aboutsummaryrefslogtreecommitdiff
path: root/original
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2013-12-20 12:03:38 -0800
committerChristopher Ferris <cferris@google.com>2013-12-20 12:03:38 -0800
commit95b0d657f7652e1f5b13e67d19b513b31c2dd081 (patch)
tree6f8f1c60c1f4ebdf5190e837d0aebe4829461d41 /original
parentf33e18504a904ed9c7f683ccbb6f6abc69329338 (diff)
downloadkernel-headers-95b0d657f7652e1f5b13e67d19b513b31c2dd081.tar.gz
Remove the non-uapi kernel header files.
Bug: 11559337 Change-Id: Id0d339407d071b8952f9e341f324f6eccfe0b5e0
Diffstat (limited to 'original')
-rw-r--r--original/asm-arm/a.out.h39
-rw-r--r--original/asm-arm/arch/board-perseus2.h45
-rw-r--r--original/asm-arm/arch/board.h190
-rw-r--r--original/asm-arm/arch/cpu.h252
-rw-r--r--original/asm-arm/arch/dma.h430
-rw-r--r--original/asm-arm/arch/fpga.h198
-rw-r--r--original/asm-arm/arch/gpio-switch.h54
-rw-r--r--original/asm-arm/arch/gpio.h89
-rw-r--r--original/asm-arm/arch/hardware.h347
-rw-r--r--original/asm-arm/arch/io.h132
-rw-r--r--original/asm-arm/arch/irqs.h290
-rw-r--r--original/asm-arm/arch/mcbsp.h322
-rw-r--r--original/asm-arm/arch/memory.h103
-rw-r--r--original/asm-arm/arch/mtd-xip.h61
-rw-r--r--original/asm-arm/arch/mux.h552
-rw-r--r--original/asm-arm/arch/omap24xx.h26
-rw-r--r--original/asm-arm/arch/serial.h37
-rw-r--r--original/asm-arm/arch/timex.h41
-rw-r--r--original/asm-arm/arch/vmalloc.h21
-rw-r--r--original/asm-arm/atomic.h211
-rw-r--r--original/asm-arm/auxvec.h4
-rw-r--r--original/asm-arm/bitops.h326
-rw-r--r--original/asm-arm/byteorder.h58
-rw-r--r--original/asm-arm/cache.h10
-rw-r--r--original/asm-arm/cacheflush.h413
-rw-r--r--original/asm-arm/cputime.h6
-rw-r--r--original/asm-arm/delay.h44
-rw-r--r--original/asm-arm/div64.h48
-rw-r--r--original/asm-arm/dma-mapping.h437
-rw-r--r--original/asm-arm/dma.h143
-rw-r--r--original/asm-arm/domain.h77
-rw-r--r--original/asm-arm/dyntick.h6
-rw-r--r--original/asm-arm/errno.h6
-rw-r--r--original/asm-arm/fcntl.h11
-rw-r--r--original/asm-arm/fpstate.h85
-rw-r--r--original/asm-arm/glue.h113
-rw-r--r--original/asm-arm/hardirq.h32
-rw-r--r--original/asm-arm/hardware.h18
-rw-r--r--original/asm-arm/hw_irq.h20
-rw-r--r--original/asm-arm/ide.h36
-rw-r--r--original/asm-arm/io.h302
-rw-r--r--original/asm-arm/ioctl.h1
-rw-r--r--original/asm-arm/ioctls.h80
-rw-r--r--original/asm-arm/ipcbuf.h29
-rw-r--r--original/asm-arm/irq.h42
-rw-r--r--original/asm-arm/linkage.h7
-rw-r--r--original/asm-arm/local.h1
-rw-r--r--original/asm-arm/locks.h274
-rw-r--r--original/asm-arm/mc146818rtc.h28
-rw-r--r--original/asm-arm/memory.h292
-rw-r--r--original/asm-arm/mman.h17
-rw-r--r--original/asm-arm/module.h18
-rw-r--r--original/asm-arm/msgbuf.h31
-rw-r--r--original/asm-arm/mtd-xip.h26
-rw-r--r--original/asm-arm/param.h31
-rw-r--r--original/asm-arm/percpu.h6
-rw-r--r--original/asm-arm/pgalloc.h133
-rw-r--r--original/asm-arm/pgtable-hwdef.h90
-rw-r--r--original/asm-arm/pgtable.h389
-rw-r--r--original/asm-arm/poll.h27
-rw-r--r--original/asm-arm/posix_types.h81
-rw-r--r--original/asm-arm/proc-fns.h185
-rw-r--r--original/asm-arm/processor.h126
-rw-r--r--original/asm-arm/procinfo.h60
-rw-r--r--original/asm-arm/ptrace.h163
-rw-r--r--original/asm-arm/resource.h6
-rw-r--r--original/asm-arm/scatterlist.h24
-rw-r--r--original/asm-arm/semaphore.h99
-rw-r--r--original/asm-arm/sembuf.h25
-rw-r--r--original/asm-arm/shmbuf.h42
-rw-r--r--original/asm-arm/shmparam.h16
-rw-r--r--original/asm-arm/sigcontext.h34
-rw-r--r--original/asm-arm/siginfo.h6
-rw-r--r--original/asm-arm/signal.h164
-rw-r--r--original/asm-arm/sizes.h52
-rw-r--r--original/asm-arm/smp.h137
-rw-r--r--original/asm-arm/socket.h68
-rw-r--r--original/asm-arm/sockios.h12
-rw-r--r--original/asm-arm/spinlock.h221
-rw-r--r--original/asm-arm/spinlock_types.h20
-rw-r--r--original/asm-arm/stat.h87
-rw-r--r--original/asm-arm/statfs.h42
-rw-r--r--original/asm-arm/suspend.h4
-rw-r--r--original/asm-arm/system.h453
-rw-r--r--original/asm-arm/termbits.h171
-rw-r--r--original/asm-arm/termios.h108
-rw-r--r--original/asm-arm/thread_info.h154
-rw-r--r--original/asm-arm/timex.h24
-rw-r--r--original/asm-arm/tlbflush.h434
-rw-r--r--original/asm-arm/topology.h6
-rw-r--r--original/asm-arm/types.h60
-rw-r--r--original/asm-arm/uaccess.h444
-rw-r--r--original/asm-arm/ucontext.h102
-rw-r--r--original/asm-arm/unaligned.h191
-rw-r--r--original/asm-arm/unistd.h489
-rw-r--r--original/asm-arm/user.h103
-rw-r--r--original/asm-arm/vga.h12
-rw-r--r--original/asm-generic/4level-fixup.h33
-rw-r--r--original/asm-generic/audit_dir_write.h14
-rw-r--r--original/asm-generic/bitops/__ffs.h43
-rw-r--r--original/asm-generic/bitops/atomic.h191
-rw-r--r--original/asm-generic/bitops/ffz.h12
-rw-r--r--original/asm-generic/bitops/find.h13
-rw-r--r--original/asm-generic/bitops/fls.h41
-rw-r--r--original/asm-generic/bitops/fls64.h14
-rw-r--r--original/asm-generic/bitops/le.h53
-rw-r--r--original/asm-generic/bitops/non-atomic.h111
-rw-r--r--original/asm-generic/bitsperlong.h32
-rw-r--r--original/asm-generic/bug.h60
-rw-r--r--original/asm-generic/cputime.h68
-rw-r--r--original/asm-generic/emergency-restart.h9
-rw-r--r--original/asm-generic/errno-base.h39
-rw-r--r--original/asm-generic/errno.h109
-rw-r--r--original/asm-generic/fcntl.h195
-rw-r--r--original/asm-generic/futex.h59
-rw-r--r--original/asm-generic/ioctl.h80
-rw-r--r--original/asm-generic/ipc.h31
-rw-r--r--original/asm-generic/local.h62
-rw-r--r--original/asm-generic/memory_model.h80
-rw-r--r--original/asm-generic/mman-common.h54
-rw-r--r--original/asm-generic/mman.h19
-rw-r--r--original/asm-generic/mutex-xchg.h118
-rw-r--r--original/asm-generic/percpu.h45
-rw-r--r--original/asm-generic/pgtable-nopmd.h69
-rw-r--r--original/asm-generic/pgtable-nopud.h61
-rw-r--r--original/asm-generic/pgtable.h235
-rw-r--r--original/asm-generic/poll.h37
-rw-r--r--original/asm-generic/posix_types.h100
-rw-r--r--original/asm-generic/resource.h94
-rw-r--r--original/asm-generic/sections.h19
-rw-r--r--original/asm-generic/siginfo.h294
-rw-r--r--original/asm-generic/signal.h28
-rw-r--r--original/asm-generic/socket.h70
-rw-r--r--original/asm-generic/swab.h18
-rw-r--r--original/asm-generic/tlb.h148
-rw-r--r--original/asm-generic/topology.h55
-rw-r--r--original/asm-generic/ucontext.h12
-rw-r--r--original/asm-generic/xor.h718
-rw-r--r--original/linux/a.out.h268
-rw-r--r--original/linux/a1026.h234
-rw-r--r--original/linux/aio_abi.h92
-rw-r--r--original/linux/akm8973.h33
-rw-r--r--original/linux/akm8975.h83
-rw-r--r--original/linux/akm8976.h89
-rw-r--r--original/linux/android_alarm.h51
-rwxr-xr-xoriginal/linux/android_pmem.h93
-rw-r--r--original/linux/android_power.h72
-rw-r--r--original/linux/apm_bios.h218
-rw-r--r--original/linux/ashmem.h48
-rw-r--r--original/linux/ata.h369
-rw-r--r--original/linux/atm.h243
-rw-r--r--original/linux/atmapi.h29
-rw-r--r--original/linux/atmdev.h500
-rw-r--r--original/linux/atmioc.h41
-rw-r--r--original/linux/atmppp.h24
-rw-r--r--original/linux/atmsap.h162
-rw-r--r--original/linux/attribute_container.h71
-rw-r--r--original/linux/audit.h723
-rw-r--r--original/linux/auto_fs.h84
-rw-r--r--original/linux/autoconf.h8
-rw-r--r--original/linux/auxvec.h36
-rw-r--r--original/linux/backing-dev.h104
-rw-r--r--original/linux/binder.h333
-rw-r--r--original/linux/binfmts.h91
-rw-r--r--original/linux/bio.h360
-rw-r--r--original/linux/bitmap.h275
-rw-r--r--original/linux/bitops.h63
-rw-r--r--original/linux/blk_types.h195
-rw-r--r--original/linux/blkdev.h844
-rw-r--r--original/linux/blkpg.h58
-rw-r--r--original/linux/blockgroup_lock.h59
-rwxr-xr-xoriginal/linux/bmp085.h48
-rw-r--r--original/linux/byteorder/big_endian.h106
-rw-r--r--original/linux/byteorder/generic.h176
-rw-r--r--original/linux/byteorder/little_endian.h106
-rw-r--r--original/linux/byteorder/swab.h192
-rw-r--r--original/linux/byteorder/swabb.h140
-rw-r--r--original/linux/cache.h63
-rw-r--r--original/linux/calc64.h49
-rw-r--r--original/linux/can.h109
-rw-r--r--original/linux/can/bcm.h66
-rw-r--r--original/linux/can/error.h91
-rw-r--r--original/linux/can/gw.h162
-rw-r--r--original/linux/can/netlink.h122
-rw-r--r--original/linux/can/raw.h29
-rw-r--r--original/linux/capability.h358
-rw-r--r--original/linux/capella_cm3602.h38
-rw-r--r--original/linux/capi.h133
-rw-r--r--original/linux/cdev.h27
-rw-r--r--original/linux/cdrom.h1189
-rw-r--r--original/linux/circ_buf.h32
-rw-r--r--original/linux/clk.h124
-rw-r--r--original/linux/coda.h787
-rw-r--r--original/linux/coda_fs_i.h55
-rw-r--r--original/linux/compat.h232
-rw-r--r--original/linux/compiler-gcc.h32
-rw-r--r--original/linux/compiler.h159
-rw-r--r--original/linux/completion.h57
-rw-r--r--original/linux/config.h8
-rw-r--r--original/linux/console_struct.h126
-rw-r--r--original/linux/const.h24
-rw-r--r--original/linux/cpcap_audio.h76
-rw-r--r--original/linux/cpu.h92
-rw-r--r--original/linux/cpumask.h413
-rw-r--r--original/linux/ctype.h54
-rw-r--r--original/linux/dccp.h503
-rw-r--r--original/linux/debug_locks.h71
-rw-r--r--original/linux/delay.h47
-rw-r--r--original/linux/device.h444
-rw-r--r--original/linux/dirent.h32
-rw-r--r--original/linux/dm-ioctl.h302
-rw-r--r--original/linux/dma-mapping.h64
-rw-r--r--original/linux/dmaengine.h366
-rw-r--r--original/linux/efs_dir.h42
-rw-r--r--original/linux/efs_fs_i.h68
-rw-r--r--original/linux/efs_fs_sb.h62
-rw-r--r--original/linux/elevator.h153
-rw-r--r--original/linux/elf-em.h49
-rw-r--r--original/linux/err.h65
-rw-r--r--original/linux/errno.h29
-rw-r--r--original/linux/errqueue.h46
-rw-r--r--original/linux/etherdevice.h131
-rw-r--r--original/linux/ethtool.h581
-rw-r--r--original/linux/ext2_fs.h557
-rw-r--r--original/linux/ext3_fs.h871
-rw-r--r--original/linux/fadvise.h21
-rwxr-xr-xoriginal/linux/fb.h1187
-rw-r--r--original/linux/fcntl.h62
-rw-r--r--original/linux/fd.h374
-rw-r--r--original/linux/file.h116
-rw-r--r--original/linux/filter.h252
-rw-r--r--original/linux/fs.h2676
-rw-r--r--original/linux/ftape.h201
-rw-r--r--original/linux/futex.h139
-rw-r--r--original/linux/genetlink.h91
-rw-r--r--original/linux/genhd.h422
-rw-r--r--original/linux/genlock.h52
-rw-r--r--original/linux/gfp.h166
-rw-r--r--original/linux/hardirq.h129
-rw-r--r--original/linux/hdlc/ioctl.h48
-rw-r--r--original/linux/hdreg.h705
-rw-r--r--original/linux/hdsmart.h124
-rw-r--r--original/linux/hid.h847
-rw-r--r--original/linux/hidraw.h89
-rw-r--r--original/linux/highmem.h116
-rw-r--r--original/linux/hil.h483
-rw-r--r--original/linux/i2c.h655
-rw-r--r--original/linux/icmp.h96
-rw-r--r--original/linux/icmpv6.h196
-rw-r--r--original/linux/idle_stats_device.h82
-rw-r--r--original/linux/if.h224
-rw-r--r--original/linux/if_addr.h64
-rw-r--r--original/linux/if_alg.h40
-rw-r--r--original/linux/if_arcnet.h137
-rw-r--r--original/linux/if_arp.h171
-rw-r--r--original/linux/if_bridge.h113
-rw-r--r--original/linux/if_ether.h150
-rw-r--r--original/linux/if_fc.h50
-rw-r--r--original/linux/if_fddi.h199
-rw-r--r--original/linux/if_hippi.h157
-rw-r--r--original/linux/if_link.h353
-rw-r--r--original/linux/if_packet.h102
-rw-r--r--original/linux/if_ppp.h158
-rw-r--r--original/linux/if_pppol2tp.h82
-rw-r--r--original/linux/if_pppolac.h33
-rw-r--r--original/linux/if_pppopns.h32
-rw-r--r--original/linux/if_pppox.h249
-rw-r--r--original/linux/if_tr.h105
-rw-r--r--original/linux/if_tun.h108
-rw-r--r--original/linux/if_vlan.h369
-rw-r--r--original/linux/in.h255
-rw-r--r--original/linux/in6.h290
-rw-r--r--original/linux/in_route.h32
-rw-r--r--original/linux/init.h278
-rw-r--r--original/linux/inotify.h227
-rw-r--r--original/linux/input.h1663
-rw-r--r--original/linux/interrupt.h401
-rw-r--r--original/linux/ioctl.h7
-rw-r--r--original/linux/ion.h356
-rw-r--r--original/linux/ioport.h136
-rw-r--r--original/linux/ioprio.h64
-rw-r--r--original/linux/ip.h125
-rw-r--r--original/linux/ipc.h75
-rw-r--r--original/linux/ipmi_msgdefs.h102
-rw-r--r--original/linux/ipmi_smi.h209
-rw-r--r--original/linux/ipsec.h47
-rw-r--r--original/linux/ipv6.h538
-rw-r--r--original/linux/ipv6_route.h62
-rw-r--r--original/linux/ipx.h74
-rw-r--r--original/linux/irq.h411
-rw-r--r--original/linux/irq_cpustat.h31
-rw-r--r--original/linux/irqflags.h96
-rw-r--r--original/linux/irqreturn.h25
-rw-r--r--original/linux/jbd.h1099
-rw-r--r--original/linux/jiffies.h450
-rw-r--r--original/linux/kd.h175
-rw-r--r--original/linux/kdev_t.h101
-rw-r--r--original/linux/kernel.h351
-rw-r--r--original/linux/kernel_stat.h58
-rw-r--r--original/linux/kernelcapi.h161
-rw-r--r--original/linux/key.h386
-rw-r--r--original/linux/keyboard.h444
-rw-r--r--original/linux/keychord.h52
-rw-r--r--original/linux/klist.h61
-rw-r--r--original/linux/kmod.h50
-rw-r--r--original/linux/kobject.h280
-rw-r--r--original/linux/kref.h32
-rw-r--r--original/linux/ktime.h273
-rwxr-xr-xoriginal/linux/kxtf9.h125
-rw-r--r--original/linux/l3g4200d.h74
-rw-r--r--original/linux/leds-an30259a.h76
-rw-r--r--original/linux/lightsensor.h28
-rw-r--r--original/linux/limits.h22
-rw-r--r--original/linux/linkage.h63
-rw-r--r--original/linux/lis331dlh.h63
-rw-r--r--original/linux/list.h889
-rw-r--r--original/linux/lockd/nlm.h57
-rw-r--r--original/linux/lockd/xdr.h109
-rw-r--r--original/linux/lockdep.h353
-rw-r--r--original/linux/loop.h162
-rw-r--r--original/linux/magic.h46
-rw-r--r--original/linux/major.h169
-rw-r--r--original/linux/max9635.h52
-rw-r--r--original/linux/mc146818rtc.h99
-rw-r--r--original/linux/mca.h146
-rw-r--r--original/linux/media.h132
-rw-r--r--original/linux/mempolicy.h277
-rw-r--r--original/linux/mempool.h79
-rw-r--r--original/linux/mfd/timpani-audio.h5016
-rw-r--r--original/linux/mfd/wcd9xxx/wcd9310_registers.h1117
-rw-r--r--original/linux/mfd/wcd9xxx/wcd9xxx_registers.h42
-rw-r--r--original/linux/miscdevice.h51
-rw-r--r--original/linux/mm.h1077
-rw-r--r--original/linux/mmc/card.h113
-rw-r--r--original/linux/mmc/host.h136
-rw-r--r--original/linux/mmc/mmc.h119
-rw-r--r--original/linux/mmzone.h641
-rw-r--r--original/linux/mod_devicetable.h300
-rw-r--r--original/linux/module.h588
-rw-r--r--original/linux/moduleparam.h175
-rw-r--r--original/linux/mount.h100
-rw-r--r--original/linux/mroute6.h266
-rw-r--r--original/linux/msdos_fs.h447
-rw-r--r--original/linux/msg.h97
-rw-r--r--original/linux/mt9t013.h157
-rw-r--r--original/linux/mtd/bbm.h125
-rw-r--r--original/linux/mtd/blktrans.h72
-rw-r--r--original/linux/mtd/cfi.h491
-rw-r--r--original/linux/mtd/cfi_endian.h57
-rw-r--r--original/linux/mtd/compatmac.h10
-rw-r--r--original/linux/mtd/flashchip.h90
-rw-r--r--original/linux/mtd/map.h436
-rw-r--r--original/linux/mtd/mtd.h268
-rw-r--r--original/linux/mtd/nand.h573
-rw-r--r--original/linux/mtd/nand_ecc.h30
-rw-r--r--original/linux/mtd/nftl.h54
-rw-r--r--original/linux/mtd/onenand_regs.h188
-rw-r--r--original/linux/mtd/partitions.h75
-rw-r--r--original/linux/mtio.h351
-rw-r--r--original/linux/mutex-debug.h23
-rw-r--r--original/linux/mutex.h139
-rw-r--r--original/linux/ncp.h201
-rw-r--r--original/linux/ncp_mount.h93
-rw-r--r--original/linux/ncp_no.h19
-rw-r--r--original/linux/neighbour.h161
-rw-r--r--original/linux/net.h308
-rw-r--r--original/linux/netdevice.h1044
-rw-r--r--original/linux/netfilter.h366
-rw-r--r--original/linux/netfilter/nf_conntrack_common.h166
-rw-r--r--original/linux/netfilter/nf_conntrack_ftp.h44
-rw-r--r--original/linux/netfilter/nf_conntrack_sctp.h27
-rw-r--r--original/linux/netfilter/nf_conntrack_tcp.h56
-rw-r--r--original/linux/netfilter/nf_conntrack_tuple_common.h13
-rw-r--r--original/linux/netfilter/nfnetlink.h176
-rw-r--r--original/linux/netfilter/nfnetlink_conntrack.h175
-rw-r--r--original/linux/netfilter/x_tables.h398
-rw-r--r--original/linux/netfilter/xt_CLASSIFY.h8
-rw-r--r--original/linux/netfilter/xt_CONNMARK.h25
-rw-r--r--original/linux/netfilter/xt_CONNSECMARK.h13
-rw-r--r--original/linux/netfilter/xt_IDLETIMER.h53
-rw-r--r--original/linux/netfilter/xt_MARK.h21
-rw-r--r--original/linux/netfilter/xt_NFQUEUE.h16
-rw-r--r--original/linux/netfilter/xt_SECMARK.h26
-rw-r--r--original/linux/netfilter/xt_comment.h10
-rw-r--r--original/linux/netfilter/xt_connbytes.h25
-rw-r--r--original/linux/netfilter/xt_connmark.h18
-rw-r--r--original/linux/netfilter/xt_conntrack.h63
-rw-r--r--original/linux/netfilter/xt_dccp.h23
-rw-r--r--original/linux/netfilter/xt_esp.h14
-rw-r--r--original/linux/netfilter/xt_helper.h8
-rw-r--r--original/linux/netfilter/xt_length.h9
-rw-r--r--original/linux/netfilter/xt_limit.h21
-rw-r--r--original/linux/netfilter/xt_mac.h8
-rw-r--r--original/linux/netfilter/xt_mark.h9
-rw-r--r--original/linux/netfilter/xt_multiport.h30
-rw-r--r--original/linux/netfilter/xt_physdev.h24
-rw-r--r--original/linux/netfilter/xt_pkttype.h8
-rw-r--r--original/linux/netfilter/xt_quota.h16
-rw-r--r--original/linux/netfilter/xt_realm.h10
-rw-r--r--original/linux/netfilter/xt_sctp.h107
-rw-r--r--original/linux/netfilter/xt_state.h13
-rw-r--r--original/linux/netfilter/xt_statistic.h32
-rw-r--r--original/linux/netfilter/xt_string.h18
-rw-r--r--original/linux/netfilter/xt_tcpmss.h9
-rw-r--r--original/linux/netfilter/xt_tcpudp.h36
-rw-r--r--original/linux/netfilter_arp.h19
-rw-r--r--original/linux/netfilter_arp/arp_tables.h256
-rw-r--r--original/linux/netfilter_bridge.h96
-rw-r--r--original/linux/netfilter_ipv4.h86
-rw-r--r--original/linux/netfilter_ipv4/ip_conntrack.h395
-rw-r--r--original/linux/netfilter_ipv4/ip_conntrack_tuple.h146
-rw-r--r--original/linux/netfilter_ipv4/ip_nat.h82
-rw-r--r--original/linux/netfilter_ipv4/ip_nat_rule.h28
-rw-r--r--original/linux/netfilter_ipv4/ip_queue.h72
-rw-r--r--original/linux/netfilter_ipv4/ip_tables.h338
-rw-r--r--original/linux/netfilter_ipv4/ipt_CLASSIFY.h7
-rw-r--r--original/linux/netfilter_ipv4/ipt_DSCP.h20
-rw-r--r--original/linux/netfilter_ipv4/ipt_ECN.h31
-rw-r--r--original/linux/netfilter_ipv4/ipt_LOG.h18
-rw-r--r--original/linux/netfilter_ipv4/ipt_NFQUEUE.h16
-rw-r--r--original/linux/netfilter_ipv4/ipt_REJECT.h20
-rw-r--r--original/linux/netfilter_ipv4/ipt_TCPMSS.h10
-rw-r--r--original/linux/netfilter_ipv4/ipt_TOS.h12
-rw-r--r--original/linux/netfilter_ipv4/ipt_TTL.h21
-rw-r--r--original/linux/netfilter_ipv4/ipt_ULOG.h49
-rw-r--r--original/linux/netfilter_ipv4/ipt_addrtype.h11
-rw-r--r--original/linux/netfilter_ipv4/ipt_ah.h16
-rw-r--r--original/linux/netfilter_ipv4/ipt_comment.h10
-rw-r--r--original/linux/netfilter_ipv4/ipt_connbytes.h18
-rw-r--r--original/linux/netfilter_ipv4/ipt_dccp.h15
-rw-r--r--original/linux/netfilter_ipv4/ipt_dscp_.h23
-rw-r--r--original/linux/netfilter_ipv4/ipt_esp.h10
-rw-r--r--original/linux/netfilter_ipv4/ipt_hashlimit.h40
-rw-r--r--original/linux/netfilter_ipv4/ipt_helper.h7
-rw-r--r--original/linux/netfilter_ipv4/ipt_iprange.h23
-rw-r--r--original/linux/netfilter_ipv4/ipt_length.h7
-rw-r--r--original/linux/netfilter_ipv4/ipt_mac.h7
-rw-r--r--original/linux/netfilter_ipv4/ipt_owner.h20
-rw-r--r--original/linux/netfilter_ipv4/ipt_physdev.h17
-rw-r--r--original/linux/netfilter_ipv4/ipt_pkttype.h7
-rw-r--r--original/linux/netfilter_ipv4/ipt_realm.h7
-rw-r--r--original/linux/netfilter_ipv4/ipt_recent.h27
-rw-r--r--original/linux/netfilter_ipv4/ipt_sctp.h105
-rw-r--r--original/linux/netfilter_ipv4/ipt_state.h15
-rw-r--r--original/linux/netfilter_ipv4/ipt_string.h10
-rw-r--r--original/linux/netfilter_ipv4/ipt_tos_.h13
-rw-r--r--original/linux/netfilter_ipv6.h90
-rw-r--r--original/linux/netfilter_ipv6/ip6_tables.h319
-rw-r--r--original/linux/netfilter_ipv6/ip6t_HL.h22
-rw-r--r--original/linux/netfilter_ipv6/ip6t_LOG.h18
-rw-r--r--original/linux/netfilter_ipv6/ip6t_REJECT.h18
-rw-r--r--original/linux/netfilter_ipv6/ip6t_ah.h21
-rw-r--r--original/linux/netfilter_ipv6/ip6t_esp.h10
-rw-r--r--original/linux/netfilter_ipv6/ip6t_frag.h24
-rw-r--r--original/linux/netfilter_ipv6/ip6t_hl.h22
-rw-r--r--original/linux/netfilter_ipv6/ip6t_ipv6header.h27
-rw-r--r--original/linux/netfilter_ipv6/ip6t_length.h8
-rw-r--r--original/linux/netfilter_ipv6/ip6t_mac.h7
-rw-r--r--original/linux/netfilter_ipv6/ip6t_opts.h23
-rw-r--r--original/linux/netfilter_ipv6/ip6t_owner.h18
-rw-r--r--original/linux/netfilter_ipv6/ip6t_physdev.h17
-rw-r--r--original/linux/netfilter_ipv6/ip6t_rt.h33
-rw-r--r--original/linux/netlink.h185
-rw-r--r--original/linux/nfs.h171
-rw-r--r--original/linux/nfs2.h74
-rw-r--r--original/linux/nfs3.h105
-rw-r--r--original/linux/nfs4.h403
-rw-r--r--original/linux/nfs_xdr.h842
-rw-r--r--original/linux/nfsacl.h58
-rw-r--r--original/linux/nfsd/auth.h27
-rw-r--r--original/linux/nfsd/const.h45
-rw-r--r--original/linux/nfsd/debug.h48
-rw-r--r--original/linux/nfsd/export.h120
-rw-r--r--original/linux/nfsd/interface.h13
-rw-r--r--original/linux/nfsd/nfsfh.h342
-rw-r--r--original/linux/nfsd/stats.h50
-rw-r--r--original/linux/nfsd/xdr.h179
-rw-r--r--original/linux/node.h59
-rw-r--r--original/linux/nodemask.h379
-rw-r--r--original/linux/notifier.h158
-rw-r--r--original/linux/numa.h13
-rw-r--r--original/linux/nvhdcp.h91
-rw-r--r--original/linux/nvram.h25
-rw-r--r--original/linux/omap_csmi.h128
-rw-r--r--original/linux/omap_ion.h85
-rw-r--r--original/linux/pagemap.h216
-rw-r--r--original/linux/param.h6
-rw-r--r--original/linux/patchkey.h45
-rw-r--r--original/linux/pci.h791
-rw-r--r--original/linux/pci_ids.h2331
-rw-r--r--original/linux/pci_regs.h466
-rw-r--r--original/linux/percpu.h59
-rw-r--r--original/linux/percpu_counter.h114
-rw-r--r--original/linux/perf_event.h1082
-rw-r--r--original/linux/personality.h121
-rw-r--r--original/linux/pfkeyv2.h348
-rw-r--r--original/linux/pkt_cls.h494
-rw-r--r--original/linux/pkt_sched.h521
-rw-r--r--original/linux/platform_device.h62
-rw-r--r--original/linux/plist.h248
-rw-r--r--original/linux/pm.h244
-rwxr-xr-xoriginal/linux/pn544.h33
-rw-r--r--original/linux/pnp.h464
-rw-r--r--original/linux/poll.h120
-rw-r--r--original/linux/posix_acl.h86
-rw-r--r--original/linux/posix_types.h37
-rw-r--r--original/linux/ppdev.h99
-rw-r--r--original/linux/ppp_defs.h184
-rw-r--r--original/linux/prctl.h150
-rw-r--r--original/linux/preempt.h63
-rw-r--r--original/linux/proc_fs.h275
-rw-r--r--original/linux/ptrace.h131
-rw-r--r--original/linux/qic117.h290
-rw-r--r--original/linux/qnxtypes.h29
-rw-r--r--original/linux/quota.h329
-rw-r--r--original/linux/raid/md.h99
-rw-r--r--original/linux/raid/md_k.h366
-rw-r--r--original/linux/raid/md_p.h276
-rw-r--r--original/linux/raid/md_u.h124
-rw-r--r--original/linux/raid/xor.h23
-rw-r--r--original/linux/random.h74
-rw-r--r--original/linux/rbtree.h161
-rw-r--r--original/linux/rcupdate.h289
-rw-r--r--original/linux/reboot.h79
-rw-r--r--original/linux/relay.h280
-rw-r--r--original/linux/resource.h74
-rw-r--r--original/linux/route.h70
-rw-r--r--original/linux/rpmsg_omx.h144
-rw-r--r--original/linux/rtc.h215
-rw-r--r--original/linux/rtnetlink.h773
-rw-r--r--original/linux/rwsem.h94
-rw-r--r--original/linux/sched.h1616
-rw-r--r--original/linux/seccomp.h133
-rw-r--r--original/linux/securebits.h51
-rw-r--r--original/linux/sem.h160
-rw-r--r--original/linux/seq_file.h54
-rw-r--r--original/linux/seqlock.h182
-rw-r--r--original/linux/serial_core.h532
-rw-r--r--original/linux/serial_reg.h325
-rw-r--r--original/linux/serio.h221
-rwxr-xr-xoriginal/linux/sfh7743.h42
-rw-r--r--original/linux/shm.h109
-rw-r--r--original/linux/signal.h246
-rw-r--r--original/linux/signalfd.h76
-rw-r--r--original/linux/skbuff.h1502
-rw-r--r--original/linux/slab.h270
-rw-r--r--original/linux/smb.h117
-rw-r--r--original/linux/smp.h130
-rw-r--r--original/linux/smp_lock.h52
-rw-r--r--original/linux/sock_diag.h26
-rw-r--r--original/linux/socket.h343
-rw-r--r--original/linux/sockios.h144
-rw-r--r--original/linux/soundcard.h1318
-rw-r--r--original/linux/spi/cpcap.h797
-rw-r--r--original/linux/spinlock.h275
-rw-r--r--original/linux/spinlock_api_smp.h59
-rw-r--r--original/linux/spinlock_api_up.h81
-rw-r--r--original/linux/spinlock_types.h94
-rw-r--r--original/linux/spinlock_types_up.h44
-rw-r--r--original/linux/spinlock_up.h73
-rw-r--r--original/linux/stacktrace.h20
-rw-r--r--original/linux/stat.h77
-rw-r--r--original/linux/statfs.h22
-rw-r--r--original/linux/stddef.h28
-rw-r--r--original/linux/string.h108
-rw-r--r--original/linux/stringify.h12
-rw-r--r--original/linux/sunrpc/auth.h155
-rw-r--r--original/linux/sunrpc/auth_gss.h97
-rw-r--r--original/linux/sunrpc/clnt.h150
-rw-r--r--original/linux/sunrpc/debug.h100
-rw-r--r--original/linux/sunrpc/gss_api.h135
-rw-r--r--original/linux/sunrpc/gss_asn1.h81
-rw-r--r--original/linux/sunrpc/gss_err.h167
-rw-r--r--original/linux/sunrpc/msg_prot.h105
-rw-r--r--original/linux/sunrpc/sched.h305
-rw-r--r--original/linux/sunrpc/stats.h77
-rw-r--r--original/linux/sunrpc/svc.h323
-rw-r--r--original/linux/sunrpc/svcauth.h169
-rw-r--r--original/linux/sunrpc/timer.h49
-rw-r--r--original/linux/sunrpc/types.h22
-rw-r--r--original/linux/sunrpc/xdr.h201
-rw-r--r--original/linux/sunrpc/xprt.h317
-rw-r--r--original/linux/sw_sync.h58
-rw-r--r--original/linux/swab.h299
-rw-r--r--original/linux/swap.h364
-rw-r--r--original/linux/sync.h419
-rw-r--r--original/linux/sysctl.h1024
-rw-r--r--original/linux/sysdev.h111
-rw-r--r--original/linux/sysfs.h204
-rw-r--r--original/linux/taskstats.h213
-rw-r--r--original/linux/taskstats_kern.h89
-rw-r--r--original/linux/tcp.h382
-rw-r--r--original/linux/tegra_audio.h57
-rw-r--r--original/linux/tegra_avp.h41
-rw-r--r--original/linux/tegra_rpc.h47
-rw-r--r--original/linux/tegra_sema.h34
-rw-r--r--original/linux/tegrafb.h98
-rw-r--r--original/linux/telephony.h266
-rw-r--r--original/linux/termios.h7
-rw-r--r--original/linux/textsearch.h182
-rw-r--r--original/linux/thread_info.h71
-rw-r--r--original/linux/threads.h36
-rw-r--r--original/linux/time.h69
-rw-r--r--original/linux/timer.h101
-rw-r--r--original/linux/timerfd.h32
-rw-r--r--original/linux/times.h13
-rw-r--r--original/linux/timex.h316
-rw-r--r--original/linux/tiocl.h39
-rw-r--r--original/linux/tpa2018d1.h36
-rw-r--r--original/linux/transport_class.h100
-rw-r--r--original/linux/tty.h345
-rw-r--r--original/linux/types.h210
-rw-r--r--original/linux/ublock.h88
-rw-r--r--original/linux/udp.h62
-rw-r--r--original/linux/ufs_fs_i.h34
-rw-r--r--original/linux/ufs_fs_sb.h38
-rw-r--r--original/linux/uhid.h104
-rw-r--r--original/linux/uinput.h176
-rw-r--r--original/linux/uio.h66
-rw-r--r--original/linux/un.h11
-rw-r--r--original/linux/unistd.h13
-rw-r--r--original/linux/usb.h1222
-rw-r--r--original/linux/usb/ch9.h942
-rw-r--r--original/linux/usb/f_accessory.h148
-rw-r--r--original/linux/usb/f_mtp.h73
-rw-r--r--original/linux/usb/functionfs.h199
-rw-r--r--original/linux/usb_ch9.h562
-rw-r--r--original/linux/usbdevice_fs.h177
-rw-r--r--original/linux/user.h1
-rw-r--r--original/linux/utime.h9
-rw-r--r--original/linux/utsname.h36
-rw-r--r--original/linux/v4l2-mediabus.h114
-rw-r--r--original/linux/version.h2
-rw-r--r--original/linux/vfs.h6
-rw-r--r--original/linux/videodev.h322
-rw-r--r--original/linux/videodev2.h2573
-rw-r--r--original/linux/vmalloc.h78
-rw-r--r--original/linux/vt.h65
-rw-r--r--original/linux/vt_buffer.h63
-rw-r--r--original/linux/wait.h454
-rw-r--r--original/linux/wanrouter.h540
-rw-r--r--original/linux/watchdog.h155
-rw-r--r--original/linux/wireless.h1070
-rw-r--r--original/linux/workqueue.h101
-rw-r--r--original/linux/xattr.h61
-rw-r--r--original/linux/zconf.h57
-rw-r--r--original/linux/zlib.h702
-rw-r--r--original/linux/zorro_ids.h552
-rwxr-xr-xoriginal/media/ov5650.h77
-rwxr-xr-xoriginal/media/soc2030.h121
-rw-r--r--original/media/tegra_camera.h38
-rw-r--r--original/media/v4l2-mediabus.h107
-rw-r--r--original/mtd/mtd-abi.h151
-rw-r--r--original/mtd/mtd-user.h21
-rw-r--r--original/sound/asound.h911
-rw-r--r--original/sound/compress_offload.h201
-rw-r--r--original/sound/compress_params.h419
-rw-r--r--original/sound/tlv.h76
-rw-r--r--original/video/dsscomp.h644
659 files changed, 0 insertions, 122786 deletions
diff --git a/original/asm-arm/a.out.h b/original/asm-arm/a.out.h
deleted file mode 100644
index 3e5fe64..0000000
--- a/original/asm-arm/a.out.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef __ARM_A_OUT_H__
-#define __ARM_A_OUT_H__
-
-#include <linux/personality.h>
-#include <asm/types.h>
-
-struct exec
-{
- __u32 a_info; /* Use macros N_MAGIC, etc for access */
- __u32 a_text; /* length of text, in bytes */
- __u32 a_data; /* length of data, in bytes */
- __u32 a_bss; /* length of uninitialized data area for file, in bytes */
- __u32 a_syms; /* length of symbol table data in file, in bytes */
- __u32 a_entry; /* start address */
- __u32 a_trsize; /* length of relocation info for text, in bytes */
- __u32 a_drsize; /* length of relocation info for data, in bytes */
-};
-
-/*
- * This is always the same
- */
-#define N_TXTADDR(a) (0x00008000)
-
-#define N_TRSIZE(a) ((a).a_trsize)
-#define N_DRSIZE(a) ((a).a_drsize)
-#define N_SYMSIZE(a) ((a).a_syms)
-
-#define M_ARM 103
-
-#ifdef __KERNEL__
-#define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \
- TASK_SIZE : TASK_SIZE_26)
-#endif
-
-#ifndef LIBRARY_START_TEXT
-#define LIBRARY_START_TEXT (0x00c00000)
-#endif
-
-#endif /* __A_OUT_GNU_H__ */
diff --git a/original/asm-arm/arch/board-perseus2.h b/original/asm-arm/arch/board-perseus2.h
deleted file mode 100644
index eb74420..0000000
--- a/original/asm-arm/arch/board-perseus2.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/board-perseus2.h
- *
- * Copyright 2003 by Texas Instruments Incorporated
- * OMAP730 / Perseus2 support by Jean Pihet
- *
- * Copyright (C) 2001 RidgeRun, Inc. (http://www.ridgerun.com)
- * Author: RidgeRun, 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.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef __ASM_ARCH_OMAP_PERSEUS2_H
-#define __ASM_ARCH_OMAP_PERSEUS2_H
-
-#include <asm/arch/fpga.h>
-
-#ifndef OMAP_SDRAM_DEVICE
-#define OMAP_SDRAM_DEVICE D256M_1X16_4B
-#endif
-
-#define MAXIRQNUM IH_BOARD_BASE
-#define MAXFIQNUM MAXIRQNUM
-#define MAXSWINUM MAXIRQNUM
-
-#define NR_IRQS (MAXIRQNUM + 1)
-
-#endif
diff --git a/original/asm-arm/arch/board.h b/original/asm-arm/arch/board.h
deleted file mode 100644
index 94867cb..0000000
--- a/original/asm-arm/arch/board.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/board.h
- *
- * Information structures for board-specific data
- *
- * Copyright (C) 2004 Nokia Corporation
- * Written by Juha Yrjölä <juha.yrjola@nokia.com>
- */
-
-#ifndef _OMAP_BOARD_H
-#define _OMAP_BOARD_H
-
-#include <linux/types.h>
-
-#include <asm/arch/gpio-switch.h>
-
-/* Different peripheral ids */
-#define OMAP_TAG_CLOCK 0x4f01
-#define OMAP_TAG_MMC 0x4f02
-#define OMAP_TAG_SERIAL_CONSOLE 0x4f03
-#define OMAP_TAG_USB 0x4f04
-#define OMAP_TAG_LCD 0x4f05
-#define OMAP_TAG_GPIO_SWITCH 0x4f06
-#define OMAP_TAG_UART 0x4f07
-#define OMAP_TAG_FBMEM 0x4f08
-#define OMAP_TAG_STI_CONSOLE 0x4f09
-#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
-#define OMAP_TAG_BT 0x4f0b
-
-#define OMAP_TAG_BOOT_REASON 0x4f80
-#define OMAP_TAG_FLASH_PART 0x4f81
-#define OMAP_TAG_VERSION_STR 0x4f82
-
-struct omap_clock_config {
- /* 0 for 12 MHz, 1 for 13 MHz and 2 for 19.2 MHz */
- u8 system_clock_type;
-};
-
-struct omap_mmc_conf {
- unsigned enabled:1;
- /* nomux means "standard" muxing is wrong on this board, and that
- * board-specific code handled it before common init logic.
- */
- unsigned nomux:1;
- /* switch pin can be for card detect (default) or card cover */
- unsigned cover:1;
- /* 4 wire signaling is optional, and is only used for SD/SDIO */
- unsigned wire4:1;
- s16 power_pin;
- s16 switch_pin;
- s16 wp_pin;
-};
-
-struct omap_mmc_config {
- struct omap_mmc_conf mmc[2];
-};
-
-struct omap_serial_console_config {
- u8 console_uart;
- u32 console_speed;
-};
-
-struct omap_sti_console_config {
- unsigned enable:1;
- u8 channel;
-};
-
-struct omap_camera_sensor_config {
- u16 reset_gpio;
- int (*power_on)(void * data);
- int (*power_off)(void * data);
-};
-
-struct omap_usb_config {
- /* Configure drivers according to the connectors on your board:
- * - "A" connector (rectagular)
- * ... for host/OHCI use, set "register_host".
- * - "B" connector (squarish) or "Mini-B"
- * ... for device/gadget use, set "register_dev".
- * - "Mini-AB" connector (very similar to Mini-B)
- * ... for OTG use as device OR host, initialize "otg"
- */
- unsigned register_host:1;
- unsigned register_dev:1;
- u8 otg; /* port number, 1-based: usb1 == 2 */
-
- u8 hmc_mode;
-
- /* implicitly true if otg: host supports remote wakeup? */
- u8 rwc;
-
- /* signaling pins used to talk to transceiver on usbN:
- * 0 == usbN unused
- * 2 == usb0-only, using internal transceiver
- * 3 == 3 wire bidirectional
- * 4 == 4 wire bidirectional
- * 6 == 6 wire unidirectional (or TLL)
- */
- u8 pins[3];
-};
-
-struct omap_lcd_config {
- char panel_name[16];
- char ctrl_name[16];
- s16 nreset_gpio;
- u8 data_lines;
-};
-
-struct device;
-struct fb_info;
-struct omap_backlight_config {
- int default_intensity;
- int (*set_power)(struct device *dev, int state);
- int (*check_fb)(struct fb_info *fb);
-};
-
-struct omap_fbmem_config {
- u32 start;
- u32 size;
-};
-
-struct omap_pwm_led_platform_data {
- const char *name;
- int intensity_timer;
- int blink_timer;
- void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
-};
-
-/* See include/asm-arm/arch-omap/gpio-switch.h for definitions */
-struct omap_gpio_switch_config {
- char name[12];
- u16 gpio;
- int flags:4;
- int type:4;
- int key_code:24; /* Linux key code */
-};
-
-struct omap_uart_config {
- /* Bit field of UARTs present; bit 0 --> UART1 */
- unsigned int enabled_uarts;
-};
-
-
-struct omap_flash_part_config {
- char part_table[0];
-};
-
-struct omap_boot_reason_config {
- char reason_str[12];
-};
-
-struct omap_version_config {
- char component[12];
- char version[12];
-};
-
-struct omap_board_config_entry {
- u16 tag;
- u16 len;
- u8 data[0];
-};
-
-struct omap_board_config_kernel {
- u16 tag;
- const void *data;
-};
-
-struct omap_bluetooth_config {
- u8 chip_type;
- u8 bt_uart;
- u8 bd_addr[6];
- u8 bt_sysclk;
- int bt_wakeup_gpio;
- int host_wakeup_gpio;
- int reset_gpio;
-};
-
-extern const void *__omap_get_config(u16 tag, size_t len, int nr);
-
-#define omap_get_config(tag, type) \
- ((const type *) __omap_get_config((tag), sizeof(type), 0))
-#define omap_get_nr_config(tag, type, nr) \
- ((const type *) __omap_get_config((tag), sizeof(type), (nr)))
-
-extern const void *omap_get_var_config(u16 tag, size_t *len);
-
-extern struct omap_board_config_kernel *omap_board_config;
-extern int omap_board_config_size;
-
-#endif
diff --git a/original/asm-arm/arch/cpu.h b/original/asm-arm/arch/cpu.h
deleted file mode 100644
index ec7eb67..0000000
--- a/original/asm-arm/arch/cpu.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/cpu.h
- *
- * OMAP cpu type detection
- *
- * Copyright (C) 2004 Nokia Corporation
- *
- * Written by Tony Lindgren <tony.lindgren@nokia.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef __ASM_ARCH_OMAP_CPU_H
-#define __ASM_ARCH_OMAP_CPU_H
-
-extern unsigned int system_rev;
-
-#define omap2_cpu_rev() ((system_rev >> 8) & 0x0f)
-
-/*
- * Test if multicore OMAP support is needed
- */
-#undef MULTI_OMAP1
-#undef MULTI_OMAP2
-#undef OMAP_NAME
-
-#ifdef CONFIG_ARCH_OMAP730
-# ifdef OMAP_NAME
-# undef MULTI_OMAP1
-# define MULTI_OMAP1
-# else
-# define OMAP_NAME omap730
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP15XX
-# ifdef OMAP_NAME
-# undef MULTI_OMAP1
-# define MULTI_OMAP1
-# else
-# define OMAP_NAME omap1510
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP16XX
-# ifdef OMAP_NAME
-# undef MULTI_OMAP1
-# define MULTI_OMAP1
-# else
-# define OMAP_NAME omap16xx
-# endif
-#endif
-#ifdef CONFIG_ARCH_OMAP24XX
-# if (defined(OMAP_NAME) || defined(MULTI_OMAP1))
-# error "OMAP1 and OMAP2 can't be selected at the same time"
-# else
-# undef MULTI_OMAP2
-# define OMAP_NAME omap24xx
-# endif
-#endif
-
-/*
- * Macros to group OMAP into cpu classes.
- * These can be used in most places.
- * cpu_is_omap7xx(): True for OMAP730
- * cpu_is_omap15xx(): True for OMAP1510, OMAP5910 and OMAP310
- * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710
- * cpu_is_omap24xx(): True for OMAP2420, OMAP2422, OMAP2423, OMAP2430
- * cpu_is_omap242x(): True for OMAP2420, OMAP2422, OMAP2423
- * cpu_is_omap243x(): True for OMAP2430
- */
-#define GET_OMAP_CLASS (system_rev & 0xff)
-
-#define IS_OMAP_CLASS(class, id) \
-static inline int is_omap ##class (void) \
-{ \
- return (GET_OMAP_CLASS == (id)) ? 1 : 0; \
-}
-
-#define GET_OMAP_SUBCLASS ((system_rev >> 20) & 0x0fff)
-
-#define IS_OMAP_SUBCLASS(subclass, id) \
-static inline int is_omap ##subclass (void) \
-{ \
- return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \
-}
-
-IS_OMAP_CLASS(7xx, 0x07)
-IS_OMAP_CLASS(15xx, 0x15)
-IS_OMAP_CLASS(16xx, 0x16)
-IS_OMAP_CLASS(24xx, 0x24)
-
-IS_OMAP_SUBCLASS(242x, 0x242)
-IS_OMAP_SUBCLASS(243x, 0x243)
-
-#define cpu_is_omap7xx() 0
-#define cpu_is_omap15xx() 0
-#define cpu_is_omap16xx() 0
-#define cpu_is_omap24xx() 0
-#define cpu_is_omap242x() 0
-#define cpu_is_omap243x() 0
-
-#if defined(MULTI_OMAP1)
-# if defined(CONFIG_ARCH_OMAP730)
-# undef cpu_is_omap7xx
-# define cpu_is_omap7xx() is_omap7xx()
-# endif
-# if defined(CONFIG_ARCH_OMAP15XX)
-# undef cpu_is_omap15xx
-# define cpu_is_omap15xx() is_omap15xx()
-# endif
-# if defined(CONFIG_ARCH_OMAP16XX)
-# undef cpu_is_omap16xx
-# define cpu_is_omap16xx() is_omap16xx()
-# endif
-#else
-# if defined(CONFIG_ARCH_OMAP730)
-# undef cpu_is_omap7xx
-# define cpu_is_omap7xx() 1
-# endif
-# if defined(CONFIG_ARCH_OMAP15XX)
-# undef cpu_is_omap15xx
-# define cpu_is_omap15xx() 1
-# endif
-# if defined(CONFIG_ARCH_OMAP16XX)
-# undef cpu_is_omap16xx
-# define cpu_is_omap16xx() 1
-# endif
-# if defined(CONFIG_ARCH_OMAP24XX)
-# undef cpu_is_omap24xx
-# undef cpu_is_omap242x
-# undef cpu_is_omap243x
-# define cpu_is_omap24xx() 1
-# define cpu_is_omap242x() is_omap242x()
-# define cpu_is_omap243x() is_omap243x()
-# endif
-#endif
-
-/*
- * Macros to detect individual cpu types.
- * These are only rarely needed.
- * cpu_is_omap330(): True for OMAP330
- * cpu_is_omap730(): True for OMAP730
- * cpu_is_omap1510(): True for OMAP1510
- * cpu_is_omap1610(): True for OMAP1610
- * cpu_is_omap1611(): True for OMAP1611
- * cpu_is_omap5912(): True for OMAP5912
- * cpu_is_omap1621(): True for OMAP1621
- * cpu_is_omap1710(): True for OMAP1710
- * cpu_is_omap2420(): True for OMAP2420
- * cpu_is_omap2422(): True for OMAP2422
- * cpu_is_omap2423(): True for OMAP2423
- * cpu_is_omap2430(): True for OMAP2430
- */
-#define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff)
-
-#define IS_OMAP_TYPE(type, id) \
-static inline int is_omap ##type (void) \
-{ \
- return (GET_OMAP_TYPE == (id)) ? 1 : 0; \
-}
-
-IS_OMAP_TYPE(310, 0x0310)
-IS_OMAP_TYPE(730, 0x0730)
-IS_OMAP_TYPE(1510, 0x1510)
-IS_OMAP_TYPE(1610, 0x1610)
-IS_OMAP_TYPE(1611, 0x1611)
-IS_OMAP_TYPE(5912, 0x1611)
-IS_OMAP_TYPE(1621, 0x1621)
-IS_OMAP_TYPE(1710, 0x1710)
-IS_OMAP_TYPE(2420, 0x2420)
-IS_OMAP_TYPE(2422, 0x2422)
-IS_OMAP_TYPE(2423, 0x2423)
-IS_OMAP_TYPE(2430, 0x2430)
-
-#define cpu_is_omap310() 0
-#define cpu_is_omap730() 0
-#define cpu_is_omap1510() 0
-#define cpu_is_omap1610() 0
-#define cpu_is_omap5912() 0
-#define cpu_is_omap1611() 0
-#define cpu_is_omap1621() 0
-#define cpu_is_omap1710() 0
-#define cpu_is_omap2420() 0
-#define cpu_is_omap2422() 0
-#define cpu_is_omap2423() 0
-#define cpu_is_omap2430() 0
-
-#if defined(MULTI_OMAP1)
-# if defined(CONFIG_ARCH_OMAP730)
-# undef cpu_is_omap730
-# define cpu_is_omap730() is_omap730()
-# endif
-#else
-# if defined(CONFIG_ARCH_OMAP730)
-# undef cpu_is_omap730
-# define cpu_is_omap730() 1
-# endif
-#endif
-
-/*
- * Whether we have MULTI_OMAP1 or not, we still need to distinguish
- * between 330 vs. 1510 and 1611B/5912 vs. 1710.
- */
-#if defined(CONFIG_ARCH_OMAP15XX)
-# undef cpu_is_omap310
-# undef cpu_is_omap1510
-# define cpu_is_omap310() is_omap310()
-# define cpu_is_omap1510() is_omap1510()
-#endif
-
-#if defined(CONFIG_ARCH_OMAP16XX)
-# undef cpu_is_omap1610
-# undef cpu_is_omap1611
-# undef cpu_is_omap5912
-# undef cpu_is_omap1621
-# undef cpu_is_omap1710
-# define cpu_is_omap1610() is_omap1610()
-# define cpu_is_omap1611() is_omap1611()
-# define cpu_is_omap5912() is_omap5912()
-# define cpu_is_omap1621() is_omap1621()
-# define cpu_is_omap1710() is_omap1710()
-#endif
-
-#if defined(CONFIG_ARCH_OMAP24XX)
-# undef cpu_is_omap2420
-# undef cpu_is_omap2422
-# undef cpu_is_omap2423
-# undef cpu_is_omap2430
-# define cpu_is_omap2420() is_omap2420()
-# define cpu_is_omap2422() is_omap2422()
-# define cpu_is_omap2423() is_omap2423()
-# define cpu_is_omap2430() is_omap2430()
-#endif
-
-/* Macros to detect if we have OMAP1 or OMAP2 */
-#define cpu_class_is_omap1() (cpu_is_omap730() || cpu_is_omap15xx() || \
- cpu_is_omap16xx())
-#define cpu_class_is_omap2() cpu_is_omap24xx()
-
-#endif
diff --git a/original/asm-arm/arch/dma.h b/original/asm-arm/arch/dma.h
deleted file mode 100644
index d591d05..0000000
--- a/original/asm-arm/arch/dma.h
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/dma.h
- *
- * Copyright (C) 2003 Nokia Corporation
- * Author: Juha Yrjölä <juha.yrjola@nokia.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __ASM_ARCH_DMA_H
-#define __ASM_ARCH_DMA_H
-
-/* Hardware registers for omap1 */
-#define OMAP_DMA_BASE (0xfffed800)
-#define OMAP_DMA_GCR (OMAP_DMA_BASE + 0x400)
-#define OMAP_DMA_GSCR (OMAP_DMA_BASE + 0x404)
-#define OMAP_DMA_GRST (OMAP_DMA_BASE + 0x408)
-#define OMAP_DMA_HW_ID (OMAP_DMA_BASE + 0x442)
-#define OMAP_DMA_PCH2_ID (OMAP_DMA_BASE + 0x444)
-#define OMAP_DMA_PCH0_ID (OMAP_DMA_BASE + 0x446)
-#define OMAP_DMA_PCH1_ID (OMAP_DMA_BASE + 0x448)
-#define OMAP_DMA_PCHG_ID (OMAP_DMA_BASE + 0x44a)
-#define OMAP_DMA_PCHD_ID (OMAP_DMA_BASE + 0x44c)
-#define OMAP_DMA_CAPS_0_U (OMAP_DMA_BASE + 0x44e)
-#define OMAP_DMA_CAPS_0_L (OMAP_DMA_BASE + 0x450)
-#define OMAP_DMA_CAPS_1_U (OMAP_DMA_BASE + 0x452)
-#define OMAP_DMA_CAPS_1_L (OMAP_DMA_BASE + 0x454)
-#define OMAP_DMA_CAPS_2 (OMAP_DMA_BASE + 0x456)
-#define OMAP_DMA_CAPS_3 (OMAP_DMA_BASE + 0x458)
-#define OMAP_DMA_CAPS_4 (OMAP_DMA_BASE + 0x45a)
-#define OMAP_DMA_PCH2_SR (OMAP_DMA_BASE + 0x460)
-#define OMAP_DMA_PCH0_SR (OMAP_DMA_BASE + 0x480)
-#define OMAP_DMA_PCH1_SR (OMAP_DMA_BASE + 0x482)
-#define OMAP_DMA_PCHD_SR (OMAP_DMA_BASE + 0x4c0)
-
-/* Hardware registers for omap2 */
-#define OMAP24XX_DMA_BASE (L4_24XX_BASE + 0x56000)
-#define OMAP_DMA4_REVISION (OMAP24XX_DMA_BASE + 0x00)
-#define OMAP_DMA4_GCR_REG (OMAP24XX_DMA_BASE + 0x78)
-#define OMAP_DMA4_IRQSTATUS_L0 (OMAP24XX_DMA_BASE + 0x08)
-#define OMAP_DMA4_IRQSTATUS_L1 (OMAP24XX_DMA_BASE + 0x0c)
-#define OMAP_DMA4_IRQSTATUS_L2 (OMAP24XX_DMA_BASE + 0x10)
-#define OMAP_DMA4_IRQSTATUS_L3 (OMAP24XX_DMA_BASE + 0x14)
-#define OMAP_DMA4_IRQENABLE_L0 (OMAP24XX_DMA_BASE + 0x18)
-#define OMAP_DMA4_IRQENABLE_L1 (OMAP24XX_DMA_BASE + 0x1c)
-#define OMAP_DMA4_IRQENABLE_L2 (OMAP24XX_DMA_BASE + 0x20)
-#define OMAP_DMA4_IRQENABLE_L3 (OMAP24XX_DMA_BASE + 0x24)
-#define OMAP_DMA4_SYSSTATUS (OMAP24XX_DMA_BASE + 0x28)
-#define OMAP_DMA4_CAPS_0 (OMAP24XX_DMA_BASE + 0x64)
-#define OMAP_DMA4_CAPS_2 (OMAP24XX_DMA_BASE + 0x6c)
-#define OMAP_DMA4_CAPS_3 (OMAP24XX_DMA_BASE + 0x70)
-#define OMAP_DMA4_CAPS_4 (OMAP24XX_DMA_BASE + 0x74)
-
-#ifdef CONFIG_ARCH_OMAP1
-
-#define OMAP_LOGICAL_DMA_CH_COUNT 17
-
-/* Common channel specific registers for omap1 */
-#define OMAP_DMA_CSDP_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x00)
-#define OMAP_DMA_CCR_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x02)
-#define OMAP_DMA_CICR_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x04)
-#define OMAP_DMA_CSR_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x06)
-#define OMAP_DMA_CEN_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x10)
-#define OMAP_DMA_CFN_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x12)
-#define OMAP_DMA_CSFI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x14)
-#define OMAP_DMA_CSEI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x16)
-#define OMAP_DMA_CSAC_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x18)
-#define OMAP_DMA_CDAC_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x1a)
-#define OMAP_DMA_CDEI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x1c)
-#define OMAP_DMA_CDFI_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x1e)
-#define OMAP_DMA_CLNK_CTRL_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x28)
-
-#else
-
-#define OMAP_LOGICAL_DMA_CH_COUNT 32 /* REVISIT: Is this 32 + 2? */
-
-/* Common channel specific registers for omap2 */
-#define OMAP_DMA_CCR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x80)
-#define OMAP_DMA_CLNK_CTRL_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x84)
-#define OMAP_DMA_CICR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x88)
-#define OMAP_DMA_CSR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x8c)
-#define OMAP_DMA_CSDP_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x90)
-#define OMAP_DMA_CEN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x94)
-#define OMAP_DMA_CFN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x98)
-#define OMAP_DMA_CSEI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xa4)
-#define OMAP_DMA_CSFI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xa8)
-#define OMAP_DMA_CDEI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xac)
-#define OMAP_DMA_CDFI_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xb0)
-#define OMAP_DMA_CSAC_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xb4)
-#define OMAP_DMA_CDAC_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xb8)
-
-#endif
-
-/* Channel specific registers only on omap1 */
-#define OMAP1_DMA_CSSA_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x08)
-#define OMAP1_DMA_CSSA_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0a)
-#define OMAP1_DMA_CDSA_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0c)
-#define OMAP1_DMA_CDSA_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x0e)
-#define OMAP1_DMA_COLOR_L_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x20)
-#define OMAP1_DMA_CCR2_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x24)
-#define OMAP1_DMA_COLOR_U_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x22)
-#define OMAP1_DMA_LCH_CTRL_REG(n) __REG16(OMAP_DMA_BASE + 0x40 * (n) + 0x2a)
-
-/* Channel specific registers only on omap2 */
-#define OMAP2_DMA_CSSA_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0x9c)
-#define OMAP2_DMA_CDSA_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xa0)
-#define OMAP2_DMA_CCEN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xbc)
-#define OMAP2_DMA_CCFN_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xc0)
-#define OMAP2_DMA_COLOR_REG(n) __REG32(OMAP24XX_DMA_BASE + 0x60 * (n) + 0xc4)
-
-/*----------------------------------------------------------------------------*/
-
-/* DMA channels for omap1 */
-#define OMAP_DMA_NO_DEVICE 0
-#define OMAP_DMA_MCSI1_TX 1
-#define OMAP_DMA_MCSI1_RX 2
-#define OMAP_DMA_I2C_RX 3
-#define OMAP_DMA_I2C_TX 4
-#define OMAP_DMA_EXT_NDMA_REQ 5
-#define OMAP_DMA_EXT_NDMA_REQ2 6
-#define OMAP_DMA_UWIRE_TX 7
-#define OMAP_DMA_MCBSP1_TX 8
-#define OMAP_DMA_MCBSP1_RX 9
-#define OMAP_DMA_MCBSP3_TX 10
-#define OMAP_DMA_MCBSP3_RX 11
-#define OMAP_DMA_UART1_TX 12
-#define OMAP_DMA_UART1_RX 13
-#define OMAP_DMA_UART2_TX 14
-#define OMAP_DMA_UART2_RX 15
-#define OMAP_DMA_MCBSP2_TX 16
-#define OMAP_DMA_MCBSP2_RX 17
-#define OMAP_DMA_UART3_TX 18
-#define OMAP_DMA_UART3_RX 19
-#define OMAP_DMA_CAMERA_IF_RX 20
-#define OMAP_DMA_MMC_TX 21
-#define OMAP_DMA_MMC_RX 22
-#define OMAP_DMA_NAND 23
-#define OMAP_DMA_IRQ_LCD_LINE 24
-#define OMAP_DMA_MEMORY_STICK 25
-#define OMAP_DMA_USB_W2FC_RX0 26
-#define OMAP_DMA_USB_W2FC_RX1 27
-#define OMAP_DMA_USB_W2FC_RX2 28
-#define OMAP_DMA_USB_W2FC_TX0 29
-#define OMAP_DMA_USB_W2FC_TX1 30
-#define OMAP_DMA_USB_W2FC_TX2 31
-
-/* These are only for 1610 */
-#define OMAP_DMA_CRYPTO_DES_IN 32
-#define OMAP_DMA_SPI_TX 33
-#define OMAP_DMA_SPI_RX 34
-#define OMAP_DMA_CRYPTO_HASH 35
-#define OMAP_DMA_CCP_ATTN 36
-#define OMAP_DMA_CCP_FIFO_NOT_EMPTY 37
-#define OMAP_DMA_CMT_APE_TX_CHAN_0 38
-#define OMAP_DMA_CMT_APE_RV_CHAN_0 39
-#define OMAP_DMA_CMT_APE_TX_CHAN_1 40
-#define OMAP_DMA_CMT_APE_RV_CHAN_1 41
-#define OMAP_DMA_CMT_APE_TX_CHAN_2 42
-#define OMAP_DMA_CMT_APE_RV_CHAN_2 43
-#define OMAP_DMA_CMT_APE_TX_CHAN_3 44
-#define OMAP_DMA_CMT_APE_RV_CHAN_3 45
-#define OMAP_DMA_CMT_APE_TX_CHAN_4 46
-#define OMAP_DMA_CMT_APE_RV_CHAN_4 47
-#define OMAP_DMA_CMT_APE_TX_CHAN_5 48
-#define OMAP_DMA_CMT_APE_RV_CHAN_5 49
-#define OMAP_DMA_CMT_APE_TX_CHAN_6 50
-#define OMAP_DMA_CMT_APE_RV_CHAN_6 51
-#define OMAP_DMA_CMT_APE_TX_CHAN_7 52
-#define OMAP_DMA_CMT_APE_RV_CHAN_7 53
-#define OMAP_DMA_MMC2_TX 54
-#define OMAP_DMA_MMC2_RX 55
-#define OMAP_DMA_CRYPTO_DES_OUT 56
-
-/* DMA channels for 24xx */
-#define OMAP24XX_DMA_NO_DEVICE 0
-#define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */
-#define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */
-#define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */
-#define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */
-#define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */
-#define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */
-#define OMAP24XX_DMA_VLYNQ_TX 7 /* S_DMA_6 */
-#define OMAP24XX_DMA_CWT 8 /* S_DMA_7 */
-#define OMAP24XX_DMA_AES_TX 9 /* S_DMA_8 */
-#define OMAP24XX_DMA_AES_RX 10 /* S_DMA_9 */
-#define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */
-#define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */
-#define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */
-#define OMAP24XX_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */
-#define OMAP24XX_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */
-#define OMAP24XX_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */
-#define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */
-#define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */
-#define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */
-#define OMAP24XX_DMA_EAC_MD_UL_WR 20 /* S_DMA_19 */
-#define OMAP24XX_DMA_EAC_MD_DL_RD 21 /* S_DMA_20 */
-#define OMAP24XX_DMA_EAC_MD_DL_WR 22 /* S_DMA_21 */
-#define OMAP24XX_DMA_EAC_BT_UL_RD 23 /* S_DMA_22 */
-#define OMAP24XX_DMA_EAC_BT_UL_WR 24 /* S_DMA_23 */
-#define OMAP24XX_DMA_EAC_BT_DL_RD 25 /* S_DMA_24 */
-#define OMAP24XX_DMA_EAC_BT_DL_WR 26 /* S_DMA_25 */
-#define OMAP24XX_DMA_I2C1_TX 27 /* S_DMA_26 */
-#define OMAP24XX_DMA_I2C1_RX 28 /* S_DMA_27 */
-#define OMAP24XX_DMA_I2C2_TX 29 /* S_DMA_28 */
-#define OMAP24XX_DMA_I2C2_RX 30 /* S_DMA_29 */
-#define OMAP24XX_DMA_MCBSP1_TX 31 /* SDMA_30 */
-#define OMAP24XX_DMA_MCBSP1_RX 32 /* SDMA_31 */
-#define OMAP24XX_DMA_MCBSP2_TX 33 /* SDMA_32 */
-#define OMAP24XX_DMA_MCBSP2_RX 34 /* SDMA_33 */
-#define OMAP24XX_DMA_SPI1_TX0 35 /* SDMA_34 */
-#define OMAP24XX_DMA_SPI1_RX0 36 /* SDMA_35 */
-#define OMAP24XX_DMA_SPI1_TX1 37 /* SDMA_36 */
-#define OMAP24XX_DMA_SPI1_RX1 38 /* SDMA_37 */
-#define OMAP24XX_DMA_SPI1_TX2 39 /* SDMA_38 */
-#define OMAP24XX_DMA_SPI1_RX2 40 /* SDMA_39 */
-#define OMAP24XX_DMA_SPI1_TX3 41 /* SDMA_40 */
-#define OMAP24XX_DMA_SPI1_RX3 42 /* SDMA_41 */
-#define OMAP24XX_DMA_SPI2_TX0 43 /* SDMA_42 */
-#define OMAP24XX_DMA_SPI2_RX0 44 /* SDMA_43 */
-#define OMAP24XX_DMA_SPI2_TX1 45 /* SDMA_44 */
-#define OMAP24XX_DMA_SPI2_RX1 46 /* SDMA_45 */
-
-#define OMAP24XX_DMA_UART1_TX 49 /* SDMA_48 */
-#define OMAP24XX_DMA_UART1_RX 50 /* SDMA_49 */
-#define OMAP24XX_DMA_UART2_TX 51 /* SDMA_50 */
-#define OMAP24XX_DMA_UART2_RX 52 /* SDMA_51 */
-#define OMAP24XX_DMA_UART3_TX 53 /* SDMA_52 */
-#define OMAP24XX_DMA_UART3_RX 54 /* SDMA_53 */
-#define OMAP24XX_DMA_USB_W2FC_TX0 55 /* SDMA_54 */
-#define OMAP24XX_DMA_USB_W2FC_RX0 56 /* SDMA_55 */
-#define OMAP24XX_DMA_USB_W2FC_TX1 57 /* SDMA_56 */
-#define OMAP24XX_DMA_USB_W2FC_RX1 58 /* SDMA_57 */
-#define OMAP24XX_DMA_USB_W2FC_TX2 59 /* SDMA_58 */
-#define OMAP24XX_DMA_USB_W2FC_RX2 60 /* SDMA_59 */
-#define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */
-#define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */
-#define OMAP24XX_DMA_MS 63 /* SDMA_62 */
-#define OMAP24XX_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */
-
-/*----------------------------------------------------------------------------*/
-
-/* Hardware registers for LCD DMA */
-#define OMAP1510_DMA_LCD_BASE (0xfffedb00)
-#define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00)
-#define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02)
-#define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04)
-#define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06)
-#define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08)
-
-#define OMAP1610_DMA_LCD_BASE (0xfffee300)
-#define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0)
-#define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2)
-#define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4)
-#define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8)
-#define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca)
-#define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc)
-#define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce)
-#define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0)
-#define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2)
-#define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4)
-#define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6)
-#define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8)
-#define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda)
-#define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0)
-#define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4)
-#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
-#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
-
-#define OMAP1_DMA_TOUT_IRQ (1 << 0)
-#define OMAP_DMA_DROP_IRQ (1 << 1)
-#define OMAP_DMA_HALF_IRQ (1 << 2)
-#define OMAP_DMA_FRAME_IRQ (1 << 3)
-#define OMAP_DMA_LAST_IRQ (1 << 4)
-#define OMAP_DMA_BLOCK_IRQ (1 << 5)
-#define OMAP1_DMA_SYNC_IRQ (1 << 6)
-#define OMAP2_DMA_PKT_IRQ (1 << 7)
-#define OMAP2_DMA_TRANS_ERR_IRQ (1 << 8)
-#define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9)
-#define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
-#define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
-
-#define OMAP_DMA_DATA_TYPE_S8 0x00
-#define OMAP_DMA_DATA_TYPE_S16 0x01
-#define OMAP_DMA_DATA_TYPE_S32 0x02
-
-#define OMAP_DMA_SYNC_ELEMENT 0x00
-#define OMAP_DMA_SYNC_FRAME 0x01
-#define OMAP_DMA_SYNC_BLOCK 0x02
-
-#define OMAP_DMA_PORT_EMIFF 0x00
-#define OMAP_DMA_PORT_EMIFS 0x01
-#define OMAP_DMA_PORT_OCP_T1 0x02
-#define OMAP_DMA_PORT_TIPB 0x03
-#define OMAP_DMA_PORT_OCP_T2 0x04
-#define OMAP_DMA_PORT_MPUI 0x05
-
-#define OMAP_DMA_AMODE_CONSTANT 0x00
-#define OMAP_DMA_AMODE_POST_INC 0x01
-#define OMAP_DMA_AMODE_SINGLE_IDX 0x02
-#define OMAP_DMA_AMODE_DOUBLE_IDX 0x03
-
-/* LCD DMA block numbers */
-enum {
- OMAP_LCD_DMA_B1_TOP,
- OMAP_LCD_DMA_B1_BOTTOM,
- OMAP_LCD_DMA_B2_TOP,
- OMAP_LCD_DMA_B2_BOTTOM
-};
-
-enum omap_dma_burst_mode {
- OMAP_DMA_DATA_BURST_DIS = 0,
- OMAP_DMA_DATA_BURST_4,
- OMAP_DMA_DATA_BURST_8,
- OMAP_DMA_DATA_BURST_16,
-};
-
-enum omap_dma_color_mode {
- OMAP_DMA_COLOR_DIS = 0,
- OMAP_DMA_CONSTANT_FILL,
- OMAP_DMA_TRANSPARENT_COPY
-};
-
-enum omap_dma_write_mode {
- OMAP_DMA_WRITE_NON_POSTED = 0,
- OMAP_DMA_WRITE_POSTED,
- OMAP_DMA_WRITE_LAST_NON_POSTED
-};
-
-struct omap_dma_channel_params {
- int data_type; /* data type 8,16,32 */
- int elem_count; /* number of elements in a frame */
- int frame_count; /* number of frames in a element */
-
- int src_port; /* Only on OMAP1 REVISIT: Is this needed? */
- int src_amode; /* constant , post increment, indexed , double indexed */
- unsigned long src_start; /* source address : physical */
- int src_ei; /* source element index */
- int src_fi; /* source frame index */
-
- int dst_port; /* Only on OMAP1 REVISIT: Is this needed? */
- int dst_amode; /* constant , post increment, indexed , double indexed */
- unsigned long dst_start; /* source address : physical */
- int dst_ei; /* source element index */
- int dst_fi; /* source frame index */
-
- int trigger; /* trigger attached if the channel is synchronized */
- int sync_mode; /* sycn on element, frame , block or packet */
- int src_or_dst_synch; /* source synch(1) or destination synch(0) */
-
- int ie; /* interrupt enabled */
-};
-
-
-extern void omap_set_dma_priority(int lch, int dst_port, int priority);
-extern int omap_request_dma(int dev_id, const char *dev_name,
- void (* callback)(int lch, u16 ch_status, void *data),
- void *data, int *dma_ch);
-extern void omap_enable_dma_irq(int ch, u16 irq_bits);
-extern void omap_disable_dma_irq(int ch, u16 irq_bits);
-extern void omap_free_dma(int ch);
-extern void omap_start_dma(int lch);
-extern void omap_stop_dma(int lch);
-extern void omap_set_dma_transfer_params(int lch, int data_type,
- int elem_count, int frame_count,
- int sync_mode,
- int dma_trigger, int src_or_dst_synch);
-extern void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode,
- u32 color);
-extern void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode);
-
-extern void omap_set_dma_src_params(int lch, int src_port, int src_amode,
- unsigned long src_start,
- int src_ei, int src_fi);
-extern void omap_set_dma_src_index(int lch, int eidx, int fidx);
-extern void omap_set_dma_src_data_pack(int lch, int enable);
-extern void omap_set_dma_src_burst_mode(int lch,
- enum omap_dma_burst_mode burst_mode);
-
-extern void omap_set_dma_dest_params(int lch, int dest_port, int dest_amode,
- unsigned long dest_start,
- int dst_ei, int dst_fi);
-extern void omap_set_dma_dest_index(int lch, int eidx, int fidx);
-extern void omap_set_dma_dest_data_pack(int lch, int enable);
-extern void omap_set_dma_dest_burst_mode(int lch,
- enum omap_dma_burst_mode burst_mode);
-
-extern void omap_set_dma_params(int lch,
- struct omap_dma_channel_params * params);
-
-extern void omap_dma_link_lch (int lch_head, int lch_queue);
-extern void omap_dma_unlink_lch (int lch_head, int lch_queue);
-
-extern int omap_set_dma_callback(int lch,
- void (* callback)(int lch, u16 ch_status, void *data),
- void *data);
-extern dma_addr_t omap_get_dma_src_pos(int lch);
-extern dma_addr_t omap_get_dma_dst_pos(int lch);
-extern int omap_get_dma_src_addr_counter(int lch);
-extern void omap_clear_dma(int lch);
-extern int omap_dma_running(void);
-
-/* LCD DMA functions */
-extern int omap_request_lcd_dma(void (* callback)(u16 status, void *data),
- void *data);
-extern void omap_free_lcd_dma(void);
-extern void omap_setup_lcd_dma(void);
-extern void omap_enable_lcd_dma(void);
-extern void omap_stop_lcd_dma(void);
-extern int omap_lcd_dma_ext_running(void);
-extern void omap_set_lcd_dma_ext_controller(int external);
-extern void omap_set_lcd_dma_single_transfer(int single);
-extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
- int data_type);
-extern void omap_set_lcd_dma_b1_rotation(int rotate);
-extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres);
-extern void omap_set_lcd_dma_b1_mirror(int mirror);
-extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale);
-
-#endif /* __ASM_ARCH_DMA_H */
diff --git a/original/asm-arm/arch/fpga.h b/original/asm-arm/arch/fpga.h
deleted file mode 100644
index 6a883e0..0000000
--- a/original/asm-arm/arch/fpga.h
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/fpga.h
- *
- * Interrupt handler for OMAP-1510 FPGA
- *
- * Copyright (C) 2001 RidgeRun, Inc.
- * Author: Greg Lonnon <glonnon@ridgerun.com>
- *
- * Copyright (C) 2002 MontaVista Software, Inc.
- *
- * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6
- * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com>
- *
- * 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.
- */
-
-#ifndef __ASM_ARCH_OMAP_FPGA_H
-#define __ASM_ARCH_OMAP_FPGA_H
-
-#if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
-extern void omap1510_fpga_init_irq(void);
-#else
-#define omap1510_fpga_init_irq() (0)
-#endif
-
-#define fpga_read(reg) __raw_readb(reg)
-#define fpga_write(val, reg) __raw_writeb(val, reg)
-
-/*
- * ---------------------------------------------------------------------------
- * H2/P2 Debug board FPGA
- * ---------------------------------------------------------------------------
- */
-/* maps in the FPGA registers and the ETHR registers */
-#define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */
-#define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */
-#define H2P2_DBG_FPGA_START 0x04000000 /* PA */
-
-#define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300)
-#define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */
-#define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */
-#define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */
-#define H2P2_DBG_FPGA_LEDS (H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */
-#define H2P2_DBG_FPGA_MISC_INPUTS (H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */
-#define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */
-#define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */
-
-/* NOTE: most boards don't have a static mapping for the FPGA ... */
-struct h2p2_dbg_fpga {
- /* offset 0x00 */
- u16 smc91x[8];
- /* offset 0x10 */
- u16 fpga_rev;
- u16 board_rev;
- u16 gpio_outputs;
- u16 leds;
- /* offset 0x18 */
- u16 misc_inputs;
- u16 lan_status;
- u16 lan_reset;
- u16 reserved0;
- /* offset 0x20 */
- u16 ps2_data;
- u16 ps2_ctrl;
- /* plus also 4 rs232 ports ... */
-};
-
-/* LEDs definition on debug board (16 LEDs, all physically green) */
-#define H2P2_DBG_FPGA_LED_GREEN (1 << 15)
-#define H2P2_DBG_FPGA_LED_AMBER (1 << 14)
-#define H2P2_DBG_FPGA_LED_RED (1 << 13)
-#define H2P2_DBG_FPGA_LED_BLUE (1 << 12)
-/* cpu0 load-meter LEDs */
-#define H2P2_DBG_FPGA_LOAD_METER (1 << 0) // A bit of fun on our board ...
-#define H2P2_DBG_FPGA_LOAD_METER_SIZE 11
-#define H2P2_DBG_FPGA_LOAD_METER_MASK ((1 << H2P2_DBG_FPGA_LOAD_METER_SIZE) - 1)
-
-#define H2P2_DBG_FPGA_P2_LED_TIMER (1 << 0)
-#define H2P2_DBG_FPGA_P2_LED_IDLE (1 << 1)
-
-/*
- * ---------------------------------------------------------------------------
- * OMAP-1510 FPGA
- * ---------------------------------------------------------------------------
- */
-#define OMAP1510_FPGA_BASE 0xE8000000 /* Virtual */
-#define OMAP1510_FPGA_SIZE SZ_4K
-#define OMAP1510_FPGA_START 0x08000000 /* Physical */
-
-/* Revision */
-#define OMAP1510_FPGA_REV_LOW (OMAP1510_FPGA_BASE + 0x0)
-#define OMAP1510_FPGA_REV_HIGH (OMAP1510_FPGA_BASE + 0x1)
-
-#define OMAP1510_FPGA_LCD_PANEL_CONTROL (OMAP1510_FPGA_BASE + 0x2)
-#define OMAP1510_FPGA_LED_DIGIT (OMAP1510_FPGA_BASE + 0x3)
-#define INNOVATOR_FPGA_HID_SPI (OMAP1510_FPGA_BASE + 0x4)
-#define OMAP1510_FPGA_POWER (OMAP1510_FPGA_BASE + 0x5)
-
-/* Interrupt status */
-#define OMAP1510_FPGA_ISR_LO (OMAP1510_FPGA_BASE + 0x6)
-#define OMAP1510_FPGA_ISR_HI (OMAP1510_FPGA_BASE + 0x7)
-
-/* Interrupt mask */
-#define OMAP1510_FPGA_IMR_LO (OMAP1510_FPGA_BASE + 0x8)
-#define OMAP1510_FPGA_IMR_HI (OMAP1510_FPGA_BASE + 0x9)
-
-/* Reset registers */
-#define OMAP1510_FPGA_HOST_RESET (OMAP1510_FPGA_BASE + 0xa)
-#define OMAP1510_FPGA_RST (OMAP1510_FPGA_BASE + 0xb)
-
-#define OMAP1510_FPGA_AUDIO (OMAP1510_FPGA_BASE + 0xc)
-#define OMAP1510_FPGA_DIP (OMAP1510_FPGA_BASE + 0xe)
-#define OMAP1510_FPGA_FPGA_IO (OMAP1510_FPGA_BASE + 0xf)
-#define OMAP1510_FPGA_UART1 (OMAP1510_FPGA_BASE + 0x14)
-#define OMAP1510_FPGA_UART2 (OMAP1510_FPGA_BASE + 0x15)
-#define OMAP1510_FPGA_OMAP1510_STATUS (OMAP1510_FPGA_BASE + 0x16)
-#define OMAP1510_FPGA_BOARD_REV (OMAP1510_FPGA_BASE + 0x18)
-#define OMAP1510P1_PPT_DATA (OMAP1510_FPGA_BASE + 0x100)
-#define OMAP1510P1_PPT_STATUS (OMAP1510_FPGA_BASE + 0x101)
-#define OMAP1510P1_PPT_CONTROL (OMAP1510_FPGA_BASE + 0x102)
-
-#define OMAP1510_FPGA_TOUCHSCREEN (OMAP1510_FPGA_BASE + 0x204)
-
-#define INNOVATOR_FPGA_INFO (OMAP1510_FPGA_BASE + 0x205)
-#define INNOVATOR_FPGA_LCD_BRIGHT_LO (OMAP1510_FPGA_BASE + 0x206)
-#define INNOVATOR_FPGA_LCD_BRIGHT_HI (OMAP1510_FPGA_BASE + 0x207)
-#define INNOVATOR_FPGA_LED_GRN_LO (OMAP1510_FPGA_BASE + 0x208)
-#define INNOVATOR_FPGA_LED_GRN_HI (OMAP1510_FPGA_BASE + 0x209)
-#define INNOVATOR_FPGA_LED_RED_LO (OMAP1510_FPGA_BASE + 0x20a)
-#define INNOVATOR_FPGA_LED_RED_HI (OMAP1510_FPGA_BASE + 0x20b)
-#define INNOVATOR_FPGA_CAM_USB_CONTROL (OMAP1510_FPGA_BASE + 0x20c)
-#define INNOVATOR_FPGA_EXP_CONTROL (OMAP1510_FPGA_BASE + 0x20d)
-#define INNOVATOR_FPGA_ISR2 (OMAP1510_FPGA_BASE + 0x20e)
-#define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210)
-
-#define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300)
-
-/*
- * Power up Giga UART driver, turn on HID clock.
- * Turn off BT power, since we're not using it and it
- * draws power.
- */
-#define OMAP1510_FPGA_RESET_VALUE 0x42
-
-#define OMAP1510_FPGA_PCR_IF_PD0 (1 << 7)
-#define OMAP1510_FPGA_PCR_COM2_EN (1 << 6)
-#define OMAP1510_FPGA_PCR_COM1_EN (1 << 5)
-#define OMAP1510_FPGA_PCR_EXP_PD0 (1 << 4)
-#define OMAP1510_FPGA_PCR_EXP_PD1 (1 << 3)
-#define OMAP1510_FPGA_PCR_48MHZ_CLK (1 << 2)
-#define OMAP1510_FPGA_PCR_4MHZ_CLK (1 << 1)
-#define OMAP1510_FPGA_PCR_RSRVD_BIT0 (1 << 0)
-
-/*
- * Innovator/OMAP1510 FPGA HID register bit definitions
- */
-#define OMAP1510_FPGA_HID_SCLK (1<<0) /* output */
-#define OMAP1510_FPGA_HID_MOSI (1<<1) /* output */
-#define OMAP1510_FPGA_HID_nSS (1<<2) /* output 0/1 chip idle/select */
-#define OMAP1510_FPGA_HID_nHSUS (1<<3) /* output 0/1 host active/suspended */
-#define OMAP1510_FPGA_HID_MISO (1<<4) /* input */
-#define OMAP1510_FPGA_HID_ATN (1<<5) /* input 0/1 chip idle/ATN */
-#define OMAP1510_FPGA_HID_rsrvd (1<<6)
-#define OMAP1510_FPGA_HID_RESETn (1<<7) /* output - 0/1 USAR reset/run */
-
-/* The FPGA IRQ is cascaded through GPIO_13 */
-#define OMAP1510_INT_FPGA (IH_GPIO_BASE + 13)
-
-/* IRQ Numbers for interrupts muxed through the FPGA */
-#define OMAP1510_IH_FPGA_BASE IH_BOARD_BASE
-#define OMAP1510_INT_FPGA_ATN (OMAP1510_IH_FPGA_BASE + 0)
-#define OMAP1510_INT_FPGA_ACK (OMAP1510_IH_FPGA_BASE + 1)
-#define OMAP1510_INT_FPGA2 (OMAP1510_IH_FPGA_BASE + 2)
-#define OMAP1510_INT_FPGA3 (OMAP1510_IH_FPGA_BASE + 3)
-#define OMAP1510_INT_FPGA4 (OMAP1510_IH_FPGA_BASE + 4)
-#define OMAP1510_INT_FPGA5 (OMAP1510_IH_FPGA_BASE + 5)
-#define OMAP1510_INT_FPGA6 (OMAP1510_IH_FPGA_BASE + 6)
-#define OMAP1510_INT_FPGA7 (OMAP1510_IH_FPGA_BASE + 7)
-#define OMAP1510_INT_FPGA8 (OMAP1510_IH_FPGA_BASE + 8)
-#define OMAP1510_INT_FPGA9 (OMAP1510_IH_FPGA_BASE + 9)
-#define OMAP1510_INT_FPGA10 (OMAP1510_IH_FPGA_BASE + 10)
-#define OMAP1510_INT_FPGA11 (OMAP1510_IH_FPGA_BASE + 11)
-#define OMAP1510_INT_FPGA12 (OMAP1510_IH_FPGA_BASE + 12)
-#define OMAP1510_INT_ETHER (OMAP1510_IH_FPGA_BASE + 13)
-#define OMAP1510_INT_FPGAUART1 (OMAP1510_IH_FPGA_BASE + 14)
-#define OMAP1510_INT_FPGAUART2 (OMAP1510_IH_FPGA_BASE + 15)
-#define OMAP1510_INT_FPGA_TS (OMAP1510_IH_FPGA_BASE + 16)
-#define OMAP1510_INT_FPGA17 (OMAP1510_IH_FPGA_BASE + 17)
-#define OMAP1510_INT_FPGA_CAM (OMAP1510_IH_FPGA_BASE + 18)
-#define OMAP1510_INT_FPGA_RTC_A (OMAP1510_IH_FPGA_BASE + 19)
-#define OMAP1510_INT_FPGA_RTC_B (OMAP1510_IH_FPGA_BASE + 20)
-#define OMAP1510_INT_FPGA_CD (OMAP1510_IH_FPGA_BASE + 21)
-#define OMAP1510_INT_FPGA22 (OMAP1510_IH_FPGA_BASE + 22)
-#define OMAP1510_INT_FPGA23 (OMAP1510_IH_FPGA_BASE + 23)
-
-#endif
diff --git a/original/asm-arm/arch/gpio-switch.h b/original/asm-arm/arch/gpio-switch.h
deleted file mode 100644
index 10da0e0..0000000
--- a/original/asm-arm/arch/gpio-switch.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * GPIO switch definitions
- *
- * Copyright (C) 2006 Nokia Corporation
- *
- * 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.
- */
-
-#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
-#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
-
-#include <linux/types.h>
-
-/* Cover:
- * high -> closed
- * low -> open
- * Connection:
- * high -> connected
- * low -> disconnected
- * Activity:
- * high -> active
- * low -> inactive
- *
- */
-#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
-#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
-#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
-#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
-#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
-
-struct omap_gpio_switch {
- const char *name;
- s16 gpio;
- unsigned flags:4;
- unsigned type:4;
-
- /* Time in ms to debounce when transitioning from
- * inactive state to active state. */
- u16 debounce_rising;
- /* Same for transition from active to inactive state. */
- u16 debounce_falling;
-
- /* notify board-specific code about state changes */
- void (* notify)(void *data, int state);
- void *notify_data;
-};
-
-/* Call at init time only */
-extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
- int count);
-
-#endif
diff --git a/original/asm-arm/arch/gpio.h b/original/asm-arm/arch/gpio.h
deleted file mode 100644
index 3e2cbc1..0000000
--- a/original/asm-arm/arch/gpio.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/gpio.h
- *
- * OMAP GPIO handling defines and functions
- *
- * Copyright (C) 2003-2005 Nokia Corporation
- *
- * Written by Juha Yrjölä <juha.yrjola@nokia.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef __ASM_ARCH_OMAP_GPIO_H
-#define __ASM_ARCH_OMAP_GPIO_H
-
-#include <asm/hardware.h>
-#include <asm/arch/irqs.h>
-#include <asm/io.h>
-
-#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000
-
-#ifdef CONFIG_ARCH_OMAP730
-#define OMAP_MPUIO_INPUT_LATCH 0x00
-#define OMAP_MPUIO_OUTPUT 0x02
-#define OMAP_MPUIO_IO_CNTL 0x04
-#define OMAP_MPUIO_KBR_LATCH 0x08
-#define OMAP_MPUIO_KBC 0x0a
-#define OMAP_MPUIO_GPIO_EVENT_MODE 0x0c
-#define OMAP_MPUIO_GPIO_INT_EDGE 0x0e
-#define OMAP_MPUIO_KBD_INT 0x10
-#define OMAP_MPUIO_GPIO_INT 0x12
-#define OMAP_MPUIO_KBD_MASKIT 0x14
-#define OMAP_MPUIO_GPIO_MASKIT 0x16
-#define OMAP_MPUIO_GPIO_DEBOUNCING 0x18
-#define OMAP_MPUIO_LATCH 0x1a
-#else
-#define OMAP_MPUIO_INPUT_LATCH 0x00
-#define OMAP_MPUIO_OUTPUT 0x04
-#define OMAP_MPUIO_IO_CNTL 0x08
-#define OMAP_MPUIO_KBR_LATCH 0x10
-#define OMAP_MPUIO_KBC 0x14
-#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
-#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
-#define OMAP_MPUIO_KBD_INT 0x20
-#define OMAP_MPUIO_GPIO_INT 0x24
-#define OMAP_MPUIO_KBD_MASKIT 0x28
-#define OMAP_MPUIO_GPIO_MASKIT 0x2c
-#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
-#define OMAP_MPUIO_LATCH 0x34
-#endif
-
-#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
-#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
-
-#define OMAP_GPIO_IRQ(nr) (OMAP_GPIO_IS_MPUIO(nr) ? \
- IH_MPUIO_BASE + ((nr) & 0x0f) : \
- IH_GPIO_BASE + (nr))
-
-struct omap_machine_gpio_bank {
- int start;
- int end;
-
- void (*set_gpio_direction)(int gpio, int is_input);
- void (*set_gpio_dataout)(int gpio, int enable);
- int (*get_gpio_datain)(int gpio);
-};
-
-extern int omap_gpio_init(void); /* Call from board init only */
-extern int omap_gpio_add_machine_gpio_bank(struct omap_machine_gpio_bank *gpio_bank);
-extern int omap_request_gpio(int gpio);
-extern void omap_free_gpio(int gpio);
-extern void omap_set_gpio_direction(int gpio, int is_input);
-extern void omap_set_gpio_dataout(int gpio, int enable);
-extern int omap_get_gpio_datain(int gpio);
-
-#endif
diff --git a/original/asm-arm/arch/hardware.h b/original/asm-arm/arch/hardware.h
deleted file mode 100644
index 56e273c..0000000
--- a/original/asm-arm/arch/hardware.h
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/hardware.h
- *
- * Hardware definitions for TI OMAP processors and boards
- *
- * NOTE: Please put device driver specific defines into a separate header
- * file for each driver.
- *
- * Copyright (C) 2001 RidgeRun, Inc.
- * Author: RidgeRun, Inc. Greg Lonnon <glonnon@ridgerun.com>
- *
- * Reorganized for Linux-2.6 by Tony Lindgren <tony@atomide.com>
- * and Dirk Behme <dirk.behme@de.bosch.com>
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OMAP_HARDWARE_H
-#define __ASM_ARCH_OMAP_HARDWARE_H
-
-#include <asm/sizes.h>
-#ifndef __ASSEMBLER__
-#include <asm/types.h>
-#include <asm/arch/cpu.h>
-#endif
-#include <asm/arch/io.h>
-#include <asm/arch/serial.h>
-
-/*
- * ---------------------------------------------------------------------------
- * Common definitions for all OMAP processors
- * NOTE: Put all processor or board specific parts to the special header
- * files.
- * ---------------------------------------------------------------------------
- */
-
-/*
- * ----------------------------------------------------------------------------
- * Timers
- * ----------------------------------------------------------------------------
- */
-#define OMAP_MPU_TIMER1_BASE (0xfffec500)
-#define OMAP_MPU_TIMER2_BASE (0xfffec600)
-#define OMAP_MPU_TIMER3_BASE (0xfffec700)
-#define MPU_TIMER_FREE (1 << 6)
-#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
-#define MPU_TIMER_AR (1 << 1)
-#define MPU_TIMER_ST (1 << 0)
-
-/*
- * ----------------------------------------------------------------------------
- * Clocks
- * ----------------------------------------------------------------------------
- */
-#define CLKGEN_REG_BASE (0xfffece00)
-#define ARM_CKCTL (CLKGEN_REG_BASE + 0x0)
-#define ARM_IDLECT1 (CLKGEN_REG_BASE + 0x4)
-#define ARM_IDLECT2 (CLKGEN_REG_BASE + 0x8)
-#define ARM_EWUPCT (CLKGEN_REG_BASE + 0xC)
-#define ARM_RSTCT1 (CLKGEN_REG_BASE + 0x10)
-#define ARM_RSTCT2 (CLKGEN_REG_BASE + 0x14)
-#define ARM_SYSST (CLKGEN_REG_BASE + 0x18)
-#define ARM_IDLECT3 (CLKGEN_REG_BASE + 0x24)
-
-#define CK_RATEF 1
-#define CK_IDLEF 2
-#define CK_ENABLEF 4
-#define CK_SELECTF 8
-#define SETARM_IDLE_SHIFT
-
-/* DPLL control registers */
-#define DPLL_CTL (0xfffecf00)
-
-/* DSP clock control. Must use __raw_readw() and __raw_writew() with these */
-#define DSP_CONFIG_REG_BASE (0xe1008000)
-#define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0)
-#define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4)
-#define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8)
-#define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14)
-
-/*
- * ---------------------------------------------------------------------------
- * UPLD
- * ---------------------------------------------------------------------------
- */
-#define ULPD_REG_BASE (0xfffe0800)
-#define ULPD_IT_STATUS (ULPD_REG_BASE + 0x14)
-#define ULPD_SETUP_ANALOG_CELL_3 (ULPD_REG_BASE + 0x24)
-#define ULPD_CLOCK_CTRL (ULPD_REG_BASE + 0x30)
-# define DIS_USB_PVCI_CLK (1 << 5) /* no USB/FAC synch */
-# define USB_MCLK_EN (1 << 4) /* enable W4_USB_CLKO */
-#define ULPD_SOFT_REQ (ULPD_REG_BASE + 0x34)
-# define SOFT_UDC_REQ (1 << 4)
-# define SOFT_USB_CLK_REQ (1 << 3)
-# define SOFT_DPLL_REQ (1 << 0)
-#define ULPD_DPLL_CTRL (ULPD_REG_BASE + 0x3c)
-#define ULPD_STATUS_REQ (ULPD_REG_BASE + 0x40)
-#define ULPD_APLL_CTRL (ULPD_REG_BASE + 0x4c)
-#define ULPD_POWER_CTRL (ULPD_REG_BASE + 0x50)
-#define ULPD_SOFT_DISABLE_REQ_REG (ULPD_REG_BASE + 0x68)
-# define DIS_MMC2_DPLL_REQ (1 << 11)
-# define DIS_MMC1_DPLL_REQ (1 << 10)
-# define DIS_UART3_DPLL_REQ (1 << 9)
-# define DIS_UART2_DPLL_REQ (1 << 8)
-# define DIS_UART1_DPLL_REQ (1 << 7)
-# define DIS_USB_HOST_DPLL_REQ (1 << 6)
-#define ULPD_SDW_CLK_DIV_CTRL_SEL (ULPD_REG_BASE + 0x74)
-#define ULPD_CAM_CLK_CTRL (ULPD_REG_BASE + 0x7c)
-
-/*
- * ---------------------------------------------------------------------------
- * Watchdog timer
- * ---------------------------------------------------------------------------
- */
-
-/* Watchdog timer within the OMAP3.2 gigacell */
-#define OMAP_MPU_WATCHDOG_BASE (0xfffec800)
-#define OMAP_WDT_TIMER (OMAP_MPU_WATCHDOG_BASE + 0x0)
-#define OMAP_WDT_LOAD_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
-#define OMAP_WDT_READ_TIM (OMAP_MPU_WATCHDOG_BASE + 0x4)
-#define OMAP_WDT_TIMER_MODE (OMAP_MPU_WATCHDOG_BASE + 0x8)
-
-/*
- * ---------------------------------------------------------------------------
- * Interrupts
- * ---------------------------------------------------------------------------
- */
-#ifdef CONFIG_ARCH_OMAP1
-
-/*
- * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c
- * or something similar.. -- PFM.
- */
-
-#define OMAP_IH1_BASE 0xfffecb00
-#define OMAP_IH2_BASE 0xfffe0000
-
-#define OMAP_IH1_ITR (OMAP_IH1_BASE + 0x00)
-#define OMAP_IH1_MIR (OMAP_IH1_BASE + 0x04)
-#define OMAP_IH1_SIR_IRQ (OMAP_IH1_BASE + 0x10)
-#define OMAP_IH1_SIR_FIQ (OMAP_IH1_BASE + 0x14)
-#define OMAP_IH1_CONTROL (OMAP_IH1_BASE + 0x18)
-#define OMAP_IH1_ILR0 (OMAP_IH1_BASE + 0x1c)
-#define OMAP_IH1_ISR (OMAP_IH1_BASE + 0x9c)
-
-#define OMAP_IH2_ITR (OMAP_IH2_BASE + 0x00)
-#define OMAP_IH2_MIR (OMAP_IH2_BASE + 0x04)
-#define OMAP_IH2_SIR_IRQ (OMAP_IH2_BASE + 0x10)
-#define OMAP_IH2_SIR_FIQ (OMAP_IH2_BASE + 0x14)
-#define OMAP_IH2_CONTROL (OMAP_IH2_BASE + 0x18)
-#define OMAP_IH2_ILR0 (OMAP_IH2_BASE + 0x1c)
-#define OMAP_IH2_ISR (OMAP_IH2_BASE + 0x9c)
-
-#define IRQ_ITR_REG_OFFSET 0x00
-#define IRQ_MIR_REG_OFFSET 0x04
-#define IRQ_SIR_IRQ_REG_OFFSET 0x10
-#define IRQ_SIR_FIQ_REG_OFFSET 0x14
-#define IRQ_CONTROL_REG_OFFSET 0x18
-#define IRQ_ISR_REG_OFFSET 0x9c
-#define IRQ_ILR0_REG_OFFSET 0x1c
-#define IRQ_GMR_REG_OFFSET 0xa0
-
-#endif
-
-/*
- * ----------------------------------------------------------------------------
- * System control registers
- * ----------------------------------------------------------------------------
- */
-#define MOD_CONF_CTRL_0 0xfffe1080
-#define MOD_CONF_CTRL_1 0xfffe1110
-
-/*
- * ----------------------------------------------------------------------------
- * Pin multiplexing registers
- * ----------------------------------------------------------------------------
- */
-#define FUNC_MUX_CTRL_0 0xfffe1000
-#define FUNC_MUX_CTRL_1 0xfffe1004
-#define FUNC_MUX_CTRL_2 0xfffe1008
-#define COMP_MODE_CTRL_0 0xfffe100c
-#define FUNC_MUX_CTRL_3 0xfffe1010
-#define FUNC_MUX_CTRL_4 0xfffe1014
-#define FUNC_MUX_CTRL_5 0xfffe1018
-#define FUNC_MUX_CTRL_6 0xfffe101C
-#define FUNC_MUX_CTRL_7 0xfffe1020
-#define FUNC_MUX_CTRL_8 0xfffe1024
-#define FUNC_MUX_CTRL_9 0xfffe1028
-#define FUNC_MUX_CTRL_A 0xfffe102C
-#define FUNC_MUX_CTRL_B 0xfffe1030
-#define FUNC_MUX_CTRL_C 0xfffe1034
-#define FUNC_MUX_CTRL_D 0xfffe1038
-#define PULL_DWN_CTRL_0 0xfffe1040
-#define PULL_DWN_CTRL_1 0xfffe1044
-#define PULL_DWN_CTRL_2 0xfffe1048
-#define PULL_DWN_CTRL_3 0xfffe104c
-#define PULL_DWN_CTRL_4 0xfffe10ac
-
-/* OMAP-1610 specific multiplexing registers */
-#define FUNC_MUX_CTRL_E 0xfffe1090
-#define FUNC_MUX_CTRL_F 0xfffe1094
-#define FUNC_MUX_CTRL_10 0xfffe1098
-#define FUNC_MUX_CTRL_11 0xfffe109c
-#define FUNC_MUX_CTRL_12 0xfffe10a0
-#define PU_PD_SEL_0 0xfffe10b4
-#define PU_PD_SEL_1 0xfffe10b8
-#define PU_PD_SEL_2 0xfffe10bc
-#define PU_PD_SEL_3 0xfffe10c0
-#define PU_PD_SEL_4 0xfffe10c4
-
-/* Timer32K for 1610 and 1710*/
-#define OMAP_TIMER32K_BASE 0xFFFBC400
-
-/*
- * ---------------------------------------------------------------------------
- * TIPB bus interface
- * ---------------------------------------------------------------------------
- */
-#define TIPB_PUBLIC_CNTL_BASE 0xfffed300
-#define MPU_PUBLIC_TIPB_CNTL (TIPB_PUBLIC_CNTL_BASE + 0x8)
-#define TIPB_PRIVATE_CNTL_BASE 0xfffeca00
-#define MPU_PRIVATE_TIPB_CNTL (TIPB_PRIVATE_CNTL_BASE + 0x8)
-
-/*
- * ----------------------------------------------------------------------------
- * MPUI interface
- * ----------------------------------------------------------------------------
- */
-#define MPUI_BASE (0xfffec900)
-#define MPUI_CTRL (MPUI_BASE + 0x0)
-#define MPUI_DEBUG_ADDR (MPUI_BASE + 0x4)
-#define MPUI_DEBUG_DATA (MPUI_BASE + 0x8)
-#define MPUI_DEBUG_FLAG (MPUI_BASE + 0xc)
-#define MPUI_STATUS_REG (MPUI_BASE + 0x10)
-#define MPUI_DSP_STATUS (MPUI_BASE + 0x14)
-#define MPUI_DSP_BOOT_CONFIG (MPUI_BASE + 0x18)
-#define MPUI_DSP_API_CONFIG (MPUI_BASE + 0x1c)
-
-/*
- * ----------------------------------------------------------------------------
- * LED Pulse Generator
- * ----------------------------------------------------------------------------
- */
-#define OMAP_LPG1_BASE 0xfffbd000
-#define OMAP_LPG2_BASE 0xfffbd800
-#define OMAP_LPG1_LCR (OMAP_LPG1_BASE + 0x00)
-#define OMAP_LPG1_PMR (OMAP_LPG1_BASE + 0x04)
-#define OMAP_LPG2_LCR (OMAP_LPG2_BASE + 0x00)
-#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
-
-/*
- * ----------------------------------------------------------------------------
- * Pulse-Width Light
- * ----------------------------------------------------------------------------
- */
-#define OMAP_PWL_BASE 0xfffb5800
-#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
-#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
-
-/*
- * ---------------------------------------------------------------------------
- * Processor specific defines
- * ---------------------------------------------------------------------------
- */
-
-#include "omap730.h"
-#include "omap1510.h"
-#include "omap24xx.h"
-#include "omap16xx.h"
-
-#ifndef __ASSEMBLER__
-
-/*
- * ---------------------------------------------------------------------------
- * Board specific defines
- * ---------------------------------------------------------------------------
- */
-
-#ifdef CONFIG_MACH_OMAP_INNOVATOR
-#include "board-innovator.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_H2
-#include "board-h2.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_PERSEUS2
-#include "board-perseus2.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_FSAMPLE
-#include "board-fsample.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_H3
-#include "board-h3.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_H4
-#include "board-h4.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_APOLLON
-#include "board-apollon.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_OSK
-#include "board-osk.h"
-#endif
-
-#ifdef CONFIG_MACH_VOICEBLUE
-#include "board-voiceblue.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_TORNADO
-#include "board-tornado.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_STARTREK
-#include "board-startrek.h"
-#endif
-
-#ifdef CONFIG_MACH_OMAP_TUTTLE
-#include "board-tuttle.h"
-#endif
-
-#endif /* !__ASSEMBLER__ */
-
-#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/original/asm-arm/arch/io.h b/original/asm-arm/arch/io.h
deleted file mode 100644
index 78f68e6..0000000
--- a/original/asm-arm/arch/io.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/io.h
- *
- * IO definitions for TI OMAP processors and boards
- *
- * Copied from linux/include/asm-arm/arch-sa1100/io.h
- * Copyright (C) 1997-1999 Russell King
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Modifications:
- * 06-12-1997 RMK Created.
- * 07-04-1999 RMK Major cleanup
- */
-
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#include <asm/hardware.h>
-
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We don't actually have real ISA nor PCI buses, but there is so many
- * drivers out there that might just work if we fake them...
- */
-#define __io(a) ((void __iomem *)(PCIO_BASE + (a)))
-#define __mem_pci(a) (a)
-
-/*
- * ----------------------------------------------------------------------------
- * I/O mapping
- * ----------------------------------------------------------------------------
- */
-
-#define PCIO_BASE 0
-
-#if defined(CONFIG_ARCH_OMAP1)
-
-#define IO_PHYS 0xFFFB0000
-#define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */
-#define IO_SIZE 0x40000
-#define IO_VIRT (IO_PHYS - IO_OFFSET)
-#define IO_ADDRESS(pa) ((pa) - IO_OFFSET)
-#define io_p2v(pa) ((pa) - IO_OFFSET)
-#define io_v2p(va) ((va) + IO_OFFSET)
-
-#elif defined(CONFIG_ARCH_OMAP2)
-
-/* We map both L3 and L4 on OMAP2 */
-#define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */
-#define L3_24XX_VIRT 0xf8000000
-#define L3_24XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */
-#define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */
-#define L4_24XX_VIRT 0xd8000000
-#define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */
-#define IO_OFFSET 0x90000000
-#define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
-#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
-#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */
-
-#endif
-
-#ifndef __ASSEMBLER__
-
-/*
- * Functions to access the OMAP IO region
- *
- * NOTE: - Use omap_read/write[bwl] for physical register addresses
- * - Use __raw_read/write[bwl]() for virtual register addresses
- * - Use IO_ADDRESS(phys_addr) to convert registers to virtual addresses
- * - DO NOT use hardcoded virtual addresses to allow changing the
- * IO address space again if needed
- */
-#define omap_readb(a) (*(volatile unsigned char *)IO_ADDRESS(a))
-#define omap_readw(a) (*(volatile unsigned short *)IO_ADDRESS(a))
-#define omap_readl(a) (*(volatile unsigned int *)IO_ADDRESS(a))
-
-#define omap_writeb(v,a) (*(volatile unsigned char *)IO_ADDRESS(a) = (v))
-#define omap_writew(v,a) (*(volatile unsigned short *)IO_ADDRESS(a) = (v))
-#define omap_writel(v,a) (*(volatile unsigned int *)IO_ADDRESS(a) = (v))
-
-/* 16 bit uses LDRH/STRH, base +/- offset_8 */
-typedef struct { volatile u16 offset[256]; } __regbase16;
-#define __REGV16(vaddr) ((__regbase16 *)((vaddr)&~0xff)) \
- ->offset[((vaddr)&0xff)>>1]
-#define __REG16(paddr) __REGV16(io_p2v(paddr))
-
-/* 8/32 bit uses LDR/STR, base +/- offset_12 */
-typedef struct { volatile u8 offset[4096]; } __regbase8;
-#define __REGV8(vaddr) ((__regbase8 *)((vaddr)&~4095)) \
- ->offset[((vaddr)&4095)>>0]
-#define __REG8(paddr) __REGV8(io_p2v(paddr))
-
-typedef struct { volatile u32 offset[4096]; } __regbase32;
-#define __REGV32(vaddr) ((__regbase32 *)((vaddr)&~4095)) \
- ->offset[((vaddr)&4095)>>2]
-#define __REG32(paddr) __REGV32(io_p2v(paddr))
-
-extern void omap1_map_common_io(void);
-extern void omap1_init_common_hw(void);
-
-extern void omap2_map_common_io(void);
-extern void omap2_init_common_hw(void);
-
-#else
-
-#define __REG8(paddr) io_p2v(paddr)
-#define __REG16(paddr) io_p2v(paddr)
-#define __REG32(paddr) io_p2v(paddr)
-
-#endif
-
-#endif
diff --git a/original/asm-arm/arch/irqs.h b/original/asm-arm/arch/irqs.h
deleted file mode 100644
index 8c7d115..0000000
--- a/original/asm-arm/arch/irqs.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/irqs.h
- *
- * Copyright (C) Greg Lonnon 2001
- * Updated for OMAP-1610 by Tony Lindgren <tony@atomide.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * NOTE: The interrupt vectors for the OMAP-1509, OMAP-1510, and OMAP-1610
- * are different.
- */
-
-#ifndef __ASM_ARCH_OMAP15XX_IRQS_H
-#define __ASM_ARCH_OMAP15XX_IRQS_H
-
-/*
- * IRQ numbers for interrupt handler 1
- *
- * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
- *
- */
-#define INT_CAMERA 1
-#define INT_FIQ 3
-#define INT_RTDX 6
-#define INT_DSP_MMU_ABORT 7
-#define INT_HOST 8
-#define INT_ABORT 9
-#define INT_DSP_MAILBOX1 10
-#define INT_DSP_MAILBOX2 11
-#define INT_BRIDGE_PRIV 13
-#define INT_GPIO_BANK1 14
-#define INT_UART3 15
-#define INT_TIMER3 16
-#define INT_DMA_CH0_6 19
-#define INT_DMA_CH1_7 20
-#define INT_DMA_CH2_8 21
-#define INT_DMA_CH3 22
-#define INT_DMA_CH4 23
-#define INT_DMA_CH5 24
-#define INT_DMA_LCD 25
-#define INT_TIMER1 26
-#define INT_WD_TIMER 27
-#define INT_BRIDGE_PUB 28
-#define INT_TIMER2 30
-#define INT_LCD_CTRL 31
-
-/*
- * OMAP-1510 specific IRQ numbers for interrupt handler 1
- */
-#define INT_1510_IH2_IRQ 0
-#define INT_1510_RES2 2
-#define INT_1510_SPI_TX 4
-#define INT_1510_SPI_RX 5
-#define INT_1510_RES12 12
-#define INT_1510_LB_MMU 17
-#define INT_1510_RES18 18
-#define INT_1510_LOCAL_BUS 29
-
-/*
- * OMAP-1610 specific IRQ numbers for interrupt handler 1
- */
-#define INT_1610_IH2_IRQ 0
-#define INT_1610_IH2_FIQ 2
-#define INT_1610_McBSP2_TX 4
-#define INT_1610_McBSP2_RX 5
-#define INT_1610_LCD_LINE 12
-#define INT_1610_GPTIMER1 17
-#define INT_1610_GPTIMER2 18
-#define INT_1610_SSR_FIFO_0 29
-
-/*
- * OMAP-730 specific IRQ numbers for interrupt handler 1
- */
-#define INT_730_IH2_FIQ 0
-#define INT_730_IH2_IRQ 1
-#define INT_730_USB_NON_ISO 2
-#define INT_730_USB_ISO 3
-#define INT_730_ICR 4
-#define INT_730_EAC 5
-#define INT_730_GPIO_BANK1 6
-#define INT_730_GPIO_BANK2 7
-#define INT_730_GPIO_BANK3 8
-#define INT_730_McBSP2TX 10
-#define INT_730_McBSP2RX 11
-#define INT_730_McBSP2RX_OVF 12
-#define INT_730_LCD_LINE 14
-#define INT_730_GSM_PROTECT 15
-#define INT_730_TIMER3 16
-#define INT_730_GPIO_BANK5 17
-#define INT_730_GPIO_BANK6 18
-#define INT_730_SPGIO_WR 29
-
-/*
- * IRQ numbers for interrupt handler 2
- *
- * NOTE: See also the OMAP-1510 and 1610 specific IRQ numbers below
- */
-#define IH2_BASE 32
-
-#define INT_KEYBOARD (1 + IH2_BASE)
-#define INT_uWireTX (2 + IH2_BASE)
-#define INT_uWireRX (3 + IH2_BASE)
-#define INT_I2C (4 + IH2_BASE)
-#define INT_MPUIO (5 + IH2_BASE)
-#define INT_USB_HHC_1 (6 + IH2_BASE)
-#define INT_McBSP3TX (10 + IH2_BASE)
-#define INT_McBSP3RX (11 + IH2_BASE)
-#define INT_McBSP1TX (12 + IH2_BASE)
-#define INT_McBSP1RX (13 + IH2_BASE)
-#define INT_UART2 (14 + IH2_BASE)
-#define INT_UART1 (15 + IH2_BASE)
-#define INT_BT_MCSI1TX (16 + IH2_BASE)
-#define INT_BT_MCSI1RX (17 + IH2_BASE)
-#define INT_USB_W2FC (20 + IH2_BASE)
-#define INT_1WIRE (21 + IH2_BASE)
-#define INT_OS_TIMER (22 + IH2_BASE)
-#define INT_MMC (23 + IH2_BASE)
-#define INT_GAUGE_32K (24 + IH2_BASE)
-#define INT_RTC_TIMER (25 + IH2_BASE)
-#define INT_RTC_ALARM (26 + IH2_BASE)
-#define INT_MEM_STICK (27 + IH2_BASE)
-#define INT_DSP_MMU (28 + IH2_BASE)
-
-/*
- * OMAP-1510 specific IRQ numbers for interrupt handler 2
- */
-#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
-
-/*
- * OMAP-1610 specific IRQ numbers for interrupt handler 2
- */
-#define INT_1610_FAC (0 + IH2_BASE)
-#define INT_1610_USB_HHC_2 (7 + IH2_BASE)
-#define INT_1610_USB_OTG (8 + IH2_BASE)
-#define INT_1610_SoSSI (9 + IH2_BASE)
-#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
-#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
-#define INT_1610_STI (32 + IH2_BASE)
-#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
-#define INT_1610_GPTIMER3 (34 + IH2_BASE)
-#define INT_1610_GPTIMER4 (35 + IH2_BASE)
-#define INT_1610_GPTIMER5 (36 + IH2_BASE)
-#define INT_1610_GPTIMER6 (37 + IH2_BASE)
-#define INT_1610_GPTIMER7 (38 + IH2_BASE)
-#define INT_1610_GPTIMER8 (39 + IH2_BASE)
-#define INT_1610_GPIO_BANK2 (40 + IH2_BASE)
-#define INT_1610_GPIO_BANK3 (41 + IH2_BASE)
-#define INT_1610_MMC2 (42 + IH2_BASE)
-#define INT_1610_CF (43 + IH2_BASE)
-#define INT_1610_WAKE_UP_REQ (46 + IH2_BASE)
-#define INT_1610_GPIO_BANK4 (48 + IH2_BASE)
-#define INT_1610_SPI (49 + IH2_BASE)
-#define INT_1610_DMA_CH6 (53 + IH2_BASE)
-#define INT_1610_DMA_CH7 (54 + IH2_BASE)
-#define INT_1610_DMA_CH8 (55 + IH2_BASE)
-#define INT_1610_DMA_CH9 (56 + IH2_BASE)
-#define INT_1610_DMA_CH10 (57 + IH2_BASE)
-#define INT_1610_DMA_CH11 (58 + IH2_BASE)
-#define INT_1610_DMA_CH12 (59 + IH2_BASE)
-#define INT_1610_DMA_CH13 (60 + IH2_BASE)
-#define INT_1610_DMA_CH14 (61 + IH2_BASE)
-#define INT_1610_DMA_CH15 (62 + IH2_BASE)
-#define INT_1610_NAND (63 + IH2_BASE)
-
-/*
- * OMAP-730 specific IRQ numbers for interrupt handler 2
- */
-#define INT_730_HW_ERRORS (0 + IH2_BASE)
-#define INT_730_NFIQ_PWR_FAIL (1 + IH2_BASE)
-#define INT_730_CFCD (2 + IH2_BASE)
-#define INT_730_CFIREQ (3 + IH2_BASE)
-#define INT_730_I2C (4 + IH2_BASE)
-#define INT_730_PCC (5 + IH2_BASE)
-#define INT_730_MPU_EXT_NIRQ (6 + IH2_BASE)
-#define INT_730_SPI_100K_1 (7 + IH2_BASE)
-#define INT_730_SYREN_SPI (8 + IH2_BASE)
-#define INT_730_VLYNQ (9 + IH2_BASE)
-#define INT_730_GPIO_BANK4 (10 + IH2_BASE)
-#define INT_730_McBSP1TX (11 + IH2_BASE)
-#define INT_730_McBSP1RX (12 + IH2_BASE)
-#define INT_730_McBSP1RX_OF (13 + IH2_BASE)
-#define INT_730_UART_MODEM_IRDA_2 (14 + IH2_BASE)
-#define INT_730_UART_MODEM_1 (15 + IH2_BASE)
-#define INT_730_MCSI (16 + IH2_BASE)
-#define INT_730_uWireTX (17 + IH2_BASE)
-#define INT_730_uWireRX (18 + IH2_BASE)
-#define INT_730_SMC_CD (19 + IH2_BASE)
-#define INT_730_SMC_IREQ (20 + IH2_BASE)
-#define INT_730_HDQ_1WIRE (21 + IH2_BASE)
-#define INT_730_TIMER32K (22 + IH2_BASE)
-#define INT_730_MMC_SDIO (23 + IH2_BASE)
-#define INT_730_UPLD (24 + IH2_BASE)
-#define INT_730_USB_HHC_1 (27 + IH2_BASE)
-#define INT_730_USB_HHC_2 (28 + IH2_BASE)
-#define INT_730_USB_GENI (29 + IH2_BASE)
-#define INT_730_USB_OTG (30 + IH2_BASE)
-#define INT_730_CAMERA_IF (31 + IH2_BASE)
-#define INT_730_RNG (32 + IH2_BASE)
-#define INT_730_DUAL_MODE_TIMER (33 + IH2_BASE)
-#define INT_730_DBB_RF_EN (34 + IH2_BASE)
-#define INT_730_MPUIO_KEYPAD (35 + IH2_BASE)
-#define INT_730_SHA1_MD5 (36 + IH2_BASE)
-#define INT_730_SPI_100K_2 (37 + IH2_BASE)
-#define INT_730_RNG_IDLE (38 + IH2_BASE)
-#define INT_730_MPUIO (39 + IH2_BASE)
-#define INT_730_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE)
-#define INT_730_LLPC_OE_FALLING (41 + IH2_BASE)
-#define INT_730_LLPC_OE_RISING (42 + IH2_BASE)
-#define INT_730_LLPC_VSYNC (43 + IH2_BASE)
-#define INT_730_WAKE_UP_REQ (46 + IH2_BASE)
-#define INT_730_DMA_CH6 (53 + IH2_BASE)
-#define INT_730_DMA_CH7 (54 + IH2_BASE)
-#define INT_730_DMA_CH8 (55 + IH2_BASE)
-#define INT_730_DMA_CH9 (56 + IH2_BASE)
-#define INT_730_DMA_CH10 (57 + IH2_BASE)
-#define INT_730_DMA_CH11 (58 + IH2_BASE)
-#define INT_730_DMA_CH12 (59 + IH2_BASE)
-#define INT_730_DMA_CH13 (60 + IH2_BASE)
-#define INT_730_DMA_CH14 (61 + IH2_BASE)
-#define INT_730_DMA_CH15 (62 + IH2_BASE)
-#define INT_730_NAND (63 + IH2_BASE)
-
-#define INT_24XX_SYS_NIRQ 7
-#define INT_24XX_SDMA_IRQ0 12
-#define INT_24XX_SDMA_IRQ1 13
-#define INT_24XX_SDMA_IRQ2 14
-#define INT_24XX_SDMA_IRQ3 15
-#define INT_24XX_CAM_IRQ 24
-#define INT_24XX_DSS_IRQ 25
-#define INT_24XX_GPIO_BANK1 29
-#define INT_24XX_GPIO_BANK2 30
-#define INT_24XX_GPIO_BANK3 31
-#define INT_24XX_GPIO_BANK4 32
-#define INT_24XX_GPTIMER1 37
-#define INT_24XX_GPTIMER2 38
-#define INT_24XX_GPTIMER3 39
-#define INT_24XX_GPTIMER4 40
-#define INT_24XX_GPTIMER5 41
-#define INT_24XX_GPTIMER6 42
-#define INT_24XX_GPTIMER7 43
-#define INT_24XX_GPTIMER8 44
-#define INT_24XX_GPTIMER9 45
-#define INT_24XX_GPTIMER10 46
-#define INT_24XX_GPTIMER11 47
-#define INT_24XX_GPTIMER12 48
-#define INT_24XX_MCBSP1_IRQ_TX 59
-#define INT_24XX_MCBSP1_IRQ_RX 60
-#define INT_24XX_MCBSP2_IRQ_TX 62
-#define INT_24XX_MCBSP2_IRQ_RX 63
-#define INT_24XX_UART1_IRQ 72
-#define INT_24XX_UART2_IRQ 73
-#define INT_24XX_UART3_IRQ 74
-#define INT_24XX_MMC_IRQ 83
-
-/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
- * 16 MPUIO lines */
-#define OMAP_MAX_GPIO_LINES 192
-#define IH_GPIO_BASE (128 + IH2_BASE)
-#define IH_MPUIO_BASE (OMAP_MAX_GPIO_LINES + IH_GPIO_BASE)
-#define IH_BOARD_BASE (16 + IH_MPUIO_BASE)
-
-#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
-
-#ifndef __ASSEMBLY__
-extern void omap_init_irq(void);
-#endif
-
-/*
- * The definition of NR_IRQS is in board-specific header file, which is
- * included via hardware.h
- */
-#include <asm/hardware.h>
-
-#ifndef NR_IRQS
-#define NR_IRQS IH_BOARD_BASE
-#endif
-
-#endif
diff --git a/original/asm-arm/arch/mcbsp.h b/original/asm-arm/arch/mcbsp.h
deleted file mode 100644
index ed0dde4..0000000
--- a/original/asm-arm/arch/mcbsp.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/gpio.h
- *
- * Defines for Multi-Channel Buffered Serial Port
- *
- * Copyright (C) 2002 RidgeRun, Inc.
- * Author: Steve Johnson
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef __ASM_ARCH_OMAP_MCBSP_H
-#define __ASM_ARCH_OMAP_MCBSP_H
-
-#include <asm/hardware.h>
-
-#define OMAP730_MCBSP1_BASE 0xfffb1000
-#define OMAP730_MCBSP2_BASE 0xfffb1800
-
-#define OMAP1510_MCBSP1_BASE 0xe1011800
-#define OMAP1510_MCBSP2_BASE 0xfffb1000
-#define OMAP1510_MCBSP3_BASE 0xe1017000
-
-#define OMAP1610_MCBSP1_BASE 0xe1011800
-#define OMAP1610_MCBSP2_BASE 0xfffb1000
-#define OMAP1610_MCBSP3_BASE 0xe1017000
-
-#define OMAP24XX_MCBSP1_BASE 0x48074000
-#define OMAP24XX_MCBSP2_BASE 0x48076000
-
-#if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730)
-
-#define OMAP_MCBSP_REG_DRR2 0x00
-#define OMAP_MCBSP_REG_DRR1 0x02
-#define OMAP_MCBSP_REG_DXR2 0x04
-#define OMAP_MCBSP_REG_DXR1 0x06
-#define OMAP_MCBSP_REG_SPCR2 0x08
-#define OMAP_MCBSP_REG_SPCR1 0x0a
-#define OMAP_MCBSP_REG_RCR2 0x0c
-#define OMAP_MCBSP_REG_RCR1 0x0e
-#define OMAP_MCBSP_REG_XCR2 0x10
-#define OMAP_MCBSP_REG_XCR1 0x12
-#define OMAP_MCBSP_REG_SRGR2 0x14
-#define OMAP_MCBSP_REG_SRGR1 0x16
-#define OMAP_MCBSP_REG_MCR2 0x18
-#define OMAP_MCBSP_REG_MCR1 0x1a
-#define OMAP_MCBSP_REG_RCERA 0x1c
-#define OMAP_MCBSP_REG_RCERB 0x1e
-#define OMAP_MCBSP_REG_XCERA 0x20
-#define OMAP_MCBSP_REG_XCERB 0x22
-#define OMAP_MCBSP_REG_PCR0 0x24
-#define OMAP_MCBSP_REG_RCERC 0x26
-#define OMAP_MCBSP_REG_RCERD 0x28
-#define OMAP_MCBSP_REG_XCERC 0x2A
-#define OMAP_MCBSP_REG_XCERD 0x2C
-#define OMAP_MCBSP_REG_RCERE 0x2E
-#define OMAP_MCBSP_REG_RCERF 0x30
-#define OMAP_MCBSP_REG_XCERE 0x32
-#define OMAP_MCBSP_REG_XCERF 0x34
-#define OMAP_MCBSP_REG_RCERG 0x36
-#define OMAP_MCBSP_REG_RCERH 0x38
-#define OMAP_MCBSP_REG_XCERG 0x3A
-#define OMAP_MCBSP_REG_XCERH 0x3C
-
-#define OMAP_MAX_MCBSP_COUNT 3
-
-#define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1)
-#define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1)
-
-#define AUDIO_MCBSP OMAP_MCBSP1
-#define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX
-#define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX
-
-#elif defined(CONFIG_ARCH_OMAP24XX)
-
-#define OMAP_MCBSP_REG_DRR2 0x00
-#define OMAP_MCBSP_REG_DRR1 0x04
-#define OMAP_MCBSP_REG_DXR2 0x08
-#define OMAP_MCBSP_REG_DXR1 0x0C
-#define OMAP_MCBSP_REG_SPCR2 0x10
-#define OMAP_MCBSP_REG_SPCR1 0x14
-#define OMAP_MCBSP_REG_RCR2 0x18
-#define OMAP_MCBSP_REG_RCR1 0x1C
-#define OMAP_MCBSP_REG_XCR2 0x20
-#define OMAP_MCBSP_REG_XCR1 0x24
-#define OMAP_MCBSP_REG_SRGR2 0x28
-#define OMAP_MCBSP_REG_SRGR1 0x2C
-#define OMAP_MCBSP_REG_MCR2 0x30
-#define OMAP_MCBSP_REG_MCR1 0x34
-#define OMAP_MCBSP_REG_RCERA 0x38
-#define OMAP_MCBSP_REG_RCERB 0x3C
-#define OMAP_MCBSP_REG_XCERA 0x40
-#define OMAP_MCBSP_REG_XCERB 0x44
-#define OMAP_MCBSP_REG_PCR0 0x48
-#define OMAP_MCBSP_REG_RCERC 0x4C
-#define OMAP_MCBSP_REG_RCERD 0x50
-#define OMAP_MCBSP_REG_XCERC 0x54
-#define OMAP_MCBSP_REG_XCERD 0x58
-#define OMAP_MCBSP_REG_RCERE 0x5C
-#define OMAP_MCBSP_REG_RCERF 0x60
-#define OMAP_MCBSP_REG_XCERE 0x64
-#define OMAP_MCBSP_REG_XCERF 0x68
-#define OMAP_MCBSP_REG_RCERG 0x6C
-#define OMAP_MCBSP_REG_RCERH 0x70
-#define OMAP_MCBSP_REG_XCERG 0x74
-#define OMAP_MCBSP_REG_XCERH 0x78
-
-#define OMAP_MAX_MCBSP_COUNT 2
-
-#define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1)
-#define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1)
-
-#define AUDIO_MCBSP OMAP_MCBSP2
-#define AUDIO_DMA_TX OMAP24XX_DMA_MCBSP2_TX
-#define AUDIO_DMA_RX OMAP24XX_DMA_MCBSP2_RX
-
-#endif
-
-#define OMAP_MCBSP_READ(base, reg) __raw_readw((base) + OMAP_MCBSP_REG_##reg)
-#define OMAP_MCBSP_WRITE(base, reg, val) __raw_writew((val), (base) + OMAP_MCBSP_REG_##reg)
-
-
-/************************** McBSP SPCR1 bit definitions ***********************/
-#define RRST 0x0001
-#define RRDY 0x0002
-#define RFULL 0x0004
-#define RSYNC_ERR 0x0008
-#define RINTM(value) ((value)<<4) /* bits 4:5 */
-#define ABIS 0x0040
-#define DXENA 0x0080
-#define CLKSTP(value) ((value)<<11) /* bits 11:12 */
-#define RJUST(value) ((value)<<13) /* bits 13:14 */
-#define DLB 0x8000
-
-/************************** McBSP SPCR2 bit definitions ***********************/
-#define XRST 0x0001
-#define XRDY 0x0002
-#define XEMPTY 0x0004
-#define XSYNC_ERR 0x0008
-#define XINTM(value) ((value)<<4) /* bits 4:5 */
-#define GRST 0x0040
-#define FRST 0x0080
-#define SOFT 0x0100
-#define FREE 0x0200
-
-/************************** McBSP PCR bit definitions *************************/
-#define CLKRP 0x0001
-#define CLKXP 0x0002
-#define FSRP 0x0004
-#define FSXP 0x0008
-#define DR_STAT 0x0010
-#define DX_STAT 0x0020
-#define CLKS_STAT 0x0040
-#define SCLKME 0x0080
-#define CLKRM 0x0100
-#define CLKXM 0x0200
-#define FSRM 0x0400
-#define FSXM 0x0800
-#define RIOEN 0x1000
-#define XIOEN 0x2000
-#define IDLE_EN 0x4000
-
-/************************** McBSP RCR1 bit definitions ************************/
-#define RWDLEN1(value) ((value)<<5) /* Bits 5:7 */
-#define RFRLEN1(value) ((value)<<8) /* Bits 8:14 */
-
-/************************** McBSP XCR1 bit definitions ************************/
-#define XWDLEN1(value) ((value)<<5) /* Bits 5:7 */
-#define XFRLEN1(value) ((value)<<8) /* Bits 8:14 */
-
-/*************************** McBSP RCR2 bit definitions ***********************/
-#define RDATDLY(value) (value) /* Bits 0:1 */
-#define RFIG 0x0004
-#define RCOMPAND(value) ((value)<<3) /* Bits 3:4 */
-#define RWDLEN2(value) ((value)<<5) /* Bits 5:7 */
-#define RFRLEN2(value) ((value)<<8) /* Bits 8:14 */
-#define RPHASE 0x8000
-
-/*************************** McBSP XCR2 bit definitions ***********************/
-#define XDATDLY(value) (value) /* Bits 0:1 */
-#define XFIG 0x0004
-#define XCOMPAND(value) ((value)<<3) /* Bits 3:4 */
-#define XWDLEN2(value) ((value)<<5) /* Bits 5:7 */
-#define XFRLEN2(value) ((value)<<8) /* Bits 8:14 */
-#define XPHASE 0x8000
-
-/************************* McBSP SRGR1 bit definitions ************************/
-#define CLKGDV(value) (value) /* Bits 0:7 */
-#define FWID(value) ((value)<<8) /* Bits 8:15 */
-
-/************************* McBSP SRGR2 bit definitions ************************/
-#define FPER(value) (value) /* Bits 0:11 */
-#define FSGM 0x1000
-#define CLKSM 0x2000
-#define CLKSP 0x4000
-#define GSYNC 0x8000
-
-/************************* McBSP MCR1 bit definitions *************************/
-#define RMCM 0x0001
-#define RCBLK(value) ((value)<<2) /* Bits 2:4 */
-#define RPABLK(value) ((value)<<5) /* Bits 5:6 */
-#define RPBBLK(value) ((value)<<7) /* Bits 7:8 */
-
-/************************* McBSP MCR2 bit definitions *************************/
-#define XMCM(value) (value) /* Bits 0:1 */
-#define XCBLK(value) ((value)<<2) /* Bits 2:4 */
-#define XPABLK(value) ((value)<<5) /* Bits 5:6 */
-#define XPBBLK(value) ((value)<<7) /* Bits 7:8 */
-
-
-/* we don't do multichannel for now */
-struct omap_mcbsp_reg_cfg {
- u16 spcr2;
- u16 spcr1;
- u16 rcr2;
- u16 rcr1;
- u16 xcr2;
- u16 xcr1;
- u16 srgr2;
- u16 srgr1;
- u16 mcr2;
- u16 mcr1;
- u16 pcr0;
- u16 rcerc;
- u16 rcerd;
- u16 xcerc;
- u16 xcerd;
- u16 rcere;
- u16 rcerf;
- u16 xcere;
- u16 xcerf;
- u16 rcerg;
- u16 rcerh;
- u16 xcerg;
- u16 xcerh;
-};
-
-typedef enum {
- OMAP_MCBSP1 = 0,
- OMAP_MCBSP2,
- OMAP_MCBSP3,
-} omap_mcbsp_id;
-
-typedef int __bitwise omap_mcbsp_io_type_t;
-#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
-#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
-
-typedef enum {
- OMAP_MCBSP_WORD_8 = 0,
- OMAP_MCBSP_WORD_12,
- OMAP_MCBSP_WORD_16,
- OMAP_MCBSP_WORD_20,
- OMAP_MCBSP_WORD_24,
- OMAP_MCBSP_WORD_32,
-} omap_mcbsp_word_length;
-
-typedef enum {
- OMAP_MCBSP_CLK_RISING = 0,
- OMAP_MCBSP_CLK_FALLING,
-} omap_mcbsp_clk_polarity;
-
-typedef enum {
- OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
- OMAP_MCBSP_FS_ACTIVE_LOW,
-} omap_mcbsp_fs_polarity;
-
-typedef enum {
- OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
- OMAP_MCBSP_CLK_STP_MODE_DELAY,
-} omap_mcbsp_clk_stp_mode;
-
-
-/******* SPI specific mode **********/
-typedef enum {
- OMAP_MCBSP_SPI_MASTER = 0,
- OMAP_MCBSP_SPI_SLAVE,
-} omap_mcbsp_spi_mode;
-
-struct omap_mcbsp_spi_cfg {
- omap_mcbsp_spi_mode spi_mode;
- omap_mcbsp_clk_polarity rx_clock_polarity;
- omap_mcbsp_clk_polarity tx_clock_polarity;
- omap_mcbsp_fs_polarity fsx_polarity;
- u8 clk_div;
- omap_mcbsp_clk_stp_mode clk_stp_mode;
- omap_mcbsp_word_length word_length;
-};
-
-void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
-int omap_mcbsp_request(unsigned int id);
-void omap_mcbsp_free(unsigned int id);
-void omap_mcbsp_start(unsigned int id);
-void omap_mcbsp_stop(unsigned int id);
-void omap_mcbsp_xmit_word(unsigned int id, u32 word);
-u32 omap_mcbsp_recv_word(unsigned int id);
-
-int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
-int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
-int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word);
-int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word);
-
-
-/* SPI specific API */
-void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg);
-
-/* Polled read/write functions */
-int omap_mcbsp_pollread(unsigned int id, u16 * buf);
-int omap_mcbsp_pollwrite(unsigned int id, u16 buf);
-
-#endif
diff --git a/original/asm-arm/arch/memory.h b/original/asm-arm/arch/memory.h
deleted file mode 100644
index a350f5f..0000000
--- a/original/asm-arm/arch/memory.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/memory.h
- *
- * Memory map for OMAP-1510 and 1610
- *
- * Copyright (C) 2000 RidgeRun, Inc.
- * Author: Greg Lonnon <glonnon@ridgerun.com>
- *
- * This file was derived from linux/include/asm-arm/arch-intergrator/memory.h
- * Copyright (C) 1999 ARM Limited
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_MEMORY_H
-#define __ASM_ARCH_MEMORY_H
-
-/*
- * Physical DRAM offset.
- */
-#if defined(CONFIG_ARCH_OMAP1)
-#define PHYS_OFFSET UL(0x10000000)
-#elif defined(CONFIG_ARCH_OMAP2)
-#define PHYS_OFFSET UL(0x80000000)
-#endif
-
-/*
- * Conversion between SDRAM and fake PCI bus, used by USB
- * NOTE: Physical address must be converted to Local Bus address
- * on OMAP-1510 only
- */
-
-/*
- * Bus address is physical address, except for OMAP-1510 Local Bus.
- */
-#define __virt_to_bus(x) __virt_to_phys(x)
-#define __bus_to_virt(x) __phys_to_virt(x)
-
-/*
- * OMAP-1510 bus address is translated into a Local Bus address if the
- * OMAP bus type is lbus. We do the address translation based on the
- * device overriding the defaults used in the dma-mapping API.
- * Note that the is_lbus_device() test is not very efficient on 1510
- * because of the strncmp().
- */
-#ifdef CONFIG_ARCH_OMAP15XX
-
-/*
- * OMAP-1510 Local Bus address offset
- */
-#define OMAP1510_LB_OFFSET UL(0x30000000)
-
-#define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET)
-#define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET)
-#define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0))
-
-#define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \
- (dma_addr_t)virt_to_lbus(page_address(page)) : \
- (dma_addr_t)__virt_to_bus(page_address(page));})
-
-#define __arch_dma_to_virt(dev, addr) ({is_lbus_device(dev) ? \
- lbus_to_virt(addr) : \
- __bus_to_virt(addr);})
-
-#define __arch_virt_to_dma(dev, addr) ({is_lbus_device(dev) ? \
- virt_to_lbus(addr) : \
- __virt_to_bus(addr);})
-
-#endif /* CONFIG_ARCH_OMAP15XX */
-
-/* Override the ARM default */
-#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-
-#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
-#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
-#endif
-
-#define CONSISTENT_DMA_SIZE \
- (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
-
-#endif
-
-#endif
-
diff --git a/original/asm-arm/arch/mtd-xip.h b/original/asm-arm/arch/mtd-xip.h
deleted file mode 100644
index a73a285..0000000
--- a/original/asm-arm/arch/mtd-xip.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * MTD primitives for XIP support. Architecture specific functions.
- *
- * Do not include this file directly. It's included from linux/mtd/xip.h
- *
- * Author: Vladimir Barinov <vbarinov@ru.mvista.com>
- *
- * (c) 2005 MontaVista Software, Inc. This file is licensed under the
- * terms of the GNU General Public License version 2. This program is
- * licensed "as is" without any warranty of any kind, whether express or
- * implied.
- */
-
-#ifndef __ARCH_OMAP_MTD_XIP_H__
-#define __ARCH_OMAP_MTD_XIP_H__
-
-#include <asm/hardware.h>
-#define OMAP_MPU_TIMER_BASE (0xfffec500)
-#define OMAP_MPU_TIMER_OFFSET 0x100
-
-typedef struct {
- u32 cntl; /* CNTL_TIMER, R/W */
- u32 load_tim; /* LOAD_TIM, W */
- u32 read_tim; /* READ_TIM, R */
-} xip_omap_mpu_timer_regs_t;
-
-#define xip_omap_mpu_timer_base(n) \
-((volatile xip_omap_mpu_timer_regs_t*)IO_ADDRESS(OMAP_MPU_TIMER_BASE + \
- (n)*OMAP_MPU_TIMER_OFFSET))
-
-static inline unsigned long xip_omap_mpu_timer_read(int nr)
-{
- volatile xip_omap_mpu_timer_regs_t* timer = xip_omap_mpu_timer_base(nr);
- return timer->read_tim;
-}
-
-#define xip_irqpending() \
- (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR))
-#define xip_currtime() (~xip_omap_mpu_timer_read(0))
-
-/*
- * It's permitted to do approxmation for xip_elapsed_since macro
- * (see linux/mtd/xip.h)
- */
-
-#ifdef CONFIG_MACH_OMAP_PERSEUS2
-#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7)
-#else
-#define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6)
-#endif
-
-/*
- * xip_cpu_idle() is used when waiting for a delay equal or larger than
- * the system timer tick period. This should put the CPU into idle mode
- * to save power and to be woken up only when some interrupts are pending.
- * As above, this should not rely upon standard kernel code.
- */
-
-#define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1))
-
-#endif /* __ARCH_OMAP_MTD_XIP_H__ */
diff --git a/original/asm-arm/arch/mux.h b/original/asm-arm/arch/mux.h
deleted file mode 100644
index 7862475..0000000
--- a/original/asm-arm/arch/mux.h
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/mux.h
- *
- * Table of the Omap register configurations for the FUNC_MUX and
- * PULL_DWN combinations.
- *
- * Copyright (C) 2003 - 2005 Nokia Corporation
- *
- * Written by Tony Lindgren <tony.lindgren@nokia.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * NOTE: Please use the following naming style for new pin entries.
- * For example, W8_1610_MMC2_DAT0, where:
- * - W8 = ball
- * - 1610 = 1510 or 1610, none if common for both 1510 and 1610
- * - MMC2_DAT0 = function
- *
- * Change log:
- * Added entry for the I2C interface. (02Feb 2004)
- * Copyright (C) 2004 Texas Instruments
- *
- * Added entry for the keypad and uwire CS1. (09Mar 2004)
- * Copyright (C) 2004 Texas Instruments
- *
- */
-
-#ifndef __ASM_ARCH_MUX_H
-#define __ASM_ARCH_MUX_H
-
-#define PU_PD_SEL_NA 0 /* No pu_pd reg available */
-#define PULL_DWN_CTRL_NA 0 /* No pull-down control needed */
-
-#ifdef CONFIG_OMAP_MUX_DEBUG
-#define MUX_REG(reg, mode_offset, mode) .mux_reg_name = "FUNC_MUX_CTRL_"#reg, \
- .mux_reg = FUNC_MUX_CTRL_##reg, \
- .mask_offset = mode_offset, \
- .mask = mode,
-
-#define PULL_REG(reg, bit, status) .pull_name = "PULL_DWN_CTRL_"#reg, \
- .pull_reg = PULL_DWN_CTRL_##reg, \
- .pull_bit = bit, \
- .pull_val = status,
-
-#define PU_PD_REG(reg, status) .pu_pd_name = "PU_PD_SEL_"#reg, \
- .pu_pd_reg = PU_PD_SEL_##reg, \
- .pu_pd_val = status,
-
-#define MUX_REG_730(reg, mode_offset, mode) .mux_reg_name = "OMAP730_IO_CONF_"#reg, \
- .mux_reg = OMAP730_IO_CONF_##reg, \
- .mask_offset = mode_offset, \
- .mask = mode,
-
-#define PULL_REG_730(reg, bit, status) .pull_name = "OMAP730_IO_CONF_"#reg, \
- .pull_reg = OMAP730_IO_CONF_##reg, \
- .pull_bit = bit, \
- .pull_val = status,
-
-#else
-
-#define MUX_REG(reg, mode_offset, mode) .mux_reg = FUNC_MUX_CTRL_##reg, \
- .mask_offset = mode_offset, \
- .mask = mode,
-
-#define PULL_REG(reg, bit, status) .pull_reg = PULL_DWN_CTRL_##reg, \
- .pull_bit = bit, \
- .pull_val = status,
-
-#define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, \
- .pu_pd_val = status,
-
-#define MUX_REG_730(reg, mode_offset, mode) \
- .mux_reg = OMAP730_IO_CONF_##reg, \
- .mask_offset = mode_offset, \
- .mask = mode,
-
-#define PULL_REG_730(reg, bit, status) .pull_reg = OMAP730_IO_CONF_##reg, \
- .pull_bit = bit, \
- .pull_val = status,
-
-#endif /* CONFIG_OMAP_MUX_DEBUG */
-
-#define MUX_CFG(desc, mux_reg, mode_offset, mode, \
- pull_reg, pull_bit, pull_status, \
- pu_pd_reg, pu_pd_status, debug_status) \
-{ \
- .name = desc, \
- .debug = debug_status, \
- MUX_REG(mux_reg, mode_offset, mode) \
- PULL_REG(pull_reg, pull_bit, !pull_status) \
- PU_PD_REG(pu_pd_reg, pu_pd_status) \
-},
-
-
-/*
- * OMAP730 has a slightly different config for the pin mux.
- * - config regs are the OMAP730_IO_CONF_x regs (see omap730.h) regs and
- * not the FUNC_MUX_CTRL_x regs from hardware.h
- * - for pull-up/down, only has one enable bit which is is in the same register
- * as mux config
- */
-#define MUX_CFG_730(desc, mux_reg, mode_offset, mode, \
- pull_bit, pull_status, debug_status)\
-{ \
- .name = desc, \
- .debug = debug_status, \
- MUX_REG_730(mux_reg, mode_offset, mode) \
- PULL_REG_730(mux_reg, pull_bit, pull_status) \
- PU_PD_REG(NA, 0) \
-},
-
-#define MUX_CFG_24XX(desc, reg_offset, mode, \
- pull_en, pull_mode, dbg) \
-{ \
- .name = desc, \
- .debug = dbg, \
- .mux_reg = reg_offset, \
- .mask = mode, \
- .pull_val = pull_en, \
- .pu_pd_val = pull_mode, \
-},
-
-
-#define PULL_DISABLED 0
-#define PULL_ENABLED 1
-
-#define PULL_DOWN 0
-#define PULL_UP 1
-
-struct pin_config {
- char *name;
- unsigned char busy;
- unsigned char debug;
-
- const char *mux_reg_name;
- const unsigned int mux_reg;
- const unsigned char mask_offset;
- const unsigned char mask;
-
- const char *pull_name;
- const unsigned int pull_reg;
- const unsigned char pull_val;
- const unsigned char pull_bit;
-
- const char *pu_pd_name;
- const unsigned int pu_pd_reg;
- const unsigned char pu_pd_val;
-};
-
-enum omap730_index {
- /* OMAP 730 keyboard */
- E2_730_KBR0,
- J7_730_KBR1,
- E1_730_KBR2,
- F3_730_KBR3,
- D2_730_KBR4,
- AA20_730_KBR5,
- V17_730_KBR6,
- C2_730_KBC0,
- D3_730_KBC1,
- E4_730_KBC2,
- F4_730_KBC3,
- E3_730_KBC4,
-
- /* USB */
- AA17_730_USB_DM,
- W16_730_USB_PU_EN,
- W17_730_USB_VBUSI,
-
- /* Tornado LCD */
- V19_730_GPIO_15,
- M19_730_GPIO_77,
- C21_730_GPIO_121_122,
- K19_730_GPIO_126,
- K15_730_GPIO_127,
-
- P15_730_GPIO_16_17,
-
- /* Tornado Navi */
- M15_730_GPIO_83,
- N20_730_GPIO_82,
- N18_730_GPIO_81,
- N19_730_GPIO_80,
- L15_730_GPIO_76,
-
- /* UART1 can go over it's normal pins or be redirected to the USB pins */
- UART1_CTS_RTS,
- OMAP_730_GPIOS_42_43, /* UART1 CTS, RTS lines as a GPIOs 42, 43 */
- UART1_TX_RX,
- OMAP_730_GPIOS_40_41, /* UART1 TX, RX lines as a GPIOs 40, 41 */
- UART1_USB_RX_TX,
- UART1_USB_RTS,
- UART1_USB_CTS
-};
-
-enum omap1xxx_index {
- /* UART1 (BT_UART_GATING)*/
- UART1_TX = 0,
- UART1_RTS,
-
- /* UART2 (COM_UART_GATING)*/
- UART2_TX,
- UART2_RX,
- UART2_CTS,
- UART2_RTS,
-
- /* UART3 (GIGA_UART_GATING) */
- UART3_TX,
- UART3_RX,
- UART3_CTS,
- UART3_RTS,
- UART3_CLKREQ,
- UART3_BCLK, /* 12MHz clock out */
- Y15_1610_UART3_RTS,
-
- /* PWT & PWL */
- PWT,
- PWL,
-
- /* USB master generic */
- R18_USB_VBUS,
- R18_1510_USB_GPIO0,
- W4_USB_PUEN,
- W4_USB_CLKO,
- W4_USB_HIGHZ,
- W4_GPIO58,
-
- /* USB1 master */
- USB1_SUSP,
- USB1_SEO,
- W13_1610_USB1_SE0,
- USB1_TXEN,
- USB1_TXD,
- USB1_VP,
- USB1_VM,
- USB1_RCV,
- USB1_SPEED,
- R13_1610_USB1_SPEED,
- R13_1710_USB1_SE0,
-
- /* USB2 master */
- USB2_SUSP,
- USB2_VP,
- USB2_TXEN,
- USB2_VM,
- USB2_RCV,
- USB2_SEO,
- USB2_TXD,
-
- /* OMAP-1510 GPIO */
- R18_1510_GPIO0,
- R19_1510_GPIO1,
- M14_1510_GPIO2,
-
- /* OMAP1610 GPIO */
- P18_1610_GPIO3,
- Y15_1610_GPIO17,
-
- /* OMAP-1710 GPIO */
- R18_1710_GPIO0,
- V2_1710_GPIO10,
- N21_1710_GPIO14,
- W15_1710_GPIO40,
-
- /* MPUIO */
- MPUIO2,
- N15_1610_MPUIO2,
- MPUIO4,
- MPUIO5,
- T20_1610_MPUIO5,
- W11_1610_MPUIO6,
- V10_1610_MPUIO7,
- W11_1610_MPUIO9,
- V10_1610_MPUIO10,
- W10_1610_MPUIO11,
- E20_1610_MPUIO13,
- U20_1610_MPUIO14,
- E19_1610_MPUIO15,
-
- /* MCBSP2 */
- MCBSP2_CLKR,
- MCBSP2_CLKX,
- MCBSP2_DR,
- MCBSP2_DX,
- MCBSP2_FSR,
- MCBSP2_FSX,
-
- /* MCBSP3 */
- MCBSP3_CLKX,
-
- /* Misc ballouts */
- BALLOUT_V8_ARMIO3,
- N20_HDQ,
-
- /* OMAP-1610 MMC2 */
- W8_1610_MMC2_DAT0,
- V8_1610_MMC2_DAT1,
- W15_1610_MMC2_DAT2,
- R10_1610_MMC2_DAT3,
- Y10_1610_MMC2_CLK,
- Y8_1610_MMC2_CMD,
- V9_1610_MMC2_CMDDIR,
- V5_1610_MMC2_DATDIR0,
- W19_1610_MMC2_DATDIR1,
- R18_1610_MMC2_CLKIN,
-
- /* OMAP-1610 External Trace Interface */
- M19_1610_ETM_PSTAT0,
- L15_1610_ETM_PSTAT1,
- L18_1610_ETM_PSTAT2,
- L19_1610_ETM_D0,
- J19_1610_ETM_D6,
- J18_1610_ETM_D7,
-
- /* OMAP16XX GPIO */
- P20_1610_GPIO4,
- V9_1610_GPIO7,
- W8_1610_GPIO9,
- N20_1610_GPIO11,
- N19_1610_GPIO13,
- P10_1610_GPIO22,
- V5_1610_GPIO24,
- AA20_1610_GPIO_41,
- W19_1610_GPIO48,
- M7_1610_GPIO62,
- V14_16XX_GPIO37,
- R9_16XX_GPIO18,
- L14_16XX_GPIO49,
-
- /* OMAP-1610 uWire */
- V19_1610_UWIRE_SCLK,
- U18_1610_UWIRE_SDI,
- W21_1610_UWIRE_SDO,
- N14_1610_UWIRE_CS0,
- P15_1610_UWIRE_CS3,
- N15_1610_UWIRE_CS1,
-
- /* OMAP-1610 SPI */
- U19_1610_SPIF_SCK,
- U18_1610_SPIF_DIN,
- P20_1610_SPIF_DIN,
- W21_1610_SPIF_DOUT,
- R18_1610_SPIF_DOUT,
- N14_1610_SPIF_CS0,
- N15_1610_SPIF_CS1,
- T19_1610_SPIF_CS2,
- P15_1610_SPIF_CS3,
-
- /* OMAP-1610 Flash */
- L3_1610_FLASH_CS2B_OE,
- M8_1610_FLASH_CS2B_WE,
-
- /* First MMC */
- MMC_CMD,
- MMC_DAT1,
- MMC_DAT2,
- MMC_DAT0,
- MMC_CLK,
- MMC_DAT3,
-
- /* OMAP-1710 MMC CMDDIR and DATDIR0 */
- M15_1710_MMC_CLKI,
- P19_1710_MMC_CMDDIR,
- P20_1710_MMC_DATDIR0,
-
- /* OMAP-1610 USB0 alternate pin configuration */
- W9_USB0_TXEN,
- AA9_USB0_VP,
- Y5_USB0_RCV,
- R9_USB0_VM,
- V6_USB0_TXD,
- W5_USB0_SE0,
- V9_USB0_SPEED,
- V9_USB0_SUSP,
-
- /* USB2 */
- W9_USB2_TXEN,
- AA9_USB2_VP,
- Y5_USB2_RCV,
- R9_USB2_VM,
- V6_USB2_TXD,
- W5_USB2_SE0,
-
- /* 16XX UART */
- R13_1610_UART1_TX,
- V14_16XX_UART1_RX,
- R14_1610_UART1_CTS,
- AA15_1610_UART1_RTS,
- R9_16XX_UART2_RX,
- L14_16XX_UART3_RX,
-
- /* I2C OMAP-1610 */
- I2C_SCL,
- I2C_SDA,
-
- /* Keypad */
- F18_1610_KBC0,
- D20_1610_KBC1,
- D19_1610_KBC2,
- E18_1610_KBC3,
- C21_1610_KBC4,
- G18_1610_KBR0,
- F19_1610_KBR1,
- H14_1610_KBR2,
- E20_1610_KBR3,
- E19_1610_KBR4,
- N19_1610_KBR5,
-
- /* Power management */
- T20_1610_LOW_PWR,
-
- /* MCLK Settings */
- V5_1710_MCLK_ON,
- V5_1710_MCLK_OFF,
- R10_1610_MCLK_ON,
- R10_1610_MCLK_OFF,
-
- /* CompactFlash controller */
- P11_1610_CF_CD2,
- R11_1610_CF_IOIS16,
- V10_1610_CF_IREQ,
- W10_1610_CF_RESET,
- W11_1610_CF_CD1,
-};
-
-enum omap24xx_index {
- /* 24xx I2C */
- M19_24XX_I2C1_SCL,
- L15_24XX_I2C1_SDA,
- J15_24XX_I2C2_SCL,
- H19_24XX_I2C2_SDA,
-
- /* 24xx Menelaus interrupt */
- W19_24XX_SYS_NIRQ,
-
- /* 24xx clock */
- W14_24XX_SYS_CLKOUT,
-
- /* 24xx GPMC wait pin monitoring */
- L3_GPMC_WAIT0,
- N7_GPMC_WAIT1,
- M1_GPMC_WAIT2,
- P1_GPMC_WAIT3,
-
- /* 242X McBSP */
- Y15_24XX_MCBSP2_CLKX,
- R14_24XX_MCBSP2_FSX,
- W15_24XX_MCBSP2_DR,
- V15_24XX_MCBSP2_DX,
-
- /* 24xx GPIO */
- M21_242X_GPIO11,
- AA10_242X_GPIO13,
- AA6_242X_GPIO14,
- AA4_242X_GPIO15,
- Y11_242X_GPIO16,
- AA12_242X_GPIO17,
- AA8_242X_GPIO58,
- Y20_24XX_GPIO60,
- W4__24XX_GPIO74,
- M15_24XX_GPIO92,
- V14_24XX_GPIO117,
-
- /* 242x DBG GPIO */
- V4_242X_GPIO49,
- W2_242X_GPIO50,
- U4_242X_GPIO51,
- V3_242X_GPIO52,
- V2_242X_GPIO53,
- V6_242X_GPIO53,
- T4_242X_GPIO54,
- Y4_242X_GPIO54,
- T3_242X_GPIO55,
- U2_242X_GPIO56,
-
- /* 24xx external DMA requests */
- AA10_242X_DMAREQ0,
- AA6_242X_DMAREQ1,
- E4_242X_DMAREQ2,
- G4_242X_DMAREQ3,
- D3_242X_DMAREQ4,
- E3_242X_DMAREQ5,
-
- P20_24XX_TSC_IRQ,
-
- /* UART3 */
- K15_24XX_UART3_TX,
- K14_24XX_UART3_RX,
-
- /* MMC/SDIO */
- G19_24XX_MMC_CLKO,
- H18_24XX_MMC_CMD,
- F20_24XX_MMC_DAT0,
- H14_24XX_MMC_DAT1,
- E19_24XX_MMC_DAT2,
- D19_24XX_MMC_DAT3,
- F19_24XX_MMC_DAT_DIR0,
- E20_24XX_MMC_DAT_DIR1,
- F18_24XX_MMC_DAT_DIR2,
- E18_24XX_MMC_DAT_DIR3,
- G18_24XX_MMC_CMD_DIR,
- H15_24XX_MMC_CLKI,
-
- /* Keypad GPIO*/
- T19_24XX_KBR0,
- R19_24XX_KBR1,
- V18_24XX_KBR2,
- M21_24XX_KBR3,
- E5__24XX_KBR4,
- M18_24XX_KBR5,
- R20_24XX_KBC0,
- M14_24XX_KBC1,
- H19_24XX_KBC2,
- V17_24XX_KBC3,
- P21_24XX_KBC4,
- L14_24XX_KBC5,
- N19_24XX_KBC6,
-
- /* 24xx Menelaus Keypad GPIO */
- B3__24XX_KBR5,
- AA4_24XX_KBC2,
- B13_24XX_KBC6,
-};
-
-#ifdef CONFIG_OMAP_MUX
-/* setup pin muxing in Linux */
-extern int omap1_mux_init(void);
-extern int omap2_mux_init(void);
-extern int omap_mux_register(struct pin_config * pins, unsigned long size);
-extern int omap_cfg_reg(unsigned long reg_cfg);
-extern int omap_cfg_probe(unsigned long reg_cfg);
-#else
-/* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */
-static inline int omap1_mux_init(void) { return 0; }
-static inline int omap2_mux_init(void) { return 0; }
-static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; }
-static inline int omap_cfg_probe(unsigned long reg_cfg) { return 0; }
-#endif
-
-#endif
diff --git a/original/asm-arm/arch/omap24xx.h b/original/asm-arm/arch/omap24xx.h
deleted file mode 100644
index 993572c..0000000
--- a/original/asm-arm/arch/omap24xx.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef __ASM_ARCH_OMAP24XX_H
-#define __ASM_ARCH_OMAP24XX_H
-
-/*
- * Please place only base defines here and put the rest in device
- * specific headers. Note also that some of these defines are needed
- * for omap1 to compile without adding ifdefs.
- */
-
-#define L4_24XX_BASE 0x48000000
-#define L3_24XX_BASE 0x68000000
-
-/* interrupt controller */
-#define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000)
-#define VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE)
-#define OMAP24XX_IVA_INTC_BASE 0x40000000
-#define IRQ_SIR_IRQ 0x0040
-
-#define OMAP24XX_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
-#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)
-#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000)
-
-#define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8)
-
-#endif /* __ASM_ARCH_OMAP24XX_H */
-
diff --git a/original/asm-arm/arch/serial.h b/original/asm-arm/arch/serial.h
deleted file mode 100644
index 79a5297..0000000
--- a/original/asm-arm/arch/serial.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/serial.h
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_SERIAL_H
-#define __ASM_ARCH_SERIAL_H
-
-#if defined(CONFIG_ARCH_OMAP1)
-/* OMAP1 serial ports */
-#define OMAP_UART1_BASE 0xfffb0000
-#define OMAP_UART2_BASE 0xfffb0800
-#define OMAP_UART3_BASE 0xfffb9800
-#elif defined(CONFIG_ARCH_OMAP2)
-/* OMAP2 serial ports */
-#define OMAP_UART1_BASE 0x4806a000
-#define OMAP_UART2_BASE 0x4806c000
-#define OMAP_UART3_BASE 0x4806e000
-#endif
-
-#define OMAP_MAX_NR_PORTS 3
-#define OMAP1510_BASE_BAUD (12000000/16)
-#define OMAP16XX_BASE_BAUD (48000000/16)
-
-#define is_omap_port(p) ({int __ret = 0; \
- if (p == IO_ADDRESS(OMAP_UART1_BASE) || \
- p == IO_ADDRESS(OMAP_UART2_BASE) || \
- p == IO_ADDRESS(OMAP_UART3_BASE)) \
- __ret = 1; \
- __ret; \
- })
-
-#endif
diff --git a/original/asm-arm/arch/timex.h b/original/asm-arm/arch/timex.h
deleted file mode 100644
index 21f2e36..0000000
--- a/original/asm-arm/arch/timex.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/timex.h
- *
- * Copyright (C) 2000 RidgeRun, Inc.
- * Author: Greg Lonnon <glonnon@ridgerun.com>
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#if !defined(__ASM_ARCH_OMAP_TIMEX_H)
-#define __ASM_ARCH_OMAP_TIMEX_H
-
-/*
- * OMAP 32KHz timer updates time one jiffie at a time from a secondary timer,
- * and that's why the CLOCK_TICK_RATE is not 32768.
- */
-#ifdef CONFIG_OMAP_32K_TIMER
-#define CLOCK_TICK_RATE (CONFIG_OMAP_32K_TIMER_HZ)
-#else
-#define CLOCK_TICK_RATE (HZ * 100000UL)
-#endif
-
-#endif /* __ASM_ARCH_OMAP_TIMEX_H */
diff --git a/original/asm-arm/arch/vmalloc.h b/original/asm-arm/arch/vmalloc.h
deleted file mode 100644
index 5b8bd8d..0000000
--- a/original/asm-arm/arch/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * linux/include/asm-arm/arch-omap/vmalloc.h
- *
- * Copyright (C) 2000 Russell King.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
-
diff --git a/original/asm-arm/atomic.h b/original/asm-arm/atomic.h
deleted file mode 100644
index 4b0ce3e..0000000
--- a/original/asm-arm/atomic.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * linux/include/asm-arm/atomic.h
- *
- * Copyright (C) 1996 Russell King.
- * Copyright (C) 2002 Deep Blue Solutions Ltd.
- *
- * 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.
- */
-#ifndef __ASM_ARM_ATOMIC_H
-#define __ASM_ARM_ATOMIC_H
-
-#include <linux/compiler.h>
-
-typedef struct { volatile int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) { (i) }
-
-#ifdef __KERNEL__
-
-#define atomic_read(v) ((v)->counter)
-
-#if __LINUX_ARM_ARCH__ >= 6
-
-/*
- * ARMv6 UP and SMP safe atomic ops. We use load exclusive and
- * store exclusive to ensure that these are atomic. We may loop
- * to ensure that the update happens. Writing to 'v->counter'
- * without using the following operations WILL break the atomic
- * nature of these ops.
- */
-static inline void atomic_set(atomic_t *v, int i)
-{
- unsigned long tmp;
-
- __asm__ __volatile__("@ atomic_set\n"
-"1: ldrex %0, [%1]\n"
-" strex %0, %2, [%1]\n"
-" teq %0, #0\n"
-" bne 1b"
- : "=&r" (tmp)
- : "r" (&v->counter), "r" (i)
- : "cc");
-}
-
-static inline int atomic_add_return(int i, atomic_t *v)
-{
- unsigned long tmp;
- int result;
-
- __asm__ __volatile__("@ atomic_add_return\n"
-"1: ldrex %0, [%2]\n"
-" add %0, %0, %3\n"
-" strex %1, %0, [%2]\n"
-" teq %1, #0\n"
-" bne 1b"
- : "=&r" (result), "=&r" (tmp)
- : "r" (&v->counter), "Ir" (i)
- : "cc");
-
- return result;
-}
-
-static inline int atomic_sub_return(int i, atomic_t *v)
-{
- unsigned long tmp;
- int result;
-
- __asm__ __volatile__("@ atomic_sub_return\n"
-"1: ldrex %0, [%2]\n"
-" sub %0, %0, %3\n"
-" strex %1, %0, [%2]\n"
-" teq %1, #0\n"
-" bne 1b"
- : "=&r" (result), "=&r" (tmp)
- : "r" (&v->counter), "Ir" (i)
- : "cc");
-
- return result;
-}
-
-static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
-{
- unsigned long oldval, res;
-
- do {
- __asm__ __volatile__("@ atomic_cmpxchg\n"
- "ldrex %1, [%2]\n"
- "mov %0, #0\n"
- "teq %1, %3\n"
- "strexeq %0, %4, [%2]\n"
- : "=&r" (res), "=&r" (oldval)
- : "r" (&ptr->counter), "Ir" (old), "r" (new)
- : "cc");
- } while (res);
-
- return oldval;
-}
-
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
- unsigned long tmp, tmp2;
-
- __asm__ __volatile__("@ atomic_clear_mask\n"
-"1: ldrex %0, %2\n"
-" bic %0, %0, %3\n"
-" strex %1, %0, %2\n"
-" teq %1, #0\n"
-" bne 1b"
- : "=&r" (tmp), "=&r" (tmp2)
- : "r" (addr), "Ir" (mask)
- : "cc");
-}
-
-#else /* ARM_ARCH_6 */
-
-#include <asm/system.h>
-
-#ifdef CONFIG_SMP
-#error SMP not supported on pre-ARMv6 CPUs
-#endif
-
-#define atomic_set(v,i) (((v)->counter) = (i))
-
-static inline int atomic_add_return(int i, atomic_t *v)
-{
- unsigned long flags;
- int val;
-
- local_irq_save(flags);
- val = v->counter;
- v->counter = val += i;
- local_irq_restore(flags);
-
- return val;
-}
-
-static inline int atomic_sub_return(int i, atomic_t *v)
-{
- unsigned long flags;
- int val;
-
- local_irq_save(flags);
- val = v->counter;
- v->counter = val -= i;
- local_irq_restore(flags);
-
- return val;
-}
-
-static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
-{
- int ret;
- unsigned long flags;
-
- local_irq_save(flags);
- ret = v->counter;
- if (likely(ret == old))
- v->counter = new;
- local_irq_restore(flags);
-
- return ret;
-}
-
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
-{
- unsigned long flags;
-
- local_irq_save(flags);
- *addr &= ~mask;
- local_irq_restore(flags);
-}
-
-#endif /* __LINUX_ARM_ARCH__ */
-
-#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
-
-static inline int atomic_add_unless(atomic_t *v, int a, int u)
-{
- int c, old;
-
- c = atomic_read(v);
- while (c != u && (old = atomic_cmpxchg((v), c, c + a)) != c)
- c = old;
- return c != u;
-}
-#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
-
-#define atomic_add(i, v) (void) atomic_add_return(i, v)
-#define atomic_inc(v) (void) atomic_add_return(1, v)
-#define atomic_sub(i, v) (void) atomic_sub_return(i, v)
-#define atomic_dec(v) (void) atomic_sub_return(1, v)
-
-#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0)
-#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0)
-#define atomic_inc_return(v) (atomic_add_return(1, v))
-#define atomic_dec_return(v) (atomic_sub_return(1, v))
-#define atomic_sub_and_test(i, v) (atomic_sub_return(i, v) == 0)
-
-#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
-
-/* Atomic operations are already serializing on ARM */
-#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
-#endif
diff --git a/original/asm-arm/auxvec.h b/original/asm-arm/auxvec.h
deleted file mode 100644
index c0536f6..0000000
--- a/original/asm-arm/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __ASMARM_AUXVEC_H
-#define __ASMARM_AUXVEC_H
-
-#endif
diff --git a/original/asm-arm/bitops.h b/original/asm-arm/bitops.h
deleted file mode 100644
index 0ac54b1..0000000
--- a/original/asm-arm/bitops.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright 1995, Russell King.
- * Various bits and pieces copyrights include:
- * Linus Torvalds (test_bit).
- * Big endian support: Copyright 2001, Nicolas Pitre
- * reworked by rmk.
- *
- * bit 0 is the LSB of an "unsigned long" quantity.
- *
- * Please note that the code in this file should never be included
- * from user space. Many of these are not implemented in assembler
- * since they would be too costly. Also, they require privileged
- * instructions (which are not available from user mode) to ensure
- * that they are atomic.
- */
-
-#ifndef __ASM_ARM_BITOPS_H
-#define __ASM_ARM_BITOPS_H
-
-#ifdef __KERNEL__
-
-#include <linux/compiler.h>
-#include <asm/system.h>
-
-#define smp_mb__before_clear_bit() mb()
-#define smp_mb__after_clear_bit() mb()
-
-/*
- * These functions are the basis of our bit ops.
- *
- * First, the atomic bitops. These use native endian.
- */
-static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
-{
- unsigned long flags;
- unsigned long mask = 1UL << (bit & 31);
-
- p += bit >> 5;
-
- local_irq_save(flags);
- *p |= mask;
- local_irq_restore(flags);
-}
-
-static inline void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
-{
- unsigned long flags;
- unsigned long mask = 1UL << (bit & 31);
-
- p += bit >> 5;
-
- local_irq_save(flags);
- *p &= ~mask;
- local_irq_restore(flags);
-}
-
-static inline void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
-{
- unsigned long flags;
- unsigned long mask = 1UL << (bit & 31);
-
- p += bit >> 5;
-
- local_irq_save(flags);
- *p ^= mask;
- local_irq_restore(flags);
-}
-
-static inline int
-____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p)
-{
- unsigned long flags;
- unsigned int res;
- unsigned long mask = 1UL << (bit & 31);
-
- p += bit >> 5;
-
- local_irq_save(flags);
- res = *p;
- *p = res | mask;
- local_irq_restore(flags);
-
- return res & mask;
-}
-
-static inline int
-____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p)
-{
- unsigned long flags;
- unsigned int res;
- unsigned long mask = 1UL << (bit & 31);
-
- p += bit >> 5;
-
- local_irq_save(flags);
- res = *p;
- *p = res & ~mask;
- local_irq_restore(flags);
-
- return res & mask;
-}
-
-static inline int
-____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
-{
- unsigned long flags;
- unsigned int res;
- unsigned long mask = 1UL << (bit & 31);
-
- p += bit >> 5;
-
- local_irq_save(flags);
- res = *p;
- *p = res ^ mask;
- local_irq_restore(flags);
-
- return res & mask;
-}
-
-#include <asm-generic/bitops/non-atomic.h>
-
-/*
- * A note about Endian-ness.
- * -------------------------
- *
- * When the ARM is put into big endian mode via CR15, the processor
- * merely swaps the order of bytes within words, thus:
- *
- * ------------ physical data bus bits -----------
- * D31 ... D24 D23 ... D16 D15 ... D8 D7 ... D0
- * little byte 3 byte 2 byte 1 byte 0
- * big byte 0 byte 1 byte 2 byte 3
- *
- * This means that reading a 32-bit word at address 0 returns the same
- * value irrespective of the endian mode bit.
- *
- * Peripheral devices should be connected with the data bus reversed in
- * "Big Endian" mode. ARM Application Note 61 is applicable, and is
- * available from http://www.arm.com/.
- *
- * The following assumes that the data bus connectivity for big endian
- * mode has been followed.
- *
- * Note that bit 0 is defined to be 32-bit word bit 0, not byte 0 bit 0.
- */
-
-/*
- * Little endian assembly bitops. nr = 0 -> byte 0 bit 0.
- */
-extern void _set_bit_le(int nr, volatile unsigned long * p);
-extern void _clear_bit_le(int nr, volatile unsigned long * p);
-extern void _change_bit_le(int nr, volatile unsigned long * p);
-extern int _test_and_set_bit_le(int nr, volatile unsigned long * p);
-extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p);
-extern int _test_and_change_bit_le(int nr, volatile unsigned long * p);
-extern int _find_first_zero_bit_le(const void * p, unsigned size);
-extern int _find_next_zero_bit_le(const void * p, int size, int offset);
-extern int _find_first_bit_le(const unsigned long *p, unsigned size);
-extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
-
-/*
- * Big endian assembly bitops. nr = 0 -> byte 3 bit 0.
- */
-extern void _set_bit_be(int nr, volatile unsigned long * p);
-extern void _clear_bit_be(int nr, volatile unsigned long * p);
-extern void _change_bit_be(int nr, volatile unsigned long * p);
-extern int _test_and_set_bit_be(int nr, volatile unsigned long * p);
-extern int _test_and_clear_bit_be(int nr, volatile unsigned long * p);
-extern int _test_and_change_bit_be(int nr, volatile unsigned long * p);
-extern int _find_first_zero_bit_be(const void * p, unsigned size);
-extern int _find_next_zero_bit_be(const void * p, int size, int offset);
-extern int _find_first_bit_be(const unsigned long *p, unsigned size);
-extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
-
-#ifndef CONFIG_SMP
-/*
- * The __* form of bitops are non-atomic and may be reordered.
- */
-#define ATOMIC_BITOP_LE(name,nr,p) \
- (__builtin_constant_p(nr) ? \
- ____atomic_##name(nr, p) : \
- _##name##_le(nr,p))
-
-#define ATOMIC_BITOP_BE(name,nr,p) \
- (__builtin_constant_p(nr) ? \
- ____atomic_##name(nr, p) : \
- _##name##_be(nr,p))
-#else
-#define ATOMIC_BITOP_LE(name,nr,p) _##name##_le(nr,p)
-#define ATOMIC_BITOP_BE(name,nr,p) _##name##_be(nr,p)
-#endif
-
-#define NONATOMIC_BITOP(name,nr,p) \
- (____nonatomic_##name(nr, p))
-
-#ifndef __ARMEB__
-/*
- * These are the little endian, atomic definitions.
- */
-#define set_bit(nr,p) ATOMIC_BITOP_LE(set_bit,nr,p)
-#define clear_bit(nr,p) ATOMIC_BITOP_LE(clear_bit,nr,p)
-#define change_bit(nr,p) ATOMIC_BITOP_LE(change_bit,nr,p)
-#define test_and_set_bit(nr,p) ATOMIC_BITOP_LE(test_and_set_bit,nr,p)
-#define test_and_clear_bit(nr,p) ATOMIC_BITOP_LE(test_and_clear_bit,nr,p)
-#define test_and_change_bit(nr,p) ATOMIC_BITOP_LE(test_and_change_bit,nr,p)
-#define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
-#define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off)
-#define find_first_bit(p,sz) _find_first_bit_le(p,sz)
-#define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off)
-
-#define WORD_BITOFF_TO_LE(x) ((x))
-
-#else
-
-/*
- * These are the big endian, atomic definitions.
- */
-#define set_bit(nr,p) ATOMIC_BITOP_BE(set_bit,nr,p)
-#define clear_bit(nr,p) ATOMIC_BITOP_BE(clear_bit,nr,p)
-#define change_bit(nr,p) ATOMIC_BITOP_BE(change_bit,nr,p)
-#define test_and_set_bit(nr,p) ATOMIC_BITOP_BE(test_and_set_bit,nr,p)
-#define test_and_clear_bit(nr,p) ATOMIC_BITOP_BE(test_and_clear_bit,nr,p)
-#define test_and_change_bit(nr,p) ATOMIC_BITOP_BE(test_and_change_bit,nr,p)
-#define find_first_zero_bit(p,sz) _find_first_zero_bit_be(p,sz)
-#define find_next_zero_bit(p,sz,off) _find_next_zero_bit_be(p,sz,off)
-#define find_first_bit(p,sz) _find_first_bit_be(p,sz)
-#define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off)
-
-#define WORD_BITOFF_TO_LE(x) ((x) ^ 0x18)
-
-#endif
-
-#if __LINUX_ARM_ARCH__ < 5
-
-#include <asm-generic/bitops/ffz.h>
-#include <asm-generic/bitops/__ffs.h>
-#include <asm-generic/bitops/fls.h>
-#include <asm-generic/bitops/ffs.h>
-
-#else
-
-static inline int constant_fls(int x)
-{
- int r = 32;
-
- if (!x)
- return 0;
- if (!(x & 0xffff0000u)) {
- x <<= 16;
- r -= 16;
- }
- if (!(x & 0xff000000u)) {
- x <<= 8;
- r -= 8;
- }
- if (!(x & 0xf0000000u)) {
- x <<= 4;
- r -= 4;
- }
- if (!(x & 0xc0000000u)) {
- x <<= 2;
- r -= 2;
- }
- if (!(x & 0x80000000u)) {
- x <<= 1;
- r -= 1;
- }
- return r;
-}
-
-/*
- * On ARMv5 and above those functions can be implemented around
- * the clz instruction for much better code efficiency.
- */
-
-#define fls(x) \
- ( __builtin_constant_p(x) ? constant_fls(x) : \
- ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
-#define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); })
-#define __ffs(x) (ffs(x) - 1)
-#define ffz(x) __ffs( ~(x) )
-
-#endif
-
-#include <asm-generic/bitops/fls64.h>
-
-#include <asm-generic/bitops/sched.h>
-#include <asm-generic/bitops/hweight.h>
-
-/*
- * Ext2 is defined to use little-endian byte ordering.
- * These do not need to be atomic.
- */
-#define ext2_set_bit(nr,p) \
- __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define ext2_set_bit_atomic(lock,nr,p) \
- test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define ext2_clear_bit(nr,p) \
- __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define ext2_clear_bit_atomic(lock,nr,p) \
- test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define ext2_test_bit(nr,p) \
- test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define ext2_find_first_zero_bit(p,sz) \
- _find_first_zero_bit_le(p,sz)
-#define ext2_find_next_zero_bit(p,sz,off) \
- _find_next_zero_bit_le(p,sz,off)
-
-/*
- * Minix is defined to use little-endian byte ordering.
- * These do not need to be atomic.
- */
-#define minix_set_bit(nr,p) \
- __set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define minix_test_bit(nr,p) \
- test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define minix_test_and_set_bit(nr,p) \
- __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define minix_test_and_clear_bit(nr,p) \
- __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
-#define minix_find_first_zero_bit(p,sz) \
- _find_first_zero_bit_le(p,sz)
-
-#endif /* __KERNEL__ */
-
-#endif /* _ARM_BITOPS_H */
diff --git a/original/asm-arm/byteorder.h b/original/asm-arm/byteorder.h
deleted file mode 100644
index e6f7fcd..0000000
--- a/original/asm-arm/byteorder.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * linux/include/asm-arm/byteorder.h
- *
- * ARM Endian-ness. In little endian mode, the data bus is connected such
- * that byte accesses appear as:
- * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31
- * and word accesses (data or instruction) appear as:
- * d0...d31
- *
- * When in big endian mode, byte accesses appear as:
- * 0 = d24...d31, 1 = d16...d23, 2 = d8...d15, 3 = d0...d7
- * and word accesses (data or instruction) appear as:
- * d0...d31
- */
-#ifndef __ASM_ARM_BYTEORDER_H
-#define __ASM_ARM_BYTEORDER_H
-
-#include <linux/compiler.h>
-#include <asm/types.h>
-
-static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
-{
- __u32 t;
-
-#ifndef __thumb__
- if (!__builtin_constant_p(x)) {
- /*
- * The compiler needs a bit of a hint here to always do the
- * right thing and not screw it up to different degrees
- * depending on the gcc version.
- */
- asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
- } else
-#endif
- t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */
-
- x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */
- t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */
- x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */
-
- return x;
-}
-
-#define __arch__swab32(x) ___arch__swab32(x)
-
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-# define __BYTEORDER_HAS_U64__
-# define __SWAB_64_THRU_32__
-#endif
-
-#ifdef __ARMEB__
-#include <linux/byteorder/big_endian.h>
-#else
-#include <linux/byteorder/little_endian.h>
-#endif
-
-#endif
-
diff --git a/original/asm-arm/cache.h b/original/asm-arm/cache.h
deleted file mode 100644
index 31332c8..0000000
--- a/original/asm-arm/cache.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * linux/include/asm-arm/cache.h
- */
-#ifndef __ASMARM_CACHE_H
-#define __ASMARM_CACHE_H
-
-#define L1_CACHE_SHIFT 5
-#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
-
-#endif
diff --git a/original/asm-arm/cacheflush.h b/original/asm-arm/cacheflush.h
deleted file mode 100644
index e4a2569..0000000
--- a/original/asm-arm/cacheflush.h
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * linux/include/asm-arm/cacheflush.h
- *
- * Copyright (C) 1999-2002 Russell King
- *
- * 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.
- */
-#ifndef _ASMARM_CACHEFLUSH_H
-#define _ASMARM_CACHEFLUSH_H
-
-#include <linux/sched.h>
-#include <linux/mm.h>
-
-#include <asm/glue.h>
-#include <asm/shmparam.h>
-
-#define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT)
-
-/*
- * Cache Model
- * ===========
- */
-#undef _CACHE
-#undef MULTI_CACHE
-
-#if defined(CONFIG_CPU_ARM610) || defined(CONFIG_CPU_ARM710)
-# ifdef _CACHE
-# define MULTI_CACHE 1
-# else
-# define _CACHE v3
-# endif
-#endif
-
-#if defined(CONFIG_CPU_ARM720T)
-# ifdef _CACHE
-# define MULTI_CACHE 1
-# else
-# define _CACHE v4
-# endif
-#endif
-
-#if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \
- defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020)
-# define MULTI_CACHE 1
-#endif
-
-#if defined(CONFIG_CPU_ARM926T)
-# ifdef _CACHE
-# define MULTI_CACHE 1
-# else
-# define _CACHE arm926
-# endif
-#endif
-
-#if defined(CONFIG_CPU_SA110) || defined(CONFIG_CPU_SA1100)
-# ifdef _CACHE
-# define MULTI_CACHE 1
-# else
-# define _CACHE v4wb
-# endif
-#endif
-
-#if defined(CONFIG_CPU_XSCALE)
-# ifdef _CACHE
-# define MULTI_CACHE 1
-# else
-# define _CACHE xscale
-# endif
-#endif
-
-#if defined(CONFIG_CPU_XSC3)
-# ifdef _CACHE
-# define MULTI_CACHE 1
-# else
-# define _CACHE xsc3
-# endif
-#endif
-
-#if defined(CONFIG_CPU_V6)
-//# ifdef _CACHE
-# define MULTI_CACHE 1
-//# else
-//# define _CACHE v6
-//# endif
-#endif
-
-#if !defined(_CACHE) && !defined(MULTI_CACHE)
-#error Unknown cache maintainence model
-#endif
-
-/*
- * This flag is used to indicate that the page pointed to by a pte
- * is dirty and requires cleaning before returning it to the user.
- */
-#define PG_dcache_dirty PG_arch_1
-
-/*
- * MM Cache Management
- * ===================
- *
- * The arch/arm/mm/cache-*.S and arch/arm/mm/proc-*.S files
- * implement these methods.
- *
- * Start addresses are inclusive and end addresses are exclusive;
- * start addresses should be rounded down, end addresses up.
- *
- * See Documentation/cachetlb.txt for more information.
- * Please note that the implementation of these, and the required
- * effects are cache-type (VIVT/VIPT/PIPT) specific.
- *
- * flush_cache_kern_all()
- *
- * Unconditionally clean and invalidate the entire cache.
- *
- * flush_cache_user_mm(mm)
- *
- * Clean and invalidate all user space cache entries
- * before a change of page tables.
- *
- * flush_cache_user_range(start, end, flags)
- *
- * Clean and invalidate a range of cache entries in the
- * specified address space before a change of page tables.
- * - start - user start address (inclusive, page aligned)
- * - end - user end address (exclusive, page aligned)
- * - flags - vma->vm_flags field
- *
- * coherent_kern_range(start, end)
- *
- * Ensure coherency between the Icache and the Dcache in the
- * region described by start, end. If you have non-snooping
- * Harvard caches, you need to implement this function.
- * - start - virtual start address
- * - end - virtual end address
- *
- * DMA Cache Coherency
- * ===================
- *
- * dma_inv_range(start, end)
- *
- * Invalidate (discard) the specified virtual address range.
- * May not write back any entries. If 'start' or 'end'
- * are not cache line aligned, those lines must be written
- * back.
- * - start - virtual start address
- * - end - virtual end address
- *
- * dma_clean_range(start, end)
- *
- * Clean (write back) the specified virtual address range.
- * - start - virtual start address
- * - end - virtual end address
- *
- * dma_flush_range(start, end)
- *
- * Clean and invalidate the specified virtual address range.
- * - start - virtual start address
- * - end - virtual end address
- */
-
-struct cpu_cache_fns {
- void (*flush_kern_all)(void);
- void (*flush_user_all)(void);
- void (*flush_user_range)(unsigned long, unsigned long, unsigned int);
-
- void (*coherent_kern_range)(unsigned long, unsigned long);
- void (*coherent_user_range)(unsigned long, unsigned long);
- void (*flush_kern_dcache_page)(void *);
-
- void (*dma_inv_range)(unsigned long, unsigned long);
- void (*dma_clean_range)(unsigned long, unsigned long);
- void (*dma_flush_range)(unsigned long, unsigned long);
-};
-
-/*
- * Select the calling method
- */
-#ifdef MULTI_CACHE
-
-extern struct cpu_cache_fns cpu_cache;
-
-#define __cpuc_flush_kern_all cpu_cache.flush_kern_all
-#define __cpuc_flush_user_all cpu_cache.flush_user_all
-#define __cpuc_flush_user_range cpu_cache.flush_user_range
-#define __cpuc_coherent_kern_range cpu_cache.coherent_kern_range
-#define __cpuc_coherent_user_range cpu_cache.coherent_user_range
-#define __cpuc_flush_dcache_page cpu_cache.flush_kern_dcache_page
-
-/*
- * These are private to the dma-mapping API. Do not use directly.
- * Their sole purpose is to ensure that data held in the cache
- * is visible to DMA, or data written by DMA to system memory is
- * visible to the CPU.
- */
-#define dmac_inv_range cpu_cache.dma_inv_range
-#define dmac_clean_range cpu_cache.dma_clean_range
-#define dmac_flush_range cpu_cache.dma_flush_range
-
-#else
-
-#define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all)
-#define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all)
-#define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
-#define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
-#define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
-#define __cpuc_flush_dcache_page __glue(_CACHE,_flush_kern_dcache_page)
-
-extern void __cpuc_flush_kern_all(void);
-extern void __cpuc_flush_user_all(void);
-extern void __cpuc_flush_user_range(unsigned long, unsigned long, unsigned int);
-extern void __cpuc_coherent_kern_range(unsigned long, unsigned long);
-extern void __cpuc_coherent_user_range(unsigned long, unsigned long);
-extern void __cpuc_flush_dcache_page(void *);
-
-/*
- * These are private to the dma-mapping API. Do not use directly.
- * Their sole purpose is to ensure that data held in the cache
- * is visible to DMA, or data written by DMA to system memory is
- * visible to the CPU.
- */
-#define dmac_inv_range __glue(_CACHE,_dma_inv_range)
-#define dmac_clean_range __glue(_CACHE,_dma_clean_range)
-#define dmac_flush_range __glue(_CACHE,_dma_flush_range)
-
-extern void dmac_inv_range(unsigned long, unsigned long);
-extern void dmac_clean_range(unsigned long, unsigned long);
-extern void dmac_flush_range(unsigned long, unsigned long);
-
-#endif
-
-/*
- * flush_cache_vmap() is used when creating mappings (eg, via vmap,
- * vmalloc, ioremap etc) in kernel space for pages. Since the
- * direct-mappings of these pages may contain cached data, we need
- * to do a full cache flush to ensure that writebacks don't corrupt
- * data placed into these pages via the new mappings.
- */
-#define flush_cache_vmap(start, end) flush_cache_all()
-#define flush_cache_vunmap(start, end) flush_cache_all()
-
-/*
- * Copy user data from/to a page which is mapped into a different
- * processes address space. Really, we want to allow our "user
- * space" model to handle this.
- */
-#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
- do { \
- memcpy(dst, src, len); \
- flush_ptrace_access(vma, page, vaddr, dst, len, 1);\
- } while (0)
-
-#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
- do { \
- memcpy(dst, src, len); \
- } while (0)
-
-/*
- * Convert calls to our calling convention.
- */
-#define flush_cache_all() __cpuc_flush_kern_all()
-#ifndef CONFIG_CPU_CACHE_VIPT
-static inline void flush_cache_mm(struct mm_struct *mm)
-{
- if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask))
- __cpuc_flush_user_all();
-}
-
-static inline void
-flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
-{
- if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask))
- __cpuc_flush_user_range(start & PAGE_MASK, PAGE_ALIGN(end),
- vma->vm_flags);
-}
-
-static inline void
-flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn)
-{
- if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
- unsigned long addr = user_addr & PAGE_MASK;
- __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
- }
-}
-
-static inline void
-flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
- unsigned long uaddr, void *kaddr,
- unsigned long len, int write)
-{
- if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
- unsigned long addr = (unsigned long)kaddr;
- __cpuc_coherent_kern_range(addr, addr + len);
- }
-}
-#else
-extern void flush_cache_mm(struct mm_struct *mm);
-extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
-extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn);
-extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
- unsigned long uaddr, void *kaddr,
- unsigned long len, int write);
-#endif
-
-/*
- * flush_cache_user_range is used when we want to ensure that the
- * Harvard caches are synchronised for the user space address range.
- * This is used for the ARM private sys_cacheflush system call.
- */
-#define flush_cache_user_range(vma,start,end) \
- __cpuc_coherent_user_range((start) & PAGE_MASK, PAGE_ALIGN(end))
-
-/*
- * Perform necessary cache operations to ensure that data previously
- * stored within this range of addresses can be executed by the CPU.
- */
-#define flush_icache_range(s,e) __cpuc_coherent_kern_range(s,e)
-
-/*
- * Perform necessary cache operations to ensure that the TLB will
- * see data written in the specified area.
- */
-#define clean_dcache_area(start,size) cpu_dcache_clean_area(start, size)
-
-/*
- * flush_dcache_page is used when the kernel has written to the page
- * cache page at virtual address page->virtual.
- *
- * If this page isn't mapped (ie, page_mapping == NULL), or it might
- * have userspace mappings, then we _must_ always clean + invalidate
- * the dcache entries associated with the kernel mapping.
- *
- * Otherwise we can defer the operation, and clean the cache when we are
- * about to change to user space. This is the same method as used on SPARC64.
- * See update_mmu_cache for the user space part.
- */
-extern void flush_dcache_page(struct page *);
-
-#define flush_dcache_mmap_lock(mapping) \
- write_lock_irq(&(mapping)->tree_lock)
-#define flush_dcache_mmap_unlock(mapping) \
- write_unlock_irq(&(mapping)->tree_lock)
-
-#define flush_icache_user_range(vma,page,addr,len) \
- flush_dcache_page(page)
-
-/*
- * We don't appear to need to do anything here. In fact, if we did, we'd
- * duplicate cache flushing elsewhere performed by flush_dcache_page().
- */
-#define flush_icache_page(vma,page) do { } while (0)
-
-#define __cacheid_present(val) (val != read_cpuid(CPUID_ID))
-#define __cacheid_vivt(val) ((val & (15 << 25)) != (14 << 25))
-#define __cacheid_vipt(val) ((val & (15 << 25)) == (14 << 25))
-#define __cacheid_vipt_nonaliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25))
-#define __cacheid_vipt_aliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23))
-
-#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
-
-#define cache_is_vivt() 1
-#define cache_is_vipt() 0
-#define cache_is_vipt_nonaliasing() 0
-#define cache_is_vipt_aliasing() 0
-
-#elif defined(CONFIG_CPU_CACHE_VIPT)
-
-#define cache_is_vivt() 0
-#define cache_is_vipt() 1
-#define cache_is_vipt_nonaliasing() \
- ({ \
- unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
- __cacheid_vipt_nonaliasing(__val); \
- })
-
-#define cache_is_vipt_aliasing() \
- ({ \
- unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
- __cacheid_vipt_aliasing(__val); \
- })
-
-#else
-
-#define cache_is_vivt() \
- ({ \
- unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
- (!__cacheid_present(__val)) || __cacheid_vivt(__val); \
- })
-
-#define cache_is_vipt() \
- ({ \
- unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
- __cacheid_present(__val) && __cacheid_vipt(__val); \
- })
-
-#define cache_is_vipt_nonaliasing() \
- ({ \
- unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
- __cacheid_present(__val) && \
- __cacheid_vipt_nonaliasing(__val); \
- })
-
-#define cache_is_vipt_aliasing() \
- ({ \
- unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
- __cacheid_present(__val) && \
- __cacheid_vipt_aliasing(__val); \
- })
-
-#endif
-
-#endif
diff --git a/original/asm-arm/cputime.h b/original/asm-arm/cputime.h
deleted file mode 100644
index 3a8002a..0000000
--- a/original/asm-arm/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ARM_CPUTIME_H
-#define __ARM_CPUTIME_H
-
-#include <asm-generic/cputime.h>
-
-#endif /* __ARM_CPUTIME_H */
diff --git a/original/asm-arm/delay.h b/original/asm-arm/delay.h
deleted file mode 100644
index b2deda1..0000000
--- a/original/asm-arm/delay.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 1995-2004 Russell King
- *
- * Delay routines, using a pre-computed "loops_per_second" value.
- */
-#ifndef __ASM_ARM_DELAY_H
-#define __ASM_ARM_DELAY_H
-
-#include <asm/param.h> /* HZ */
-
-extern void __delay(int loops);
-
-/*
- * This function intentionally does not exist; if you see references to
- * it, it means that you're calling udelay() with an out of range value.
- *
- * With currently imposed limits, this means that we support a max delay
- * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
- */
-extern void __bad_udelay(void);
-
-/*
- * division by multiplication: you don't have to worry about
- * loss of precision.
- *
- * Use only for very small delays ( < 1 msec). Should probably use a
- * lookup table, really, as the multiplications take much too long with
- * short delays. This is a "reasonable" implementation, though (and the
- * first constant multiplications gets optimized away if the delay is
- * a constant)
- */
-extern void __udelay(unsigned long usecs);
-extern void __const_udelay(unsigned long);
-
-#define MAX_UDELAY_MS 2
-
-#define udelay(n) \
- (__builtin_constant_p(n) ? \
- ((n) > (MAX_UDELAY_MS * 1000) ? __bad_udelay() : \
- __const_udelay((n) * ((2199023U*HZ)>>11))) : \
- __udelay(n))
-
-#endif /* defined(_ARM_DELAY_H) */
-
diff --git a/original/asm-arm/div64.h b/original/asm-arm/div64.h
deleted file mode 100644
index 3682616..0000000
--- a/original/asm-arm/div64.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __ASM_ARM_DIV64
-#define __ASM_ARM_DIV64
-
-#include <asm/system.h>
-
-/*
- * The semantics of do_div() are:
- *
- * uint32_t do_div(uint64_t *n, uint32_t base)
- * {
- * uint32_t remainder = *n % base;
- * *n = *n / base;
- * return remainder;
- * }
- *
- * In other words, a 64-bit dividend with a 32-bit divisor producing
- * a 64-bit result and a 32-bit remainder. To accomplish this optimally
- * we call a special __do_div64 helper with completely non standard
- * calling convention for arguments and results (beware).
- */
-
-#ifdef __ARMEB__
-#define __xh "r0"
-#define __xl "r1"
-#else
-#define __xl "r0"
-#define __xh "r1"
-#endif
-
-#define do_div(n,base) \
-({ \
- register unsigned int __base asm("r4") = base; \
- register unsigned long long __n asm("r0") = n; \
- register unsigned long long __res asm("r2"); \
- register unsigned int __rem asm(__xh); \
- asm( __asmeq("%0", __xh) \
- __asmeq("%1", "r2") \
- __asmeq("%2", "r0") \
- __asmeq("%3", "r4") \
- "bl __do_div64" \
- : "=r" (__rem), "=r" (__res) \
- : "r" (__n), "r" (__base) \
- : "ip", "lr", "cc"); \
- n = __res; \
- __rem; \
-})
-
-#endif
diff --git a/original/asm-arm/dma-mapping.h b/original/asm-arm/dma-mapping.h
deleted file mode 100644
index 04c4785..0000000
--- a/original/asm-arm/dma-mapping.h
+++ /dev/null
@@ -1,437 +0,0 @@
-#ifndef ASMARM_DMA_MAPPING_H
-#define ASMARM_DMA_MAPPING_H
-
-#ifdef __KERNEL__
-
-#include <linux/mm.h> /* need struct page */
-#include <linux/device.h>
-
-#include <asm/scatterlist.h>
-
-/*
- * DMA-consistent mapping functions. These allocate/free a region of
- * uncached, unwrite-buffered mapped memory space for use with DMA
- * devices. This is the "generic" version. The PCI specific version
- * is in pci.h
- */
-extern void consistent_sync(void *kaddr, size_t size, int rw);
-
-/*
- * Return whether the given device DMA address mask can be supported
- * properly. For example, if your device can only drive the low 24-bits
- * during bus mastering, then you would pass 0x00ffffff as the mask
- * to this function.
- *
- * FIXME: This should really be a platform specific issue - we should
- * return false if GFP_DMA allocations may not satisfy the supplied 'mask'.
- */
-static inline int dma_supported(struct device *dev, u64 mask)
-{
- return dev->dma_mask && *dev->dma_mask != 0;
-}
-
-static inline int dma_set_mask(struct device *dev, u64 dma_mask)
-{
- if (!dev->dma_mask || !dma_supported(dev, dma_mask))
- return -EIO;
-
- *dev->dma_mask = dma_mask;
-
- return 0;
-}
-
-static inline int dma_get_cache_alignment(void)
-{
- return 32;
-}
-
-static inline int dma_is_consistent(dma_addr_t handle)
-{
- return !!arch_is_coherent();
-}
-
-/*
- * DMA errors are defined by all-bits-set in the DMA address.
- */
-static inline int dma_mapping_error(dma_addr_t dma_addr)
-{
- return dma_addr == ~0;
-}
-
-/**
- * dma_alloc_coherent - allocate consistent memory for DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @size: required memory size
- * @handle: bus-specific DMA address
- *
- * Allocate some uncached, unbuffered memory for a device for
- * performing DMA. This function allocates pages, and will
- * return the CPU-viewed address, and sets @handle to be the
- * device-viewed address.
- */
-extern void *
-dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp);
-
-/**
- * dma_free_coherent - free memory allocated by dma_alloc_coherent
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @size: size of memory originally requested in dma_alloc_coherent
- * @cpu_addr: CPU-view address returned from dma_alloc_coherent
- * @handle: device-view address returned from dma_alloc_coherent
- *
- * Free (and unmap) a DMA buffer previously allocated by
- * dma_alloc_coherent().
- *
- * References to memory and mappings associated with cpu_addr/handle
- * during and after this call executing are illegal.
- */
-extern void
-dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
- dma_addr_t handle);
-
-/**
- * dma_mmap_coherent - map a coherent DMA allocation into user space
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @vma: vm_area_struct describing requested user mapping
- * @cpu_addr: kernel CPU-view address returned from dma_alloc_coherent
- * @handle: device-view address returned from dma_alloc_coherent
- * @size: size of memory originally requested in dma_alloc_coherent
- *
- * Map a coherent DMA buffer previously allocated by dma_alloc_coherent
- * into user space. The coherent DMA buffer must not be freed by the
- * driver until the user space mapping has been released.
- */
-int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
- void *cpu_addr, dma_addr_t handle, size_t size);
-
-
-/**
- * dma_alloc_writecombine - allocate writecombining memory for DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @size: required memory size
- * @handle: bus-specific DMA address
- *
- * Allocate some uncached, buffered memory for a device for
- * performing DMA. This function allocates pages, and will
- * return the CPU-viewed address, and sets @handle to be the
- * device-viewed address.
- */
-extern void *
-dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp);
-
-#define dma_free_writecombine(dev,size,cpu_addr,handle) \
- dma_free_coherent(dev,size,cpu_addr,handle)
-
-int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
- void *cpu_addr, dma_addr_t handle, size_t size);
-
-
-/**
- * dma_map_single - map a single buffer for streaming DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @cpu_addr: CPU direct mapped address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Ensure that any data held in the cache is appropriately discarded
- * or written back.
- *
- * The device owns this memory once this call has completed. The CPU
- * can regain ownership by calling dma_unmap_single() or
- * dma_sync_single_for_cpu().
- */
-#ifndef CONFIG_DMABOUNCE
-static inline dma_addr_t
-dma_map_single(struct device *dev, void *cpu_addr, size_t size,
- enum dma_data_direction dir)
-{
- if (!arch_is_coherent())
- consistent_sync(cpu_addr, size, dir);
-
- return virt_to_dma(dev, (unsigned long)cpu_addr);
-}
-#else
-extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction);
-#endif
-
-/**
- * dma_map_page - map a portion of a page for streaming DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @page: page that buffer resides in
- * @offset: offset into page for start of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Ensure that any data held in the cache is appropriately discarded
- * or written back.
- *
- * The device owns this memory once this call has completed. The CPU
- * can regain ownership by calling dma_unmap_page() or
- * dma_sync_single_for_cpu().
- */
-static inline dma_addr_t
-dma_map_page(struct device *dev, struct page *page,
- unsigned long offset, size_t size,
- enum dma_data_direction dir)
-{
- return dma_map_single(dev, page_address(page) + offset, size, (int)dir);
-}
-
-/**
- * dma_unmap_single - unmap a single buffer previously mapped
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Unmap a single streaming mode DMA translation. The handle and size
- * must match what was provided in the previous dma_map_single() call.
- * All other usages are undefined.
- *
- * After this call, reads by the CPU to the buffer are guaranteed to see
- * whatever the device wrote there.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_unmap_single(struct device *dev, dma_addr_t handle, size_t size,
- enum dma_data_direction dir)
-{
- /* nothing to do */
-}
-#else
-extern void dma_unmap_single(struct device *, dma_addr_t, size_t, enum dma_data_direction);
-#endif
-
-/**
- * dma_unmap_page - unmap a buffer previously mapped through dma_map_page()
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Unmap a single streaming mode DMA translation. The handle and size
- * must match what was provided in the previous dma_map_single() call.
- * All other usages are undefined.
- *
- * After this call, reads by the CPU to the buffer are guaranteed to see
- * whatever the device wrote there.
- */
-static inline void
-dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size,
- enum dma_data_direction dir)
-{
- dma_unmap_single(dev, handle, size, (int)dir);
-}
-
-/**
- * dma_map_sg - map a set of SG buffers for streaming mode DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Map a set of buffers described by scatterlist in streaming
- * mode for DMA. This is the scatter-gather version of the
- * above dma_map_single interface. Here the scatter gather list
- * elements are each tagged with the appropriate dma address
- * and length. They are obtained via sg_dma_{address,length}(SG).
- *
- * NOTE: An implementation may be able to use a smaller number of
- * DMA address/length pairs than there are SG table elements.
- * (for example via virtual mapping capabilities)
- * The routine returns the number of addr/length pairs actually
- * used, at most nents.
- *
- * Device ownership issues as mentioned above for dma_map_single are
- * the same here.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
- enum dma_data_direction dir)
-{
- int i;
-
- for (i = 0; i < nents; i++, sg++) {
- char *virt;
-
- sg->dma_address = page_to_dma(dev, sg->page) + sg->offset;
- virt = page_address(sg->page) + sg->offset;
-
- if (!arch_is_coherent())
- consistent_sync(virt, sg->length, dir);
- }
-
- return nents;
-}
-#else
-extern int dma_map_sg(struct device *, struct scatterlist *, int, enum dma_data_direction);
-#endif
-
-/**
- * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Unmap a set of streaming mode DMA translations.
- * Again, CPU read rules concerning calls here are the same as for
- * dma_unmap_single() above.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
- enum dma_data_direction dir)
-{
-
- /* nothing to do */
-}
-#else
-extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_data_direction);
-#endif
-
-
-/**
- * dma_sync_single_for_cpu
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
- *
- * Make physical memory consistent for a single streaming mode DMA
- * translation after a transfer.
- *
- * If you perform a dma_map_single() but wish to interrogate the
- * buffer using the cpu, yet do not wish to teardown the PCI dma
- * mapping, you must call this function before doing so. At the
- * next point you give the PCI dma address back to the card, you
- * must first the perform a dma_sync_for_device, and then the
- * device again owns the buffer.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
- enum dma_data_direction dir)
-{
- if (!arch_is_coherent())
- consistent_sync((void *)dma_to_virt(dev, handle), size, dir);
-}
-
-static inline void
-dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
- enum dma_data_direction dir)
-{
- if (!arch_is_coherent())
- consistent_sync((void *)dma_to_virt(dev, handle), size, dir);
-}
-#else
-extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction);
-extern void dma_sync_single_for_device(struct device*, dma_addr_t, size_t, enum dma_data_direction);
-#endif
-
-
-/**
- * dma_sync_sg_for_cpu
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Make physical memory consistent for a set of streaming
- * mode DMA translations after a transfer.
- *
- * The same as dma_sync_single_for_* but for a scatter-gather list,
- * same rules and usage.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
- enum dma_data_direction dir)
-{
- int i;
-
- for (i = 0; i < nents; i++, sg++) {
- char *virt = page_address(sg->page) + sg->offset;
- if (!arch_is_coherent())
- consistent_sync(virt, sg->length, dir);
- }
-}
-
-static inline void
-dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
- enum dma_data_direction dir)
-{
- int i;
-
- for (i = 0; i < nents; i++, sg++) {
- char *virt = page_address(sg->page) + sg->offset;
- if (!arch_is_coherent())
- consistent_sync(virt, sg->length, dir);
- }
-}
-#else
-extern void dma_sync_sg_for_cpu(struct device*, struct scatterlist*, int, enum dma_data_direction);
-extern void dma_sync_sg_for_device(struct device*, struct scatterlist*, int, enum dma_data_direction);
-#endif
-
-#ifdef CONFIG_DMABOUNCE
-/*
- * For SA-1111, IXP425, and ADI systems the dma-mapping functions are "magic"
- * and utilize bounce buffers as needed to work around limited DMA windows.
- *
- * On the SA-1111, a bug limits DMA to only certain regions of RAM.
- * On the IXP425, the PCI inbound window is 64MB (256MB total RAM)
- * On some ADI engineering sytems, PCI inbound window is 32MB (12MB total RAM)
- *
- * The following are helper functions used by the dmabounce subystem
- *
- */
-
-/**
- * dmabounce_register_dev
- *
- * @dev: valid struct device pointer
- * @small_buf_size: size of buffers to use with small buffer pool
- * @large_buf_size: size of buffers to use with large buffer pool (can be 0)
- *
- * This function should be called by low-level platform code to register
- * a device as requireing DMA buffer bouncing. The function will allocate
- * appropriate DMA pools for the device.
- *
- */
-extern int dmabounce_register_dev(struct device *, unsigned long, unsigned long);
-
-/**
- * dmabounce_unregister_dev
- *
- * @dev: valid struct device pointer
- *
- * This function should be called by low-level platform code when device
- * that was previously registered with dmabounce_register_dev is removed
- * from the system.
- *
- */
-extern void dmabounce_unregister_dev(struct device *);
-
-/**
- * dma_needs_bounce
- *
- * @dev: valid struct device pointer
- * @dma_handle: dma_handle of unbounced buffer
- * @size: size of region being mapped
- *
- * Platforms that utilize the dmabounce mechanism must implement
- * this function.
- *
- * The dmabounce routines call this function whenever a dma-mapping
- * is requested to determine whether a given buffer needs to be bounced
- * or not. The function must return 0 if the the buffer is OK for
- * DMA access and 1 if the buffer needs to be bounced.
- *
- */
-extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
-#endif /* CONFIG_DMABOUNCE */
-
-#endif /* __KERNEL__ */
-#endif
diff --git a/original/asm-arm/dma.h b/original/asm-arm/dma.h
deleted file mode 100644
index 9f2c530..0000000
--- a/original/asm-arm/dma.h
+++ /dev/null
@@ -1,143 +0,0 @@
-#ifndef __ASM_ARM_DMA_H
-#define __ASM_ARM_DMA_H
-
-typedef unsigned int dmach_t;
-
-#include <linux/spinlock.h>
-#include <asm/system.h>
-#include <asm/scatterlist.h>
-#include <asm/arch/dma.h>
-
-/*
- * This is the maximum virtual address which can be DMA'd from.
- */
-#ifndef MAX_DMA_ADDRESS
-#define MAX_DMA_ADDRESS 0xffffffff
-#endif
-
-/*
- * DMA modes
- */
-typedef unsigned int dmamode_t;
-
-#define DMA_MODE_MASK 3
-
-#define DMA_MODE_READ 0
-#define DMA_MODE_WRITE 1
-#define DMA_MODE_CASCADE 2
-#define DMA_AUTOINIT 4
-
-extern spinlock_t dma_spin_lock;
-
-static inline unsigned long claim_dma_lock(void)
-{
- unsigned long flags;
- spin_lock_irqsave(&dma_spin_lock, flags);
- return flags;
-}
-
-static inline void release_dma_lock(unsigned long flags)
-{
- spin_unlock_irqrestore(&dma_spin_lock, flags);
-}
-
-/* Clear the 'DMA Pointer Flip Flop'.
- * Write 0 for LSB/MSB, 1 for MSB/LSB access.
- */
-#define clear_dma_ff(channel)
-
-/* Set only the page register bits of the transfer address.
- *
- * NOTE: This is an architecture specific function, and should
- * be hidden from the drivers
- */
-extern void set_dma_page(dmach_t channel, char pagenr);
-
-/* Request a DMA channel
- *
- * Some architectures may need to do allocate an interrupt
- */
-extern int request_dma(dmach_t channel, const char * device_id);
-
-/* Free a DMA channel
- *
- * Some architectures may need to do free an interrupt
- */
-extern void free_dma(dmach_t channel);
-
-/* Enable DMA for this channel
- *
- * On some architectures, this may have other side effects like
- * enabling an interrupt and setting the DMA registers.
- */
-extern void enable_dma(dmach_t channel);
-
-/* Disable DMA for this channel
- *
- * On some architectures, this may have other side effects like
- * disabling an interrupt or whatever.
- */
-extern void disable_dma(dmach_t channel);
-
-/* Test whether the specified channel has an active DMA transfer
- */
-extern int dma_channel_active(dmach_t channel);
-
-/* Set the DMA scatter gather list for this channel
- *
- * This should not be called if a DMA channel is enabled,
- * especially since some DMA architectures don't update the
- * DMA address immediately, but defer it to the enable_dma().
- */
-extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
-
-/* Set the DMA address for this channel
- *
- * This should not be called if a DMA channel is enabled,
- * especially since some DMA architectures don't update the
- * DMA address immediately, but defer it to the enable_dma().
- */
-extern void __set_dma_addr(dmach_t channel, void *addr);
-#define set_dma_addr(channel, addr) \
- __set_dma_addr(channel, bus_to_virt(addr))
-
-/* Set the DMA byte count for this channel
- *
- * This should not be called if a DMA channel is enabled,
- * especially since some DMA architectures don't update the
- * DMA count immediately, but defer it to the enable_dma().
- */
-extern void set_dma_count(dmach_t channel, unsigned long count);
-
-/* Set the transfer direction for this channel
- *
- * This should not be called if a DMA channel is enabled,
- * especially since some DMA architectures don't update the
- * DMA transfer direction immediately, but defer it to the
- * enable_dma().
- */
-extern void set_dma_mode(dmach_t channel, dmamode_t mode);
-
-/* Set the transfer speed for this channel
- */
-extern void set_dma_speed(dmach_t channel, int cycle_ns);
-
-/* Get DMA residue count. After a DMA transfer, this
- * should return zero. Reading this while a DMA transfer is
- * still in progress will return unpredictable results.
- * If called before the channel has been used, it may return 1.
- * Otherwise, it returns the number of _bytes_ left to transfer.
- */
-extern int get_dma_residue(dmach_t channel);
-
-#ifndef NO_DMA
-#define NO_DMA 255
-#endif
-
-#ifdef CONFIG_PCI
-extern int isa_dma_bridge_buggy;
-#else
-#define isa_dma_bridge_buggy (0)
-#endif
-
-#endif /* _ARM_DMA_H */
diff --git a/original/asm-arm/domain.h b/original/asm-arm/domain.h
deleted file mode 100644
index 4c2885a..0000000
--- a/original/asm-arm/domain.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * linux/include/asm-arm/domain.h
- *
- * Copyright (C) 1999 Russell King.
- *
- * 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.
- */
-#ifndef __ASM_PROC_DOMAIN_H
-#define __ASM_PROC_DOMAIN_H
-
-/*
- * Domain numbers
- *
- * DOMAIN_IO - domain 2 includes all IO only
- * DOMAIN_USER - domain 1 includes all user memory only
- * DOMAIN_KERNEL - domain 0 includes all kernel memory only
- *
- * The domain numbering depends on whether we support 36 physical
- * address for I/O or not. Addresses above the 32 bit boundary can
- * only be mapped using supersections and supersections can only
- * be set for domain 0. We could just default to DOMAIN_IO as zero,
- * but there may be systems with supersection support and no 36-bit
- * addressing. In such cases, we want to map system memory with
- * supersections to reduce TLB misses and footprint.
- *
- * 36-bit addressing and supersections are only available on
- * CPUs based on ARMv6+ or the Intel XSC3 core.
- */
-#ifndef CONFIG_IO_36
-#define DOMAIN_KERNEL 0
-#define DOMAIN_TABLE 0
-#define DOMAIN_USER 1
-#define DOMAIN_IO 2
-#else
-#define DOMAIN_KERNEL 2
-#define DOMAIN_TABLE 2
-#define DOMAIN_USER 1
-#define DOMAIN_IO 0
-#endif
-
-/*
- * Domain types
- */
-#define DOMAIN_NOACCESS 0
-#define DOMAIN_CLIENT 1
-#define DOMAIN_MANAGER 3
-
-#define domain_val(dom,type) ((type) << (2*(dom)))
-
-#ifndef __ASSEMBLY__
-
-#ifdef CONFIG_MMU
-#define set_domain(x) \
- do { \
- __asm__ __volatile__( \
- "mcr p15, 0, %0, c3, c0 @ set domain" \
- : : "r" (x)); \
- } while (0)
-
-#define modify_domain(dom,type) \
- do { \
- struct thread_info *thread = current_thread_info(); \
- unsigned int domain = thread->cpu_domain; \
- domain &= ~domain_val(dom, DOMAIN_MANAGER); \
- thread->cpu_domain = domain | domain_val(dom, type); \
- set_domain(thread->cpu_domain); \
- } while (0)
-
-#else
-#define set_domain(x) do { } while (0)
-#define modify_domain(dom,type) do { } while (0)
-#endif
-
-#endif
-#endif /* !__ASSEMBLY__ */
diff --git a/original/asm-arm/dyntick.h b/original/asm-arm/dyntick.h
deleted file mode 100644
index 19fab2d..0000000
--- a/original/asm-arm/dyntick.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASMARM_DYNTICK_H
-#define _ASMARM_DYNTICK_H
-
-#include <asm/mach/time.h>
-
-#endif /* _ASMARM_DYNTICK_H */
diff --git a/original/asm-arm/errno.h b/original/asm-arm/errno.h
deleted file mode 100644
index 6e60f06..0000000
--- a/original/asm-arm/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ARM_ERRNO_H
-#define _ARM_ERRNO_H
-
-#include <asm-generic/errno.h>
-
-#endif
diff --git a/original/asm-arm/fcntl.h b/original/asm-arm/fcntl.h
deleted file mode 100644
index a80b660..0000000
--- a/original/asm-arm/fcntl.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _ARM_FCNTL_H
-#define _ARM_FCNTL_H
-
-#define O_DIRECTORY 040000 /* must be a directory */
-#define O_NOFOLLOW 0100000 /* don't follow links */
-#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
-#define O_LARGEFILE 0400000
-
-#include <asm-generic/fcntl.h>
-
-#endif
diff --git a/original/asm-arm/fpstate.h b/original/asm-arm/fpstate.h
deleted file mode 100644
index 6af4e6b..0000000
--- a/original/asm-arm/fpstate.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * linux/include/asm-arm/fpstate.h
- *
- * Copyright (C) 1995 Russell King
- *
- * 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.
- */
-
-#ifndef __ASM_ARM_FPSTATE_H
-#define __ASM_ARM_FPSTATE_H
-
-
-#ifndef __ASSEMBLY__
-
-/*
- * VFP storage area has:
- * - FPEXC, FPSCR, FPINST and FPINST2.
- * - 16 double precision data registers
- * - an implementation-dependant word of state for FLDMX/FSTMX
- *
- * FPEXC will always be non-zero once the VFP has been used in this process.
- */
-
-struct vfp_hard_struct {
- __u64 fpregs[16];
-#if __LINUX_ARM_ARCH__ < 6
- __u32 fpmx_state;
-#endif
- __u32 fpexc;
- __u32 fpscr;
- /*
- * VFP implementation specific state
- */
- __u32 fpinst;
- __u32 fpinst2;
-};
-
-union vfp_state {
- struct vfp_hard_struct hard;
-};
-
-extern void vfp_flush_thread(union vfp_state *);
-extern void vfp_release_thread(union vfp_state *);
-
-#define FP_HARD_SIZE 35
-
-struct fp_hard_struct {
- unsigned int save[FP_HARD_SIZE]; /* as yet undefined */
-};
-
-#define FP_SOFT_SIZE 35
-
-struct fp_soft_struct {
- unsigned int save[FP_SOFT_SIZE]; /* undefined information */
-};
-
-#define IWMMXT_SIZE 0x98
-
-struct iwmmxt_struct {
- unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)];
-};
-
-union fp_state {
- struct fp_hard_struct hard;
- struct fp_soft_struct soft;
-#ifdef CONFIG_IWMMXT
- struct iwmmxt_struct iwmmxt;
-#endif
-};
-
-#define FP_SIZE (sizeof(union fp_state) / sizeof(int))
-
-struct crunch_state {
- unsigned int mvdx[16][2];
- unsigned int mvax[4][3];
- unsigned int dspsc[2];
-};
-
-#define CRUNCH_SIZE sizeof(struct crunch_state)
-
-#endif
-
-#endif
diff --git a/original/asm-arm/glue.h b/original/asm-arm/glue.h
deleted file mode 100644
index 0cc5d3b..0000000
--- a/original/asm-arm/glue.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * linux/include/asm-arm/glue.h
- *
- * Copyright (C) 1997-1999 Russell King
- * Copyright (C) 2000-2002 Deep Blue Solutions Ltd.
- *
- * 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.
- *
- * This file provides the glue to stick the processor-specific bits
- * into the kernel in an efficient manner. The idea is to use branches
- * when we're only targetting one class of TLB, or indirect calls
- * when we're targetting multiple classes of TLBs.
- */
-#ifdef __KERNEL__
-
-
-#ifdef __STDC__
-#define ____glue(name,fn) name##fn
-#else
-#define ____glue(name,fn) name/**/fn
-#endif
-#define __glue(name,fn) ____glue(name,fn)
-
-
-
-/*
- * Data Abort Model
- * ================
- *
- * We have the following to choose from:
- * arm6 - ARM6 style
- * arm7 - ARM7 style
- * v4_early - ARMv4 without Thumb early abort handler
- * v4t_late - ARMv4 with Thumb late abort handler
- * v4t_early - ARMv4 with Thumb early abort handler
- * v5tej_early - ARMv5 with Thumb and Java early abort handler
- * xscale - ARMv5 with Thumb with Xscale extensions
- * v6_early - ARMv6 generic early abort handler
- */
-#undef CPU_ABORT_HANDLER
-#undef MULTI_ABORT
-
-#if defined(CONFIG_CPU_ARM610)
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER cpu_arm6_data_abort
-# endif
-#endif
-
-#if defined(CONFIG_CPU_ARM710)
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER cpu_arm7_data_abort
-# endif
-#endif
-
-#ifdef CONFIG_CPU_ABRT_LV4T
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER v4t_late_abort
-# endif
-#endif
-
-#ifdef CONFIG_CPU_ABRT_EV4
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER v4_early_abort
-# endif
-#endif
-
-#ifdef CONFIG_CPU_ABRT_EV4T
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER v4t_early_abort
-# endif
-#endif
-
-#ifdef CONFIG_CPU_ABRT_EV5TJ
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER v5tj_early_abort
-# endif
-#endif
-
-#ifdef CONFIG_CPU_ABRT_EV5T
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER v5t_early_abort
-# endif
-#endif
-
-#ifdef CONFIG_CPU_ABRT_EV6
-# ifdef CPU_ABORT_HANDLER
-# define MULTI_ABORT 1
-# else
-# define CPU_ABORT_HANDLER v6_early_abort
-# endif
-#endif
-
-#ifndef CPU_ABORT_HANDLER
-#error Unknown data abort handler type
-#endif
-
-#endif
diff --git a/original/asm-arm/hardirq.h b/original/asm-arm/hardirq.h
deleted file mode 100644
index 182310b..0000000
--- a/original/asm-arm/hardirq.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef __ASM_HARDIRQ_H
-#define __ASM_HARDIRQ_H
-
-#include <linux/cache.h>
-#include <linux/threads.h>
-#include <asm/irq.h>
-
-typedef struct {
- unsigned int __softirq_pending;
- unsigned int local_timer_irqs;
-} ____cacheline_aligned irq_cpustat_t;
-
-#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-
-#if NR_IRQS > 256
-#define HARDIRQ_BITS 9
-#else
-#define HARDIRQ_BITS 8
-#endif
-
-/*
- * The hardirq mask has to be large enough to have space
- * for potentially all IRQ sources in the system nesting
- * on a single CPU:
- */
-#if (1 << HARDIRQ_BITS) < NR_IRQS
-# error HARDIRQ_BITS is too low!
-#endif
-
-#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
-
-#endif /* __ASM_HARDIRQ_H */
diff --git a/original/asm-arm/hardware.h b/original/asm-arm/hardware.h
deleted file mode 100644
index 1fd1a5b..0000000
--- a/original/asm-arm/hardware.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * linux/include/asm-arm/hardware.h
- *
- * Copyright (C) 1996 Russell King
- *
- * 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.
- *
- * Common hardware definitions
- */
-
-#ifndef __ASM_HARDWARE_H
-#define __ASM_HARDWARE_H
-
-#include <asm/arch/hardware.h>
-
-#endif
diff --git a/original/asm-arm/hw_irq.h b/original/asm-arm/hw_irq.h
deleted file mode 100644
index ea85697..0000000
--- a/original/asm-arm/hw_irq.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Nothing to see here yet
- */
-#ifndef _ARCH_ARM_HW_IRQ_H
-#define _ARCH_ARM_HW_IRQ_H
-
-#include <asm/mach/irq.h>
-
-#if defined(CONFIG_NO_IDLE_HZ)
-# include <asm/dyntick.h>
-# define handle_dynamic_tick(action) \
- if (!(action->flags & IRQF_TIMER) && system_timer->dyn_tick) { \
- write_seqlock(&xtime_lock); \
- if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) \
- system_timer->dyn_tick->handler(irq, 0, regs); \
- write_sequnlock(&xtime_lock); \
- }
-#endif
-
-#endif
diff --git a/original/asm-arm/ide.h b/original/asm-arm/ide.h
deleted file mode 100644
index 4f68c8a..0000000
--- a/original/asm-arm/ide.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * linux/include/asm-arm/ide.h
- *
- * Copyright (C) 1994-1996 Linus Torvalds & authors
- */
-
-/*
- * This file contains the ARM architecture specific IDE code.
- */
-
-#ifndef __ASMARM_IDE_H
-#define __ASMARM_IDE_H
-
-#ifdef __KERNEL__
-
-#ifndef MAX_HWIFS
-#define MAX_HWIFS 4
-#endif
-
-#if !defined(CONFIG_ARCH_L7200)
-# define IDE_ARCH_OBSOLETE_INIT
-# ifdef CONFIG_ARCH_CLPS7500
-# define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
-# else
-# define ide_default_io_ctl(base) (0)
-# endif
-#endif /* !ARCH_L7200 */
-
-#define __ide_mm_insw(port,addr,len) readsw(port,addr,len)
-#define __ide_mm_insl(port,addr,len) readsl(port,addr,len)
-#define __ide_mm_outsw(port,addr,len) writesw(port,addr,len)
-#define __ide_mm_outsl(port,addr,len) writesl(port,addr,len)
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASMARM_IDE_H */
diff --git a/original/asm-arm/io.h b/original/asm-arm/io.h
deleted file mode 100644
index bf7b9de..0000000
--- a/original/asm-arm/io.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * linux/include/asm-arm/io.h
- *
- * Copyright (C) 1996-2000 Russell King
- *
- * 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.
- *
- * Modifications:
- * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both
- * constant addresses and variable addresses.
- * 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture
- * specific IO header files.
- * 27-Mar-1999 PJB Second parameter of memcpy_toio is const..
- * 04-Apr-1999 PJB Added check_signature.
- * 12-Dec-1999 RMK More cleanups
- * 18-Jun-2000 RMK Removed virt_to_* and friends definitions
- * 05-Oct-2004 BJD Moved memory string functions to use void __iomem
- */
-#ifndef __ASM_ARM_IO_H
-#define __ASM_ARM_IO_H
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <asm/byteorder.h>
-#include <asm/memory.h>
-
-/*
- * ISA I/O bus memory addresses are 1:1 with the physical address.
- */
-#define isa_virt_to_bus virt_to_phys
-#define isa_page_to_bus page_to_phys
-#define isa_bus_to_virt phys_to_virt
-
-/*
- * Generic IO read/write. These perform native-endian accesses. Note
- * that some architectures will want to re-define __raw_{read,write}w.
- */
-extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen);
-extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen);
-extern void __raw_writesl(void __iomem *addr, const void *data, int longlen);
-
-extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen);
-extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen);
-extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
-
-#define __raw_writeb(v,a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v))
-#define __raw_writew(v,a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))
-#define __raw_writel(v,a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a) = (v))
-
-#define __raw_readb(a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a))
-#define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a))
-#define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a))
-
-/*
- * Architecture ioremap implementation.
- *
- * __ioremap takes CPU physical address.
- *
- * __ioremap_pfn takes a Page Frame Number and an offset into that page
- */
-extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
-extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
-extern void __iounmap(void __iomem *addr);
-
-/*
- * Bad read/write accesses...
- */
-extern void __readwrite_bug(const char *fn);
-
-/*
- * Now, pick up the machine-defined IO definitions
- */
-#include <asm/arch/io.h>
-
-#ifdef __io_pci
-#warning machine class uses buggy __io_pci
-#endif
-#if defined(__arch_putb) || defined(__arch_putw) || defined(__arch_putl) || \
- defined(__arch_getb) || defined(__arch_getw) || defined(__arch_getl)
-#warning machine class uses old __arch_putw or __arch_getw
-#endif
-
-/*
- * IO port access primitives
- * -------------------------
- *
- * The ARM doesn't have special IO access instructions; all IO is memory
- * mapped. Note that these are defined to perform little endian accesses
- * only. Their primary purpose is to access PCI and ISA peripherals.
- *
- * Note that for a big endian machine, this implies that the following
- * big endian mode connectivity is in place, as described by numerous
- * ARM documents:
- *
- * PCI: D0-D7 D8-D15 D16-D23 D24-D31
- * ARM: D24-D31 D16-D23 D8-D15 D0-D7
- *
- * The machine specific io.h include defines __io to translate an "IO"
- * address to a memory address.
- *
- * Note that we prevent GCC re-ordering or caching values in expressions
- * by introducing sequence points into the in*() definitions. Note that
- * __raw_* do not guarantee this behaviour.
- *
- * The {in,out}[bwl] macros are for emulating x86-style PCI/ISA IO space.
- */
-#ifdef __io
-#define outb(v,p) __raw_writeb(v,__io(p))
-#define outw(v,p) __raw_writew((__force __u16) \
- cpu_to_le16(v),__io(p))
-#define outl(v,p) __raw_writel((__force __u32) \
- cpu_to_le32(v),__io(p))
-
-#define inb(p) ({ __u8 __v = __raw_readb(__io(p)); __v; })
-#define inw(p) ({ __u16 __v = le16_to_cpu((__force __le16) \
- __raw_readw(__io(p))); __v; })
-#define inl(p) ({ __u32 __v = le32_to_cpu((__force __le32) \
- __raw_readl(__io(p))); __v; })
-
-#define outsb(p,d,l) __raw_writesb(__io(p),d,l)
-#define outsw(p,d,l) __raw_writesw(__io(p),d,l)
-#define outsl(p,d,l) __raw_writesl(__io(p),d,l)
-
-#define insb(p,d,l) __raw_readsb(__io(p),d,l)
-#define insw(p,d,l) __raw_readsw(__io(p),d,l)
-#define insl(p,d,l) __raw_readsl(__io(p),d,l)
-#endif
-
-#define outb_p(val,port) outb((val),(port))
-#define outw_p(val,port) outw((val),(port))
-#define outl_p(val,port) outl((val),(port))
-#define inb_p(port) inb((port))
-#define inw_p(port) inw((port))
-#define inl_p(port) inl((port))
-
-#define outsb_p(port,from,len) outsb(port,from,len)
-#define outsw_p(port,from,len) outsw(port,from,len)
-#define outsl_p(port,from,len) outsl(port,from,len)
-#define insb_p(port,to,len) insb(port,to,len)
-#define insw_p(port,to,len) insw(port,to,len)
-#define insl_p(port,to,len) insl(port,to,len)
-
-/*
- * String version of IO memory access ops:
- */
-extern void _memcpy_fromio(void *, const volatile void __iomem *, size_t);
-extern void _memcpy_toio(volatile void __iomem *, const void *, size_t);
-extern void _memset_io(volatile void __iomem *, int, size_t);
-
-#define mmiowb()
-
-/*
- * Memory access primitives
- * ------------------------
- *
- * These perform PCI memory accesses via an ioremap region. They don't
- * take an address as such, but a cookie.
- *
- * Again, this are defined to perform little endian accesses. See the
- * IO port primitives for more information.
- */
-#ifdef __mem_pci
-#define readb(c) ({ __u8 __v = __raw_readb(__mem_pci(c)); __v; })
-#define readw(c) ({ __u16 __v = le16_to_cpu((__force __le16) \
- __raw_readw(__mem_pci(c))); __v; })
-#define readl(c) ({ __u32 __v = le32_to_cpu((__force __le32) \
- __raw_readl(__mem_pci(c))); __v; })
-#define readb_relaxed(addr) readb(addr)
-#define readw_relaxed(addr) readw(addr)
-#define readl_relaxed(addr) readl(addr)
-
-#define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l)
-#define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l)
-#define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l)
-
-#define writeb(v,c) __raw_writeb(v,__mem_pci(c))
-#define writew(v,c) __raw_writew((__force __u16) \
- cpu_to_le16(v),__mem_pci(c))
-#define writel(v,c) __raw_writel((__force __u32) \
- cpu_to_le32(v),__mem_pci(c))
-
-#define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l)
-#define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l)
-#define writesl(p,d,l) __raw_writesl(__mem_pci(p),d,l)
-
-#define memset_io(c,v,l) _memset_io(__mem_pci(c),(v),(l))
-#define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l))
-#define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l))
-
-#define eth_io_copy_and_sum(s,c,l,b) \
- eth_copy_and_sum((s),__mem_pci(c),(l),(b))
-
-static inline int
-check_signature(void __iomem *io_addr, const unsigned char *signature,
- int length)
-{
- int retval = 0;
- do {
- if (readb(io_addr) != *signature)
- goto out;
- io_addr++;
- signature++;
- length--;
- } while (length);
- retval = 1;
-out:
- return retval;
-}
-
-#elif !defined(readb)
-
-#define readb(c) (__readwrite_bug("readb"),0)
-#define readw(c) (__readwrite_bug("readw"),0)
-#define readl(c) (__readwrite_bug("readl"),0)
-#define writeb(v,c) __readwrite_bug("writeb")
-#define writew(v,c) __readwrite_bug("writew")
-#define writel(v,c) __readwrite_bug("writel")
-
-#define eth_io_copy_and_sum(s,c,l,b) __readwrite_bug("eth_io_copy_and_sum")
-
-#define check_signature(io,sig,len) (0)
-
-#endif /* __mem_pci */
-
-/*
- * ioremap and friends.
- *
- * ioremap takes a PCI memory address, as specified in
- * Documentation/IO-mapping.txt.
- *
- */
-#ifndef __arch_ioremap
-#define ioremap(cookie,size) __ioremap(cookie,size,0)
-#define ioremap_nocache(cookie,size) __ioremap(cookie,size,0)
-#define ioremap_cached(cookie,size) __ioremap(cookie,size,L_PTE_CACHEABLE)
-#define iounmap(cookie) __iounmap(cookie)
-#else
-#define ioremap(cookie,size) __arch_ioremap((cookie),(size),0)
-#define ioremap_nocache(cookie,size) __arch_ioremap((cookie),(size),0)
-#define ioremap_cached(cookie,size) __arch_ioremap((cookie),(size),L_PTE_CACHEABLE)
-#define iounmap(cookie) __arch_iounmap(cookie)
-#endif
-
-/*
- * io{read,write}{8,16,32} macros
- */
-#ifndef ioread8
-#define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; })
-#define ioread16(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(p)); __v; })
-#define ioread32(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(p)); __v; })
-
-#define iowrite8(v,p) __raw_writeb(v, p)
-#define iowrite16(v,p) __raw_writew(cpu_to_le16(v), p)
-#define iowrite32(v,p) __raw_writel(cpu_to_le32(v), p)
-
-#define ioread8_rep(p,d,c) __raw_readsb(p,d,c)
-#define ioread16_rep(p,d,c) __raw_readsw(p,d,c)
-#define ioread32_rep(p,d,c) __raw_readsl(p,d,c)
-
-#define iowrite8_rep(p,s,c) __raw_writesb(p,s,c)
-#define iowrite16_rep(p,s,c) __raw_writesw(p,s,c)
-#define iowrite32_rep(p,s,c) __raw_writesl(p,s,c)
-
-extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
-extern void ioport_unmap(void __iomem *addr);
-#endif
-
-struct pci_dev;
-
-extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen);
-extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
-
-/*
- * can the hardware map this into one segment or not, given no other
- * constraints.
- */
-#define BIOVEC_MERGEABLE(vec1, vec2) \
- ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
-
-/*
- * 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
-
-/*
- * Register ISA memory and port locations for glibc iopl/inb/outb
- * emulation.
- */
-extern void register_isa_ports(unsigned int mmio, unsigned int io,
- unsigned int io_shift);
-
-#endif /* __KERNEL__ */
-#endif /* __ASM_ARM_IO_H */
diff --git a/original/asm-arm/ioctl.h b/original/asm-arm/ioctl.h
deleted file mode 100644
index b279fe0..0000000
--- a/original/asm-arm/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/ioctl.h>
diff --git a/original/asm-arm/ioctls.h b/original/asm-arm/ioctls.h
deleted file mode 100644
index bb9a7aa..0000000
--- a/original/asm-arm/ioctls.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __ASM_ARM_IOCTLS_H
-#define __ASM_ARM_IOCTLS_H
-
-#include <asm/ioctl.h>
-
-/* 0x54 is just a magic number to make these relatively unique ('T') */
-
-#define TCGETS 0x5401
-#define TCSETS 0x5402
-#define TCSETSW 0x5403
-#define TCSETSF 0x5404
-#define TCGETA 0x5405
-#define TCSETA 0x5406
-#define TCSETAW 0x5407
-#define TCSETAF 0x5408
-#define TCSBRK 0x5409
-#define TCXONC 0x540A
-#define TCFLSH 0x540B
-#define TIOCEXCL 0x540C
-#define TIOCNXCL 0x540D
-#define TIOCSCTTY 0x540E
-#define TIOCGPGRP 0x540F
-#define TIOCSPGRP 0x5410
-#define TIOCOUTQ 0x5411
-#define TIOCSTI 0x5412
-#define TIOCGWINSZ 0x5413
-#define TIOCSWINSZ 0x5414
-#define TIOCMGET 0x5415
-#define TIOCMBIS 0x5416
-#define TIOCMBIC 0x5417
-#define TIOCMSET 0x5418
-#define TIOCGSOFTCAR 0x5419
-#define TIOCSSOFTCAR 0x541A
-#define FIONREAD 0x541B
-#define TIOCINQ FIONREAD
-#define TIOCLINUX 0x541C
-#define TIOCCONS 0x541D
-#define TIOCGSERIAL 0x541E
-#define TIOCSSERIAL 0x541F
-#define TIOCPKT 0x5420
-#define FIONBIO 0x5421
-#define TIOCNOTTY 0x5422
-#define TIOCSETD 0x5423
-#define TIOCGETD 0x5424
-#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
-#define TIOCSBRK 0x5427 /* BSD compatibility */
-#define TIOCCBRK 0x5428 /* BSD compatibility */
-#define TIOCGSID 0x5429 /* Return the session ID of FD */
-#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
-#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
-
-#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
-#define FIOCLEX 0x5451
-#define FIOASYNC 0x5452
-#define TIOCSERCONFIG 0x5453
-#define TIOCSERGWILD 0x5454
-#define TIOCSERSWILD 0x5455
-#define TIOCGLCKTRMIOS 0x5456
-#define TIOCSLCKTRMIOS 0x5457
-#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
-#define TIOCSERGETLSR 0x5459 /* Get line status register */
-#define TIOCSERGETMULTI 0x545A /* Get multiport config */
-#define TIOCSERSETMULTI 0x545B /* Set multiport config */
-
-#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
-#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
-#define FIOQSIZE 0x545E
-
-/* Used for packet mode */
-#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 TIOCSER_TEMT 0x01 /* Transmitter physically empty */
-
-#endif
diff --git a/original/asm-arm/ipcbuf.h b/original/asm-arm/ipcbuf.h
deleted file mode 100644
index 9768397..0000000
--- a/original/asm-arm/ipcbuf.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __ASMARM_IPCBUF_H
-#define __ASMARM_IPCBUF_H
-
-/*
- * The ipc64_perm structure for arm architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 32-bit mode_t and seq
- * - 2 miscellaneous 32-bit values
- */
-
-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 short __pad1;
- unsigned short seq;
- unsigned short __pad2;
- unsigned long __unused1;
- unsigned long __unused2;
-};
-
-#endif /* __ASMARM_IPCBUF_H */
diff --git a/original/asm-arm/irq.h b/original/asm-arm/irq.h
deleted file mode 100644
index 283af50..0000000
--- a/original/asm-arm/irq.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef __ASM_ARM_IRQ_H
-#define __ASM_ARM_IRQ_H
-
-#include <asm/arch/irqs.h>
-
-#ifndef irq_canonicalize
-#define irq_canonicalize(i) (i)
-#endif
-
-#ifndef NR_IRQS
-#define NR_IRQS 128
-#endif
-
-/*
- * Use this value to indicate lack of interrupt
- * capability
- */
-#ifndef NO_IRQ
-#define NO_IRQ ((unsigned int)(-1))
-#endif
-
-struct irqaction;
-
-/*
- * Migration helpers
- */
-#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING
-#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
-#define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW
-#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH
-
-#define IRQT_NOEDGE (0)
-#define IRQT_RISING (__IRQT_RISEDGE)
-#define IRQT_FALLING (__IRQT_FALEDGE)
-#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
-#define IRQT_LOW (__IRQT_LOWLVL)
-#define IRQT_HIGH (__IRQT_HIGHLVL)
-#define IRQT_PROBE IRQ_TYPE_PROBE
-
-extern void migrate_irqs(void);
-#endif
-
diff --git a/original/asm-arm/linkage.h b/original/asm-arm/linkage.h
deleted file mode 100644
index dbe4b4e..0000000
--- a/original/asm-arm/linkage.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __ASM_LINKAGE_H
-#define __ASM_LINKAGE_H
-
-#define __ALIGN .align 0
-#define __ALIGN_STR ".align 0"
-
-#endif
diff --git a/original/asm-arm/local.h b/original/asm-arm/local.h
deleted file mode 100644
index c11c530..0000000
--- a/original/asm-arm/local.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/local.h>
diff --git a/original/asm-arm/locks.h b/original/asm-arm/locks.h
deleted file mode 100644
index 852220e..0000000
--- a/original/asm-arm/locks.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * linux/include/asm-arm/locks.h
- *
- * Copyright (C) 2000 Russell King
- *
- * 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.
- *
- * Interrupt safe locking assembler.
- */
-#ifndef __ASM_PROC_LOCKS_H
-#define __ASM_PROC_LOCKS_H
-
-#if __LINUX_ARM_ARCH__ >= 6
-
-#define __down_op(ptr,fail) \
- ({ \
- __asm__ __volatile__( \
- "@ down_op\n" \
-"1: ldrex lr, [%0]\n" \
-" sub lr, lr, %1\n" \
-" strex ip, lr, [%0]\n" \
-" teq ip, #0\n" \
-" bne 1b\n" \
-" teq lr, #0\n" \
-" movmi ip, %0\n" \
-" blmi " #fail \
- : \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- })
-
-#define __down_op_ret(ptr,fail) \
- ({ \
- unsigned int ret; \
- __asm__ __volatile__( \
- "@ down_op_ret\n" \
-"1: ldrex lr, [%1]\n" \
-" sub lr, lr, %2\n" \
-" strex ip, lr, [%1]\n" \
-" teq ip, #0\n" \
-" bne 1b\n" \
-" teq lr, #0\n" \
-" movmi ip, %1\n" \
-" movpl ip, #0\n" \
-" blmi " #fail "\n" \
-" mov %0, ip" \
- : "=&r" (ret) \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- ret; \
- })
-
-#define __up_op(ptr,wake) \
- ({ \
- smp_mb(); \
- __asm__ __volatile__( \
- "@ up_op\n" \
-"1: ldrex lr, [%0]\n" \
-" add lr, lr, %1\n" \
-" strex ip, lr, [%0]\n" \
-" teq ip, #0\n" \
-" bne 1b\n" \
-" cmp lr, #0\n" \
-" movle ip, %0\n" \
-" blle " #wake \
- : \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- })
-
-/*
- * The value 0x01000000 supports up to 128 processors and
- * lots of processes. BIAS must be chosen such that sub'ing
- * BIAS once per CPU will result in the long remaining
- * negative.
- */
-#define RW_LOCK_BIAS 0x01000000
-#define RW_LOCK_BIAS_STR "0x01000000"
-
-#define __down_op_write(ptr,fail) \
- ({ \
- __asm__ __volatile__( \
- "@ down_op_write\n" \
-"1: ldrex lr, [%0]\n" \
-" sub lr, lr, %1\n" \
-" strex ip, lr, [%0]\n" \
-" teq ip, #0\n" \
-" bne 1b\n" \
-" teq lr, #0\n" \
-" movne ip, %0\n" \
-" blne " #fail \
- : \
- : "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- })
-
-#define __up_op_write(ptr,wake) \
- ({ \
- smp_mb(); \
- __asm__ __volatile__( \
- "@ up_op_write\n" \
-"1: ldrex lr, [%0]\n" \
-" adds lr, lr, %1\n" \
-" strex ip, lr, [%0]\n" \
-" teq ip, #0\n" \
-" bne 1b\n" \
-" movcs ip, %0\n" \
-" blcs " #wake \
- : \
- : "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "ip", "lr", "cc"); \
- })
-
-#define __down_op_read(ptr,fail) \
- __down_op(ptr, fail)
-
-#define __up_op_read(ptr,wake) \
- ({ \
- smp_mb(); \
- __asm__ __volatile__( \
- "@ up_op_read\n" \
-"1: ldrex lr, [%0]\n" \
-" add lr, lr, %1\n" \
-" strex ip, lr, [%0]\n" \
-" teq ip, #0\n" \
-" bne 1b\n" \
-" teq lr, #0\n" \
-" moveq ip, %0\n" \
-" bleq " #wake \
- : \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- })
-
-#else
-
-#define __down_op(ptr,fail) \
- ({ \
- __asm__ __volatile__( \
- "@ down_op\n" \
-" mrs ip, cpsr\n" \
-" orr lr, ip, #128\n" \
-" msr cpsr_c, lr\n" \
-" ldr lr, [%0]\n" \
-" subs lr, lr, %1\n" \
-" str lr, [%0]\n" \
-" msr cpsr_c, ip\n" \
-" movmi ip, %0\n" \
-" blmi " #fail \
- : \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- })
-
-#define __down_op_ret(ptr,fail) \
- ({ \
- unsigned int ret; \
- __asm__ __volatile__( \
- "@ down_op_ret\n" \
-" mrs ip, cpsr\n" \
-" orr lr, ip, #128\n" \
-" msr cpsr_c, lr\n" \
-" ldr lr, [%1]\n" \
-" subs lr, lr, %2\n" \
-" str lr, [%1]\n" \
-" msr cpsr_c, ip\n" \
-" movmi ip, %1\n" \
-" movpl ip, #0\n" \
-" blmi " #fail "\n" \
-" mov %0, ip" \
- : "=&r" (ret) \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- ret; \
- })
-
-#define __up_op(ptr,wake) \
- ({ \
- smp_mb(); \
- __asm__ __volatile__( \
- "@ up_op\n" \
-" mrs ip, cpsr\n" \
-" orr lr, ip, #128\n" \
-" msr cpsr_c, lr\n" \
-" ldr lr, [%0]\n" \
-" adds lr, lr, %1\n" \
-" str lr, [%0]\n" \
-" msr cpsr_c, ip\n" \
-" movle ip, %0\n" \
-" blle " #wake \
- : \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- })
-
-/*
- * The value 0x01000000 supports up to 128 processors and
- * lots of processes. BIAS must be chosen such that sub'ing
- * BIAS once per CPU will result in the long remaining
- * negative.
- */
-#define RW_LOCK_BIAS 0x01000000
-#define RW_LOCK_BIAS_STR "0x01000000"
-
-#define __down_op_write(ptr,fail) \
- ({ \
- __asm__ __volatile__( \
- "@ down_op_write\n" \
-" mrs ip, cpsr\n" \
-" orr lr, ip, #128\n" \
-" msr cpsr_c, lr\n" \
-" ldr lr, [%0]\n" \
-" subs lr, lr, %1\n" \
-" str lr, [%0]\n" \
-" msr cpsr_c, ip\n" \
-" movne ip, %0\n" \
-" blne " #fail \
- : \
- : "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- })
-
-#define __up_op_write(ptr,wake) \
- ({ \
- __asm__ __volatile__( \
- "@ up_op_write\n" \
-" mrs ip, cpsr\n" \
-" orr lr, ip, #128\n" \
-" msr cpsr_c, lr\n" \
-" ldr lr, [%0]\n" \
-" adds lr, lr, %1\n" \
-" str lr, [%0]\n" \
-" msr cpsr_c, ip\n" \
-" movcs ip, %0\n" \
-" blcs " #wake \
- : \
- : "r" (ptr), "I" (RW_LOCK_BIAS) \
- : "ip", "lr", "cc"); \
- smp_mb(); \
- })
-
-#define __down_op_read(ptr,fail) \
- __down_op(ptr, fail)
-
-#define __up_op_read(ptr,wake) \
- ({ \
- smp_mb(); \
- __asm__ __volatile__( \
- "@ up_op_read\n" \
-" mrs ip, cpsr\n" \
-" orr lr, ip, #128\n" \
-" msr cpsr_c, lr\n" \
-" ldr lr, [%0]\n" \
-" adds lr, lr, %1\n" \
-" str lr, [%0]\n" \
-" msr cpsr_c, ip\n" \
-" moveq ip, %0\n" \
-" bleq " #wake \
- : \
- : "r" (ptr), "I" (1) \
- : "ip", "lr", "cc"); \
- })
-
-#endif
-
-#endif
diff --git a/original/asm-arm/mc146818rtc.h b/original/asm-arm/mc146818rtc.h
deleted file mode 100644
index 7b81e0c..0000000
--- a/original/asm-arm/mc146818rtc.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Machine dependent access functions for RTC registers.
- */
-#ifndef _ASM_MC146818RTC_H
-#define _ASM_MC146818RTC_H
-
-#include <asm/arch/irqs.h>
-#include <asm/io.h>
-
-#ifndef RTC_PORT
-#define RTC_PORT(x) (0x70 + (x))
-#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
-#endif
-
-/*
- * The yet supported machines all access the RTC index register via
- * an ISA port access but the way to access the date register differs ...
- */
-#define CMOS_READ(addr) ({ \
-outb_p((addr),RTC_PORT(0)); \
-inb_p(RTC_PORT(1)); \
-})
-#define CMOS_WRITE(val, addr) ({ \
-outb_p((addr),RTC_PORT(0)); \
-outb_p((val),RTC_PORT(1)); \
-})
-
-#endif /* _ASM_MC146818RTC_H */
diff --git a/original/asm-arm/memory.h b/original/asm-arm/memory.h
deleted file mode 100644
index 91d536c..0000000
--- a/original/asm-arm/memory.h
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * linux/include/asm-arm/memory.h
- *
- * Copyright (C) 2000-2002 Russell King
- * modification for nommu, Hyok S. Choi, 2004
- *
- * 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.
- *
- * Note: this file should not be included by non-asm/.h files
- */
-#ifndef __ASM_ARM_MEMORY_H
-#define __ASM_ARM_MEMORY_H
-
-/*
- * Allow for constants defined here to be used from assembly code
- * by prepending the UL suffix only with actual C code compilation.
- */
-#ifndef __ASSEMBLY__
-#define UL(x) (x##UL)
-#else
-#define UL(x) (x)
-#endif
-
-#include <linux/compiler.h>
-#include <asm/arch/memory.h>
-#include <asm/sizes.h>
-
-#ifdef CONFIG_MMU
-
-#ifndef TASK_SIZE
-/*
- * TASK_SIZE - the maximum size of a user space task.
- * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
- */
-#define TASK_SIZE UL(0xbf000000)
-#define TASK_UNMAPPED_BASE UL(0x40000000)
-#endif
-
-/*
- * The maximum size of a 26-bit user space task.
- */
-#define TASK_SIZE_26 UL(0x04000000)
-
-/*
- * Page offset: 3GB
- */
-#ifndef PAGE_OFFSET
-#define PAGE_OFFSET UL(0xc0000000)
-#endif
-
-/*
- * The module space lives between the addresses given by TASK_SIZE
- * and PAGE_OFFSET - it must be within 32MB of the kernel text.
- */
-#define MODULE_END (PAGE_OFFSET)
-#define MODULE_START (MODULE_END - 16*1048576)
-
-#if TASK_SIZE > MODULE_START
-#error Top of user space clashes with start of module space
-#endif
-
-/*
- * The XIP kernel gets mapped at the bottom of the module vm area.
- * Since we use sections to map it, this macro replaces the physical address
- * with its virtual address while keeping offset from the base section.
- */
-#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff))
-
-/*
- * Allow 16MB-aligned ioremap pages
- */
-#define IOREMAP_MAX_ORDER 24
-
-#else /* CONFIG_MMU */
-
-/*
- * The limitation of user task size can grow up to the end of free ram region.
- * It is difficult to define and perhaps will never meet the original meaning
- * of this define that was meant to.
- * Fortunately, there is no reference for this in noMMU mode, for now.
- */
-#ifndef TASK_SIZE
-#define TASK_SIZE (CONFIG_DRAM_SIZE)
-#endif
-
-#ifndef TASK_UNMAPPED_BASE
-#define TASK_UNMAPPED_BASE UL(0x00000000)
-#endif
-
-#ifndef PHYS_OFFSET
-#define PHYS_OFFSET (CONFIG_DRAM_BASE)
-#endif
-
-#ifndef END_MEM
-#define END_MEM (CONFIG_DRAM_BASE + CONFIG_DRAM_SIZE)
-#endif
-
-#ifndef PAGE_OFFSET
-#define PAGE_OFFSET (PHYS_OFFSET)
-#endif
-
-/*
- * The module can be at any place in ram in nommu mode.
- */
-#define MODULE_END (END_MEM)
-#define MODULE_START (PHYS_OFFSET)
-
-#endif /* !CONFIG_MMU */
-
-/*
- * Size of DMA-consistent memory region. Must be multiple of 2M,
- * between 2MB and 14MB inclusive.
- */
-#ifndef CONSISTENT_DMA_SIZE
-#define CONSISTENT_DMA_SIZE SZ_2M
-#endif
-
-/*
- * Physical vs virtual RAM address space conversion. These are
- * private definitions which should NOT be used outside memory.h
- * files. Use virt_to_phys/phys_to_virt/__pa/__va instead.
- */
-#ifndef __virt_to_phys
-#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
-#endif
-
-/*
- * Convert a physical address to a Page Frame Number and back
- */
-#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
-#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
-
-#ifndef __ASSEMBLY__
-
-/*
- * The DMA mask corresponding to the maximum bus address allocatable
- * using GFP_DMA. The default here places no restriction on DMA
- * allocations. This must be the smallest DMA mask in the system,
- * so a successful GFP_DMA allocation will always satisfy this.
- */
-#ifndef ISA_DMA_THRESHOLD
-#define ISA_DMA_THRESHOLD (0xffffffffULL)
-#endif
-
-#ifndef arch_adjust_zones
-#define arch_adjust_zones(node,size,holes) do { } while (0)
-#endif
-
-/*
- * PFNs are used to describe any physical page; this means
- * PFN 0 == physical address 0.
- *
- * This is the PFN of the first RAM page in the kernel
- * direct-mapped view. We assume this is the first page
- * of RAM in the mem_map as well.
- */
-#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT)
-
-/*
- * These are *only* valid on the kernel direct mapped RAM memory.
- * Note: Drivers should NOT use these. They are the wrong
- * translation for translating DMA addresses. Use the driver
- * DMA support - see dma-mapping.h.
- */
-static inline unsigned long virt_to_phys(void *x)
-{
- return __virt_to_phys((unsigned long)(x));
-}
-
-static inline void *phys_to_virt(unsigned long x)
-{
- return (void *)(__phys_to_virt((unsigned long)(x)));
-}
-
-/*
- * Drivers should NOT use these either.
- */
-#define __pa(x) __virt_to_phys((unsigned long)(x))
-#define __va(x) ((void *)__phys_to_virt((unsigned long)(x)))
-#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
-
-/*
- * Virtual <-> DMA view memory address translations
- * Again, these are *only* valid on the kernel direct mapped RAM
- * memory. Use of these is *deprecated* (and that doesn't mean
- * use the __ prefixed forms instead.) See dma-mapping.h.
- */
-static inline __deprecated unsigned long virt_to_bus(void *x)
-{
- return __virt_to_bus((unsigned long)x);
-}
-
-static inline __deprecated void *bus_to_virt(unsigned long x)
-{
- return (void *)__bus_to_virt(x);
-}
-
-/*
- * Conversion between a struct page and a physical address.
- *
- * Note: when converting an unknown physical address to a
- * struct page, the resulting pointer must be validated
- * using VALID_PAGE(). It must return an invalid struct page
- * for any physical address not corresponding to a system
- * RAM address.
- *
- * page_to_pfn(page) convert a struct page * to a PFN number
- * pfn_to_page(pfn) convert a _valid_ PFN number to struct page *
- * pfn_valid(pfn) indicates whether a PFN number is valid
- *
- * virt_to_page(k) convert a _valid_ virtual address to struct page *
- * virt_addr_valid(k) indicates whether a virtual address is valid
- */
-#ifndef CONFIG_DISCONTIGMEM
-#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
-#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
-
-#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
-#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
-
-#define PHYS_TO_NID(addr) (0)
-
-#else /* CONFIG_DISCONTIGMEM */
-
-/*
- * This is more complex. We have a set of mem_map arrays spread
- * around in memory.
- */
-#include <linux/numa.h>
-#define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn)
-#define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT)
-
-#define pfn_valid(pfn) \
- ({ \
- unsigned int nid = PFN_TO_NID(pfn); \
- int valid = nid < MAX_NUMNODES; \
- if (valid) { \
- pg_data_t *node = NODE_DATA(nid); \
- valid = (pfn - node->node_start_pfn) < \
- node->node_spanned_pages; \
- } \
- valid; \
- })
-
-#define virt_to_page(kaddr) \
- (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))
-
-#define virt_addr_valid(kaddr) (KVADDR_TO_NID(kaddr) < MAX_NUMNODES)
-
-/*
- * Common discontigmem stuff.
- * PHYS_TO_NID is used by the ARM kernel/setup.c
- */
-#define PHYS_TO_NID(addr) PFN_TO_NID((addr) >> PAGE_SHIFT)
-
-#endif /* !CONFIG_DISCONTIGMEM */
-
-/*
- * For BIO. "will die". Kill me when bio_to_phys() and bvec_to_phys() die.
- */
-#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
-
-/*
- * Optional device DMA address remapping. Do _not_ use directly!
- * We should really eliminate virt_to_bus() here - it's deprecated.
- */
-#ifndef __arch_page_to_dma
-#define page_to_dma(dev, page) ((dma_addr_t)__virt_to_bus((unsigned long)page_address(page)))
-#define dma_to_virt(dev, addr) ((void *)__bus_to_virt(addr))
-#define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_bus((unsigned long)(addr)))
-#else
-#define page_to_dma(dev, page) (__arch_page_to_dma(dev, page))
-#define dma_to_virt(dev, addr) (__arch_dma_to_virt(dev, addr))
-#define virt_to_dma(dev, addr) (__arch_virt_to_dma(dev, addr))
-#endif
-
-/*
- * Optional coherency support. Currently used only by selected
- * Intel XSC3-based systems.
- */
-#ifndef arch_is_coherent
-#define arch_is_coherent() 0
-#endif
-
-#endif
-
-#include <asm-generic/memory_model.h>
-
-#endif
diff --git a/original/asm-arm/mman.h b/original/asm-arm/mman.h
deleted file mode 100644
index 54570d2..0000000
--- a/original/asm-arm/mman.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __ARM_MMAN_H__
-#define __ARM_MMAN_H__
-
-#include <asm-generic/mman.h>
-
-#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
-#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
-#define MAP_LOCKED 0x2000 /* pages are locked */
-#define MAP_NORESERVE 0x4000 /* don't check for reservations */
-#define MAP_POPULATE 0x8000 /* populate (prefault) page tables */
-#define MAP_NONBLOCK 0x10000 /* do not block on IO */
-
-#define MCL_CURRENT 1 /* lock all current mappings */
-#define MCL_FUTURE 2 /* lock all future mappings */
-
-#endif /* __ARM_MMAN_H__ */
diff --git a/original/asm-arm/module.h b/original/asm-arm/module.h
deleted file mode 100644
index 24b168d..0000000
--- a/original/asm-arm/module.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _ASM_ARM_MODULE_H
-#define _ASM_ARM_MODULE_H
-
-struct mod_arch_specific
-{
- int foo;
-};
-
-#define Elf_Shdr Elf32_Shdr
-#define Elf_Sym Elf32_Sym
-#define Elf_Ehdr Elf32_Ehdr
-
-/*
- * Include the ARM architecture version.
- */
-#define MODULE_ARCH_VERMAGIC "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
-
-#endif /* _ASM_ARM_MODULE_H */
diff --git a/original/asm-arm/msgbuf.h b/original/asm-arm/msgbuf.h
deleted file mode 100644
index 33b35b9..0000000
--- a/original/asm-arm/msgbuf.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _ASMARM_MSGBUF_H
-#define _ASMARM_MSGBUF_H
-
-/*
- * The msqid64_ds structure for arm architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct msqid64_ds {
- struct ipc64_perm msg_perm;
- __kernel_time_t msg_stime; /* last msgsnd time */
- unsigned long __unused1;
- __kernel_time_t msg_rtime; /* last msgrcv time */
- unsigned long __unused2;
- __kernel_time_t msg_ctime; /* last change time */
- unsigned long __unused3;
- unsigned long msg_cbytes; /* current number of bytes on queue */
- unsigned long msg_qnum; /* number of messages in queue */
- unsigned long msg_qbytes; /* max number of bytes on queue */
- __kernel_pid_t msg_lspid; /* pid of last msgsnd */
- __kernel_pid_t msg_lrpid; /* last receive pid */
- unsigned long __unused4;
- unsigned long __unused5;
-};
-
-#endif /* _ASMARM_MSGBUF_H */
diff --git a/original/asm-arm/mtd-xip.h b/original/asm-arm/mtd-xip.h
deleted file mode 100644
index 9eb127c..0000000
--- a/original/asm-arm/mtd-xip.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * MTD primitives for XIP support. Architecture specific functions
- *
- * Do not include this file directly. It's included from linux/mtd/xip.h
- *
- * Author: Nicolas Pitre
- * Created: Nov 2, 2004
- * Copyright: (C) 2004 MontaVista Software, Inc.
- *
- * 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.
- *
- * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
- */
-
-#ifndef __ARM_MTD_XIP_H__
-#define __ARM_MTD_XIP_H__
-
-#include <asm/hardware.h>
-#include <asm/arch/mtd-xip.h>
-
-/* fill instruction prefetch */
-#define xip_iprefetch() do { asm volatile (".rep 8; nop; .endr"); } while (0)
-
-#endif /* __ARM_MTD_XIP_H__ */
diff --git a/original/asm-arm/param.h b/original/asm-arm/param.h
deleted file mode 100644
index 1580646..0000000
--- a/original/asm-arm/param.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * linux/include/asm-arm/param.h
- *
- * Copyright (C) 1995-1999 Russell King
- *
- * 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.
- */
-#ifndef __ASM_PARAM_H
-#define __ASM_PARAM_H
-
-#ifdef __KERNEL__
-# define HZ CONFIG_HZ /* Internal kernel timer frequency */
-# define USER_HZ 100 /* User interfaces are in "ticks" */
-# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
-#else
-# define HZ 100
-#endif
-
-#define EXEC_PAGESIZE 4096
-
-#ifndef NOGROUP
-#define NOGROUP (-1)
-#endif
-
-/* max length of hostname */
-#define MAXHOSTNAMELEN 64
-
-#endif
-
diff --git a/original/asm-arm/percpu.h b/original/asm-arm/percpu.h
deleted file mode 100644
index b4e32d8..0000000
--- a/original/asm-arm/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __ARM_PERCPU
-#define __ARM_PERCPU
-
-#include <asm-generic/percpu.h>
-
-#endif
diff --git a/original/asm-arm/pgalloc.h b/original/asm-arm/pgalloc.h
deleted file mode 100644
index 4d43945..0000000
--- a/original/asm-arm/pgalloc.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * linux/include/asm-arm/pgalloc.h
- *
- * Copyright (C) 2000-2001 Russell King
- *
- * 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.
- */
-#ifndef _ASMARM_PGALLOC_H
-#define _ASMARM_PGALLOC_H
-
-#include <asm/domain.h>
-#include <asm/pgtable-hwdef.h>
-#include <asm/processor.h>
-#include <asm/cacheflush.h>
-#include <asm/tlbflush.h>
-
-#define check_pgt_cache() do { } while (0)
-
-#ifdef CONFIG_MMU
-
-#define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER))
-#define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL))
-
-/*
- * Since we have only two-level page tables, these are trivial
- */
-#define pmd_alloc_one(mm,addr) ({ BUG(); ((pmd_t *)2); })
-#define pmd_free(pmd) do { } while (0)
-#define pgd_populate(mm,pmd,pte) BUG()
-
-extern pgd_t *get_pgd_slow(struct mm_struct *mm);
-extern void free_pgd_slow(pgd_t *pgd);
-
-#define pgd_alloc(mm) get_pgd_slow(mm)
-#define pgd_free(pgd) free_pgd_slow(pgd)
-
-/*
- * Allocate one PTE table.
- *
- * This actually allocates two hardware PTE tables, but we wrap this up
- * into one table thus:
- *
- * +------------+
- * | h/w pt 0 |
- * +------------+
- * | h/w pt 1 |
- * +------------+
- * | Linux pt 0 |
- * +------------+
- * | Linux pt 1 |
- * +------------+
- */
-static inline pte_t *
-pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
-{
- pte_t *pte;
-
- pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
- if (pte) {
- clean_dcache_area(pte, sizeof(pte_t) * PTRS_PER_PTE);
- pte += PTRS_PER_PTE;
- }
-
- return pte;
-}
-
-static inline struct page *
-pte_alloc_one(struct mm_struct *mm, unsigned long addr)
-{
- struct page *pte;
-
- pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
- if (pte) {
- void *page = page_address(pte);
- clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE);
- }
-
- return pte;
-}
-
-/*
- * Free one PTE table.
- */
-static inline void pte_free_kernel(pte_t *pte)
-{
- if (pte) {
- pte -= PTRS_PER_PTE;
- free_page((unsigned long)pte);
- }
-}
-
-static inline void pte_free(struct page *pte)
-{
- __free_page(pte);
-}
-
-static inline void __pmd_populate(pmd_t *pmdp, unsigned long pmdval)
-{
- pmdp[0] = __pmd(pmdval);
- pmdp[1] = __pmd(pmdval + 256 * sizeof(pte_t));
- flush_pmd_entry(pmdp);
-}
-
-/*
- * Populate the pmdp entry with a pointer to the pte. This pmd is part
- * of the mm address space.
- *
- * Ensure that we always set both PMD entries.
- */
-static inline void
-pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep)
-{
- unsigned long pte_ptr = (unsigned long)ptep;
-
- /*
- * The pmd must be loaded with the physical
- * address of the PTE table
- */
- pte_ptr -= PTRS_PER_PTE * sizeof(void *);
- __pmd_populate(pmdp, __pa(pte_ptr) | _PAGE_KERNEL_TABLE);
-}
-
-static inline void
-pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep)
-{
- __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE);
-}
-
-#endif /* CONFIG_MMU */
-
-#endif
diff --git a/original/asm-arm/pgtable-hwdef.h b/original/asm-arm/pgtable-hwdef.h
deleted file mode 100644
index f3b5120..0000000
--- a/original/asm-arm/pgtable-hwdef.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * linux/include/asm-arm/pgtable-hwdef.h
- *
- * Copyright (C) 1995-2002 Russell King
- *
- * 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.
- */
-#ifndef _ASMARM_PGTABLE_HWDEF_H
-#define _ASMARM_PGTABLE_HWDEF_H
-
-/*
- * Hardware page table definitions.
- *
- * + Level 1 descriptor (PMD)
- * - common
- */
-#define PMD_TYPE_MASK (3 << 0)
-#define PMD_TYPE_FAULT (0 << 0)
-#define PMD_TYPE_TABLE (1 << 0)
-#define PMD_TYPE_SECT (2 << 0)
-#define PMD_BIT4 (1 << 4)
-#define PMD_DOMAIN(x) ((x) << 5)
-#define PMD_PROTECTION (1 << 9) /* v5 */
-/*
- * - section
- */
-#define PMD_SECT_BUFFERABLE (1 << 2)
-#define PMD_SECT_CACHEABLE (1 << 3)
-#define PMD_SECT_XN (1 << 4) /* v6 */
-#define PMD_SECT_AP_WRITE (1 << 10)
-#define PMD_SECT_AP_READ (1 << 11)
-#define PMD_SECT_TEX(x) ((x) << 12) /* v5 */
-#define PMD_SECT_APX (1 << 15) /* v6 */
-#define PMD_SECT_S (1 << 16) /* v6 */
-#define PMD_SECT_nG (1 << 17) /* v6 */
-#define PMD_SECT_SUPER (1 << 18) /* v6 */
-
-#define PMD_SECT_UNCACHED (0)
-#define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE)
-#define PMD_SECT_WT (PMD_SECT_CACHEABLE)
-#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
-#define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
-#define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
-#define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2))
-
-/*
- * - coarse table (not used)
- */
-
-/*
- * + Level 2 descriptor (PTE)
- * - common
- */
-#define PTE_TYPE_MASK (3 << 0)
-#define PTE_TYPE_FAULT (0 << 0)
-#define PTE_TYPE_LARGE (1 << 0)
-#define PTE_TYPE_SMALL (2 << 0)
-#define PTE_TYPE_EXT (3 << 0) /* v5 */
-#define PTE_BUFFERABLE (1 << 2)
-#define PTE_CACHEABLE (1 << 3)
-
-/*
- * - extended small page/tiny page
- */
-#define PTE_EXT_XN (1 << 0) /* v6 */
-#define PTE_EXT_AP_MASK (3 << 4)
-#define PTE_EXT_AP0 (1 << 4)
-#define PTE_EXT_AP1 (2 << 4)
-#define PTE_EXT_AP_UNO_SRO (0 << 4)
-#define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0)
-#define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1)
-#define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0)
-#define PTE_EXT_TEX(x) ((x) << 6) /* v5 */
-#define PTE_EXT_APX (1 << 9) /* v6 */
-#define PTE_EXT_COHERENT (1 << 9) /* XScale3 */
-#define PTE_EXT_SHARED (1 << 10) /* v6 */
-#define PTE_EXT_NG (1 << 11) /* v6 */
-
-/*
- * - small page
- */
-#define PTE_SMALL_AP_MASK (0xff << 4)
-#define PTE_SMALL_AP_UNO_SRO (0x00 << 4)
-#define PTE_SMALL_AP_UNO_SRW (0x55 << 4)
-#define PTE_SMALL_AP_URO_SRW (0xaa << 4)
-#define PTE_SMALL_AP_URW_SRW (0xff << 4)
-
-#endif
diff --git a/original/asm-arm/pgtable.h b/original/asm-arm/pgtable.h
deleted file mode 100644
index 8d3919c..0000000
--- a/original/asm-arm/pgtable.h
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * linux/include/asm-arm/pgtable.h
- *
- * Copyright (C) 1995-2002 Russell King
- *
- * 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.
- */
-#ifndef _ASMARM_PGTABLE_H
-#define _ASMARM_PGTABLE_H
-
-#include <asm-generic/4level-fixup.h>
-#include <asm/proc-fns.h>
-
-#ifndef CONFIG_MMU
-
-#include "pgtable-nommu.h"
-
-#else
-
-#include <asm/memory.h>
-#include <asm/arch/vmalloc.h>
-
-/*
- * Just any arbitrary offset to the start of the vmalloc VM area: the
- * current 8MB value just means that there will be a 8MB "hole" after the
- * physical memory until the kernel virtual memory starts. That means that
- * any out-of-bounds memory accesses will hopefully be caught.
- * The vmalloc() routines leaves a hole of 4kB between each vmalloced
- * area for the same reason. ;)
- *
- * Note that platforms may override VMALLOC_START, but they must provide
- * VMALLOC_END. VMALLOC_END defines the (exclusive) limit of this space,
- * which may not overlap IO space.
- */
-#ifndef VMALLOC_START
-#define VMALLOC_OFFSET (8*1024*1024)
-#define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
-#endif
-
-/*
- * Hardware-wise, we have a two level page table structure, where the first
- * level has 4096 entries, and the second level has 256 entries. Each entry
- * is one 32-bit word. Most of the bits in the second level entry are used
- * by hardware, and there aren't any "accessed" and "dirty" bits.
- *
- * Linux on the other hand has a three level page table structure, which can
- * be wrapped to fit a two level page table structure easily - using the PGD
- * and PTE only. However, Linux also expects one "PTE" table per page, and
- * at least a "dirty" bit.
- *
- * Therefore, we tweak the implementation slightly - we tell Linux that we
- * have 2048 entries in the first level, each of which is 8 bytes (iow, two
- * hardware pointers to the second level.) The second level contains two
- * hardware PTE tables arranged contiguously, followed by Linux versions
- * which contain the state information Linux needs. We, therefore, end up
- * with 512 entries in the "PTE" level.
- *
- * This leads to the page tables having the following layout:
- *
- * pgd pte
- * | |
- * +--------+ +0
- * | |-----> +------------+ +0
- * +- - - - + +4 | h/w pt 0 |
- * | |-----> +------------+ +1024
- * +--------+ +8 | h/w pt 1 |
- * | | +------------+ +2048
- * +- - - - + | Linux pt 0 |
- * | | +------------+ +3072
- * +--------+ | Linux pt 1 |
- * | | +------------+ +4096
- *
- * See L_PTE_xxx below for definitions of bits in the "Linux pt", and
- * PTE_xxx for definitions of bits appearing in the "h/w pt".
- *
- * PMD_xxx definitions refer to bits in the first level page table.
- *
- * The "dirty" bit is emulated by only granting hardware write permission
- * iff the page is marked "writable" and "dirty" in the Linux PTE. This
- * means that a write to a clean page will cause a permission fault, and
- * the Linux MM layer will mark the page dirty via handle_pte_fault().
- * For the hardware to notice the permission change, the TLB entry must
- * be flushed, and ptep_establish() does that for us.
- *
- * The "accessed" or "young" bit is emulated by a similar method; we only
- * allow accesses to the page if the "young" bit is set. Accesses to the
- * page will cause a fault, and handle_pte_fault() will set the young bit
- * for us as long as the page is marked present in the corresponding Linux
- * PTE entry. Again, ptep_establish() will ensure that the TLB is up to
- * date.
- *
- * However, when the "young" bit is cleared, we deny access to the page
- * by clearing the hardware PTE. Currently Linux does not flush the TLB
- * for us in this case, which means the TLB will retain the transation
- * until either the TLB entry is evicted under pressure, or a context
- * switch which changes the user space mapping occurs.
- */
-#define PTRS_PER_PTE 512
-#define PTRS_PER_PMD 1
-#define PTRS_PER_PGD 2048
-
-/*
- * PMD_SHIFT determines the size of the area a second-level page table can map
- * PGDIR_SHIFT determines what a third-level page table entry can map
- */
-#define PMD_SHIFT 21
-#define PGDIR_SHIFT 21
-
-#define LIBRARY_TEXT_START 0x0c000000
-
-#ifndef __ASSEMBLY__
-extern void __pte_error(const char *file, int line, unsigned long val);
-extern void __pmd_error(const char *file, int line, unsigned long val);
-extern void __pgd_error(const char *file, int line, unsigned long val);
-
-#define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte_val(pte))
-#define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd_val(pmd))
-#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd))
-#endif /* !__ASSEMBLY__ */
-
-#define PMD_SIZE (1UL << PMD_SHIFT)
-#define PMD_MASK (~(PMD_SIZE-1))
-#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
-#define PGDIR_MASK (~(PGDIR_SIZE-1))
-
-/*
- * This is the lowest virtual address we can permit any user space
- * mapping to be mapped at. This is particularly important for
- * non-high vector CPUs.
- */
-#define FIRST_USER_ADDRESS PAGE_SIZE
-
-#define FIRST_USER_PGD_NR 1
-#define USER_PTRS_PER_PGD ((TASK_SIZE/PGDIR_SIZE) - FIRST_USER_PGD_NR)
-
-/*
- * ARMv6 supersection address mask and size definitions.
- */
-#define SUPERSECTION_SHIFT 24
-#define SUPERSECTION_SIZE (1UL << SUPERSECTION_SHIFT)
-#define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1))
-
-/*
- * "Linux" PTE definitions.
- *
- * We keep two sets of PTEs - the hardware and the linux version.
- * This allows greater flexibility in the way we map the Linux bits
- * onto the hardware tables, and allows us to have YOUNG and DIRTY
- * bits.
- *
- * The PTE table pointer refers to the hardware entries; the "Linux"
- * entries are stored 1024 bytes below.
- */
-#define L_PTE_PRESENT (1 << 0)
-#define L_PTE_FILE (1 << 1) /* only when !PRESENT */
-#define L_PTE_YOUNG (1 << 1)
-#define L_PTE_BUFFERABLE (1 << 2) /* matches PTE */
-#define L_PTE_CACHEABLE (1 << 3) /* matches PTE */
-#define L_PTE_USER (1 << 4)
-#define L_PTE_WRITE (1 << 5)
-#define L_PTE_EXEC (1 << 6)
-#define L_PTE_DIRTY (1 << 7)
-#define L_PTE_COHERENT (1 << 9) /* I/O coherent (xsc3) */
-#define L_PTE_SHARED (1 << 10) /* shared between CPUs (v6) */
-#define L_PTE_ASID (1 << 11) /* non-global (use ASID, v6) */
-
-#ifndef __ASSEMBLY__
-
-/*
- * The following macros handle the cache and bufferable bits...
- */
-#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
-#define _L_PTE_READ L_PTE_USER | L_PTE_EXEC
-
-extern pgprot_t pgprot_kernel;
-
-#define PAGE_NONE __pgprot(_L_PTE_DEFAULT)
-#define PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
-#define PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_WRITE)
-#define PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
-#define PAGE_KERNEL pgprot_kernel
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * The table below defines the page protection levels that we insert into our
- * Linux page table version. These get translated into the best that the
- * architecture can perform. Note that on most ARM hardware:
- * 1) We cannot do execute protection
- * 2) If we could do execute protection, then read is implied
- * 3) write implies read permissions
- */
-#define __P000 PAGE_NONE
-#define __P001 PAGE_READONLY
-#define __P010 PAGE_COPY
-#define __P011 PAGE_COPY
-#define __P100 PAGE_READONLY
-#define __P101 PAGE_READONLY
-#define __P110 PAGE_COPY
-#define __P111 PAGE_COPY
-
-#define __S000 PAGE_NONE
-#define __S001 PAGE_READONLY
-#define __S010 PAGE_SHARED
-#define __S011 PAGE_SHARED
-#define __S100 PAGE_READONLY
-#define __S101 PAGE_READONLY
-#define __S110 PAGE_SHARED
-#define __S111 PAGE_SHARED
-
-#ifndef __ASSEMBLY__
-/*
- * ZERO_PAGE is a global shared page that is always zero: used
- * for zero-mapped memory areas etc..
- */
-extern struct page *empty_zero_page;
-#define ZERO_PAGE(vaddr) (empty_zero_page)
-
-#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
-#define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)))
-
-#define pte_none(pte) (!pte_val(pte))
-#define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0))
-#define pte_page(pte) (pfn_to_page(pte_pfn(pte)))
-#define pte_offset_kernel(dir,addr) (pmd_page_kernel(*(dir)) + __pte_index(addr))
-#define pte_offset_map(dir,addr) (pmd_page_kernel(*(dir)) + __pte_index(addr))
-#define pte_offset_map_nested(dir,addr) (pmd_page_kernel(*(dir)) + __pte_index(addr))
-#define pte_unmap(pte) do { } while (0)
-#define pte_unmap_nested(pte) do { } while (0)
-
-#define set_pte(ptep, pte) cpu_set_pte(ptep,pte)
-#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
-
-/*
- * The following only work if pte_present() is true.
- * Undefined behaviour if not..
- */
-#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT)
-#define pte_read(pte) (pte_val(pte) & L_PTE_USER)
-#define pte_write(pte) (pte_val(pte) & L_PTE_WRITE)
-#define pte_exec(pte) (pte_val(pte) & L_PTE_EXEC)
-#define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY)
-#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG)
-
-/*
- * The following only works if pte_present() is not true.
- */
-#define pte_file(pte) (pte_val(pte) & L_PTE_FILE)
-#define pte_to_pgoff(x) (pte_val(x) >> 2)
-#define pgoff_to_pte(x) __pte(((x) << 2) | L_PTE_FILE)
-
-#define PTE_FILE_MAX_BITS 30
-
-#define PTE_BIT_FUNC(fn,op) \
-static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
-
-/*PTE_BIT_FUNC(rdprotect, &= ~L_PTE_USER);*/
-/*PTE_BIT_FUNC(mkread, |= L_PTE_USER);*/
-PTE_BIT_FUNC(wrprotect, &= ~L_PTE_WRITE);
-PTE_BIT_FUNC(mkwrite, |= L_PTE_WRITE);
-PTE_BIT_FUNC(exprotect, &= ~L_PTE_EXEC);
-PTE_BIT_FUNC(mkexec, |= L_PTE_EXEC);
-PTE_BIT_FUNC(mkclean, &= ~L_PTE_DIRTY);
-PTE_BIT_FUNC(mkdirty, |= L_PTE_DIRTY);
-PTE_BIT_FUNC(mkold, &= ~L_PTE_YOUNG);
-PTE_BIT_FUNC(mkyoung, |= L_PTE_YOUNG);
-
-/*
- * Mark the prot value as uncacheable and unbufferable.
- */
-#define pgprot_noncached(prot) __pgprot(pgprot_val(prot) & ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE))
-#define pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~L_PTE_CACHEABLE)
-
-#define pmd_none(pmd) (!pmd_val(pmd))
-#define pmd_present(pmd) (pmd_val(pmd))
-#define pmd_bad(pmd) (pmd_val(pmd) & 2)
-
-#define copy_pmd(pmdpd,pmdps) \
- do { \
- pmdpd[0] = pmdps[0]; \
- pmdpd[1] = pmdps[1]; \
- flush_pmd_entry(pmdpd); \
- } while (0)
-
-#define pmd_clear(pmdp) \
- do { \
- pmdp[0] = __pmd(0); \
- pmdp[1] = __pmd(0); \
- clean_pmd_entry(pmdp); \
- } while (0)
-
-static inline pte_t *pmd_page_kernel(pmd_t pmd)
-{
- unsigned long ptr;
-
- ptr = pmd_val(pmd) & ~(PTRS_PER_PTE * sizeof(void *) - 1);
- ptr += PTRS_PER_PTE * sizeof(void *);
-
- return __va(ptr);
-}
-
-#define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd)))
-
-/*
- * Permanent address of a page. We never have highmem, so this is trivial.
- */
-#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))
-
-/*
- * 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 mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot)
-
-/*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pgd is never bad, and a pmd always exists (as it's folded
- * into the pgd entry)
- */
-#define pgd_none(pgd) (0)
-#define pgd_bad(pgd) (0)
-#define pgd_present(pgd) (1)
-#define pgd_clear(pgdp) do { } while (0)
-#define set_pgd(pgd,pgdp) do { } while (0)
-
-/* to find an entry in a page-table-directory */
-#define pgd_index(addr) ((addr) >> PGDIR_SHIFT)
-
-#define pgd_offset(mm, addr) ((mm)->pgd+pgd_index(addr))
-
-/* to find an entry in a kernel page-table-directory */
-#define pgd_offset_k(addr) pgd_offset(&init_mm, addr)
-
-/* Find an entry in the second-level page table.. */
-#define pmd_offset(dir, addr) ((pmd_t *)(dir))
-
-/* Find an entry in the third-level page table.. */
-#define __pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
-
-static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
-{
- const unsigned long mask = L_PTE_EXEC | L_PTE_WRITE | L_PTE_USER;
- pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
- return pte;
-}
-
-extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-
-/* Encode and decode a swap entry.
- *
- * We support up to 32GB of swap on 4k machines
- */
-#define __swp_type(x) (((x).val >> 2) & 0x7f)
-#define __swp_offset(x) ((x).val >> 9)
-#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 9) })
-#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
-#define __swp_entry_to_pte(swp) ((pte_t) { (swp).val })
-
-/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
-/* FIXME: this is not correct */
-#define kern_addr_valid(addr) (1)
-
-#include <asm-generic/pgtable.h>
-
-/*
- * We provide our own arch_get_unmapped_area to cope with VIPT caches.
- */
-#define HAVE_ARCH_UNMAPPED_AREA
-
-/*
- * 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)
-
-#define MK_IOSPACE_PFN(space, pfn) (pfn)
-#define GET_IOSPACE(pfn) 0
-#define GET_PFN(pfn) (pfn)
-
-#define pgtable_cache_init() do { } while (0)
-
-#endif /* !__ASSEMBLY__ */
-
-#endif /* CONFIG_MMU */
-
-#endif /* _ASMARM_PGTABLE_H */
diff --git a/original/asm-arm/poll.h b/original/asm-arm/poll.h
deleted file mode 100644
index 5030b2b..0000000
--- a/original/asm-arm/poll.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __ASMARM_POLL_H
-#define __ASMARM_POLL_H
-
-/* These are specified by iBCS2 */
-#define POLLIN 0x0001
-#define POLLPRI 0x0002
-#define POLLOUT 0x0004
-#define POLLERR 0x0008
-#define POLLHUP 0x0010
-#define POLLNVAL 0x0020
-
-/* The rest seem to be more-or-less nonstandard. Check them! */
-#define POLLRDNORM 0x0040
-#define POLLRDBAND 0x0080
-#define POLLWRNORM 0x0100
-#define POLLWRBAND 0x0200
-#define POLLMSG 0x0400
-#define POLLREMOVE 0x1000
-#define POLLRDHUP 0x2000
-
-struct pollfd {
- int fd;
- short events;
- short revents;
-};
-
-#endif
diff --git a/original/asm-arm/posix_types.h b/original/asm-arm/posix_types.h
deleted file mode 100644
index e142a2a..0000000
--- a/original/asm-arm/posix_types.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * linux/include/asm-arm/posix_types.h
- *
- * Copyright (C) 1996-1998 Russell King.
- *
- * 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.
- *
- * Changelog:
- * 27-06-1996 RMK Created
- */
-#ifndef __ARCH_ARM_POSIX_TYPES_H
-#define __ARCH_ARM_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 short __kernel_mode_t;
-typedef unsigned short __kernel_nlink_t;
-typedef long __kernel_off_t;
-typedef int __kernel_pid_t;
-typedef unsigned short __kernel_ipc_pid_t;
-typedef unsigned short __kernel_uid_t;
-typedef unsigned short __kernel_gid_t;
-typedef unsigned int __kernel_size_t;
-typedef int __kernel_ssize_t;
-typedef int __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 {
-#if defined(__KERNEL__) || defined(__USE_ALL)
- int val[2];
-#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
- int __val[2];
-#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
-} __kernel_fsid_t;
-
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
-
-#undef __FD_SET
-#define __FD_SET(fd, fdsetp) \
- (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
-
-#undef __FD_CLR
-#define __FD_CLR(fd, fdsetp) \
- (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
-
-#undef __FD_ISSET
-#define __FD_ISSET(fd, fdsetp) \
- ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
-
-#undef __FD_ZERO
-#define __FD_ZERO(fdsetp) \
- (memset (fdsetp, 0, sizeof (*(fd_set *)(fdsetp))))
-
-#endif
-
-#endif
diff --git a/original/asm-arm/proc-fns.h b/original/asm-arm/proc-fns.h
deleted file mode 100644
index 1bde92c..0000000
--- a/original/asm-arm/proc-fns.h
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * linux/include/asm-arm/proc-fns.h
- *
- * Copyright (C) 1997-1999 Russell King
- * Copyright (C) 2000 Deep Blue Solutions Ltd
- *
- * 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.
- */
-#ifndef __ASM_PROCFNS_H
-#define __ASM_PROCFNS_H
-
-#ifdef __KERNEL__
-
-
-/*
- * Work out if we need multiple CPU support
- */
-#undef MULTI_CPU
-#undef CPU_NAME
-
-/*
- * CPU_NAME - the prefix for CPU related functions
- */
-
-#ifdef CONFIG_CPU_32
-# ifdef CONFIG_CPU_ARM610
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm6
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM710
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm7
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM720T
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm720
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM920T
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm920
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM922T
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm922
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM925T
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm925
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM926T
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm926
-# endif
-# endif
-# ifdef CONFIG_CPU_SA110
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_sa110
-# endif
-# endif
-# ifdef CONFIG_CPU_SA1100
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_sa1100
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM1020
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm1020
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM1020E
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm1020e
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM1022
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm1022
-# endif
-# endif
-# ifdef CONFIG_CPU_ARM1026
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_arm1026
-# endif
-# endif
-# ifdef CONFIG_CPU_XSCALE
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_xscale
-# endif
-# endif
-# ifdef CONFIG_CPU_XSC3
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_xsc3
-# endif
-# endif
-# ifdef CONFIG_CPU_V6
-# ifdef CPU_NAME
-# undef MULTI_CPU
-# define MULTI_CPU
-# else
-# define CPU_NAME cpu_v6
-# endif
-# endif
-#endif
-
-#ifndef __ASSEMBLY__
-
-#ifndef MULTI_CPU
-#include "asm/cpu-single.h"
-#else
-#include "asm/cpu-multi32.h"
-#endif
-
-#include <asm/memory.h>
-
-#ifdef CONFIG_MMU
-
-#define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm)
-
-#define cpu_get_pgd() \
- ({ \
- unsigned long pg; \
- __asm__("mrc p15, 0, %0, c2, c0, 0" \
- : "=r" (pg) : : "cc"); \
- pg &= ~0x3fff; \
- (pgd_t *)phys_to_virt(pg); \
- })
-
-#endif
-
-#endif /* __ASSEMBLY__ */
-#endif /* __KERNEL__ */
-#endif /* __ASM_PROCFNS_H */
diff --git a/original/asm-arm/processor.h b/original/asm-arm/processor.h
deleted file mode 100644
index 04f4d34..0000000
--- a/original/asm-arm/processor.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * linux/include/asm-arm/processor.h
- *
- * Copyright (C) 1995-1999 Russell King
- *
- * 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.
- */
-
-#ifndef __ASM_ARM_PROCESSOR_H
-#define __ASM_ARM_PROCESSOR_H
-
-/*
- * Default implementation of macro that returns current
- * instruction pointer ("program counter").
- */
-#define current_text_addr() ({ __label__ _l; _l: &&_l;})
-
-#ifdef __KERNEL__
-
-#include <asm/ptrace.h>
-#include <asm/procinfo.h>
-#include <asm/types.h>
-
-union debug_insn {
- u32 arm;
- u16 thumb;
-};
-
-struct debug_entry {
- u32 address;
- union debug_insn insn;
-};
-
-struct debug_info {
- int nsaved;
- struct debug_entry bp[2];
-};
-
-struct thread_struct {
- /* fault info */
- unsigned long address;
- unsigned long trap_no;
- unsigned long error_code;
- /* debugging */
- struct debug_info debug;
-};
-
-#define INIT_THREAD { }
-
-#ifdef CONFIG_MMU
-#define nommu_start_thread(regs) do { } while (0)
-#else
-#define nommu_start_thread(regs) regs->ARM_r10 = current->mm->start_data
-#endif
-
-#define start_thread(regs,pc,sp) \
-({ \
- unsigned long *stack = (unsigned long *)sp; \
- set_fs(USER_DS); \
- memzero(regs->uregs, sizeof(regs->uregs)); \
- if (current->personality & ADDR_LIMIT_32BIT) \
- regs->ARM_cpsr = USR_MODE; \
- else \
- regs->ARM_cpsr = USR26_MODE; \
- if (elf_hwcap & HWCAP_THUMB && pc & 1) \
- regs->ARM_cpsr |= PSR_T_BIT; \
- regs->ARM_pc = pc & ~1; /* pc */ \
- regs->ARM_sp = sp; /* sp */ \
- regs->ARM_r2 = stack[2]; /* r2 (envp) */ \
- regs->ARM_r1 = stack[1]; /* r1 (argv) */ \
- regs->ARM_r0 = stack[0]; /* r0 (argc) */ \
- nommu_start_thread(regs); \
-})
-
-/* Forward declaration, a strange C thing */
-struct task_struct;
-
-/* Free all resources held by a thread. */
-extern void release_thread(struct task_struct *);
-
-/* Prepare to copy thread state - unlazy all lazy status */
-#define prepare_to_copy(tsk) do { } while (0)
-
-unsigned long get_wchan(struct task_struct *p);
-
-#define cpu_relax() barrier()
-
-/*
- * Create a new kernel thread
- */
-extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
-
-#define task_pt_regs(p) \
- ((struct pt_regs *)(THREAD_START_SP + task_stack_page(p)) - 1)
-
-#define KSTK_EIP(tsk) task_pt_regs(tsk)->ARM_pc
-#define KSTK_ESP(tsk) task_pt_regs(tsk)->ARM_sp
-
-/*
- * Prefetching support - only ARMv5.
- */
-#if __LINUX_ARM_ARCH__ >= 5
-
-#define ARCH_HAS_PREFETCH
-#define prefetch(ptr) \
- ({ \
- __asm__ __volatile__( \
- "pld\t%0" \
- : \
- : "o" (*(char *)(ptr)) \
- : "cc"); \
- })
-
-#define ARCH_HAS_PREFETCHW
-#define prefetchw(ptr) prefetch(ptr)
-
-#define ARCH_HAS_SPINLOCK_PREFETCH
-#define spin_lock_prefetch(x) do { } while (0)
-
-#endif
-
-#endif
-
-#endif /* __ASM_ARM_PROCESSOR_H */
diff --git a/original/asm-arm/procinfo.h b/original/asm-arm/procinfo.h
deleted file mode 100644
index 91a31ad..0000000
--- a/original/asm-arm/procinfo.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * linux/include/asm-arm/procinfo.h
- *
- * Copyright (C) 1996-1999 Russell King
- *
- * 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.
- */
-#ifndef __ASM_PROCINFO_H
-#define __ASM_PROCINFO_H
-
-#ifndef __ASSEMBLY__
-
-struct cpu_tlb_fns;
-struct cpu_user_fns;
-struct cpu_cache_fns;
-struct processor;
-
-/*
- * Note! struct processor is always defined if we're
- * using MULTI_CPU, otherwise this entry is unused,
- * but still exists.
- *
- * NOTE! The following structure is defined by assembly
- * language, NOT C code. For more information, check:
- * arch/arm/mm/proc-*.S and arch/arm/kernel/head.S
- */
-struct proc_info_list {
- unsigned int cpu_val;
- unsigned int cpu_mask;
- unsigned long __cpu_mm_mmu_flags; /* used by head.S */
- unsigned long __cpu_io_mmu_flags; /* used by head.S */
- unsigned long __cpu_flush; /* used by head.S */
- const char *arch_name;
- const char *elf_name;
- unsigned int elf_hwcap;
- const char *cpu_name;
- struct processor *proc;
- struct cpu_tlb_fns *tlb;
- struct cpu_user_fns *user;
- struct cpu_cache_fns *cache;
-};
-
-extern unsigned int elf_hwcap;
-
-#endif /* __ASSEMBLY__ */
-
-#define HWCAP_SWP 1
-#define HWCAP_HALF 2
-#define HWCAP_THUMB 4
-#define HWCAP_26BIT 8 /* Play it safe */
-#define HWCAP_FAST_MULT 16
-#define HWCAP_FPA 32
-#define HWCAP_VFP 64
-#define HWCAP_EDSP 128
-#define HWCAP_JAVA 256
-#define HWCAP_IWMMXT 512
-
-#endif
diff --git a/original/asm-arm/ptrace.h b/original/asm-arm/ptrace.h
deleted file mode 100644
index debb258..0000000
--- a/original/asm-arm/ptrace.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * linux/include/asm-arm/ptrace.h
- *
- * Copyright (C) 1996-2003 Russell King
- *
- * 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.
- */
-#ifndef __ASM_ARM_PTRACE_H
-#define __ASM_ARM_PTRACE_H
-
-
-#define PTRACE_GETREGS 12
-#define PTRACE_SETREGS 13
-#define PTRACE_GETFPREGS 14
-#define PTRACE_SETFPREGS 15
-
-#define PTRACE_GETWMMXREGS 18
-#define PTRACE_SETWMMXREGS 19
-
-#define PTRACE_OLDSETOPTIONS 21
-
-#define PTRACE_GET_THREAD_AREA 22
-
-#define PTRACE_SET_SYSCALL 23
-
-/* PTRACE_SYSCALL is 24 */
-
-#define PTRACE_GETCRUNCHREGS 25
-#define PTRACE_SETCRUNCHREGS 26
-#define PTRACE_GETVFPREGS 27
-#define PTRACE_SETVFPREGS 28
-
-/*
- * PSR bits
- */
-#define USR26_MODE 0x00000000
-#define FIQ26_MODE 0x00000001
-#define IRQ26_MODE 0x00000002
-#define SVC26_MODE 0x00000003
-#define USR_MODE 0x00000010
-#define FIQ_MODE 0x00000011
-#define IRQ_MODE 0x00000012
-#define SVC_MODE 0x00000013
-#define ABT_MODE 0x00000017
-#define UND_MODE 0x0000001b
-#define SYSTEM_MODE 0x0000001f
-#define MODE32_BIT 0x00000010
-#define MODE_MASK 0x0000001f
-#define PSR_T_BIT 0x00000020
-#define PSR_F_BIT 0x00000040
-#define PSR_I_BIT 0x00000080
-#define PSR_J_BIT 0x01000000
-#define PSR_Q_BIT 0x08000000
-#define PSR_V_BIT 0x10000000
-#define PSR_C_BIT 0x20000000
-#define PSR_Z_BIT 0x40000000
-#define PSR_N_BIT 0x80000000
-#define PCMASK 0
-
-/*
- * Groups of PSR bits
- */
-#define PSR_f 0xff000000 /* Flags */
-#define PSR_s 0x00ff0000 /* Status */
-#define PSR_x 0x0000ff00 /* Extension */
-#define PSR_c 0x000000ff /* Control */
-
-#ifndef __ASSEMBLY__
-
-/*
- * This struct defines the way the registers are stored on the
- * stack during a system call. Note that sizeof(struct pt_regs)
- * has to be a multiple of 8.
- */
-struct pt_regs {
- long uregs[18];
-};
-
-#define ARM_cpsr uregs[16]
-#define ARM_pc uregs[15]
-#define ARM_lr uregs[14]
-#define ARM_sp uregs[13]
-#define ARM_ip uregs[12]
-#define ARM_fp uregs[11]
-#define ARM_r10 uregs[10]
-#define ARM_r9 uregs[9]
-#define ARM_r8 uregs[8]
-#define ARM_r7 uregs[7]
-#define ARM_r6 uregs[6]
-#define ARM_r5 uregs[5]
-#define ARM_r4 uregs[4]
-#define ARM_r3 uregs[3]
-#define ARM_r2 uregs[2]
-#define ARM_r1 uregs[1]
-#define ARM_r0 uregs[0]
-#define ARM_ORIG_r0 uregs[17]
-
-#ifdef __KERNEL__
-
-#define user_mode(regs) \
- (((regs)->ARM_cpsr & 0xf) == 0)
-
-#ifdef CONFIG_ARM_THUMB
-#define thumb_mode(regs) \
- (((regs)->ARM_cpsr & PSR_T_BIT))
-#else
-#define thumb_mode(regs) (0)
-#endif
-
-#define processor_mode(regs) \
- ((regs)->ARM_cpsr & MODE_MASK)
-
-#define interrupts_enabled(regs) \
- (!((regs)->ARM_cpsr & PSR_I_BIT))
-
-#define fast_interrupts_enabled(regs) \
- (!((regs)->ARM_cpsr & PSR_F_BIT))
-
-#define condition_codes(regs) \
- ((regs)->ARM_cpsr & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT))
-
-/* Are the current registers suitable for user mode?
- * (used to maintain security in signal handlers)
- */
-static inline int valid_user_regs(struct pt_regs *regs)
-{
- if (user_mode(regs) &&
- (regs->ARM_cpsr & (PSR_F_BIT|PSR_I_BIT)) == 0)
- return 1;
-
- /*
- * Force CPSR to something logical...
- */
- regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT;
-
- return 0;
-}
-
-#endif /* __KERNEL__ */
-
-#define pc_pointer(v) \
- ((v) & ~PCMASK)
-
-#define instruction_pointer(regs) \
- (pc_pointer((regs)->ARM_pc))
-
-#ifdef CONFIG_SMP
-extern unsigned long profile_pc(struct pt_regs *regs);
-#else
-#define profile_pc(regs) instruction_pointer(regs)
-#endif
-
-#ifdef __KERNEL__
-#define predicate(x) ((x) & 0xf0000000)
-#define PREDICATE_ALWAYS 0xe0000000
-#endif
-
-#endif /* __ASSEMBLY__ */
-
-#endif
-
diff --git a/original/asm-arm/resource.h b/original/asm-arm/resource.h
deleted file mode 100644
index 734b581..0000000
--- a/original/asm-arm/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ARM_RESOURCE_H
-#define _ARM_RESOURCE_H
-
-#include <asm-generic/resource.h>
-
-#endif
diff --git a/original/asm-arm/scatterlist.h b/original/asm-arm/scatterlist.h
deleted file mode 100644
index de2f65e..0000000
--- a/original/asm-arm/scatterlist.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _ASMARM_SCATTERLIST_H
-#define _ASMARM_SCATTERLIST_H
-
-#include <asm/memory.h>
-#include <asm/types.h>
-
-struct scatterlist {
- struct page *page; /* buffer page */
- unsigned int offset; /* buffer offset */
- dma_addr_t dma_address; /* dma address */
- unsigned int length; /* 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)
-
-#endif /* _ASMARM_SCATTERLIST_H */
diff --git a/original/asm-arm/semaphore.h b/original/asm-arm/semaphore.h
deleted file mode 100644
index d5dc624..0000000
--- a/original/asm-arm/semaphore.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * linux/include/asm-arm/semaphore.h
- */
-#ifndef __ASM_ARM_SEMAPHORE_H
-#define __ASM_ARM_SEMAPHORE_H
-
-#include <linux/linkage.h>
-#include <linux/spinlock.h>
-#include <linux/wait.h>
-#include <linux/rwsem.h>
-
-#include <asm/atomic.h>
-#include <asm/locks.h>
-
-struct semaphore {
- atomic_t count;
- int sleepers;
- wait_queue_head_t wait;
-};
-
-#define __SEMAPHORE_INIT(name, cnt) \
-{ \
- .count = ATOMIC_INIT(cnt), \
- .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
-}
-
-#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
- struct semaphore name = __SEMAPHORE_INIT(name,count)
-
-#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
-#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
-
-static inline void sema_init(struct semaphore *sem, int val)
-{
- atomic_set(&sem->count, val);
- sem->sleepers = 0;
- init_waitqueue_head(&sem->wait);
-}
-
-static inline void init_MUTEX(struct semaphore *sem)
-{
- sema_init(sem, 1);
-}
-
-static inline void init_MUTEX_LOCKED(struct semaphore *sem)
-{
- sema_init(sem, 0);
-}
-
-/*
- * special register calling convention
- */
-asmlinkage void __down_failed(void);
-asmlinkage int __down_interruptible_failed(void);
-asmlinkage int __down_trylock_failed(void);
-asmlinkage void __up_wakeup(void);
-
-extern void __down(struct semaphore * sem);
-extern int __down_interruptible(struct semaphore * sem);
-extern int __down_trylock(struct semaphore * sem);
-extern void __up(struct semaphore * sem);
-
-/*
- * This is ugly, but we want the default case to fall through.
- * "__down" is the actual routine that waits...
- */
-static inline void down(struct semaphore * sem)
-{
- might_sleep();
- __down_op(sem, __down_failed);
-}
-
-/*
- * This is ugly, but we want the default case to fall through.
- * "__down_interruptible" is the actual routine that waits...
- */
-static inline int down_interruptible (struct semaphore * sem)
-{
- might_sleep();
- return __down_op_ret(sem, __down_interruptible_failed);
-}
-
-static inline int down_trylock(struct semaphore *sem)
-{
- return __down_op_ret(sem, __down_trylock_failed);
-}
-
-/*
- * Note! This is subtle. We jump to wake people up only if
- * the semaphore was negative (== somebody was waiting on it).
- * The default case (no contention) will result in NO
- * jumps for both down() and up().
- */
-static inline void up(struct semaphore * sem)
-{
- __up_op(sem, __up_wakeup);
-}
-
-#endif
diff --git a/original/asm-arm/sembuf.h b/original/asm-arm/sembuf.h
deleted file mode 100644
index 1c02839..0000000
--- a/original/asm-arm/sembuf.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _ASMARM_SEMBUF_H
-#define _ASMARM_SEMBUF_H
-
-/*
- * The semid64_ds structure for arm architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct semid64_ds {
- struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
- __kernel_time_t sem_otime; /* last semop time */
- unsigned long __unused1;
- __kernel_time_t sem_ctime; /* last change time */
- unsigned long __unused2;
- unsigned long sem_nsems; /* no. of semaphores in array */
- unsigned long __unused3;
- unsigned long __unused4;
-};
-
-#endif /* _ASMARM_SEMBUF_H */
diff --git a/original/asm-arm/shmbuf.h b/original/asm-arm/shmbuf.h
deleted file mode 100644
index 2e5c67b..0000000
--- a/original/asm-arm/shmbuf.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _ASMARM_SHMBUF_H
-#define _ASMARM_SHMBUF_H
-
-/*
- * The shmid64_ds structure for arm architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 64-bit time_t to solve y2038 problem
- * - 2 miscellaneous 32-bit values
- */
-
-struct shmid64_ds {
- struct ipc64_perm shm_perm; /* operation perms */
- size_t shm_segsz; /* size of segment (bytes) */
- __kernel_time_t shm_atime; /* last attach time */
- unsigned long __unused1;
- __kernel_time_t shm_dtime; /* last detach time */
- unsigned long __unused2;
- __kernel_time_t shm_ctime; /* last change time */
- unsigned long __unused3;
- __kernel_pid_t shm_cpid; /* pid of creator */
- __kernel_pid_t shm_lpid; /* pid of last operator */
- unsigned long shm_nattch; /* no. of current attaches */
- unsigned long __unused4;
- unsigned long __unused5;
-};
-
-struct shminfo64 {
- unsigned long shmmax;
- unsigned long shmmin;
- unsigned long shmmni;
- unsigned long shmseg;
- unsigned long shmall;
- unsigned long __unused1;
- unsigned long __unused2;
- unsigned long __unused3;
- unsigned long __unused4;
-};
-
-#endif /* _ASMARM_SHMBUF_H */
diff --git a/original/asm-arm/shmparam.h b/original/asm-arm/shmparam.h
deleted file mode 100644
index a5223b3..0000000
--- a/original/asm-arm/shmparam.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _ASMARM_SHMPARAM_H
-#define _ASMARM_SHMPARAM_H
-
-/*
- * This should be the size of the virtually indexed cache/ways,
- * or page size, whichever is greater since the cache aliases
- * every size/ways bytes.
- */
-#define SHMLBA (4 * PAGE_SIZE) /* attach addr a multiple of this */
-
-/*
- * Enforce SHMLBA in shmat
- */
-#define __ARCH_FORCE_SHMLBA
-
-#endif /* _ASMARM_SHMPARAM_H */
diff --git a/original/asm-arm/sigcontext.h b/original/asm-arm/sigcontext.h
deleted file mode 100644
index fc0b80b..0000000
--- a/original/asm-arm/sigcontext.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _ASMARM_SIGCONTEXT_H
-#define _ASMARM_SIGCONTEXT_H
-
-/*
- * Signal context structure - contains all info to do with the state
- * before the signal handler was invoked. Note: only add new entries
- * to the end of the structure.
- */
-struct sigcontext {
- unsigned long trap_no;
- unsigned long error_code;
- unsigned long oldmask;
- unsigned long arm_r0;
- unsigned long arm_r1;
- unsigned long arm_r2;
- unsigned long arm_r3;
- unsigned long arm_r4;
- unsigned long arm_r5;
- unsigned long arm_r6;
- unsigned long arm_r7;
- unsigned long arm_r8;
- unsigned long arm_r9;
- unsigned long arm_r10;
- unsigned long arm_fp;
- unsigned long arm_ip;
- unsigned long arm_sp;
- unsigned long arm_lr;
- unsigned long arm_pc;
- unsigned long arm_cpsr;
- unsigned long fault_address;
-};
-
-
-#endif
diff --git a/original/asm-arm/siginfo.h b/original/asm-arm/siginfo.h
deleted file mode 100644
index 5e21852..0000000
--- a/original/asm-arm/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASMARM_SIGINFO_H
-#define _ASMARM_SIGINFO_H
-
-#include <asm-generic/siginfo.h>
-
-#endif
diff --git a/original/asm-arm/signal.h b/original/asm-arm/signal.h
deleted file mode 100644
index d0fb487..0000000
--- a/original/asm-arm/signal.h
+++ /dev/null
@@ -1,164 +0,0 @@
-#ifndef _ASMARM_SIGNAL_H
-#define _ASMARM_SIGNAL_H
-
-#include <linux/types.h>
-
-/* Avoid too many header ordering problems. */
-struct siginfo;
-
-#ifdef __KERNEL__
-/* Most things should be clean enough to redefine this at will, if care
- is taken to make libc match. */
-
-#define _NSIG 64
-#define _NSIG_BPW 32
-#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
-
-typedef unsigned long old_sigset_t; /* at least 32 bits */
-
-typedef struct {
- unsigned long sig[_NSIG_WORDS];
-} sigset_t;
-
-#else
-/* Here we must cater to libcs that poke about in kernel headers. */
-
-#define NSIG 32
-typedef unsigned long sigset_t;
-
-#endif /* __KERNEL__ */
-
-#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
-
-#define SIGSWI 32
-
-/*
- * SA_FLAGS values:
- *
- * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
- * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
- * SA_SIGINFO deliver the signal with SIGINFO structs
- * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task
- * is running in 26-bit.
- * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
- * SA_RESTART flag to get restarting signals (which were the default long ago)
- * SA_NODEFER prevents the current signal from being masked in the handler.
- * SA_RESETHAND clears the handler when the signal is delivered.
- *
- * 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
-#define SA_SIGINFO 0x00000004
-#define SA_THIRTYTWO 0x02000000
-#define SA_RESTORER 0x04000000
-#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
-
-
-/*
- * sigaltstack controls
- */
-#define SS_ONSTACK 1
-#define SS_DISABLE 2
-
-#define MINSIGSTKSZ 2048
-#define SIGSTKSZ 8192
-
-#include <asm-generic/signal.h>
-
-#ifdef __KERNEL__
-struct old_sigaction {
- __sighandler_t sa_handler;
- old_sigset_t sa_mask;
- unsigned long sa_flags;
- __sigrestore_t sa_restorer;
-};
-
-struct sigaction {
- __sighandler_t sa_handler;
- unsigned long sa_flags;
- __sigrestore_t sa_restorer;
- 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 __user *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
-
-#endif
diff --git a/original/asm-arm/sizes.h b/original/asm-arm/sizes.h
deleted file mode 100644
index 7f50ae0..0000000
--- a/original/asm-arm/sizes.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-/* DO NOT EDIT!! - this file automatically generated
- * from .s file by awk -f s2h.awk
- */
-/* Size definitions
- * Copyright (C) ARM Limited 1998. All rights reserved.
- */
-
-#ifndef __sizes_h
-#define __sizes_h 1
-
-/* handy sizes */
-#define SZ_1K 0x00000400
-#define SZ_4K 0x00001000
-#define SZ_8K 0x00002000
-#define SZ_16K 0x00004000
-#define SZ_64K 0x00010000
-#define SZ_128K 0x00020000
-#define SZ_256K 0x00040000
-#define SZ_512K 0x00080000
-
-#define SZ_1M 0x00100000
-#define SZ_2M 0x00200000
-#define SZ_4M 0x00400000
-#define SZ_8M 0x00800000
-#define SZ_16M 0x01000000
-#define SZ_32M 0x02000000
-#define SZ_64M 0x04000000
-#define SZ_128M 0x08000000
-#define SZ_256M 0x10000000
-#define SZ_512M 0x20000000
-
-#define SZ_1G 0x40000000
-#define SZ_2G 0x80000000
-
-#endif
-
-/* END */
diff --git a/original/asm-arm/smp.h b/original/asm-arm/smp.h
deleted file mode 100644
index f67acce..0000000
--- a/original/asm-arm/smp.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * linux/include/asm-arm/smp.h
- *
- * Copyright (C) 2004-2005 ARM Ltd.
- *
- * 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.
- */
-#ifndef __ASM_ARM_SMP_H
-#define __ASM_ARM_SMP_H
-
-#include <linux/threads.h>
-#include <linux/cpumask.h>
-#include <linux/thread_info.h>
-
-#include <asm/arch/smp.h>
-
-#ifndef CONFIG_SMP
-# error "<asm-arm/smp.h> included in non-SMP build"
-#endif
-
-#define raw_smp_processor_id() (current_thread_info()->cpu)
-
-/*
- * at the moment, there's not a big penalty for changing CPUs
- * (the >big< penalty is running SMP in the first place)
- */
-#define PROC_CHANGE_PENALTY 15
-
-struct seq_file;
-
-/*
- * generate IPI list text
- */
-extern void show_ipi_list(struct seq_file *p);
-
-/*
- * Called from assembly code, this handles an IPI.
- */
-asmlinkage void do_IPI(struct pt_regs *regs);
-
-/*
- * Setup the SMP cpu_possible_map
- */
-extern void smp_init_cpus(void);
-
-/*
- * Move global data into per-processor storage.
- */
-extern void smp_store_cpu_info(unsigned int cpuid);
-
-/*
- * Raise an IPI cross call on CPUs in callmap.
- */
-extern void smp_cross_call(cpumask_t callmap);
-
-/*
- * Broadcast a timer interrupt to the other CPUs.
- */
-extern void smp_send_timer(void);
-
-/*
- * Boot a secondary CPU, and assign it the specified idle task.
- * This also gives us the initial stack to use for this CPU.
- */
-extern int boot_secondary(unsigned int cpu, struct task_struct *);
-
-/*
- * Called from platform specific assembly code, this is the
- * secondary CPU entry point.
- */
-asmlinkage void secondary_start_kernel(void);
-
-/*
- * Perform platform specific initialisation of the specified CPU.
- */
-extern void platform_secondary_init(unsigned int cpu);
-
-/*
- * Initial data for bringing up a secondary CPU.
- */
-struct secondary_data {
- unsigned long pgdir;
- void *stack;
-};
-extern struct secondary_data secondary_data;
-
-extern int __cpu_disable(void);
-extern int mach_cpu_disable(unsigned int cpu);
-
-extern void __cpu_die(unsigned int cpu);
-extern void cpu_die(void);
-
-extern void platform_cpu_die(unsigned int cpu);
-extern int platform_cpu_kill(unsigned int cpu);
-extern void platform_cpu_enable(unsigned int cpu);
-
-#ifdef CONFIG_LOCAL_TIMERS
-/*
- * Setup a local timer interrupt for a CPU.
- */
-extern void local_timer_setup(unsigned int cpu);
-
-/*
- * Stop a local timer interrupt.
- */
-extern void local_timer_stop(unsigned int cpu);
-
-/*
- * Platform provides this to acknowledge a local timer IRQ
- */
-extern int local_timer_ack(void);
-
-#else
-
-static inline void local_timer_setup(unsigned int cpu)
-{
-}
-
-static inline void local_timer_stop(unsigned int cpu)
-{
-}
-
-#endif
-
-/*
- * show local interrupt info
- */
-extern void show_local_irqs(struct seq_file *);
-
-/*
- * Called from assembly, this is the local timer IRQ handler
- */
-asmlinkage void do_local_timer(struct pt_regs *);
-
-#endif /* ifndef __ASM_ARM_SMP_H */
diff --git a/original/asm-arm/socket.h b/original/asm-arm/socket.h
deleted file mode 100644
index dec6f9a..0000000
--- a/original/asm-arm/socket.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _ASMARM_SOCKET_H
-#define _ASMARM_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockopt(2) */
-#define SOL_SOCKET 1
-
-#define SO_DEBUG 1
-#define SO_REUSEADDR 2
-#define SO_TYPE 3
-#define SO_ERROR 4
-#define SO_DONTROUTE 5
-#define SO_BROADCAST 6
-#define SO_SNDBUF 7
-#define SO_RCVBUF 8
-#define SO_SNDBUFFORCE 32
-#define SO_RCVBUFFORCE 33
-#define SO_KEEPALIVE 9
-#define SO_OOBINLINE 10
-#define SO_NO_CHECK 11
-#define SO_PRIORITY 12
-#define SO_LINGER 13
-#define SO_BSDCOMPAT 14
-/* To add :#define SO_REUSEPORT 15 */
-#define SO_PASSCRED 16
-#define SO_PEERCRED 17
-#define SO_RCVLOWAT 18
-#define SO_SNDLOWAT 19
-#define SO_RCVTIMEO 20
-#define SO_SNDTIMEO 21
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-#define SO_SECURITY_AUTHENTICATION 22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
-#define SO_SECURITY_ENCRYPTION_NETWORK 24
-
-#define SO_BINDTODEVICE 25
-
-/* Socket filtering */
-#define SO_ATTACH_FILTER 26
-#define SO_DETACH_FILTER 27
-
-#define SO_PEERNAME 28
-#define SO_TIMESTAMP 29
-#define SCM_TIMESTAMP SO_TIMESTAMP
-
-#define SO_ACCEPTCONN 30
-
-#define SO_PEERSEC 31
-#define SO_PASSSEC 34
-#define SO_TIMESTAMPNS 35
-#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
-
-#define SO_MARK 36
-
-#define SO_TIMESTAMPING 37
-#define SCM_TIMESTAMPING SO_TIMESTAMPING
-
-#define SO_PROTOCOL 38
-#define SO_DOMAIN 39
-
-#define SO_RXQ_OVFL 40
-
-#define SO_WIFI_STATUS 41
-#define SCM_WIFI_STATUS SO_WIFI_STATUS
-
-#endif /* _ASM_SOCKET_H */
diff --git a/original/asm-arm/sockios.h b/original/asm-arm/sockios.h
deleted file mode 100644
index 77c3408..0000000
--- a/original/asm-arm/sockios.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __ARCH_ARM_SOCKIOS_H
-#define __ARCH_ARM_SOCKIOS_H
-
-/* Socket-level I/O control calls. */
-#define FIOSETOWN 0x8901
-#define SIOCSPGRP 0x8902
-#define FIOGETOWN 0x8903
-#define SIOCGPGRP 0x8904
-#define SIOCATMARK 0x8905
-#define SIOCGSTAMP 0x8906 /* Get stamp */
-
-#endif
diff --git a/original/asm-arm/spinlock.h b/original/asm-arm/spinlock.h
deleted file mode 100644
index 01b7c26..0000000
--- a/original/asm-arm/spinlock.h
+++ /dev/null
@@ -1,221 +0,0 @@
-#ifndef __ASM_SPINLOCK_H
-#define __ASM_SPINLOCK_H
-
-#if __LINUX_ARM_ARCH__ < 6
-#error SMP not supported on pre-ARMv6 CPUs
-#endif
-
-/*
- * ARMv6 Spin-locking.
- *
- * We exclusively read the old value. If it is zero, we may have
- * won the lock, so we try exclusively storing it. A memory barrier
- * is required after we get a lock, and before we release it, because
- * V6 CPUs are assumed to have weakly ordered memory.
- *
- * Unlocked value: 0
- * Locked value: 1
- */
-
-#define __raw_spin_is_locked(x) ((x)->lock != 0)
-#define __raw_spin_unlock_wait(lock) \
- do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
-
-#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
-
-static inline void __raw_spin_lock(raw_spinlock_t *lock)
-{
- unsigned long tmp;
-
- __asm__ __volatile__(
-"1: ldrex %0, [%1]\n"
-" teq %0, #0\n"
-#ifdef CONFIG_CPU_32v6K
-" wfene\n"
-#endif
-" strexeq %0, %2, [%1]\n"
-" teqeq %0, #0\n"
-" bne 1b"
- : "=&r" (tmp)
- : "r" (&lock->lock), "r" (1)
- : "cc");
-
- smp_mb();
-}
-
-static inline int __raw_spin_trylock(raw_spinlock_t *lock)
-{
- unsigned long tmp;
-
- __asm__ __volatile__(
-" ldrex %0, [%1]\n"
-" teq %0, #0\n"
-" strexeq %0, %2, [%1]"
- : "=&r" (tmp)
- : "r" (&lock->lock), "r" (1)
- : "cc");
-
- if (tmp == 0) {
- smp_mb();
- return 1;
- } else {
- return 0;
- }
-}
-
-static inline void __raw_spin_unlock(raw_spinlock_t *lock)
-{
- smp_mb();
-
- __asm__ __volatile__(
-" str %1, [%0]\n"
-#ifdef CONFIG_CPU_32v6K
-" mcr p15, 0, %1, c7, c10, 4\n" /* DSB */
-" sev"
-#endif
- :
- : "r" (&lock->lock), "r" (0)
- : "cc");
-}
-
-/*
- * RWLOCKS
- *
- *
- * Write locks are easy - we just set bit 31. When unlocking, we can
- * just write zero since the lock is exclusively held.
- */
-#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0)
-
-static inline void __raw_write_lock(raw_rwlock_t *rw)
-{
- unsigned long tmp;
-
- __asm__ __volatile__(
-"1: ldrex %0, [%1]\n"
-" teq %0, #0\n"
-#ifdef CONFIG_CPU_32v6K
-" wfene\n"
-#endif
-" strexeq %0, %2, [%1]\n"
-" teq %0, #0\n"
-" bne 1b"
- : "=&r" (tmp)
- : "r" (&rw->lock), "r" (0x80000000)
- : "cc");
-
- smp_mb();
-}
-
-static inline int __raw_write_trylock(raw_rwlock_t *rw)
-{
- unsigned long tmp;
-
- __asm__ __volatile__(
-"1: ldrex %0, [%1]\n"
-" teq %0, #0\n"
-" strexeq %0, %2, [%1]"
- : "=&r" (tmp)
- : "r" (&rw->lock), "r" (0x80000000)
- : "cc");
-
- if (tmp == 0) {
- smp_mb();
- return 1;
- } else {
- return 0;
- }
-}
-
-static inline void __raw_write_unlock(raw_rwlock_t *rw)
-{
- smp_mb();
-
- __asm__ __volatile__(
- "str %1, [%0]\n"
-#ifdef CONFIG_CPU_32v6K
-" mcr p15, 0, %1, c7, c10, 4\n" /* DSB */
-" sev\n"
-#endif
- :
- : "r" (&rw->lock), "r" (0)
- : "cc");
-}
-
-/* write_can_lock - would write_trylock() succeed? */
-#define __raw_write_can_lock(x) ((x)->lock == 0x80000000)
-
-/*
- * Read locks are a bit more hairy:
- * - Exclusively load the lock value.
- * - Increment it.
- * - Store new lock value if positive, and we still own this location.
- * If the value is negative, we've already failed.
- * - If we failed to store the value, we want a negative result.
- * - If we failed, try again.
- * Unlocking is similarly hairy. We may have multiple read locks
- * currently active. However, we know we won't have any write
- * locks.
- */
-static inline void __raw_read_lock(raw_rwlock_t *rw)
-{
- unsigned long tmp, tmp2;
-
- __asm__ __volatile__(
-"1: ldrex %0, [%2]\n"
-" adds %0, %0, #1\n"
-" strexpl %1, %0, [%2]\n"
-#ifdef CONFIG_CPU_32v6K
-" wfemi\n"
-#endif
-" rsbpls %0, %1, #0\n"
-" bmi 1b"
- : "=&r" (tmp), "=&r" (tmp2)
- : "r" (&rw->lock)
- : "cc");
-
- smp_mb();
-}
-
-static inline void __raw_read_unlock(raw_rwlock_t *rw)
-{
- unsigned long tmp, tmp2;
-
- smp_mb();
-
- __asm__ __volatile__(
-"1: ldrex %0, [%2]\n"
-" sub %0, %0, #1\n"
-" strex %1, %0, [%2]\n"
-" teq %1, #0\n"
-" bne 1b"
-#ifdef CONFIG_CPU_32v6K
-"\n cmp %0, #0\n"
-" mcreq p15, 0, %0, c7, c10, 4\n"
-" seveq"
-#endif
- : "=&r" (tmp), "=&r" (tmp2)
- : "r" (&rw->lock)
- : "cc");
-}
-
-static inline int __raw_read_trylock(raw_rwlock_t *rw)
-{
- unsigned long tmp, tmp2 = 1;
-
- __asm__ __volatile__(
-"1: ldrex %0, [%2]\n"
-" adds %0, %0, #1\n"
-" strexpl %1, %0, [%2]\n"
- : "=&r" (tmp), "+r" (tmp2)
- : "r" (&rw->lock)
- : "cc");
-
- smp_mb();
- return tmp2 == 0;
-}
-
-/* read_can_lock - would read_trylock() succeed? */
-#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)
-
-#endif /* __ASM_SPINLOCK_H */
diff --git a/original/asm-arm/spinlock_types.h b/original/asm-arm/spinlock_types.h
deleted file mode 100644
index 43e83f6..0000000
--- a/original/asm-arm/spinlock_types.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __ASM_SPINLOCK_TYPES_H
-#define __ASM_SPINLOCK_TYPES_H
-
-#ifndef __LINUX_SPINLOCK_TYPES_H
-# error "please don't include this file directly"
-#endif
-
-typedef struct {
- volatile unsigned int lock;
-} raw_spinlock_t;
-
-#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
-
-typedef struct {
- volatile unsigned int lock;
-} raw_rwlock_t;
-
-#define __RAW_RW_LOCK_UNLOCKED { 0 }
-
-#endif
diff --git a/original/asm-arm/stat.h b/original/asm-arm/stat.h
deleted file mode 100644
index 42c0c13..0000000
--- a/original/asm-arm/stat.h
+++ /dev/null
@@ -1,87 +0,0 @@
-#ifndef _ASMARM_STAT_H
-#define _ASMARM_STAT_H
-
-struct __old_kernel_stat {
- unsigned short st_dev;
- unsigned short st_ino;
- unsigned short st_mode;
- unsigned short st_nlink;
- unsigned short st_uid;
- unsigned short st_gid;
- unsigned short st_rdev;
- unsigned long st_size;
- unsigned long st_atime;
- unsigned long st_mtime;
- unsigned long st_ctime;
-};
-
-#define STAT_HAVE_NSEC
-
-struct stat {
-#if defined(__ARMEB__)
- unsigned short st_dev;
- unsigned short __pad1;
-#else
- unsigned long st_dev;
-#endif
- unsigned long st_ino;
- unsigned short st_mode;
- unsigned short st_nlink;
- unsigned short st_uid;
- unsigned short st_gid;
-#if defined(__ARMEB__)
- unsigned short st_rdev;
- unsigned short __pad2;
-#else
- unsigned long st_rdev;
-#endif
- unsigned 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;
-};
-
-/* This matches struct stat64 in glibc2.1, hence the absolutely
- * insane amounts of padding around dev_t's.
- * Note: The kernel zero's the padded region because glibc might read them
- * in the hope that the kernel has stretched to using larger sizes.
- */
-struct stat64 {
- unsigned long long st_dev;
- unsigned char __pad0[4];
-
-#define STAT64_HAS_BROKEN_ST_INO 1
- unsigned long __st_ino;
- unsigned int st_mode;
- unsigned int st_nlink;
-
- unsigned long st_uid;
- unsigned long st_gid;
-
- unsigned long long st_rdev;
- unsigned char __pad3[4];
-
- long long st_size;
- unsigned long st_blksize;
- unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
-
- 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 long st_ino;
-};
-
-#endif
diff --git a/original/asm-arm/statfs.h b/original/asm-arm/statfs.h
deleted file mode 100644
index a02e6a8..0000000
--- a/original/asm-arm/statfs.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _ASMARM_STATFS_H
-#define _ASMARM_STATFS_H
-
-#ifndef __KERNEL_STRICT_NAMES
-# include <linux/types.h>
-typedef __kernel_fsid_t fsid_t;
-#endif
-
-struct statfs {
- __u32 f_type;
- __u32 f_bsize;
- __u32 f_blocks;
- __u32 f_bfree;
- __u32 f_bavail;
- __u32 f_files;
- __u32 f_ffree;
- __kernel_fsid_t f_fsid;
- __u32 f_namelen;
- __u32 f_frsize;
- __u32 f_spare[5];
-};
-
-/*
- * With EABI there is 4 bytes of padding added to this structure.
- * Let's pack it so the padding goes away to simplify dual ABI support.
- * Note that user space does NOT have to pack this structure.
- */
-struct statfs64 {
- __u32 f_type;
- __u32 f_bsize;
- __u64 f_blocks;
- __u64 f_bfree;
- __u64 f_bavail;
- __u64 f_files;
- __u64 f_ffree;
- __kernel_fsid_t f_fsid;
- __u32 f_namelen;
- __u32 f_frsize;
- __u32 f_spare[5];
-} __attribute__ ((packed,aligned(4)));
-
-#endif
diff --git a/original/asm-arm/suspend.h b/original/asm-arm/suspend.h
deleted file mode 100644
index cf0d0bd..0000000
--- a/original/asm-arm/suspend.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef _ASMARM_SUSPEND_H
-#define _ASMARM_SUSPEND_H
-
-#endif
diff --git a/original/asm-arm/system.h b/original/asm-arm/system.h
deleted file mode 100644
index 0947cbf..0000000
--- a/original/asm-arm/system.h
+++ /dev/null
@@ -1,453 +0,0 @@
-#ifndef __ASM_ARM_SYSTEM_H
-#define __ASM_ARM_SYSTEM_H
-
-#ifdef __KERNEL__
-
-
-#define CPU_ARCH_UNKNOWN 0
-#define CPU_ARCH_ARMv3 1
-#define CPU_ARCH_ARMv4 2
-#define CPU_ARCH_ARMv4T 3
-#define CPU_ARCH_ARMv5 4
-#define CPU_ARCH_ARMv5T 5
-#define CPU_ARCH_ARMv5TE 6
-#define CPU_ARCH_ARMv5TEJ 7
-#define CPU_ARCH_ARMv6 8
-
-/*
- * CR1 bits (CP#15 CR1)
- */
-#define CR_M (1 << 0) /* MMU enable */
-#define CR_A (1 << 1) /* Alignment abort enable */
-#define CR_C (1 << 2) /* Dcache enable */
-#define CR_W (1 << 3) /* Write buffer enable */
-#define CR_P (1 << 4) /* 32-bit exception handler */
-#define CR_D (1 << 5) /* 32-bit data address range */
-#define CR_L (1 << 6) /* Implementation defined */
-#define CR_B (1 << 7) /* Big endian */
-#define CR_S (1 << 8) /* System MMU protection */
-#define CR_R (1 << 9) /* ROM MMU protection */
-#define CR_F (1 << 10) /* Implementation defined */
-#define CR_Z (1 << 11) /* Implementation defined */
-#define CR_I (1 << 12) /* Icache enable */
-#define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */
-#define CR_RR (1 << 14) /* Round Robin cache replacement */
-#define CR_L4 (1 << 15) /* LDR pc can set T bit */
-#define CR_DT (1 << 16)
-#define CR_IT (1 << 18)
-#define CR_ST (1 << 19)
-#define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */
-#define CR_U (1 << 22) /* Unaligned access operation */
-#define CR_XP (1 << 23) /* Extended page tables */
-#define CR_VE (1 << 24) /* Vectored interrupts */
-
-#define CPUID_ID 0
-#define CPUID_CACHETYPE 1
-#define CPUID_TCM 2
-#define CPUID_TLBTYPE 3
-
-#define read_cpuid(reg) \
- ({ \
- unsigned int __val; \
- asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \
- : "=r" (__val) \
- : \
- : "cc"); \
- __val; \
- })
-
-/*
- * This is used to ensure the compiler did actually allocate the register we
- * asked it for some inline assembly sequences. Apparently we can't trust
- * the compiler from one version to another so a bit of paranoia won't hurt.
- * This string is meant to be concatenated with the inline asm string and
- * will cause compilation to stop on mismatch.
- * (for details, see gcc PR 15089)
- */
-#define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t"
-
-#ifndef __ASSEMBLY__
-
-#include <linux/linkage.h>
-
-struct thread_info;
-struct task_struct;
-
-/* information about the system we're running on */
-extern unsigned int system_rev;
-extern unsigned int system_serial_low;
-extern unsigned int system_serial_high;
-extern unsigned int mem_fclk_21285;
-
-struct pt_regs;
-
-void die(const char *msg, struct pt_regs *regs, int err)
- __attribute__((noreturn));
-
-struct siginfo;
-void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
- unsigned long err, unsigned long trap);
-
-void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
- struct pt_regs *),
- int sig, const char *name);
-
-#define xchg(ptr,x) \
- ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
-
-#define tas(ptr) (xchg((ptr),1))
-
-extern asmlinkage void __backtrace(void);
-extern asmlinkage void c_backtrace(unsigned long fp, int pmode);
-
-struct mm_struct;
-extern void show_pte(struct mm_struct *mm, unsigned long addr);
-extern void __show_regs(struct pt_regs *);
-
-extern int cpu_architecture(void);
-extern void cpu_init(void);
-
-void arm_machine_restart(char mode);
-extern void (*arm_pm_restart)(char str);
-
-/*
- * Intel's XScale3 core supports some v6 features (supersections, L2)
- * but advertises itself as v5 as it does not support the v6 ISA. For
- * this reason, we need a way to explicitly test for this type of CPU.
- */
-#ifndef CONFIG_CPU_XSC3
-#define cpu_is_xsc3() 0
-#else
-static inline int cpu_is_xsc3(void)
-{
- extern unsigned int processor_id;
-
- if ((processor_id & 0xffffe000) == 0x69056000)
- return 1;
-
- return 0;
-}
-#endif
-
-#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
-#define cpu_is_xscale() 0
-#else
-#define cpu_is_xscale() 1
-#endif
-
-#define set_cr(x) \
- __asm__ __volatile__( \
- "mcr p15, 0, %0, c1, c0, 0 @ set CR" \
- : : "r" (x) : "cc")
-
-#define get_cr() \
- ({ \
- unsigned int __val; \
- __asm__ __volatile__( \
- "mrc p15, 0, %0, c1, c0, 0 @ get CR" \
- : "=r" (__val) : : "cc"); \
- __val; \
- })
-
-extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
-extern unsigned long cr_alignment; /* defined in entry-armv.S */
-
-#define UDBG_UNDEFINED (1 << 0)
-#define UDBG_SYSCALL (1 << 1)
-#define UDBG_BADABORT (1 << 2)
-#define UDBG_SEGV (1 << 3)
-#define UDBG_BUS (1 << 4)
-
-extern unsigned int user_debug;
-
-#if __LINUX_ARM_ARCH__ >= 4
-#define vectors_high() (cr_alignment & CR_V)
-#else
-#define vectors_high() (0)
-#endif
-
-#if __LINUX_ARM_ARCH__ >= 6
-#define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \
- : : "r" (0) : "memory")
-#else
-#define mb() __asm__ __volatile__ ("" : : : "memory")
-#endif
-#define rmb() mb()
-#define wmb() mb()
-#define read_barrier_depends() do { } while(0)
-#define set_mb(var, value) do { var = value; mb(); } while (0)
-#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
-
-/*
- * switch_mm() may do a full cache flush over the context switch,
- * so enable interrupts over the context switch to avoid high
- * latency.
- */
-#define __ARCH_WANT_INTERRUPTS_ON_CTXSW
-
-/*
- * switch_to(prev, next) should switch from task `prev' to `next'
- * `prev' will never be the same as `next'. schedule() itself
- * contains the memory barrier to tell GCC not to cache `current'.
- */
-extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
-
-#define switch_to(prev,next,last) \
-do { \
- last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \
-} while (0)
-
-/*
- * On SMP systems, when the scheduler does migration-cost autodetection,
- * it needs a way to flush as much of the CPU's caches as possible.
- *
- * TODO: fill this in!
- */
-static inline void sched_cacheflush(void)
-{
-}
-
-/*
- * CPU interrupt mask handling.
- */
-#if __LINUX_ARM_ARCH__ >= 6
-
-#define local_irq_save(x) \
- ({ \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ local_irq_save\n" \
- "cpsid i" \
- : "=r" (x) : : "memory", "cc"); \
- })
-
-#define local_irq_enable() __asm__("cpsie i @ __sti" : : : "memory", "cc")
-#define local_irq_disable() __asm__("cpsid i @ __cli" : : : "memory", "cc")
-#define local_fiq_enable() __asm__("cpsie f @ __stf" : : : "memory", "cc")
-#define local_fiq_disable() __asm__("cpsid f @ __clf" : : : "memory", "cc")
-
-#else
-
-/*
- * Save the current interrupt enable state & disable IRQs
- */
-#define local_irq_save(x) \
- ({ \
- unsigned long temp; \
- (void) (&temp == &x); \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ local_irq_save\n" \
-" orr %1, %0, #128\n" \
-" msr cpsr_c, %1" \
- : "=r" (x), "=r" (temp) \
- : \
- : "memory", "cc"); \
- })
-
-/*
- * Enable IRQs
- */
-#define local_irq_enable() \
- ({ \
- unsigned long temp; \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ local_irq_enable\n" \
-" bic %0, %0, #128\n" \
-" msr cpsr_c, %0" \
- : "=r" (temp) \
- : \
- : "memory", "cc"); \
- })
-
-/*
- * Disable IRQs
- */
-#define local_irq_disable() \
- ({ \
- unsigned long temp; \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ local_irq_disable\n" \
-" orr %0, %0, #128\n" \
-" msr cpsr_c, %0" \
- : "=r" (temp) \
- : \
- : "memory", "cc"); \
- })
-
-/*
- * Enable FIQs
- */
-#define local_fiq_enable() \
- ({ \
- unsigned long temp; \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ stf\n" \
-" bic %0, %0, #64\n" \
-" msr cpsr_c, %0" \
- : "=r" (temp) \
- : \
- : "memory", "cc"); \
- })
-
-/*
- * Disable FIQs
- */
-#define local_fiq_disable() \
- ({ \
- unsigned long temp; \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ clf\n" \
-" orr %0, %0, #64\n" \
-" msr cpsr_c, %0" \
- : "=r" (temp) \
- : \
- : "memory", "cc"); \
- })
-
-#endif
-
-/*
- * Save the current interrupt enable state.
- */
-#define local_save_flags(x) \
- ({ \
- __asm__ __volatile__( \
- "mrs %0, cpsr @ local_save_flags" \
- : "=r" (x) : : "memory", "cc"); \
- })
-
-/*
- * restore saved IRQ & FIQ state
- */
-#define local_irq_restore(x) \
- __asm__ __volatile__( \
- "msr cpsr_c, %0 @ local_irq_restore\n" \
- : \
- : "r" (x) \
- : "memory", "cc")
-
-#define irqs_disabled() \
-({ \
- unsigned long flags; \
- local_save_flags(flags); \
- (int)(flags & PSR_I_BIT); \
-})
-
-#ifdef CONFIG_SMP
-
-#define smp_mb() mb()
-#define smp_rmb() rmb()
-#define smp_wmb() wmb()
-#define smp_read_barrier_depends() read_barrier_depends()
-
-#else
-
-#define smp_mb() barrier()
-#define smp_rmb() barrier()
-#define smp_wmb() barrier()
-#define smp_read_barrier_depends() do { } while(0)
-
-#endif /* CONFIG_SMP */
-
-#if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110)
-/*
- * On the StrongARM, "swp" is terminally broken since it bypasses the
- * cache totally. This means that the cache becomes inconsistent, and,
- * since we use normal loads/stores as well, this is really bad.
- * Typically, this causes oopsen in filp_close, but could have other,
- * more disasterous effects. There are two work-arounds:
- * 1. Disable interrupts and emulate the atomic swap
- * 2. Clean the cache, perform atomic swap, flush the cache
- *
- * We choose (1) since its the "easiest" to achieve here and is not
- * dependent on the processor type.
- *
- * NOTE that this solution won't work on an SMP system, so explcitly
- * forbid it here.
- */
-#define swp_is_buggy
-#endif
-
-static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
-{
- extern void __bad_xchg(volatile void *, int);
- unsigned long ret;
-#ifdef swp_is_buggy
- unsigned long flags;
-#endif
-#if __LINUX_ARM_ARCH__ >= 6
- unsigned int tmp;
-#endif
-
- switch (size) {
-#if __LINUX_ARM_ARCH__ >= 6
- case 1:
- asm volatile("@ __xchg1\n"
- "1: ldrexb %0, [%3]\n"
- " strexb %1, %2, [%3]\n"
- " teq %1, #0\n"
- " bne 1b"
- : "=&r" (ret), "=&r" (tmp)
- : "r" (x), "r" (ptr)
- : "memory", "cc");
- break;
- case 4:
- asm volatile("@ __xchg4\n"
- "1: ldrex %0, [%3]\n"
- " strex %1, %2, [%3]\n"
- " teq %1, #0\n"
- " bne 1b"
- : "=&r" (ret), "=&r" (tmp)
- : "r" (x), "r" (ptr)
- : "memory", "cc");
- break;
-#elif defined(swp_is_buggy)
-#ifdef CONFIG_SMP
-#error SMP is not supported on this platform
-#endif
- case 1:
- local_irq_save(flags);
- ret = *(volatile unsigned char *)ptr;
- *(volatile unsigned char *)ptr = x;
- local_irq_restore(flags);
- break;
-
- case 4:
- local_irq_save(flags);
- ret = *(volatile unsigned long *)ptr;
- *(volatile unsigned long *)ptr = x;
- local_irq_restore(flags);
- break;
-#else
- case 1:
- asm volatile("@ __xchg1\n"
- " swpb %0, %1, [%2]"
- : "=&r" (ret)
- : "r" (x), "r" (ptr)
- : "memory", "cc");
- break;
- case 4:
- asm volatile("@ __xchg4\n"
- " swp %0, %1, [%2]"
- : "=&r" (ret)
- : "r" (x), "r" (ptr)
- : "memory", "cc");
- break;
-#endif
- default:
- __bad_xchg(ptr, size), ret = 0;
- break;
- }
-
- return ret;
-}
-
-extern void disable_hlt(void);
-extern void enable_hlt(void);
-
-#endif /* __ASSEMBLY__ */
-
-#define arch_align_stack(x) (x)
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/asm-arm/termbits.h b/original/asm-arm/termbits.h
deleted file mode 100644
index bbc6e1d..0000000
--- a/original/asm-arm/termbits.h
+++ /dev/null
@@ -1,171 +0,0 @@
-#ifndef __ASM_ARM_TERMBITS_H
-#define __ASM_ARM_TERMBITS_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 */
-};
-
-/* 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 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 (not used) */
-#define CMSPAR 010000000000 /* mark or space (stick) parity */
-#define CRTSCTS 020000000000 /* flow control */
-
-/* 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 /* __ASM_ARM_TERMBITS_H */
diff --git a/original/asm-arm/termios.h b/original/asm-arm/termios.h
deleted file mode 100644
index 7b8f5e8..0000000
--- a/original/asm-arm/termios.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef __ASM_ARM_TERMIOS_H
-#define __ASM_ARM_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 */
-};
-
-#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"
-#endif
-
-/* 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 */
-
-/* line disciplines */
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6 /* X.25 async */
-#define N_6PACK 7
-#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
-#define N_R3964 9 /* Reserved for Simatic R3964 module */
-#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
-#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
-#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
-#define N_HDLC 13 /* synchronous HDLC */
-#define N_SYNC_PPP 14
-#define N_HCI 15 /* Bluetooth HCI UART */
-
-#ifdef __KERNEL__
-
-/*
- * 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 termios))
-#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios))
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASM_ARM_TERMIOS_H */
diff --git a/original/asm-arm/thread_info.h b/original/asm-arm/thread_info.h
deleted file mode 100644
index f28b236..0000000
--- a/original/asm-arm/thread_info.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * linux/include/asm-arm/thread_info.h
- *
- * Copyright (C) 2002 Russell King.
- *
- * 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.
- */
-#ifndef __ASM_ARM_THREAD_INFO_H
-#define __ASM_ARM_THREAD_INFO_H
-
-#ifdef __KERNEL__
-
-#include <linux/compiler.h>
-#include <asm/fpstate.h>
-
-#define THREAD_SIZE_ORDER 1
-#define THREAD_SIZE 8192
-#define THREAD_START_SP (THREAD_SIZE - 8)
-
-#ifndef __ASSEMBLY__
-
-struct task_struct;
-struct exec_domain;
-
-#include <asm/ptrace.h>
-#include <asm/types.h>
-#include <asm/domain.h>
-
-typedef unsigned long mm_segment_t;
-
-struct cpu_context_save {
- __u32 r4;
- __u32 r5;
- __u32 r6;
- __u32 r7;
- __u32 r8;
- __u32 r9;
- __u32 sl;
- __u32 fp;
- __u32 sp;
- __u32 pc;
- __u32 extra[2]; /* Xscale 'acc' register, etc */
-};
-
-/*
- * low level task data that entry.S needs immediate access to.
- * __switch_to() assumes cpu_context follows immediately after cpu_domain.
- */
-struct thread_info {
- unsigned long flags; /* low level flags */
- int preempt_count; /* 0 => preemptable, <0 => bug */
- mm_segment_t addr_limit; /* address limit */
- struct task_struct *task; /* main task structure */
- struct exec_domain *exec_domain; /* execution domain */
- __u32 cpu; /* cpu */
- __u32 cpu_domain; /* cpu domain */
- struct cpu_context_save cpu_context; /* cpu context */
- __u8 used_cp[16]; /* thread used copro */
- unsigned long tp_value;
- struct crunch_state crunchstate;
- union fp_state fpstate __attribute__((aligned(8)));
- union vfp_state vfpstate;
- struct restart_block restart_block;
-};
-
-#define INIT_THREAD_INFO(tsk) \
-{ \
- .task = &tsk, \
- .exec_domain = &default_exec_domain, \
- .flags = 0, \
- .preempt_count = 1, \
- .addr_limit = KERNEL_DS, \
- .cpu_domain = domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
- domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
- domain_val(DOMAIN_IO, DOMAIN_CLIENT), \
- .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) __attribute_const__;
-
-static inline struct thread_info *current_thread_info(void)
-{
- register unsigned long sp asm ("sp");
- return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
-}
-
-extern struct thread_info *alloc_thread_info(struct task_struct *task);
-extern void free_thread_info(struct thread_info *);
-
-#define thread_saved_pc(tsk) \
- ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
-#define thread_saved_fp(tsk) \
- ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
-
-extern void crunch_task_disable(struct thread_info *);
-extern void crunch_task_copy(struct thread_info *, void *);
-extern void crunch_task_restore(struct thread_info *, void *);
-extern void crunch_task_release(struct thread_info *);
-
-extern void iwmmxt_task_disable(struct thread_info *);
-extern void iwmmxt_task_copy(struct thread_info *, void *);
-extern void iwmmxt_task_restore(struct thread_info *, void *);
-extern void iwmmxt_task_release(struct thread_info *);
-extern void iwmmxt_task_switch(struct thread_info *);
-
-#endif
-
-/*
- * We use bit 30 of the preempt_count to indicate that kernel
- * preemption is occurring. See include/asm-arm/hardirq.h.
- */
-#define PREEMPT_ACTIVE 0x40000000
-
-/*
- * thread information flags:
- * TIF_SYSCALL_TRACE - syscall trace active
- * TIF_NOTIFY_RESUME - resumption notification requested
- * TIF_SIGPENDING - signal pending
- * TIF_NEED_RESCHED - rescheduling necessary
- * TIF_USEDFPU - FPU was used by this task this quantum (SMP)
- * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED
- */
-#define TIF_NOTIFY_RESUME 0
-#define TIF_SIGPENDING 1
-#define TIF_NEED_RESCHED 2
-#define TIF_SYSCALL_TRACE 8
-#define TIF_POLLING_NRFLAG 16
-#define TIF_USING_IWMMXT 17
-#define TIF_MEMDIE 18
-
-#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
-#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
-#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
-#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
-#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
-#define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT)
-
-/*
- * Change these and you break ASM code in entry-common.S
- */
-#define _TIF_WORK_MASK 0x000000ff
-
-#endif /* __KERNEL__ */
-#endif /* __ASM_ARM_THREAD_INFO_H */
diff --git a/original/asm-arm/timex.h b/original/asm-arm/timex.h
deleted file mode 100644
index 7b8d4cb..0000000
--- a/original/asm-arm/timex.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * linux/include/asm-arm/timex.h
- *
- * Copyright (C) 1997,1998 Russell King
- *
- * 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.
- *
- * Architecture Specific TIME specifications
- */
-#ifndef _ASMARM_TIMEX_H
-#define _ASMARM_TIMEX_H
-
-#include <asm/arch/timex.h>
-
-typedef unsigned long cycles_t;
-
-static inline cycles_t get_cycles (void)
-{
- return 0;
-}
-
-#endif
diff --git a/original/asm-arm/tlbflush.h b/original/asm-arm/tlbflush.h
deleted file mode 100644
index d97fc76..0000000
--- a/original/asm-arm/tlbflush.h
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * linux/include/asm-arm/tlbflush.h
- *
- * Copyright (C) 1999-2003 Russell King
- *
- * 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.
- */
-#ifndef _ASMARM_TLBFLUSH_H
-#define _ASMARM_TLBFLUSH_H
-
-
-#ifndef CONFIG_MMU
-
-#define tlb_flush(tlb) ((void) tlb)
-
-#else /* CONFIG_MMU */
-
-#include <asm/glue.h>
-
-#define TLB_V3_PAGE (1 << 0)
-#define TLB_V4_U_PAGE (1 << 1)
-#define TLB_V4_D_PAGE (1 << 2)
-#define TLB_V4_I_PAGE (1 << 3)
-#define TLB_V6_U_PAGE (1 << 4)
-#define TLB_V6_D_PAGE (1 << 5)
-#define TLB_V6_I_PAGE (1 << 6)
-
-#define TLB_V3_FULL (1 << 8)
-#define TLB_V4_U_FULL (1 << 9)
-#define TLB_V4_D_FULL (1 << 10)
-#define TLB_V4_I_FULL (1 << 11)
-#define TLB_V6_U_FULL (1 << 12)
-#define TLB_V6_D_FULL (1 << 13)
-#define TLB_V6_I_FULL (1 << 14)
-
-#define TLB_V6_U_ASID (1 << 16)
-#define TLB_V6_D_ASID (1 << 17)
-#define TLB_V6_I_ASID (1 << 18)
-
-#define TLB_DCLEAN (1 << 30)
-#define TLB_WB (1 << 31)
-
-/*
- * MMU TLB Model
- * =============
- *
- * We have the following to choose from:
- * v3 - ARMv3
- * v4 - ARMv4 without write buffer
- * v4wb - ARMv4 with write buffer without I TLB flush entry instruction
- * v4wbi - ARMv4 with write buffer with I TLB flush entry instruction
- * v6wbi - ARMv6 with write buffer with I TLB flush entry instruction
- */
-#undef _TLB
-#undef MULTI_TLB
-
-#define v3_tlb_flags (TLB_V3_FULL | TLB_V3_PAGE)
-
-#ifdef CONFIG_CPU_TLB_V3
-# define v3_possible_flags v3_tlb_flags
-# define v3_always_flags v3_tlb_flags
-# ifdef _TLB
-# define MULTI_TLB 1
-# else
-# define _TLB v3
-# endif
-#else
-# define v3_possible_flags 0
-# define v3_always_flags (-1UL)
-#endif
-
-#define v4_tlb_flags (TLB_V4_U_FULL | TLB_V4_U_PAGE)
-
-#ifdef CONFIG_CPU_TLB_V4WT
-# define v4_possible_flags v4_tlb_flags
-# define v4_always_flags v4_tlb_flags
-# ifdef _TLB
-# define MULTI_TLB 1
-# else
-# define _TLB v4
-# endif
-#else
-# define v4_possible_flags 0
-# define v4_always_flags (-1UL)
-#endif
-
-#define v4wbi_tlb_flags (TLB_WB | TLB_DCLEAN | \
- TLB_V4_I_FULL | TLB_V4_D_FULL | \
- TLB_V4_I_PAGE | TLB_V4_D_PAGE)
-
-#ifdef CONFIG_CPU_TLB_V4WBI
-# define v4wbi_possible_flags v4wbi_tlb_flags
-# define v4wbi_always_flags v4wbi_tlb_flags
-# ifdef _TLB
-# define MULTI_TLB 1
-# else
-# define _TLB v4wbi
-# endif
-#else
-# define v4wbi_possible_flags 0
-# define v4wbi_always_flags (-1UL)
-#endif
-
-#define v4wb_tlb_flags (TLB_WB | TLB_DCLEAN | \
- TLB_V4_I_FULL | TLB_V4_D_FULL | \
- TLB_V4_D_PAGE)
-
-#ifdef CONFIG_CPU_TLB_V4WB
-# define v4wb_possible_flags v4wb_tlb_flags
-# define v4wb_always_flags v4wb_tlb_flags
-# ifdef _TLB
-# define MULTI_TLB 1
-# else
-# define _TLB v4wb
-# endif
-#else
-# define v4wb_possible_flags 0
-# define v4wb_always_flags (-1UL)
-#endif
-
-#define v6wbi_tlb_flags (TLB_WB | TLB_DCLEAN | \
- TLB_V6_I_FULL | TLB_V6_D_FULL | \
- TLB_V6_I_PAGE | TLB_V6_D_PAGE | \
- TLB_V6_I_ASID | TLB_V6_D_ASID)
-
-#ifdef CONFIG_CPU_TLB_V6
-# define v6wbi_possible_flags v6wbi_tlb_flags
-# define v6wbi_always_flags v6wbi_tlb_flags
-# ifdef _TLB
-# define MULTI_TLB 1
-# else
-# define _TLB v6wbi
-# endif
-#else
-# define v6wbi_possible_flags 0
-# define v6wbi_always_flags (-1UL)
-#endif
-
-#ifndef _TLB
-#error Unknown TLB model
-#endif
-
-#ifndef __ASSEMBLY__
-
-struct cpu_tlb_fns {
- void (*flush_user_range)(unsigned long, unsigned long, struct vm_area_struct *);
- void (*flush_kern_range)(unsigned long, unsigned long);
- unsigned long tlb_flags;
-};
-
-/*
- * Select the calling method
- */
-#ifdef MULTI_TLB
-
-#define __cpu_flush_user_tlb_range cpu_tlb.flush_user_range
-#define __cpu_flush_kern_tlb_range cpu_tlb.flush_kern_range
-
-#else
-
-#define __cpu_flush_user_tlb_range __glue(_TLB,_flush_user_tlb_range)
-#define __cpu_flush_kern_tlb_range __glue(_TLB,_flush_kern_tlb_range)
-
-extern void __cpu_flush_user_tlb_range(unsigned long, unsigned long, struct vm_area_struct *);
-extern void __cpu_flush_kern_tlb_range(unsigned long, unsigned long);
-
-#endif
-
-extern struct cpu_tlb_fns cpu_tlb;
-
-#define __cpu_tlb_flags cpu_tlb.tlb_flags
-
-/*
- * TLB Management
- * ==============
- *
- * The arch/arm/mm/tlb-*.S files implement these methods.
- *
- * The TLB specific code is expected to perform whatever tests it
- * needs to determine if it should invalidate the TLB for each
- * call. Start addresses are inclusive and end addresses are
- * exclusive; it is safe to round these addresses down.
- *
- * flush_tlb_all()
- *
- * Invalidate the entire TLB.
- *
- * flush_tlb_mm(mm)
- *
- * Invalidate all TLB entries in a particular address
- * space.
- * - mm - mm_struct describing address space
- *
- * flush_tlb_range(mm,start,end)
- *
- * Invalidate a range of TLB entries in the specified
- * address space.
- * - mm - mm_struct describing address space
- * - start - start address (may not be aligned)
- * - end - end address (exclusive, may not be aligned)
- *
- * flush_tlb_page(vaddr,vma)
- *
- * Invalidate the specified page in the specified address range.
- * - vaddr - virtual address (may not be aligned)
- * - vma - vma_struct describing address range
- *
- * flush_kern_tlb_page(kaddr)
- *
- * Invalidate the TLB entry for the specified page. The address
- * will be in the kernels virtual memory space. Current uses
- * only require the D-TLB to be invalidated.
- * - kaddr - Kernel virtual memory address
- */
-
-/*
- * We optimise the code below by:
- * - building a set of TLB flags that might be set in __cpu_tlb_flags
- * - building a set of TLB flags that will always be set in __cpu_tlb_flags
- * - if we're going to need __cpu_tlb_flags, access it once and only once
- *
- * This allows us to build optimal assembly for the single-CPU type case,
- * and as close to optimal given the compiler constrants for multi-CPU
- * case. We could do better for the multi-CPU case if the compiler
- * implemented the "%?" method, but this has been discontinued due to too
- * many people getting it wrong.
- */
-#define possible_tlb_flags (v3_possible_flags | \
- v4_possible_flags | \
- v4wbi_possible_flags | \
- v4wb_possible_flags | \
- v6wbi_possible_flags)
-
-#define always_tlb_flags (v3_always_flags & \
- v4_always_flags & \
- v4wbi_always_flags & \
- v4wb_always_flags & \
- v6wbi_always_flags)
-
-#define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f)))
-
-static inline void local_flush_tlb_all(void)
-{
- const int zero = 0;
- const unsigned int __tlb_flag = __cpu_tlb_flags;
-
- if (tlb_flag(TLB_WB))
- asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
-
- if (tlb_flag(TLB_V3_FULL))
- asm("mcr%? p15, 0, %0, c6, c0, 0" : : "r" (zero));
- if (tlb_flag(TLB_V4_U_FULL | TLB_V6_U_FULL))
- asm("mcr%? p15, 0, %0, c8, c7, 0" : : "r" (zero));
- if (tlb_flag(TLB_V4_D_FULL | TLB_V6_D_FULL))
- asm("mcr%? p15, 0, %0, c8, c6, 0" : : "r" (zero));
- if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL))
- asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));
-}
-
-static inline void local_flush_tlb_mm(struct mm_struct *mm)
-{
- const int zero = 0;
- const int asid = ASID(mm);
- const unsigned int __tlb_flag = __cpu_tlb_flags;
-
- if (tlb_flag(TLB_WB))
- asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
-
- if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) {
- if (tlb_flag(TLB_V3_FULL))
- asm("mcr%? p15, 0, %0, c6, c0, 0" : : "r" (zero));
- if (tlb_flag(TLB_V4_U_FULL))
- asm("mcr%? p15, 0, %0, c8, c7, 0" : : "r" (zero));
- if (tlb_flag(TLB_V4_D_FULL))
- asm("mcr%? p15, 0, %0, c8, c6, 0" : : "r" (zero));
- if (tlb_flag(TLB_V4_I_FULL))
- asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));
- }
-
- if (tlb_flag(TLB_V6_U_ASID))
- asm("mcr%? p15, 0, %0, c8, c7, 2" : : "r" (asid));
- if (tlb_flag(TLB_V6_D_ASID))
- asm("mcr%? p15, 0, %0, c8, c6, 2" : : "r" (asid));
- if (tlb_flag(TLB_V6_I_ASID))
- asm("mcr%? p15, 0, %0, c8, c5, 2" : : "r" (asid));
-}
-
-static inline void
-local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
-{
- const int zero = 0;
- const unsigned int __tlb_flag = __cpu_tlb_flags;
-
- uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm);
-
- if (tlb_flag(TLB_WB))
- asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
-
- if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
- if (tlb_flag(TLB_V3_PAGE))
- asm("mcr%? p15, 0, %0, c6, c0, 0" : : "r" (uaddr));
- if (tlb_flag(TLB_V4_U_PAGE))
- asm("mcr%? p15, 0, %0, c8, c7, 1" : : "r" (uaddr));
- if (tlb_flag(TLB_V4_D_PAGE))
- asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (uaddr));
- if (tlb_flag(TLB_V4_I_PAGE))
- asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr));
- if (!tlb_flag(TLB_V4_I_PAGE) && tlb_flag(TLB_V4_I_FULL))
- asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));
- }
-
- if (tlb_flag(TLB_V6_U_PAGE))
- asm("mcr%? p15, 0, %0, c8, c7, 1" : : "r" (uaddr));
- if (tlb_flag(TLB_V6_D_PAGE))
- asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (uaddr));
- if (tlb_flag(TLB_V6_I_PAGE))
- asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr));
-}
-
-static inline void local_flush_tlb_kernel_page(unsigned long kaddr)
-{
- const int zero = 0;
- const unsigned int __tlb_flag = __cpu_tlb_flags;
-
- kaddr &= PAGE_MASK;
-
- if (tlb_flag(TLB_WB))
- asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
-
- if (tlb_flag(TLB_V3_PAGE))
- asm("mcr%? p15, 0, %0, c6, c0, 0" : : "r" (kaddr));
- if (tlb_flag(TLB_V4_U_PAGE))
- asm("mcr%? p15, 0, %0, c8, c7, 1" : : "r" (kaddr));
- if (tlb_flag(TLB_V4_D_PAGE))
- asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr));
- if (tlb_flag(TLB_V4_I_PAGE))
- asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr));
- if (!tlb_flag(TLB_V4_I_PAGE) && tlb_flag(TLB_V4_I_FULL))
- asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero));
-
- if (tlb_flag(TLB_V6_U_PAGE))
- asm("mcr%? p15, 0, %0, c8, c7, 1" : : "r" (kaddr));
- if (tlb_flag(TLB_V6_D_PAGE))
- asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr));
- if (tlb_flag(TLB_V6_I_PAGE))
- asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr));
-
- /* The ARM ARM states that the completion of a TLB maintenance
- * operation is only guaranteed by a DSB instruction
- */
- if (tlb_flag(TLB_V6_U_PAGE | TLB_V6_D_PAGE | TLB_V6_I_PAGE))
- asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero));
-}
-
-/*
- * flush_pmd_entry
- *
- * Flush a PMD entry (word aligned, or double-word aligned) to
- * RAM if the TLB for the CPU we are running on requires this.
- * This is typically used when we are creating PMD entries.
- *
- * clean_pmd_entry
- *
- * Clean (but don't drain the write buffer) if the CPU requires
- * these operations. This is typically used when we are removing
- * PMD entries.
- */
-static inline void flush_pmd_entry(pmd_t *pmd)
-{
- const unsigned int zero = 0;
- const unsigned int __tlb_flag = __cpu_tlb_flags;
-
- if (tlb_flag(TLB_DCLEAN))
- asm("mcr%? p15, 0, %0, c7, c10, 1 @ flush_pmd"
- : : "r" (pmd));
- if (tlb_flag(TLB_WB))
- asm("mcr%? p15, 0, %0, c7, c10, 4 @ flush_pmd"
- : : "r" (zero));
-}
-
-static inline void clean_pmd_entry(pmd_t *pmd)
-{
- const unsigned int __tlb_flag = __cpu_tlb_flags;
-
- if (tlb_flag(TLB_DCLEAN))
- asm("mcr%? p15, 0, %0, c7, c10, 1 @ flush_pmd"
- : : "r" (pmd));
-}
-
-#undef tlb_flag
-#undef always_tlb_flags
-#undef possible_tlb_flags
-
-/*
- * Convert calls to our calling convention.
- */
-#define local_flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma)
-#define local_flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e)
-
-#ifndef CONFIG_SMP
-#define flush_tlb_all local_flush_tlb_all
-#define flush_tlb_mm local_flush_tlb_mm
-#define flush_tlb_page local_flush_tlb_page
-#define flush_tlb_kernel_page local_flush_tlb_kernel_page
-#define flush_tlb_range local_flush_tlb_range
-#define flush_tlb_kernel_range local_flush_tlb_kernel_range
-#else
-extern void flush_tlb_all(void);
-extern void flush_tlb_mm(struct mm_struct *mm);
-extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr);
-extern void flush_tlb_kernel_page(unsigned long kaddr);
-extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
-extern void flush_tlb_kernel_range(unsigned long start, unsigned long end);
-#endif
-
-/*
- * if PG_dcache_dirty is set for the page, we need to ensure that any
- * cache entries for the kernels virtual memory range are written
- * back to the page.
- */
-extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte);
-
-/*
- * ARM processors do not cache TLB tables in RAM.
- */
-#define flush_tlb_pgtables(mm,start,end) do { } while (0)
-
-#endif
-
-#endif /* CONFIG_MMU */
-
-#endif
diff --git a/original/asm-arm/topology.h b/original/asm-arm/topology.h
deleted file mode 100644
index accbd7c..0000000
--- a/original/asm-arm/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _ASM_ARM_TOPOLOGY_H
-#define _ASM_ARM_TOPOLOGY_H
-
-#include <asm-generic/topology.h>
-
-#endif /* _ASM_ARM_TOPOLOGY_H */
diff --git a/original/asm-arm/types.h b/original/asm-arm/types.h
deleted file mode 100644
index 5077114..0000000
--- a/original/asm-arm/types.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef __ASM_ARM_TYPES_H
-#define __ASM_ARM_TYPES_H
-
-#ifndef __ASSEMBLY__
-
-typedef unsigned short umode_t;
-
-/*
- * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
- * header files exported to user space
- */
-
-typedef __signed__ char __s8;
-typedef unsigned char __u8;
-
-typedef __signed__ short __s16;
-typedef unsigned short __u16;
-
-typedef __signed__ int __s32;
-typedef unsigned int __u32;
-
-#if defined(__GNUC__)
-typedef __signed__ long long __s64;
-typedef unsigned long long __u64;
-#endif
-
-#endif /* __ASSEMBLY__ */
-
-/*
- * These aren't exported outside the kernel to avoid name space clashes
- */
-#ifdef __KERNEL__
-
-#define BITS_PER_LONG 32
-
-#ifndef __ASSEMBLY__
-
-typedef signed char s8;
-typedef unsigned char u8;
-
-typedef signed short s16;
-typedef unsigned short u16;
-
-typedef signed int s32;
-typedef unsigned int u32;
-
-typedef signed long long s64;
-typedef unsigned long long u64;
-
-/* Dma addresses are 32-bits wide. */
-
-typedef u32 dma_addr_t;
-typedef u32 dma64_addr_t;
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __KERNEL__ */
-
-#endif
-
diff --git a/original/asm-arm/uaccess.h b/original/asm-arm/uaccess.h
deleted file mode 100644
index 87aba57..0000000
--- a/original/asm-arm/uaccess.h
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * linux/include/asm-arm/uaccess.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.
- */
-#ifndef _ASMARM_UACCESS_H
-#define _ASMARM_UACCESS_H
-
-/*
- * User space memory access functions
- */
-#include <linux/sched.h>
-#include <asm/errno.h>
-#include <asm/memory.h>
-#include <asm/domain.h>
-#include <asm/system.h>
-
-#define VERIFY_READ 0
-#define VERIFY_WRITE 1
-
-/*
- * The exception table consists of pairs of addresses: the first is the
- * address of an instruction that is allowed to fault, and the second is
- * the address at which the program should continue. No registers are
- * modified, so it is entirely up to the continuation code to figure out
- * what to do.
- *
- * All the routines below use bits of fixup code that are out of line
- * with the main instruction path. This means when everything is well,
- * we don't even have to jump over them. Further, they do not intrude
- * on our cache or tlb entries.
- */
-
-struct exception_table_entry
-{
- unsigned long insn, fixup;
-};
-
-extern int fixup_exception(struct pt_regs *regs);
-
-/*
- * These two are intentionally not defined anywhere - if the kernel
- * code generates any references to them, that's a bug.
- */
-extern int __get_user_bad(void);
-extern int __put_user_bad(void);
-
-/*
- * Note that this is actually 0x1,0000,0000
- */
-#define KERNEL_DS 0x00000000
-#define get_ds() (KERNEL_DS)
-
-#ifdef CONFIG_MMU
-
-#define USER_DS TASK_SIZE
-#define get_fs() (current_thread_info()->addr_limit)
-
-static inline void set_fs(mm_segment_t fs)
-{
- current_thread_info()->addr_limit = fs;
- modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER);
-}
-
-#define segment_eq(a,b) ((a) == (b))
-
-#define __addr_ok(addr) ({ \
- unsigned long flag; \
- __asm__("cmp %2, %0; movlo %0, #0" \
- : "=&r" (flag) \
- : "0" (current_thread_info()->addr_limit), "r" (addr) \
- : "cc"); \
- (flag == 0); })
-
-/* We use 33-bit arithmetic here... */
-#define __range_ok(addr,size) ({ \
- unsigned long flag, sum; \
- __chk_user_ptr(addr); \
- __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
- : "=&r" (flag), "=&r" (sum) \
- : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
- : "cc"); \
- flag; })
-
-/*
- * Single-value transfer routines. They automatically use the right
- * size if we just have the right pointer type. Note that the functions
- * which read from user space (*get_*) need to take care not to leak
- * kernel data even if the calling code is buggy and fails to check
- * the return value. This means zeroing out the destination variable
- * or buffer on error. Normally this is done out of line by the
- * fixup code, but there are a few places where it intrudes on the
- * main code path. When we only write to user space, there is no
- * problem.
- */
-extern int __get_user_1(void *);
-extern int __get_user_2(void *);
-extern int __get_user_4(void *);
-
-#define __get_user_x(__r2,__p,__e,__s,__i...) \
- __asm__ __volatile__ ( \
- __asmeq("%0", "r0") __asmeq("%1", "r2") \
- "bl __get_user_" #__s \
- : "=&r" (__e), "=r" (__r2) \
- : "0" (__p) \
- : __i, "cc")
-
-#define get_user(x,p) \
- ({ \
- const register typeof(*(p)) __user *__p asm("r0") = (p);\
- register unsigned int __r2 asm("r2"); \
- register int __e asm("r0"); \
- switch (sizeof(*(__p))) { \
- case 1: \
- __get_user_x(__r2, __p, __e, 1, "lr"); \
- break; \
- case 2: \
- __get_user_x(__r2, __p, __e, 2, "r3", "lr"); \
- break; \
- case 4: \
- __get_user_x(__r2, __p, __e, 4, "lr"); \
- break; \
- default: __e = __get_user_bad(); break; \
- } \
- x = (typeof(*(p))) __r2; \
- __e; \
- })
-
-extern int __put_user_1(void *, unsigned int);
-extern int __put_user_2(void *, unsigned int);
-extern int __put_user_4(void *, unsigned int);
-extern int __put_user_8(void *, unsigned long long);
-
-#define __put_user_x(__r2,__p,__e,__s) \
- __asm__ __volatile__ ( \
- __asmeq("%0", "r0") __asmeq("%2", "r2") \
- "bl __put_user_" #__s \
- : "=&r" (__e) \
- : "0" (__p), "r" (__r2) \
- : "ip", "lr", "cc")
-
-#define put_user(x,p) \
- ({ \
- const register typeof(*(p)) __r2 asm("r2") = (x); \
- const register typeof(*(p)) __user *__p asm("r0") = (p);\
- register int __e asm("r0"); \
- switch (sizeof(*(__p))) { \
- case 1: \
- __put_user_x(__r2, __p, __e, 1); \
- break; \
- case 2: \
- __put_user_x(__r2, __p, __e, 2); \
- break; \
- case 4: \
- __put_user_x(__r2, __p, __e, 4); \
- break; \
- case 8: \
- __put_user_x(__r2, __p, __e, 8); \
- break; \
- default: __e = __put_user_bad(); break; \
- } \
- __e; \
- })
-
-#else /* CONFIG_MMU */
-
-/*
- * uClinux has only one addr space, so has simplified address limits.
- */
-#define USER_DS KERNEL_DS
-
-#define segment_eq(a,b) (1)
-#define __addr_ok(addr) (1)
-#define __range_ok(addr,size) (0)
-#define get_fs() (KERNEL_DS)
-
-static inline void set_fs(mm_segment_t fs)
-{
-}
-
-#define get_user(x,p) __get_user(x,p)
-#define put_user(x,p) __put_user(x,p)
-
-#endif /* CONFIG_MMU */
-
-#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
-
-/*
- * The "__xxx" versions of the user access functions do not verify the
- * address space - it must have been done previously with a separate
- * "access_ok()" call.
- *
- * The "xxx_error" versions set the third argument to EFAULT if an
- * error occurs, and leave it unchanged on success. Note that these
- * versions are void (ie, don't return a value as such).
- */
-#define __get_user(x,ptr) \
-({ \
- long __gu_err = 0; \
- __get_user_err((x),(ptr),__gu_err); \
- __gu_err; \
-})
-
-#define __get_user_error(x,ptr,err) \
-({ \
- __get_user_err((x),(ptr),err); \
- (void) 0; \
-})
-
-#define __get_user_err(x,ptr,err) \
-do { \
- unsigned long __gu_addr = (unsigned long)(ptr); \
- unsigned long __gu_val; \
- __chk_user_ptr(ptr); \
- switch (sizeof(*(ptr))) { \
- case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \
- case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \
- case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; \
- default: (__gu_val) = __get_user_bad(); \
- } \
- (x) = (__typeof__(*(ptr)))__gu_val; \
-} while (0)
-
-#define __get_user_asm_byte(x,addr,err) \
- __asm__ __volatile__( \
- "1: ldrbt %1,[%2],#0\n" \
- "2:\n" \
- " .section .fixup,\"ax\"\n" \
- " .align 2\n" \
- "3: mov %0, %3\n" \
- " mov %1, #0\n" \
- " b 2b\n" \
- " .previous\n" \
- " .section __ex_table,\"a\"\n" \
- " .align 3\n" \
- " .long 1b, 3b\n" \
- " .previous" \
- : "+r" (err), "=&r" (x) \
- : "r" (addr), "i" (-EFAULT) \
- : "cc")
-
-#ifndef __ARMEB__
-#define __get_user_asm_half(x,__gu_addr,err) \
-({ \
- unsigned long __b1, __b2; \
- __get_user_asm_byte(__b1, __gu_addr, err); \
- __get_user_asm_byte(__b2, __gu_addr + 1, err); \
- (x) = __b1 | (__b2 << 8); \
-})
-#else
-#define __get_user_asm_half(x,__gu_addr,err) \
-({ \
- unsigned long __b1, __b2; \
- __get_user_asm_byte(__b1, __gu_addr, err); \
- __get_user_asm_byte(__b2, __gu_addr + 1, err); \
- (x) = (__b1 << 8) | __b2; \
-})
-#endif
-
-#define __get_user_asm_word(x,addr,err) \
- __asm__ __volatile__( \
- "1: ldrt %1,[%2],#0\n" \
- "2:\n" \
- " .section .fixup,\"ax\"\n" \
- " .align 2\n" \
- "3: mov %0, %3\n" \
- " mov %1, #0\n" \
- " b 2b\n" \
- " .previous\n" \
- " .section __ex_table,\"a\"\n" \
- " .align 3\n" \
- " .long 1b, 3b\n" \
- " .previous" \
- : "+r" (err), "=&r" (x) \
- : "r" (addr), "i" (-EFAULT) \
- : "cc")
-
-#define __put_user(x,ptr) \
-({ \
- long __pu_err = 0; \
- __put_user_err((x),(ptr),__pu_err); \
- __pu_err; \
-})
-
-#define __put_user_error(x,ptr,err) \
-({ \
- __put_user_err((x),(ptr),err); \
- (void) 0; \
-})
-
-#define __put_user_err(x,ptr,err) \
-do { \
- unsigned long __pu_addr = (unsigned long)(ptr); \
- __typeof__(*(ptr)) __pu_val = (x); \
- __chk_user_ptr(ptr); \
- switch (sizeof(*(ptr))) { \
- case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \
- case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \
- case 4: __put_user_asm_word(__pu_val,__pu_addr,err); break; \
- case 8: __put_user_asm_dword(__pu_val,__pu_addr,err); break; \
- default: __put_user_bad(); \
- } \
-} while (0)
-
-#define __put_user_asm_byte(x,__pu_addr,err) \
- __asm__ __volatile__( \
- "1: strbt %1,[%2],#0\n" \
- "2:\n" \
- " .section .fixup,\"ax\"\n" \
- " .align 2\n" \
- "3: mov %0, %3\n" \
- " b 2b\n" \
- " .previous\n" \
- " .section __ex_table,\"a\"\n" \
- " .align 3\n" \
- " .long 1b, 3b\n" \
- " .previous" \
- : "+r" (err) \
- : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \
- : "cc")
-
-#ifndef __ARMEB__
-#define __put_user_asm_half(x,__pu_addr,err) \
-({ \
- unsigned long __temp = (unsigned long)(x); \
- __put_user_asm_byte(__temp, __pu_addr, err); \
- __put_user_asm_byte(__temp >> 8, __pu_addr + 1, err); \
-})
-#else
-#define __put_user_asm_half(x,__pu_addr,err) \
-({ \
- unsigned long __temp = (unsigned long)(x); \
- __put_user_asm_byte(__temp >> 8, __pu_addr, err); \
- __put_user_asm_byte(__temp, __pu_addr + 1, err); \
-})
-#endif
-
-#define __put_user_asm_word(x,__pu_addr,err) \
- __asm__ __volatile__( \
- "1: strt %1,[%2],#0\n" \
- "2:\n" \
- " .section .fixup,\"ax\"\n" \
- " .align 2\n" \
- "3: mov %0, %3\n" \
- " b 2b\n" \
- " .previous\n" \
- " .section __ex_table,\"a\"\n" \
- " .align 3\n" \
- " .long 1b, 3b\n" \
- " .previous" \
- : "+r" (err) \
- : "r" (x), "r" (__pu_addr), "i" (-EFAULT) \
- : "cc")
-
-#ifndef __ARMEB__
-#define __reg_oper0 "%R2"
-#define __reg_oper1 "%Q2"
-#else
-#define __reg_oper0 "%Q2"
-#define __reg_oper1 "%R2"
-#endif
-
-#define __put_user_asm_dword(x,__pu_addr,err) \
- __asm__ __volatile__( \
- "1: strt " __reg_oper1 ", [%1], #4\n" \
- "2: strt " __reg_oper0 ", [%1], #0\n" \
- "3:\n" \
- " .section .fixup,\"ax\"\n" \
- " .align 2\n" \
- "4: mov %0, %3\n" \
- " b 3b\n" \
- " .previous\n" \
- " .section __ex_table,\"a\"\n" \
- " .align 3\n" \
- " .long 1b, 4b\n" \
- " .long 2b, 4b\n" \
- " .previous" \
- : "+r" (err), "+r" (__pu_addr) \
- : "r" (x), "i" (-EFAULT) \
- : "cc")
-
-
-#ifdef CONFIG_MMU
-extern unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n);
-extern unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n);
-extern unsigned long __clear_user(void __user *addr, unsigned long n);
-#else
-#define __copy_from_user(to,from,n) (memcpy(to, (void __force *)from, n), 0)
-#define __copy_to_user(to,from,n) (memcpy((void __force *)to, from, n), 0)
-#define __clear_user(addr,n) (memset((void __force *)addr, 0, n), 0)
-#endif
-
-extern unsigned long __strncpy_from_user(char *to, const char __user *from, unsigned long count);
-extern unsigned long __strnlen_user(const char __user *s, long n);
-
-static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
-{
- if (access_ok(VERIFY_READ, from, n))
- n = __copy_from_user(to, from, n);
- else /* security hole - plug it */
- memzero(to, n);
- return n;
-}
-
-static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
-{
- if (access_ok(VERIFY_WRITE, to, n))
- n = __copy_to_user(to, from, n);
- return n;
-}
-
-#define __copy_to_user_inatomic __copy_to_user
-#define __copy_from_user_inatomic __copy_from_user
-
-static inline unsigned long clear_user(void __user *to, unsigned long n)
-{
- if (access_ok(VERIFY_WRITE, to, n))
- n = __clear_user(to, n);
- return n;
-}
-
-static inline long strncpy_from_user(char *dst, const char __user *src, long count)
-{
- long res = -EFAULT;
- if (access_ok(VERIFY_READ, src, 1))
- res = __strncpy_from_user(dst, src, count);
- return res;
-}
-
-#define strlen_user(s) strnlen_user(s, ~0UL >> 1)
-
-static inline long strnlen_user(const char __user *s, long n)
-{
- unsigned long res = 0;
-
- if (__addr_ok(s))
- res = __strnlen_user(s, n);
-
- return res;
-}
-
-#endif /* _ASMARM_UACCESS_H */
diff --git a/original/asm-arm/ucontext.h b/original/asm-arm/ucontext.h
deleted file mode 100644
index 14749ae..0000000
--- a/original/asm-arm/ucontext.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef _ASMARM_UCONTEXT_H
-#define _ASMARM_UCONTEXT_H
-
-#include <asm/fpstate.h>
-
-/*
- * struct sigcontext only has room for the basic registers, but struct
- * ucontext now has room for all registers which need to be saved and
- * restored. Coprocessor registers are stored in uc_regspace. Each
- * coprocessor's saved state should start with a documented 32-bit magic
- * number, followed by a 32-bit word giving the coproccesor's saved size.
- * uc_regspace may be expanded if necessary, although this takes some
- * coordination with glibc.
- */
-
-struct ucontext {
- unsigned long uc_flags;
- struct ucontext *uc_link;
- stack_t uc_stack;
- struct sigcontext uc_mcontext;
- sigset_t uc_sigmask;
- /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
- int __unused[32 - (sizeof (sigset_t) / sizeof (int))];
- /* Last for extensibility. Eight byte aligned because some
- coprocessors require eight byte alignment. */
- unsigned long uc_regspace[128] __attribute__((__aligned__(8)));
-};
-
-#ifdef __KERNEL__
-
-/*
- * Coprocessor save state. The magic values and specific
- * coprocessor's layouts are part of the userspace ABI. Each one of
- * these should be a multiple of eight bytes and aligned to eight
- * bytes, to prevent unpredictable padding in the signal frame.
- */
-
-#ifdef CONFIG_CRUNCH
-#define CRUNCH_MAGIC 0x5065cf03
-#define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8)
-
-struct crunch_sigframe {
- unsigned long magic;
- unsigned long size;
- struct crunch_state storage;
-} __attribute__((__aligned__(8)));
-#endif
-
-#ifdef CONFIG_IWMMXT
-/* iwmmxt_area is 0x98 bytes long, preceded by 8 bytes of signature */
-#define IWMMXT_MAGIC 0x12ef842a
-#define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8)
-
-struct iwmmxt_sigframe {
- unsigned long magic;
- unsigned long size;
- struct iwmmxt_struct storage;
-} __attribute__((__aligned__(8)));
-#endif /* CONFIG_IWMMXT */
-
-#ifdef CONFIG_VFP
-#define VFP_MAGIC 0x56465001
-
-struct vfp_sigframe
-{
- unsigned long magic;
- unsigned long size;
- struct user_vfp ufp;
- struct user_vfp_exc ufp_exc;
-} __attribute__((__aligned__(8)));
-
-/*
- * 8 byte for magic and size, 264 byte for ufp, 12 bytes for ufp_exc,
- * 4 bytes padding.
- */
-#define VFP_STORAGE_SIZE sizeof(struct vfp_sigframe)
-
-#endif /* CONFIG_VFP */
-
-/*
- * Auxiliary signal frame. This saves stuff like FP state.
- * The layout of this structure is not part of the user ABI,
- * because the config options aren't. uc_regspace is really
- * one of these.
- */
-struct aux_sigframe {
-#ifdef CONFIG_CRUNCH
- struct crunch_sigframe crunch;
-#endif
-#ifdef CONFIG_IWMMXT
- struct iwmmxt_sigframe iwmmxt;
-#endif
-#ifdef CONFIG_VFP
- struct vfp_sigframe vfp;
-#endif
- /* Something that isn't a valid magic number for any coprocessor. */
- unsigned long end_magic;
-} __attribute__((__aligned__(8)));
-
-#endif
-
-#endif /* !_ASMARM_UCONTEXT_H */
diff --git a/original/asm-arm/unaligned.h b/original/asm-arm/unaligned.h
deleted file mode 100644
index 1b39c2f..0000000
--- a/original/asm-arm/unaligned.h
+++ /dev/null
@@ -1,191 +0,0 @@
-#ifndef __ASM_ARM_UNALIGNED_H
-#define __ASM_ARM_UNALIGNED_H
-
-#include <asm/types.h>
-
-extern int __bug_unaligned_x(void *ptr);
-
-/*
- * What is the most efficient way of loading/storing an unaligned value?
- *
- * That is the subject of this file. Efficiency here is defined as
- * minimum code size with minimum register usage for the common cases.
- * It is currently not believed that long longs are common, so we
- * trade efficiency for the chars, shorts and longs against the long
- * longs.
- *
- * Current stats with gcc 2.7.2.2 for these functions:
- *
- * ptrsize get: code regs put: code regs
- * 1 1 1 1 2
- * 2 3 2 3 2
- * 4 7 3 7 3
- * 8 20 6 16 6
- *
- * gcc 2.95.1 seems to code differently:
- *
- * ptrsize get: code regs put: code regs
- * 1 1 1 1 2
- * 2 3 2 3 2
- * 4 7 4 7 4
- * 8 19 8 15 6
- *
- * which may or may not be more efficient (depending upon whether
- * you can afford the extra registers). Hopefully the gcc 2.95
- * is inteligent enough to decide if it is better to use the
- * extra register, but evidence so far seems to suggest otherwise.
- *
- * Unfortunately, gcc is not able to optimise the high word
- * out of long long >> 32, or the low word from long long << 32
- */
-
-#define __get_unaligned_2_le(__p) \
- (__p[0] | __p[1] << 8)
-
-#define __get_unaligned_2_be(__p) \
- (__p[0] << 8 | __p[1])
-
-#define __get_unaligned_4_le(__p) \
- (__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24)
-
-#define __get_unaligned_4_be(__p) \
- (__p[0] << 24 | __p[1] << 16 | __p[2] << 8 | __p[3])
-
-#define __get_unaligned_le(ptr) \
- ({ \
- __typeof__(*(ptr)) __v; \
- __u8 *__p = (__u8 *)(ptr); \
- switch (sizeof(*(ptr))) { \
- case 1: __v = *(ptr); break; \
- case 2: __v = __get_unaligned_2_le(__p); break; \
- case 4: __v = __get_unaligned_4_le(__p); break; \
- case 8: { \
- unsigned int __v1, __v2; \
- __v2 = __get_unaligned_4_le((__p+4)); \
- __v1 = __get_unaligned_4_le(__p); \
- __v = ((unsigned long long)__v2 << 32 | __v1); \
- } \
- break; \
- default: __v = __bug_unaligned_x(__p); break; \
- } \
- __v; \
- })
-
-#define __get_unaligned_be(ptr) \
- ({ \
- __typeof__(*(ptr)) __v; \
- __u8 *__p = (__u8 *)(ptr); \
- switch (sizeof(*(ptr))) { \
- case 1: __v = *(ptr); break; \
- case 2: __v = __get_unaligned_2_be(__p); break; \
- case 4: __v = __get_unaligned_4_be(__p); break; \
- case 8: { \
- unsigned int __v1, __v2; \
- __v2 = __get_unaligned_4_be(__p); \
- __v1 = __get_unaligned_4_be((__p+4)); \
- __v = ((unsigned long long)__v2 << 32 | __v1); \
- } \
- break; \
- default: __v = __bug_unaligned_x(__p); break; \
- } \
- __v; \
- })
-
-
-static inline void __put_unaligned_2_le(__u32 __v, register __u8 *__p)
-{
- *__p++ = __v;
- *__p++ = __v >> 8;
-}
-
-static inline void __put_unaligned_2_be(__u32 __v, register __u8 *__p)
-{
- *__p++ = __v >> 8;
- *__p++ = __v;
-}
-
-static inline void __put_unaligned_4_le(__u32 __v, register __u8 *__p)
-{
- __put_unaligned_2_le(__v >> 16, __p + 2);
- __put_unaligned_2_le(__v, __p);
-}
-
-static inline void __put_unaligned_4_be(__u32 __v, register __u8 *__p)
-{
- __put_unaligned_2_be(__v >> 16, __p);
- __put_unaligned_2_be(__v, __p + 2);
-}
-
-static inline void __put_unaligned_8_le(const unsigned long long __v, register __u8 *__p)
-{
- /*
- * tradeoff: 8 bytes of stack for all unaligned puts (2
- * instructions), or an extra register in the long long
- * case - go for the extra register.
- */
- __put_unaligned_4_le(__v >> 32, __p+4);
- __put_unaligned_4_le(__v, __p);
-}
-
-static inline void __put_unaligned_8_be(const unsigned long long __v, register __u8 *__p)
-{
- /*
- * tradeoff: 8 bytes of stack for all unaligned puts (2
- * instructions), or an extra register in the long long
- * case - go for the extra register.
- */
- __put_unaligned_4_be(__v >> 32, __p);
- __put_unaligned_4_be(__v, __p+4);
-}
-
-/*
- * Try to store an unaligned value as efficiently as possible.
- */
-#define __put_unaligned_le(val,ptr) \
- ({ \
- switch (sizeof(*(ptr))) { \
- case 1: \
- *(ptr) = (val); \
- break; \
- case 2: __put_unaligned_2_le((val),(__u8 *)(ptr)); \
- break; \
- case 4: __put_unaligned_4_le((val),(__u8 *)(ptr)); \
- break; \
- case 8: __put_unaligned_8_le((val),(__u8 *)(ptr)); \
- break; \
- default: __bug_unaligned_x(ptr); \
- break; \
- } \
- (void) 0; \
- })
-
-#define __put_unaligned_be(val,ptr) \
- ({ \
- switch (sizeof(*(ptr))) { \
- case 1: \
- *(ptr) = (val); \
- break; \
- case 2: __put_unaligned_2_be((val),(__u8 *)(ptr)); \
- break; \
- case 4: __put_unaligned_4_be((val),(__u8 *)(ptr)); \
- break; \
- case 8: __put_unaligned_8_be((val),(__u8 *)(ptr)); \
- break; \
- default: __bug_unaligned_x(ptr); \
- break; \
- } \
- (void) 0; \
- })
-
-/*
- * Select endianness
- */
-#ifndef __ARMEB__
-#define get_unaligned __get_unaligned_le
-#define put_unaligned __put_unaligned_le
-#else
-#define get_unaligned __get_unaligned_be
-#define put_unaligned __put_unaligned_be
-#endif
-
-#endif
diff --git a/original/asm-arm/unistd.h b/original/asm-arm/unistd.h
deleted file mode 100644
index 512cd14..0000000
--- a/original/asm-arm/unistd.h
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- * arch/arm/include/asm/unistd.h
- *
- * Copyright (C) 2001-2005 Russell King
- *
- * 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.
- *
- * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
- * no matter what the change is. Thanks!
- */
-#ifndef __ASM_ARM_UNISTD_H
-#define __ASM_ARM_UNISTD_H
-
-#define __NR_OABI_SYSCALL_BASE 0x900000
-
-#if defined(__thumb__) || defined(__ARM_EABI__)
-#define __NR_SYSCALL_BASE 0
-#else
-#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
-#endif
-
-/*
- * This file contains the system call numbers.
- */
-
-#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0)
-#define __NR_exit (__NR_SYSCALL_BASE+ 1)
-#define __NR_fork (__NR_SYSCALL_BASE+ 2)
-#define __NR_read (__NR_SYSCALL_BASE+ 3)
-#define __NR_write (__NR_SYSCALL_BASE+ 4)
-#define __NR_open (__NR_SYSCALL_BASE+ 5)
-#define __NR_close (__NR_SYSCALL_BASE+ 6)
- /* 7 was sys_waitpid */
-#define __NR_creat (__NR_SYSCALL_BASE+ 8)
-#define __NR_link (__NR_SYSCALL_BASE+ 9)
-#define __NR_unlink (__NR_SYSCALL_BASE+ 10)
-#define __NR_execve (__NR_SYSCALL_BASE+ 11)
-#define __NR_chdir (__NR_SYSCALL_BASE+ 12)
-#define __NR_time (__NR_SYSCALL_BASE+ 13)
-#define __NR_mknod (__NR_SYSCALL_BASE+ 14)
-#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
-#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
- /* 17 was sys_break */
- /* 18 was sys_stat */
-#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
-#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
-#define __NR_mount (__NR_SYSCALL_BASE+ 21)
-#define __NR_umount (__NR_SYSCALL_BASE+ 22)
-#define __NR_setuid (__NR_SYSCALL_BASE+ 23)
-#define __NR_getuid (__NR_SYSCALL_BASE+ 24)
-#define __NR_stime (__NR_SYSCALL_BASE+ 25)
-#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
-#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
- /* 28 was sys_fstat */
-#define __NR_pause (__NR_SYSCALL_BASE+ 29)
-#define __NR_utime (__NR_SYSCALL_BASE+ 30)
- /* 31 was sys_stty */
- /* 32 was sys_gtty */
-#define __NR_access (__NR_SYSCALL_BASE+ 33)
-#define __NR_nice (__NR_SYSCALL_BASE+ 34)
- /* 35 was sys_ftime */
-#define __NR_sync (__NR_SYSCALL_BASE+ 36)
-#define __NR_kill (__NR_SYSCALL_BASE+ 37)
-#define __NR_rename (__NR_SYSCALL_BASE+ 38)
-#define __NR_mkdir (__NR_SYSCALL_BASE+ 39)
-#define __NR_rmdir (__NR_SYSCALL_BASE+ 40)
-#define __NR_dup (__NR_SYSCALL_BASE+ 41)
-#define __NR_pipe (__NR_SYSCALL_BASE+ 42)
-#define __NR_times (__NR_SYSCALL_BASE+ 43)
- /* 44 was sys_prof */
-#define __NR_brk (__NR_SYSCALL_BASE+ 45)
-#define __NR_setgid (__NR_SYSCALL_BASE+ 46)
-#define __NR_getgid (__NR_SYSCALL_BASE+ 47)
- /* 48 was sys_signal */
-#define __NR_geteuid (__NR_SYSCALL_BASE+ 49)
-#define __NR_getegid (__NR_SYSCALL_BASE+ 50)
-#define __NR_acct (__NR_SYSCALL_BASE+ 51)
-#define __NR_umount2 (__NR_SYSCALL_BASE+ 52)
- /* 53 was sys_lock */
-#define __NR_ioctl (__NR_SYSCALL_BASE+ 54)
-#define __NR_fcntl (__NR_SYSCALL_BASE+ 55)
- /* 56 was sys_mpx */
-#define __NR_setpgid (__NR_SYSCALL_BASE+ 57)
- /* 58 was sys_ulimit */
- /* 59 was sys_olduname */
-#define __NR_umask (__NR_SYSCALL_BASE+ 60)
-#define __NR_chroot (__NR_SYSCALL_BASE+ 61)
-#define __NR_ustat (__NR_SYSCALL_BASE+ 62)
-#define __NR_dup2 (__NR_SYSCALL_BASE+ 63)
-#define __NR_getppid (__NR_SYSCALL_BASE+ 64)
-#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65)
-#define __NR_setsid (__NR_SYSCALL_BASE+ 66)
-#define __NR_sigaction (__NR_SYSCALL_BASE+ 67)
- /* 68 was sys_sgetmask */
- /* 69 was sys_ssetmask */
-#define __NR_setreuid (__NR_SYSCALL_BASE+ 70)
-#define __NR_setregid (__NR_SYSCALL_BASE+ 71)
-#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72)
-#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
-#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
-#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
-#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */
-#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
-#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
-#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
-#define __NR_getgroups (__NR_SYSCALL_BASE+ 80)
-#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
-#define __NR_select (__NR_SYSCALL_BASE+ 82)
-#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
- /* 84 was sys_lstat */
-#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
-#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
-#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
-#define __NR_reboot (__NR_SYSCALL_BASE+ 88)
-#define __NR_readdir (__NR_SYSCALL_BASE+ 89)
-#define __NR_mmap (__NR_SYSCALL_BASE+ 90)
-#define __NR_munmap (__NR_SYSCALL_BASE+ 91)
-#define __NR_truncate (__NR_SYSCALL_BASE+ 92)
-#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93)
-#define __NR_fchmod (__NR_SYSCALL_BASE+ 94)
-#define __NR_fchown (__NR_SYSCALL_BASE+ 95)
-#define __NR_getpriority (__NR_SYSCALL_BASE+ 96)
-#define __NR_setpriority (__NR_SYSCALL_BASE+ 97)
- /* 98 was sys_profil */
-#define __NR_statfs (__NR_SYSCALL_BASE+ 99)
-#define __NR_fstatfs (__NR_SYSCALL_BASE+100)
- /* 101 was sys_ioperm */
-#define __NR_socketcall (__NR_SYSCALL_BASE+102)
-#define __NR_syslog (__NR_SYSCALL_BASE+103)
-#define __NR_setitimer (__NR_SYSCALL_BASE+104)
-#define __NR_getitimer (__NR_SYSCALL_BASE+105)
-#define __NR_stat (__NR_SYSCALL_BASE+106)
-#define __NR_lstat (__NR_SYSCALL_BASE+107)
-#define __NR_fstat (__NR_SYSCALL_BASE+108)
- /* 109 was sys_uname */
- /* 110 was sys_iopl */
-#define __NR_vhangup (__NR_SYSCALL_BASE+111)
- /* 112 was sys_idle */
-#define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */
-#define __NR_wait4 (__NR_SYSCALL_BASE+114)
-#define __NR_swapoff (__NR_SYSCALL_BASE+115)
-#define __NR_sysinfo (__NR_SYSCALL_BASE+116)
-#define __NR_ipc (__NR_SYSCALL_BASE+117)
-#define __NR_fsync (__NR_SYSCALL_BASE+118)
-#define __NR_sigreturn (__NR_SYSCALL_BASE+119)
-#define __NR_clone (__NR_SYSCALL_BASE+120)
-#define __NR_setdomainname (__NR_SYSCALL_BASE+121)
-#define __NR_uname (__NR_SYSCALL_BASE+122)
- /* 123 was sys_modify_ldt */
-#define __NR_adjtimex (__NR_SYSCALL_BASE+124)
-#define __NR_mprotect (__NR_SYSCALL_BASE+125)
-#define __NR_sigprocmask (__NR_SYSCALL_BASE+126)
- /* 127 was sys_create_module */
-#define __NR_init_module (__NR_SYSCALL_BASE+128)
-#define __NR_delete_module (__NR_SYSCALL_BASE+129)
- /* 130 was sys_get_kernel_syms */
-#define __NR_quotactl (__NR_SYSCALL_BASE+131)
-#define __NR_getpgid (__NR_SYSCALL_BASE+132)
-#define __NR_fchdir (__NR_SYSCALL_BASE+133)
-#define __NR_bdflush (__NR_SYSCALL_BASE+134)
-#define __NR_sysfs (__NR_SYSCALL_BASE+135)
-#define __NR_personality (__NR_SYSCALL_BASE+136)
- /* 137 was sys_afs_syscall */
-#define __NR_setfsuid (__NR_SYSCALL_BASE+138)
-#define __NR_setfsgid (__NR_SYSCALL_BASE+139)
-#define __NR__llseek (__NR_SYSCALL_BASE+140)
-#define __NR_getdents (__NR_SYSCALL_BASE+141)
-#define __NR__newselect (__NR_SYSCALL_BASE+142)
-#define __NR_flock (__NR_SYSCALL_BASE+143)
-#define __NR_msync (__NR_SYSCALL_BASE+144)
-#define __NR_readv (__NR_SYSCALL_BASE+145)
-#define __NR_writev (__NR_SYSCALL_BASE+146)
-#define __NR_getsid (__NR_SYSCALL_BASE+147)
-#define __NR_fdatasync (__NR_SYSCALL_BASE+148)
-#define __NR__sysctl (__NR_SYSCALL_BASE+149)
-#define __NR_mlock (__NR_SYSCALL_BASE+150)
-#define __NR_munlock (__NR_SYSCALL_BASE+151)
-#define __NR_mlockall (__NR_SYSCALL_BASE+152)
-#define __NR_munlockall (__NR_SYSCALL_BASE+153)
-#define __NR_sched_setparam (__NR_SYSCALL_BASE+154)
-#define __NR_sched_getparam (__NR_SYSCALL_BASE+155)
-#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156)
-#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157)
-#define __NR_sched_yield (__NR_SYSCALL_BASE+158)
-#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159)
-#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160)
-#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161)
-#define __NR_nanosleep (__NR_SYSCALL_BASE+162)
-#define __NR_mremap (__NR_SYSCALL_BASE+163)
-#define __NR_setresuid (__NR_SYSCALL_BASE+164)
-#define __NR_getresuid (__NR_SYSCALL_BASE+165)
- /* 166 was sys_vm86 */
- /* 167 was sys_query_module */
-#define __NR_poll (__NR_SYSCALL_BASE+168)
-#define __NR_nfsservctl (__NR_SYSCALL_BASE+169)
-#define __NR_setresgid (__NR_SYSCALL_BASE+170)
-#define __NR_getresgid (__NR_SYSCALL_BASE+171)
-#define __NR_prctl (__NR_SYSCALL_BASE+172)
-#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173)
-#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174)
-#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175)
-#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176)
-#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177)
-#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178)
-#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179)
-#define __NR_pread64 (__NR_SYSCALL_BASE+180)
-#define __NR_pwrite64 (__NR_SYSCALL_BASE+181)
-#define __NR_chown (__NR_SYSCALL_BASE+182)
-#define __NR_getcwd (__NR_SYSCALL_BASE+183)
-#define __NR_capget (__NR_SYSCALL_BASE+184)
-#define __NR_capset (__NR_SYSCALL_BASE+185)
-#define __NR_sigaltstack (__NR_SYSCALL_BASE+186)
-#define __NR_sendfile (__NR_SYSCALL_BASE+187)
- /* 188 reserved */
- /* 189 reserved */
-#define __NR_vfork (__NR_SYSCALL_BASE+190)
-#define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */
-#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
-#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
-#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
-#define __NR_stat64 (__NR_SYSCALL_BASE+195)
-#define __NR_lstat64 (__NR_SYSCALL_BASE+196)
-#define __NR_fstat64 (__NR_SYSCALL_BASE+197)
-#define __NR_lchown32 (__NR_SYSCALL_BASE+198)
-#define __NR_getuid32 (__NR_SYSCALL_BASE+199)
-#define __NR_getgid32 (__NR_SYSCALL_BASE+200)
-#define __NR_geteuid32 (__NR_SYSCALL_BASE+201)
-#define __NR_getegid32 (__NR_SYSCALL_BASE+202)
-#define __NR_setreuid32 (__NR_SYSCALL_BASE+203)
-#define __NR_setregid32 (__NR_SYSCALL_BASE+204)
-#define __NR_getgroups32 (__NR_SYSCALL_BASE+205)
-#define __NR_setgroups32 (__NR_SYSCALL_BASE+206)
-#define __NR_fchown32 (__NR_SYSCALL_BASE+207)
-#define __NR_setresuid32 (__NR_SYSCALL_BASE+208)
-#define __NR_getresuid32 (__NR_SYSCALL_BASE+209)
-#define __NR_setresgid32 (__NR_SYSCALL_BASE+210)
-#define __NR_getresgid32 (__NR_SYSCALL_BASE+211)
-#define __NR_chown32 (__NR_SYSCALL_BASE+212)
-#define __NR_setuid32 (__NR_SYSCALL_BASE+213)
-#define __NR_setgid32 (__NR_SYSCALL_BASE+214)
-#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215)
-#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216)
-#define __NR_getdents64 (__NR_SYSCALL_BASE+217)
-#define __NR_pivot_root (__NR_SYSCALL_BASE+218)
-#define __NR_mincore (__NR_SYSCALL_BASE+219)
-#define __NR_madvise (__NR_SYSCALL_BASE+220)
-#define __NR_fcntl64 (__NR_SYSCALL_BASE+221)
- /* 222 for tux */
- /* 223 is unused */
-#define __NR_gettid (__NR_SYSCALL_BASE+224)
-#define __NR_readahead (__NR_SYSCALL_BASE+225)
-#define __NR_setxattr (__NR_SYSCALL_BASE+226)
-#define __NR_lsetxattr (__NR_SYSCALL_BASE+227)
-#define __NR_fsetxattr (__NR_SYSCALL_BASE+228)
-#define __NR_getxattr (__NR_SYSCALL_BASE+229)
-#define __NR_lgetxattr (__NR_SYSCALL_BASE+230)
-#define __NR_fgetxattr (__NR_SYSCALL_BASE+231)
-#define __NR_listxattr (__NR_SYSCALL_BASE+232)
-#define __NR_llistxattr (__NR_SYSCALL_BASE+233)
-#define __NR_flistxattr (__NR_SYSCALL_BASE+234)
-#define __NR_removexattr (__NR_SYSCALL_BASE+235)
-#define __NR_lremovexattr (__NR_SYSCALL_BASE+236)
-#define __NR_fremovexattr (__NR_SYSCALL_BASE+237)
-#define __NR_tkill (__NR_SYSCALL_BASE+238)
-#define __NR_sendfile64 (__NR_SYSCALL_BASE+239)
-#define __NR_futex (__NR_SYSCALL_BASE+240)
-#define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241)
-#define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242)
-#define __NR_io_setup (__NR_SYSCALL_BASE+243)
-#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
-#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
-#define __NR_io_submit (__NR_SYSCALL_BASE+246)
-#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
-#define __NR_exit_group (__NR_SYSCALL_BASE+248)
-#define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249)
-#define __NR_epoll_create (__NR_SYSCALL_BASE+250)
-#define __NR_epoll_ctl (__NR_SYSCALL_BASE+251)
-#define __NR_epoll_wait (__NR_SYSCALL_BASE+252)
-#define __NR_remap_file_pages (__NR_SYSCALL_BASE+253)
- /* 254 for set_thread_area */
- /* 255 for get_thread_area */
-#define __NR_set_tid_address (__NR_SYSCALL_BASE+256)
-#define __NR_timer_create (__NR_SYSCALL_BASE+257)
-#define __NR_timer_settime (__NR_SYSCALL_BASE+258)
-#define __NR_timer_gettime (__NR_SYSCALL_BASE+259)
-#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260)
-#define __NR_timer_delete (__NR_SYSCALL_BASE+261)
-#define __NR_clock_settime (__NR_SYSCALL_BASE+262)
-#define __NR_clock_gettime (__NR_SYSCALL_BASE+263)
-#define __NR_clock_getres (__NR_SYSCALL_BASE+264)
-#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265)
-#define __NR_statfs64 (__NR_SYSCALL_BASE+266)
-#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267)
-#define __NR_tgkill (__NR_SYSCALL_BASE+268)
-#define __NR_utimes (__NR_SYSCALL_BASE+269)
-#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE+270)
-#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271)
-#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272)
-#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273)
-#define __NR_mq_open (__NR_SYSCALL_BASE+274)
-#define __NR_mq_unlink (__NR_SYSCALL_BASE+275)
-#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276)
-#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277)
-#define __NR_mq_notify (__NR_SYSCALL_BASE+278)
-#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279)
-#define __NR_waitid (__NR_SYSCALL_BASE+280)
-#define __NR_socket (__NR_SYSCALL_BASE+281)
-#define __NR_bind (__NR_SYSCALL_BASE+282)
-#define __NR_connect (__NR_SYSCALL_BASE+283)
-#define __NR_listen (__NR_SYSCALL_BASE+284)
-#define __NR_accept (__NR_SYSCALL_BASE+285)
-#define __NR_getsockname (__NR_SYSCALL_BASE+286)
-#define __NR_getpeername (__NR_SYSCALL_BASE+287)
-#define __NR_socketpair (__NR_SYSCALL_BASE+288)
-#define __NR_send (__NR_SYSCALL_BASE+289)
-#define __NR_sendto (__NR_SYSCALL_BASE+290)
-#define __NR_recv (__NR_SYSCALL_BASE+291)
-#define __NR_recvfrom (__NR_SYSCALL_BASE+292)
-#define __NR_shutdown (__NR_SYSCALL_BASE+293)
-#define __NR_setsockopt (__NR_SYSCALL_BASE+294)
-#define __NR_getsockopt (__NR_SYSCALL_BASE+295)
-#define __NR_sendmsg (__NR_SYSCALL_BASE+296)
-#define __NR_recvmsg (__NR_SYSCALL_BASE+297)
-#define __NR_semop (__NR_SYSCALL_BASE+298)
-#define __NR_semget (__NR_SYSCALL_BASE+299)
-#define __NR_semctl (__NR_SYSCALL_BASE+300)
-#define __NR_msgsnd (__NR_SYSCALL_BASE+301)
-#define __NR_msgrcv (__NR_SYSCALL_BASE+302)
-#define __NR_msgget (__NR_SYSCALL_BASE+303)
-#define __NR_msgctl (__NR_SYSCALL_BASE+304)
-#define __NR_shmat (__NR_SYSCALL_BASE+305)
-#define __NR_shmdt (__NR_SYSCALL_BASE+306)
-#define __NR_shmget (__NR_SYSCALL_BASE+307)
-#define __NR_shmctl (__NR_SYSCALL_BASE+308)
-#define __NR_add_key (__NR_SYSCALL_BASE+309)
-#define __NR_request_key (__NR_SYSCALL_BASE+310)
-#define __NR_keyctl (__NR_SYSCALL_BASE+311)
-#define __NR_semtimedop (__NR_SYSCALL_BASE+312)
-#define __NR_vserver (__NR_SYSCALL_BASE+313)
-#define __NR_ioprio_set (__NR_SYSCALL_BASE+314)
-#define __NR_ioprio_get (__NR_SYSCALL_BASE+315)
-#define __NR_inotify_init (__NR_SYSCALL_BASE+316)
-#define __NR_inotify_add_watch (__NR_SYSCALL_BASE+317)
-#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE+318)
-#define __NR_mbind (__NR_SYSCALL_BASE+319)
-#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320)
-#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321)
-#define __NR_openat (__NR_SYSCALL_BASE+322)
-#define __NR_mkdirat (__NR_SYSCALL_BASE+323)
-#define __NR_mknodat (__NR_SYSCALL_BASE+324)
-#define __NR_fchownat (__NR_SYSCALL_BASE+325)
-#define __NR_futimesat (__NR_SYSCALL_BASE+326)
-#define __NR_fstatat64 (__NR_SYSCALL_BASE+327)
-#define __NR_unlinkat (__NR_SYSCALL_BASE+328)
-#define __NR_renameat (__NR_SYSCALL_BASE+329)
-#define __NR_linkat (__NR_SYSCALL_BASE+330)
-#define __NR_symlinkat (__NR_SYSCALL_BASE+331)
-#define __NR_readlinkat (__NR_SYSCALL_BASE+332)
-#define __NR_fchmodat (__NR_SYSCALL_BASE+333)
-#define __NR_faccessat (__NR_SYSCALL_BASE+334)
-#define __NR_pselect6 (__NR_SYSCALL_BASE+335)
-#define __NR_ppoll (__NR_SYSCALL_BASE+336)
-#define __NR_unshare (__NR_SYSCALL_BASE+337)
-#define __NR_set_robust_list (__NR_SYSCALL_BASE+338)
-#define __NR_get_robust_list (__NR_SYSCALL_BASE+339)
-#define __NR_splice (__NR_SYSCALL_BASE+340)
-#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341)
-#define __NR_sync_file_range2 __NR_arm_sync_file_range
-#define __NR_tee (__NR_SYSCALL_BASE+342)
-#define __NR_vmsplice (__NR_SYSCALL_BASE+343)
-#define __NR_move_pages (__NR_SYSCALL_BASE+344)
-#define __NR_getcpu (__NR_SYSCALL_BASE+345)
-#define __NR_epoll_pwait (__NR_SYSCALL_BASE+346)
-#define __NR_kexec_load (__NR_SYSCALL_BASE+347)
-#define __NR_utimensat (__NR_SYSCALL_BASE+348)
-#define __NR_signalfd (__NR_SYSCALL_BASE+349)
-#define __NR_timerfd_create (__NR_SYSCALL_BASE+350)
-#define __NR_eventfd (__NR_SYSCALL_BASE+351)
-#define __NR_fallocate (__NR_SYSCALL_BASE+352)
-#define __NR_timerfd_settime (__NR_SYSCALL_BASE+353)
-#define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354)
-#define __NR_signalfd4 (__NR_SYSCALL_BASE+355)
-#define __NR_eventfd2 (__NR_SYSCALL_BASE+356)
-#define __NR_epoll_create1 (__NR_SYSCALL_BASE+357)
-#define __NR_dup3 (__NR_SYSCALL_BASE+358)
-#define __NR_pipe2 (__NR_SYSCALL_BASE+359)
-#define __NR_inotify_init1 (__NR_SYSCALL_BASE+360)
-#define __NR_preadv (__NR_SYSCALL_BASE+361)
-#define __NR_pwritev (__NR_SYSCALL_BASE+362)
-#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
-#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
-#define __NR_recvmmsg (__NR_SYSCALL_BASE+365)
-#define __NR_accept4 (__NR_SYSCALL_BASE+366)
-#define __NR_fanotify_init (__NR_SYSCALL_BASE+367)
-#define __NR_fanotify_mark (__NR_SYSCALL_BASE+368)
-#define __NR_prlimit64 (__NR_SYSCALL_BASE+369)
-#define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370)
-#define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371)
-#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372)
-#define __NR_syncfs (__NR_SYSCALL_BASE+373)
-#define __NR_sendmmsg (__NR_SYSCALL_BASE+374)
-#define __NR_setns (__NR_SYSCALL_BASE+375)
-#define __NR_process_vm_readv (__NR_SYSCALL_BASE+376)
-#define __NR_process_vm_writev (__NR_SYSCALL_BASE+377)
-
-/*
- * The following SWIs are ARM private.
- */
-#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
-#define __ARM_NR_breakpoint (__ARM_NR_BASE+1)
-#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
-#define __ARM_NR_usr26 (__ARM_NR_BASE+3)
-#define __ARM_NR_usr32 (__ARM_NR_BASE+4)
-#define __ARM_NR_set_tls (__ARM_NR_BASE+5)
-
-/*
- * *NOTE*: This is a ghost syscall private to the kernel. Only the
- * __kuser_cmpxchg code in entry-armv.S should be aware of its
- * existence. Don't ever use this from user code.
- */
-#ifdef __KERNEL__
-#define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)
-#endif
-
-/*
- * The following syscalls are obsolete and no longer available for EABI.
- */
-#if !defined(__KERNEL__)
-#if defined(__ARM_EABI__)
-#undef __NR_time
-#undef __NR_umount
-#undef __NR_stime
-#undef __NR_alarm
-#undef __NR_utime
-#undef __NR_getrlimit
-#undef __NR_select
-#undef __NR_readdir
-#undef __NR_mmap
-#undef __NR_socketcall
-#undef __NR_syscall
-#undef __NR_ipc
-#endif
-#endif
-
-#ifdef __KERNEL__
-
-#define __ARCH_WANT_IPC_PARSE_VERSION
-#define __ARCH_WANT_STAT64
-#define __ARCH_WANT_SYS_GETHOSTNAME
-#define __ARCH_WANT_SYS_PAUSE
-#define __ARCH_WANT_SYS_GETPGRP
-#define __ARCH_WANT_SYS_LLSEEK
-#define __ARCH_WANT_SYS_NICE
-#define __ARCH_WANT_SYS_SIGPENDING
-#define __ARCH_WANT_SYS_SIGPROCMASK
-#define __ARCH_WANT_SYS_RT_SIGACTION
-#define __ARCH_WANT_SYS_RT_SIGSUSPEND
-#define __ARCH_WANT_SYS_OLD_MMAP
-#define __ARCH_WANT_SYS_OLD_SELECT
-
-#if !defined(CONFIG_AEABI) || defined(CONFIG_OABI_COMPAT)
-#define __ARCH_WANT_SYS_TIME
-#define __ARCH_WANT_SYS_IPC
-#define __ARCH_WANT_SYS_OLDUMOUNT
-#define __ARCH_WANT_SYS_ALARM
-#define __ARCH_WANT_SYS_UTIME
-#define __ARCH_WANT_SYS_OLD_GETRLIMIT
-#define __ARCH_WANT_OLD_READDIR
-#define __ARCH_WANT_SYS_SOCKETCALL
-#endif
-
-/*
- * "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")
-
-/*
- * Unimplemented (or alternatively implemented) syscalls
- */
-#define __IGNORE_fadvise64_64
-#define __IGNORE_migrate_pages
-
-#endif /* __KERNEL__ */
-#endif /* __ASM_ARM_UNISTD_H */
diff --git a/original/asm-arm/user.h b/original/asm-arm/user.h
deleted file mode 100644
index 71ae623..0000000
--- a/original/asm-arm/user.h
+++ /dev/null
@@ -1,103 +0,0 @@
-#ifndef _ARM_USER_H
-#define _ARM_USER_H
-
-#include <asm/page.h>
-#include <asm/ptrace.h>
-/* Core file format: The core file is written in such a way that gdb
- can understand it and provide useful information to the user (under
- linux we use the 'trad-core' bfd). There are quite a number of
- obstacles to being able to view the contents of the floating point
- registers, and until these are solved you will not be able to view the
- contents of them. Actually, you can read in the core file and look at
- the contents of the user struct to find out what the floating point
- registers contain.
- The actual file contents are as follows:
- UPAGE: 1 page consisting of a user struct that tells gdb what is present
- in the file. Directly after this is a copy of the task_struct, which
- is currently not used by gdb, but it may come in useful at some point.
- All of the registers are stored as part of the upage. The upage should
- always be only one page.
- DATA: The data area is stored. We use current->end_text to
- current->brk to pick up all of the user variables, plus any memory
- that may have been malloced. No attempt is made to determine if a page
- is demand-zero or if a page is totally unused, we just cover the entire
- range. All of the addresses are rounded in such a way that an integral
- number of pages is written.
- STACK: We need the stack information in order to get a meaningful
- backtrace. We need to write the data from (esp) to
- current->start_stack, so we round each of these off in order to be able
- to write an integer number of pages.
- The minimum core file size is 3 pages, or 12288 bytes.
-*/
-
-struct user_fp {
- struct fp_reg {
- unsigned int sign1:1;
- unsigned int unused:15;
- unsigned int sign2:1;
- unsigned int exponent:14;
- unsigned int j:1;
- unsigned int mantissa1:31;
- unsigned int mantissa0:32;
- } fpregs[8];
- unsigned int fpsr:32;
- unsigned int fpcr:32;
- unsigned char ftype[8];
- unsigned int init_flag;
-};
-
-/* When the kernel dumps core, it starts by dumping the user struct -
- this will be used by gdb to figure out where the data and stack segments
- are within the file, and what virtual addresses to use. */
-struct user{
-/* We start with the registers, to mimic the way that "memory" is returned
- from the ptrace(3,...) function. */
- struct pt_regs regs; /* Where the registers are actually stored */
-/* ptrace does not yet supply these. Someday.... */
- int u_fpvalid; /* True if math co-processor being used. */
- /* for this mess. Not yet used. */
-/* The rest of this junk is to help gdb figure out what goes where */
- unsigned long int u_tsize; /* Text segment size (pages). */
- unsigned long int u_dsize; /* Data segment size (pages). */
- unsigned long int u_ssize; /* Stack segment size (pages). */
- unsigned long start_code; /* Starting virtual address of text. */
- unsigned long start_stack; /* Starting virtual address of stack area.
- This is actually the bottom of the stack,
- the top of the stack is always found in the
- esp register. */
- long int signal; /* Signal that caused the core dump. */
- int reserved; /* No longer used */
- struct pt_regs * u_ar0; /* Used by gdb to help find the values for */
- /* the registers. */
- unsigned long magic; /* To uniquely identify a core file */
- char u_comm[32]; /* User command that was responsible */
- int u_debugreg[8];
- struct user_fp u_fp; /* FP state */
- struct user_fp_struct * u_fp0;/* Used by gdb to help find the values for */
- /* the FP registers. */
-};
-#define NBPG PAGE_SIZE
-#define UPAGES 1
-#define HOST_TEXT_START_ADDR (u.start_code)
-#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
-
-/*
- * User specific VFP registers. If only VFPv2 is present, registers 16 to 31
- * are ignored by the ptrace system call and the signal handler.
- */
-struct user_vfp {
- unsigned long long fpregs[32];
- unsigned long fpscr;
-};
-
-/*
- * VFP exception registers exposed to user space during signal delivery.
- * Fields not relavant to the current VFP architecture are ignored.
- */
-struct user_vfp_exc {
- unsigned long fpexc;
- unsigned long fpinst;
- unsigned long fpinst2;
-};
-
-#endif /* _ARM_USER_H */
diff --git a/original/asm-arm/vga.h b/original/asm-arm/vga.h
deleted file mode 100644
index 1e0b913..0000000
--- a/original/asm-arm/vga.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef ASMARM_VGA_H
-#define ASMARM_VGA_H
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-
-#define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x))
-
-#define vga_readb(x) (*((volatile unsigned char *)x))
-#define vga_writeb(x,y) (*((volatile unsigned char *)y) = (x))
-
-#endif
diff --git a/original/asm-generic/4level-fixup.h b/original/asm-generic/4level-fixup.h
deleted file mode 100644
index 68c6fea..0000000
--- a/original/asm-generic/4level-fixup.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _4LEVEL_FIXUP_H
-#define _4LEVEL_FIXUP_H
-
-#define __ARCH_HAS_4LEVEL_HACK
-#define __PAGETABLE_PUD_FOLDED
-
-#define PUD_SIZE PGDIR_SIZE
-#define PUD_MASK PGDIR_MASK
-#define PTRS_PER_PUD 1
-
-#define pud_t pgd_t
-
-#define pmd_alloc(mm, pud, address) \
- ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
- NULL: pmd_offset(pud, address))
-
-#define pud_alloc(mm, pgd, address) (pgd)
-#define pud_offset(pgd, start) (pgd)
-#define pud_none(pud) 0
-#define pud_bad(pud) 0
-#define pud_present(pud) 1
-#define pud_ERROR(pud) do { } while (0)
-#define pud_clear(pud) pgd_clear(pud)
-
-#undef pud_free_tlb
-#define pud_free_tlb(tlb, x) do { } while (0)
-#define pud_free(x) do { } while (0)
-#define __pud_free_tlb(tlb, x) do { } while (0)
-
-#undef pud_addr_end
-#define pud_addr_end(addr, end) (end)
-
-#endif
diff --git a/original/asm-generic/audit_dir_write.h b/original/asm-generic/audit_dir_write.h
deleted file mode 100644
index 161a7a5..0000000
--- a/original/asm-generic/audit_dir_write.h
+++ /dev/null
@@ -1,14 +0,0 @@
-__NR_rename,
-__NR_mkdir,
-__NR_rmdir,
-__NR_creat,
-__NR_link,
-__NR_unlink,
-__NR_symlink,
-__NR_mknod,
-__NR_mkdirat,
-__NR_mknodat,
-__NR_unlinkat,
-__NR_renameat,
-__NR_linkat,
-__NR_symlinkat,
diff --git a/original/asm-generic/bitops/__ffs.h b/original/asm-generic/bitops/__ffs.h
deleted file mode 100644
index 9a3274a..0000000
--- a/original/asm-generic/bitops/__ffs.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS___FFS_H_
-#define _ASM_GENERIC_BITOPS___FFS_H_
-
-#include <asm/types.h>
-
-/**
- * __ffs - find first bit in word.
- * @word: The word to search
- *
- * Undefined if no bit exists, so code should check against 0 first.
- */
-static inline unsigned long __ffs(unsigned long word)
-{
- int num = 0;
-
-#if BITS_PER_LONG == 64
- if ((word & 0xffffffff) == 0) {
- num += 32;
- word >>= 32;
- }
-#endif
- if ((word & 0xffff) == 0) {
- num += 16;
- word >>= 16;
- }
- if ((word & 0xff) == 0) {
- num += 8;
- word >>= 8;
- }
- if ((word & 0xf) == 0) {
- num += 4;
- word >>= 4;
- }
- if ((word & 0x3) == 0) {
- num += 2;
- word >>= 2;
- }
- if ((word & 0x1) == 0)
- num += 1;
- return num;
-}
-
-#endif /* _ASM_GENERIC_BITOPS___FFS_H_ */
diff --git a/original/asm-generic/bitops/atomic.h b/original/asm-generic/bitops/atomic.h
deleted file mode 100644
index 7833931..0000000
--- a/original/asm-generic/bitops/atomic.h
+++ /dev/null
@@ -1,191 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_ATOMIC_H_
-#define _ASM_GENERIC_BITOPS_ATOMIC_H_
-
-#include <asm/types.h>
-
-#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
-#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
-
-#ifdef CONFIG_SMP
-#include <asm/spinlock.h>
-#include <asm/cache.h> /* we use L1_CACHE_BYTES */
-
-/* Use an array of spinlocks for our atomic_ts.
- * Hash function to index into a different SPINLOCK.
- * Since "a" is usually an address, use one spinlock per cacheline.
- */
-# define ATOMIC_HASH_SIZE 4
-# define ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
-
-extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
-
-/* Can't use raw_spin_lock_irq because of #include problems, so
- * this is the substitute */
-#define _atomic_spin_lock_irqsave(l,f) do { \
- raw_spinlock_t *s = ATOMIC_HASH(l); \
- local_irq_save(f); \
- __raw_spin_lock(s); \
-} while(0)
-
-#define _atomic_spin_unlock_irqrestore(l,f) do { \
- raw_spinlock_t *s = ATOMIC_HASH(l); \
- __raw_spin_unlock(s); \
- local_irq_restore(f); \
-} while(0)
-
-
-#else
-# define _atomic_spin_lock_irqsave(l,f) do { local_irq_save(f); } while (0)
-# define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0)
-#endif
-
-/*
- * NMI events can occur at any time, including when interrupts have been
- * disabled by *_irqsave(). So you can get NMI events occurring while a
- * *_bit function is holding a spin lock. If the NMI handler also wants
- * to do bit manipulation (and they do) then you can get a deadlock
- * between the original caller of *_bit() and the NMI handler.
- *
- * by Keith Owens
- */
-
-/**
- * set_bit - Atomically set a bit in memory
- * @nr: the bit to set
- * @addr: the address to start counting from
- *
- * This function is atomic and may not be reordered. See __set_bit()
- * if you do not require the atomic guarantees.
- *
- * Note: there are no guarantees that this function will not be reordered
- * on non x86 architectures, so if you are writting portable code,
- * make sure not to rely on its reordering guarantees.
- *
- * Note that @nr may be almost arbitrarily large; this function is not
- * restricted to acting on a single-word quantity.
- */
-static inline void set_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long flags;
-
- _atomic_spin_lock_irqsave(p, flags);
- *p |= mask;
- _atomic_spin_unlock_irqrestore(p, flags);
-}
-
-/**
- * clear_bit - Clears a bit in memory
- * @nr: Bit to clear
- * @addr: Address to start counting from
- *
- * clear_bit() is atomic and may not be reordered. However, it does
- * not contain a memory barrier, so if it is used for locking purposes,
- * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
- * in order to ensure changes are visible on other processors.
- */
-static inline void clear_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long flags;
-
- _atomic_spin_lock_irqsave(p, flags);
- *p &= ~mask;
- _atomic_spin_unlock_irqrestore(p, flags);
-}
-
-/**
- * change_bit - Toggle a bit in memory
- * @nr: Bit to change
- * @addr: Address to start counting from
- *
- * change_bit() is atomic and may not be reordered. It may be
- * reordered on other architectures than x86.
- * Note that @nr may be almost arbitrarily large; this function is not
- * restricted to acting on a single-word quantity.
- */
-static inline void change_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long flags;
-
- _atomic_spin_lock_irqsave(p, flags);
- *p ^= mask;
- _atomic_spin_unlock_irqrestore(p, flags);
-}
-
-/**
- * test_and_set_bit - Set a bit and return its old value
- * @nr: Bit to set
- * @addr: Address to count from
- *
- * This operation is atomic and cannot be reordered.
- * It may be reordered on other architectures than x86.
- * It also implies a memory barrier.
- */
-static inline int test_and_set_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long old;
- unsigned long flags;
-
- _atomic_spin_lock_irqsave(p, flags);
- old = *p;
- *p = old | mask;
- _atomic_spin_unlock_irqrestore(p, flags);
-
- return (old & mask) != 0;
-}
-
-/**
- * test_and_clear_bit - Clear a bit and return its old value
- * @nr: Bit to clear
- * @addr: Address to count from
- *
- * This operation is atomic and cannot be reordered.
- * It can be reorderdered on other architectures other than x86.
- * It also implies a memory barrier.
- */
-static inline int test_and_clear_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long old;
- unsigned long flags;
-
- _atomic_spin_lock_irqsave(p, flags);
- old = *p;
- *p = old & ~mask;
- _atomic_spin_unlock_irqrestore(p, flags);
-
- return (old & mask) != 0;
-}
-
-/**
- * test_and_change_bit - Change a bit and return its old value
- * @nr: Bit to change
- * @addr: Address to count from
- *
- * This operation is atomic and cannot be reordered.
- * It also implies a memory barrier.
- */
-static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long old;
- unsigned long flags;
-
- _atomic_spin_lock_irqsave(p, flags);
- old = *p;
- *p = old ^ mask;
- _atomic_spin_unlock_irqrestore(p, flags);
-
- return (old & mask) != 0;
-}
-
-#endif /* _ASM_GENERIC_BITOPS_ATOMIC_H */
diff --git a/original/asm-generic/bitops/ffz.h b/original/asm-generic/bitops/ffz.h
deleted file mode 100644
index 6744bd4..0000000
--- a/original/asm-generic/bitops/ffz.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_FFZ_H_
-#define _ASM_GENERIC_BITOPS_FFZ_H_
-
-/*
- * ffz - find first zero in word.
- * @word: The word to search
- *
- * Undefined if no zero exists, so code should check against ~0UL first.
- */
-#define ffz(x) __ffs(~(x))
-
-#endif /* _ASM_GENERIC_BITOPS_FFZ_H_ */
diff --git a/original/asm-generic/bitops/find.h b/original/asm-generic/bitops/find.h
deleted file mode 100644
index 72a51e5..0000000
--- a/original/asm-generic/bitops/find.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_FIND_H_
-#define _ASM_GENERIC_BITOPS_FIND_H_
-
-extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
- size, unsigned long offset);
-
-extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
- long size, unsigned long offset);
-
-#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
-#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
-
-#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */
diff --git a/original/asm-generic/bitops/fls.h b/original/asm-generic/bitops/fls.h
deleted file mode 100644
index 850859b..0000000
--- a/original/asm-generic/bitops/fls.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_FLS_H_
-#define _ASM_GENERIC_BITOPS_FLS_H_
-
-/**
- * fls - find last (most-significant) bit set
- * @x: the word to search
- *
- * This is defined the same way as ffs.
- * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
- */
-
-static inline int fls(int x)
-{
- int r = 32;
-
- if (!x)
- return 0;
- if (!(x & 0xffff0000u)) {
- x <<= 16;
- r -= 16;
- }
- if (!(x & 0xff000000u)) {
- x <<= 8;
- r -= 8;
- }
- if (!(x & 0xf0000000u)) {
- x <<= 4;
- r -= 4;
- }
- if (!(x & 0xc0000000u)) {
- x <<= 2;
- r -= 2;
- }
- if (!(x & 0x80000000u)) {
- x <<= 1;
- r -= 1;
- }
- return r;
-}
-
-#endif /* _ASM_GENERIC_BITOPS_FLS_H_ */
diff --git a/original/asm-generic/bitops/fls64.h b/original/asm-generic/bitops/fls64.h
deleted file mode 100644
index 1b6b17c..0000000
--- a/original/asm-generic/bitops/fls64.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_FLS64_H_
-#define _ASM_GENERIC_BITOPS_FLS64_H_
-
-#include <asm/types.h>
-
-static inline int fls64(__u64 x)
-{
- __u32 h = x >> 32;
- if (h)
- return fls(h) + 32;
- return fls(x);
-}
-
-#endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */
diff --git a/original/asm-generic/bitops/le.h b/original/asm-generic/bitops/le.h
deleted file mode 100644
index b9c7e5d..0000000
--- a/original/asm-generic/bitops/le.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_LE_H_
-#define _ASM_GENERIC_BITOPS_LE_H_
-
-#include <asm/types.h>
-#include <asm/byteorder.h>
-
-#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
-#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
-
-#if defined(__LITTLE_ENDIAN)
-
-#define generic_test_le_bit(nr, addr) test_bit(nr, addr)
-#define generic___set_le_bit(nr, addr) __set_bit(nr, addr)
-#define generic___clear_le_bit(nr, addr) __clear_bit(nr, addr)
-
-#define generic_test_and_set_le_bit(nr, addr) test_and_set_bit(nr, addr)
-#define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit(nr, addr)
-
-#define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit(nr, addr)
-#define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit(nr, addr)
-
-#define generic_find_next_zero_le_bit(addr, size, offset) find_next_zero_bit(addr, size, offset)
-
-#elif defined(__BIG_ENDIAN)
-
-#define generic_test_le_bit(nr, addr) \
- test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-#define generic___set_le_bit(nr, addr) \
- __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-#define generic___clear_le_bit(nr, addr) \
- __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-
-#define generic_test_and_set_le_bit(nr, addr) \
- test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-#define generic_test_and_clear_le_bit(nr, addr) \
- test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-
-#define generic___test_and_set_le_bit(nr, addr) \
- __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-#define generic___test_and_clear_le_bit(nr, addr) \
- __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
-
-extern unsigned long generic_find_next_zero_le_bit(const unsigned long *addr,
- unsigned long size, unsigned long offset);
-
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-
-#define generic_find_first_zero_le_bit(addr, size) \
- generic_find_next_zero_le_bit((addr), (size), 0)
-
-#endif /* _ASM_GENERIC_BITOPS_LE_H_ */
diff --git a/original/asm-generic/bitops/non-atomic.h b/original/asm-generic/bitops/non-atomic.h
deleted file mode 100644
index 46a825c..0000000
--- a/original/asm-generic/bitops/non-atomic.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
-#define _ASM_GENERIC_BITOPS_NON_ATOMIC_H_
-
-#include <asm/types.h>
-
-#define BITOP_MASK(nr) (1UL << ((nr) % BITS_PER_LONG))
-#define BITOP_WORD(nr) ((nr) / BITS_PER_LONG)
-
-/**
- * __set_bit - Set a bit in memory
- * @nr: the bit to set
- * @addr: the address to start counting from
- *
- * Unlike set_bit(), this function is non-atomic and may be reordered.
- * If it's called on the same region of memory simultaneously, the effect
- * may be that only one operation succeeds.
- */
-static inline void __set_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
-
- *p |= mask;
-}
-
-static inline void __clear_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
-
- *p &= ~mask;
-}
-
-/**
- * __change_bit - Toggle a bit in memory
- * @nr: the bit to change
- * @addr: the address to start counting from
- *
- * Unlike change_bit(), this function is non-atomic and may be reordered.
- * If it's called on the same region of memory simultaneously, the effect
- * may be that only one operation succeeds.
- */
-static inline void __change_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
-
- *p ^= mask;
-}
-
-/**
- * __test_and_set_bit - Set a bit and return its old value
- * @nr: Bit to set
- * @addr: Address to count from
- *
- * This operation is non-atomic and can be reordered.
- * If two examples of this operation race, one can appear to succeed
- * but actually fail. You must protect multiple accesses with a lock.
- */
-static inline int __test_and_set_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long old = *p;
-
- *p = old | mask;
- return (old & mask) != 0;
-}
-
-/**
- * __test_and_clear_bit - Clear a bit and return its old value
- * @nr: Bit to clear
- * @addr: Address to count from
- *
- * This operation is non-atomic and can be reordered.
- * If two examples of this operation race, one can appear to succeed
- * but actually fail. You must protect multiple accesses with a lock.
- */
-static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long old = *p;
-
- *p = old & ~mask;
- return (old & mask) != 0;
-}
-
-/* WARNING: non atomic and it can be reordered! */
-static inline int __test_and_change_bit(int nr,
- volatile unsigned long *addr)
-{
- unsigned long mask = BITOP_MASK(nr);
- unsigned long *p = ((unsigned long *)addr) + BITOP_WORD(nr);
- unsigned long old = *p;
-
- *p = old ^ mask;
- return (old & mask) != 0;
-}
-
-/**
- * test_bit - Determine whether a bit is set
- * @nr: bit number to test
- * @addr: Address to start counting from
- */
-static inline int test_bit(int nr, const volatile unsigned long *addr)
-{
- return 1UL & (addr[BITOP_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
-}
-
-#endif /* _ASM_GENERIC_BITOPS_NON_ATOMIC_H_ */
diff --git a/original/asm-generic/bitsperlong.h b/original/asm-generic/bitsperlong.h
deleted file mode 100644
index 4ae54e0..0000000
--- a/original/asm-generic/bitsperlong.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef __ASM_GENERIC_BITS_PER_LONG
-#define __ASM_GENERIC_BITS_PER_LONG
-
-/*
- * There seems to be no way of detecting this automatically from user
- * space, so 64 bit architectures should override this in their
- * bitsperlong.h. In particular, an architecture that supports
- * both 32 and 64 bit user space must not rely on CONFIG_64BIT
- * to decide it, but rather check a compiler provided macro.
- */
-#ifndef __BITS_PER_LONG
-#define __BITS_PER_LONG 32
-#endif
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_64BIT
-#define BITS_PER_LONG 64
-#else
-#define BITS_PER_LONG 32
-#endif /* CONFIG_64BIT */
-
-/*
- * FIXME: The check currently breaks x86-64 build, so it's
- * temporarily disabled. Please fix x86-64 and reenable
- */
-#if 0 && BITS_PER_LONG != __BITS_PER_LONG
-#error Inconsistent word size. Check asm/bitsperlong.h
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* __ASM_GENERIC_BITS_PER_LONG */
diff --git a/original/asm-generic/bug.h b/original/asm-generic/bug.h
deleted file mode 100644
index 8ceab7b..0000000
--- a/original/asm-generic/bug.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _ASM_GENERIC_BUG_H
-#define _ASM_GENERIC_BUG_H
-
-#include <linux/compiler.h>
-
-#ifdef CONFIG_BUG
-#ifndef HAVE_ARCH_BUG
-#define BUG() do { \
- printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
- panic("BUG!"); \
-} while (0)
-#endif
-
-#ifndef HAVE_ARCH_BUG_ON
-#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
-#endif
-
-#ifndef HAVE_ARCH_WARN_ON
-#define WARN_ON(condition) do { \
- if (unlikely((condition)!=0)) { \
- printk("BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \
- dump_stack(); \
- } \
-} while (0)
-#endif
-
-#else /* !CONFIG_BUG */
-#ifndef HAVE_ARCH_BUG
-#define BUG()
-#endif
-
-#ifndef HAVE_ARCH_BUG_ON
-#define BUG_ON(condition) do { if (condition) ; } while(0)
-#endif
-
-#ifndef HAVE_ARCH_WARN_ON
-#define WARN_ON(condition) do { if (condition) ; } while(0)
-#endif
-#endif
-
-#define WARN_ON_ONCE(condition) \
-({ \
- static int __warn_once = 1; \
- int __ret = 0; \
- \
- if (unlikely((condition) && __warn_once)) { \
- __warn_once = 0; \
- WARN_ON(1); \
- __ret = 1; \
- } \
- __ret; \
-})
-
-#ifdef CONFIG_SMP
-# define WARN_ON_SMP(x) WARN_ON(x)
-#else
-# define WARN_ON_SMP(x) do { } while (0)
-#endif
-
-#endif
diff --git a/original/asm-generic/cputime.h b/original/asm-generic/cputime.h
deleted file mode 100644
index 09204e4..0000000
--- a/original/asm-generic/cputime.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _ASM_GENERIC_CPUTIME_H
-#define _ASM_GENERIC_CPUTIME_H
-
-#include <linux/time.h>
-#include <linux/jiffies.h>
-
-typedef unsigned long cputime_t;
-
-#define cputime_zero (0UL)
-#define cputime_max ((~0UL >> 1) - 1)
-#define cputime_add(__a, __b) ((__a) + (__b))
-#define cputime_sub(__a, __b) ((__a) - (__b))
-#define cputime_div(__a, __n) ((__a) / (__n))
-#define cputime_halve(__a) ((__a) >> 1)
-#define cputime_eq(__a, __b) ((__a) == (__b))
-#define cputime_gt(__a, __b) ((__a) > (__b))
-#define cputime_ge(__a, __b) ((__a) >= (__b))
-#define cputime_lt(__a, __b) ((__a) < (__b))
-#define cputime_le(__a, __b) ((__a) <= (__b))
-#define cputime_to_jiffies(__ct) (__ct)
-#define jiffies_to_cputime(__hz) (__hz)
-
-typedef u64 cputime64_t;
-
-#define cputime64_zero (0ULL)
-#define cputime64_add(__a, __b) ((__a) + (__b))
-#define cputime64_sub(__a, __b) ((__a) - (__b))
-#define cputime64_to_jiffies64(__ct) (__ct)
-#define jiffies64_to_cputime64(__jif) (__jif)
-#define cputime_to_cputime64(__ct) ((u64) __ct)
-
-
-/*
- * Convert cputime to milliseconds and back.
- */
-#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct)
-#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs)
-
-/*
- * Convert cputime to seconds and back.
- */
-#define cputime_to_secs(jif) ((jif) / HZ)
-#define secs_to_cputime(sec) ((sec) * HZ)
-
-/*
- * Convert cputime to timespec and back.
- */
-#define timespec_to_cputime(__val) timespec_to_jiffies(__val)
-#define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val)
-
-/*
- * Convert cputime to timeval and back.
- */
-#define timeval_to_cputime(__val) timeval_to_jiffies(__val)
-#define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val)
-
-/*
- * Convert cputime to clock and back.
- */
-#define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct)
-#define clock_t_to_cputime(__x) clock_t_to_jiffies(__x)
-
-/*
- * Convert cputime64 to clock.
- */
-#define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct)
-
-#endif
diff --git a/original/asm-generic/emergency-restart.h b/original/asm-generic/emergency-restart.h
deleted file mode 100644
index 0d68a1e..0000000
--- a/original/asm-generic/emergency-restart.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
-#define _ASM_GENERIC_EMERGENCY_RESTART_H
-
-static inline void machine_emergency_restart(void)
-{
- machine_restart(NULL);
-}
-
-#endif /* _ASM_GENERIC_EMERGENCY_RESTART_H */
diff --git a/original/asm-generic/errno-base.h b/original/asm-generic/errno-base.h
deleted file mode 100644
index 6511597..0000000
--- a/original/asm-generic/errno-base.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _ASM_GENERIC_ERRNO_BASE_H
-#define _ASM_GENERIC_ERRNO_BASE_H
-
-#define EPERM 1 /* Operation not permitted */
-#define ENOENT 2 /* No such file or directory */
-#define ESRCH 3 /* No such process */
-#define EINTR 4 /* Interrupted system call */
-#define EIO 5 /* I/O error */
-#define ENXIO 6 /* No such device or address */
-#define E2BIG 7 /* Argument list too long */
-#define ENOEXEC 8 /* Exec format error */
-#define EBADF 9 /* Bad file number */
-#define ECHILD 10 /* No child processes */
-#define EAGAIN 11 /* Try again */
-#define ENOMEM 12 /* Out of memory */
-#define EACCES 13 /* Permission denied */
-#define EFAULT 14 /* Bad address */
-#define ENOTBLK 15 /* Block device required */
-#define EBUSY 16 /* Device or resource busy */
-#define EEXIST 17 /* File exists */
-#define EXDEV 18 /* Cross-device link */
-#define ENODEV 19 /* No such device */
-#define ENOTDIR 20 /* Not a directory */
-#define EISDIR 21 /* Is a directory */
-#define EINVAL 22 /* Invalid argument */
-#define ENFILE 23 /* File table overflow */
-#define EMFILE 24 /* Too many open files */
-#define ENOTTY 25 /* Not a typewriter */
-#define ETXTBSY 26 /* Text file busy */
-#define EFBIG 27 /* File too large */
-#define ENOSPC 28 /* No space left on device */
-#define ESPIPE 29 /* Illegal seek */
-#define EROFS 30 /* Read-only file system */
-#define EMLINK 31 /* Too many links */
-#define EPIPE 32 /* Broken pipe */
-#define EDOM 33 /* Math argument out of domain of func */
-#define ERANGE 34 /* Math result not representable */
-
-#endif
diff --git a/original/asm-generic/errno.h b/original/asm-generic/errno.h
deleted file mode 100644
index e8852c0..0000000
--- a/original/asm-generic/errno.h
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef _ASM_GENERIC_ERRNO_H
-#define _ASM_GENERIC_ERRNO_H
-
-#include <asm-generic/errno-base.h>
-
-#define EDEADLK 35 /* Resource deadlock would occur */
-#define ENAMETOOLONG 36 /* File name too long */
-#define ENOLCK 37 /* No record locks available */
-#define ENOSYS 38 /* Function not implemented */
-#define ENOTEMPTY 39 /* Directory not empty */
-#define ELOOP 40 /* Too many symbolic links encountered */
-#define EWOULDBLOCK EAGAIN /* Operation would block */
-#define ENOMSG 42 /* No message of desired type */
-#define EIDRM 43 /* Identifier removed */
-#define ECHRNG 44 /* Channel number out of range */
-#define EL2NSYNC 45 /* Level 2 not synchronized */
-#define EL3HLT 46 /* Level 3 halted */
-#define EL3RST 47 /* Level 3 reset */
-#define ELNRNG 48 /* Link number out of range */
-#define EUNATCH 49 /* Protocol driver not attached */
-#define ENOCSI 50 /* No CSI structure available */
-#define EL2HLT 51 /* Level 2 halted */
-#define EBADE 52 /* Invalid exchange */
-#define EBADR 53 /* Invalid request descriptor */
-#define EXFULL 54 /* Exchange full */
-#define ENOANO 55 /* No anode */
-#define EBADRQC 56 /* Invalid request code */
-#define EBADSLT 57 /* Invalid slot */
-
-#define EDEADLOCK EDEADLK
-
-#define EBFONT 59 /* Bad font file format */
-#define ENOSTR 60 /* Device not a stream */
-#define ENODATA 61 /* No data available */
-#define ETIME 62 /* Timer expired */
-#define ENOSR 63 /* Out of streams resources */
-#define ENONET 64 /* Machine is not on the network */
-#define ENOPKG 65 /* Package not installed */
-#define EREMOTE 66 /* Object is remote */
-#define ENOLINK 67 /* Link has been severed */
-#define EADV 68 /* Advertise error */
-#define ESRMNT 69 /* Srmount error */
-#define ECOMM 70 /* Communication error on send */
-#define EPROTO 71 /* Protocol error */
-#define EMULTIHOP 72 /* Multihop attempted */
-#define EDOTDOT 73 /* RFS specific error */
-#define EBADMSG 74 /* Not a data message */
-#define EOVERFLOW 75 /* Value too large for defined data type */
-#define ENOTUNIQ 76 /* Name not unique on network */
-#define EBADFD 77 /* File descriptor in bad state */
-#define EREMCHG 78 /* Remote address changed */
-#define ELIBACC 79 /* Can not access a needed shared library */
-#define ELIBBAD 80 /* Accessing a corrupted shared library */
-#define ELIBSCN 81 /* .lib section in a.out corrupted */
-#define ELIBMAX 82 /* Attempting to link in too many shared libraries */
-#define ELIBEXEC 83 /* Cannot exec a shared library directly */
-#define EILSEQ 84 /* Illegal byte sequence */
-#define ERESTART 85 /* Interrupted system call should be restarted */
-#define ESTRPIPE 86 /* Streams pipe error */
-#define EUSERS 87 /* Too many users */
-#define ENOTSOCK 88 /* Socket operation on non-socket */
-#define EDESTADDRREQ 89 /* Destination address required */
-#define EMSGSIZE 90 /* Message too long */
-#define EPROTOTYPE 91 /* Protocol wrong type for socket */
-#define ENOPROTOOPT 92 /* Protocol not available */
-#define EPROTONOSUPPORT 93 /* Protocol not supported */
-#define ESOCKTNOSUPPORT 94 /* Socket type not supported */
-#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */
-#define EPFNOSUPPORT 96 /* Protocol family not supported */
-#define EAFNOSUPPORT 97 /* Address family not supported by protocol */
-#define EADDRINUSE 98 /* Address already in use */
-#define EADDRNOTAVAIL 99 /* Cannot assign requested address */
-#define ENETDOWN 100 /* Network is down */
-#define ENETUNREACH 101 /* Network is unreachable */
-#define ENETRESET 102 /* Network dropped connection because of reset */
-#define ECONNABORTED 103 /* Software caused connection abort */
-#define ECONNRESET 104 /* Connection reset by peer */
-#define ENOBUFS 105 /* No buffer space available */
-#define EISCONN 106 /* Transport endpoint is already connected */
-#define ENOTCONN 107 /* Transport endpoint is not connected */
-#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */
-#define ETOOMANYREFS 109 /* Too many references: cannot splice */
-#define ETIMEDOUT 110 /* Connection timed out */
-#define ECONNREFUSED 111 /* Connection refused */
-#define EHOSTDOWN 112 /* Host is down */
-#define EHOSTUNREACH 113 /* No route to host */
-#define EALREADY 114 /* Operation already in progress */
-#define EINPROGRESS 115 /* Operation now in progress */
-#define ESTALE 116 /* Stale NFS file handle */
-#define EUCLEAN 117 /* Structure needs cleaning */
-#define ENOTNAM 118 /* Not a XENIX named type file */
-#define ENAVAIL 119 /* No XENIX semaphores available */
-#define EISNAM 120 /* Is a named type file */
-#define EREMOTEIO 121 /* Remote I/O error */
-#define EDQUOT 122 /* Quota exceeded */
-
-#define ENOMEDIUM 123 /* No medium found */
-#define EMEDIUMTYPE 124 /* Wrong medium type */
-#define ECANCELED 125 /* Operation Canceled */
-#define ENOKEY 126 /* Required key not available */
-#define EKEYEXPIRED 127 /* Key has expired */
-#define EKEYREVOKED 128 /* Key has been revoked */
-#define EKEYREJECTED 129 /* Key was rejected by service */
-
-/* for robust mutexes */
-#define EOWNERDEAD 130 /* Owner died */
-#define ENOTRECOVERABLE 131 /* State not recoverable */
-
-#endif
diff --git a/original/asm-generic/fcntl.h b/original/asm-generic/fcntl.h
deleted file mode 100644
index 9e5b035..0000000
--- a/original/asm-generic/fcntl.h
+++ /dev/null
@@ -1,195 +0,0 @@
-#ifndef _ASM_GENERIC_FCNTL_H
-#define _ASM_GENERIC_FCNTL_H
-
-#include <linux/types.h>
-
-/*
- * FMODE_EXEC is 0x20
- * FMODE_NONOTIFY is 0x1000000
- * These cannot be used by userspace O_* until internal and external open
- * flags are split.
- * -Eric Paris
- */
-
-/*
- * When introducing new O_* bits, please check its uniqueness in fcntl_init().
- */
-
-#define O_ACCMODE 00000003
-#define O_RDONLY 00000000
-#define O_WRONLY 00000001
-#define O_RDWR 00000002
-#ifndef O_CREAT
-#define O_CREAT 00000100 /* not fcntl */
-#endif
-#ifndef O_EXCL
-#define O_EXCL 00000200 /* not fcntl */
-#endif
-#ifndef O_NOCTTY
-#define O_NOCTTY 00000400 /* not fcntl */
-#endif
-#ifndef O_TRUNC
-#define O_TRUNC 00001000 /* not fcntl */
-#endif
-#ifndef O_APPEND
-#define O_APPEND 00002000
-#endif
-#ifndef O_NONBLOCK
-#define O_NONBLOCK 00004000
-#endif
-#ifndef O_DSYNC
-#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
-#endif
-#ifndef FASYNC
-#define FASYNC 00020000 /* fcntl, for BSD compatibility */
-#endif
-#ifndef O_DIRECT
-#define O_DIRECT 00040000 /* direct disk access hint */
-#endif
-#ifndef O_LARGEFILE
-#define O_LARGEFILE 00100000
-#endif
-#ifndef O_DIRECTORY
-#define O_DIRECTORY 00200000 /* must be a directory */
-#endif
-#ifndef O_NOFOLLOW
-#define O_NOFOLLOW 00400000 /* don't follow links */
-#endif
-#ifndef O_NOATIME
-#define O_NOATIME 01000000
-#endif
-#ifndef O_CLOEXEC
-#define O_CLOEXEC 02000000 /* set close_on_exec */
-#endif
-
-/*
- * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
- * the O_SYNC flag. We continue to use the existing numerical value
- * for O_DSYNC semantics now, but using the correct symbolic name for it.
- * This new value is used to request true Posix O_SYNC semantics. It is
- * defined in this strange way to make sure applications compiled against
- * new headers get at least O_DSYNC semantics on older kernels.
- *
- * This has the nice side-effect that we can simply test for O_DSYNC
- * wherever we do not care if O_DSYNC or O_SYNC is used.
- *
- * Note: __O_SYNC must never be used directly.
- */
-#ifndef O_SYNC
-#define __O_SYNC 04000000
-#define O_SYNC (__O_SYNC|O_DSYNC)
-#endif
-
-#ifndef O_PATH
-#define O_PATH 010000000
-#endif
-
-#ifndef O_NDELAY
-#define O_NDELAY O_NONBLOCK
-#endif
-
-#define F_DUPFD 0 /* dup */
-#define F_GETFD 1 /* get close_on_exec */
-#define F_SETFD 2 /* set/clear close_on_exec */
-#define F_GETFL 3 /* get file->f_flags */
-#define F_SETFL 4 /* set file->f_flags */
-#ifndef F_GETLK
-#define F_GETLK 5
-#define F_SETLK 6
-#define F_SETLKW 7
-#endif
-#ifndef F_SETOWN
-#define F_SETOWN 8 /* for sockets. */
-#define F_GETOWN 9 /* for sockets. */
-#endif
-#ifndef F_SETSIG
-#define F_SETSIG 10 /* for sockets. */
-#define F_GETSIG 11 /* for sockets. */
-#endif
-
-#ifndef CONFIG_64BIT
-#ifndef F_GETLK64
-#define F_GETLK64 12 /* using 'struct flock64' */
-#define F_SETLK64 13
-#define F_SETLKW64 14
-#endif
-#endif
-
-#ifndef F_SETOWN_EX
-#define F_SETOWN_EX 15
-#define F_GETOWN_EX 16
-#endif
-
-#define F_OWNER_TID 0
-#define F_OWNER_PID 1
-#define F_OWNER_PGRP 2
-
-struct f_owner_ex {
- int type;
- __kernel_pid_t pid;
-};
-
-/* for F_[GET|SET]FL */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* for posix fcntl() and lockf() */
-#ifndef F_RDLCK
-#define F_RDLCK 0
-#define F_WRLCK 1
-#define F_UNLCK 2
-#endif
-
-/* for old implementation of bsd flock () */
-#ifndef F_EXLCK
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-#endif
-
-/* operations for bsd flock(), also used by the kernel implementation */
-#define LOCK_SH 1 /* shared lock */
-#define LOCK_EX 2 /* exclusive lock */
-#define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-#define LOCK_UN 8 /* remove lock */
-
-#define LOCK_MAND 32 /* This is a mandatory flock ... */
-#define LOCK_READ 64 /* which allows concurrent read operations */
-#define LOCK_WRITE 128 /* which allows concurrent write operations */
-#define LOCK_RW 192 /* which allows concurrent read & write ops */
-
-#define F_LINUX_SPECIFIC_BASE 1024
-
-#ifndef HAVE_ARCH_STRUCT_FLOCK
-#ifndef __ARCH_FLOCK_PAD
-#define __ARCH_FLOCK_PAD
-#endif
-
-struct flock {
- short l_type;
- short l_whence;
- __kernel_off_t l_start;
- __kernel_off_t l_len;
- __kernel_pid_t l_pid;
- __ARCH_FLOCK_PAD
-};
-#endif
-
-#ifndef CONFIG_64BIT
-
-#ifndef HAVE_ARCH_STRUCT_FLOCK64
-#ifndef __ARCH_FLOCK64_PAD
-#define __ARCH_FLOCK64_PAD
-#endif
-
-struct flock64 {
- short l_type;
- short l_whence;
- __kernel_loff_t l_start;
- __kernel_loff_t l_len;
- __kernel_pid_t l_pid;
- __ARCH_FLOCK64_PAD
-};
-#endif
-#endif /* !CONFIG_64BIT */
-
-#endif /* _ASM_GENERIC_FCNTL_H */
diff --git a/original/asm-generic/futex.h b/original/asm-generic/futex.h
deleted file mode 100644
index df893c1..0000000
--- a/original/asm-generic/futex.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef _ASM_GENERIC_FUTEX_H
-#define _ASM_GENERIC_FUTEX_H
-
-#ifdef __KERNEL__
-
-#include <linux/futex.h>
-#include <asm/errno.h>
-#include <asm/uaccess.h>
-
-static inline int
-futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
-{
- int op = (encoded_op >> 28) & 7;
- int cmp = (encoded_op >> 24) & 15;
- int oparg = (encoded_op << 8) >> 20;
- int cmparg = (encoded_op << 20) >> 20;
- int oldval = 0, ret;
- if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
- oparg = 1 << oparg;
-
- if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
- return -EFAULT;
-
- inc_preempt_count();
-
- switch (op) {
- case FUTEX_OP_SET:
- case FUTEX_OP_ADD:
- case FUTEX_OP_OR:
- case FUTEX_OP_ANDN:
- case FUTEX_OP_XOR:
- default:
- ret = -ENOSYS;
- }
-
- dec_preempt_count();
-
- if (!ret) {
- switch (cmp) {
- case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
- case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
- case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
- case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
- case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
- case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
- default: ret = -ENOSYS;
- }
- }
- return ret;
-}
-
-static inline int
-futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
-{
- return -ENOSYS;
-}
-
-#endif
-#endif
diff --git a/original/asm-generic/ioctl.h b/original/asm-generic/ioctl.h
deleted file mode 100644
index cd02729..0000000
--- a/original/asm-generic/ioctl.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef _ASM_GENERIC_IOCTL_H
-#define _ASM_GENERIC_IOCTL_H
-
-/* ioctl command encoding: 32 bits total, command in lower 16 bits,
- * size of the parameter structure in the lower 14 bits of the
- * upper 16 bits.
- * Encoding the size of the parameter structure in the ioctl request
- * is useful for catching programs compiled with old versions
- * and to avoid overwriting user space outside the user buffer area.
- * The highest 2 bits are reserved for indicating the ``access mode''.
- * NOTE: This limits the max parameter size to 16kB -1 !
- */
-
-/*
- * The following is for compatibility across the various Linux
- * platforms. The generic ioctl numbering scheme doesn't really enforce
- * a type field. De facto, however, the top 8 bits of the lower 16
- * bits are indeed used as a type field, so we might just as well make
- * this explicit here. Please be sure to use the decoding macros
- * below from now on.
- */
-#define _IOC_NRBITS 8
-#define _IOC_TYPEBITS 8
-#define _IOC_SIZEBITS 14
-#define _IOC_DIRBITS 2
-
-#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
-#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
-#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
-#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
-
-#define _IOC_NRSHIFT 0
-#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
-#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
-#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
-
-/*
- * Direction bits.
- */
-#define _IOC_NONE 0U
-#define _IOC_WRITE 1U
-#define _IOC_READ 2U
-
-#define _IOC(dir,type,nr,size) \
- (((dir) << _IOC_DIRSHIFT) | \
- ((type) << _IOC_TYPESHIFT) | \
- ((nr) << _IOC_NRSHIFT) | \
- ((size) << _IOC_SIZESHIFT))
-
-/* provoke compile error for invalid uses of size argument */
-extern unsigned int __invalid_size_argument_for_IOC;
-#define _IOC_TYPECHECK(t) \
- ((sizeof(t) == sizeof(t[1]) && \
- sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
- sizeof(t) : __invalid_size_argument_for_IOC)
-
-/* used to create numbers */
-#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
-#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size)))
-#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
-#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size)))
-#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
-#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
-#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
-
-/* used to decode ioctl numbers.. */
-#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
-#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
-#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
-#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
-
-/* ...and for the drivers/sound files... */
-
-#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
-#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
-#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
-#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
-#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
-
-#endif /* _ASM_GENERIC_IOCTL_H */
diff --git a/original/asm-generic/ipc.h b/original/asm-generic/ipc.h
deleted file mode 100644
index a40407a..0000000
--- a/original/asm-generic/ipc.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef _ASM_GENERIC_IPC_H
-#define _ASM_GENERIC_IPC_H
-/*
- * These are used to wrap system calls.
- *
- * See architecture code for ugly details..
- */
-struct ipc_kludge {
- struct msgbuf __user *msgp;
- long msgtyp;
-};
-
-#define SEMOP 1
-#define SEMGET 2
-#define SEMCTL 3
-#define SEMTIMEDOP 4
-#define MSGSND 11
-#define MSGRCV 12
-#define MSGGET 13
-#define MSGCTL 14
-#define SHMAT 21
-#define SHMDT 22
-#define SHMGET 23
-#define SHMCTL 24
-
-/* Used by the DIPC package, try and avoid reusing it */
-#define DIPC 25
-
-#define IPCCALL(version,op) ((version)<<16 | (op))
-
-#endif /* _ASM_GENERIC_IPC_H */
diff --git a/original/asm-generic/local.h b/original/asm-generic/local.h
deleted file mode 100644
index ab46929..0000000
--- a/original/asm-generic/local.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef _ASM_GENERIC_LOCAL_H
-#define _ASM_GENERIC_LOCAL_H
-
-#include <linux/percpu.h>
-#include <linux/hardirq.h>
-#include <asm/atomic.h>
-#include <asm/types.h>
-
-/*
- * A signed long type for operations which are atomic for a single CPU.
- * Usually used in combination with per-cpu variables.
- *
- * This is the default implementation, which uses atomic_long_t. Which is
- * rather pointless. The whole point behind local_t is that some processors
- * can perform atomic adds and subtracts in a manner which is atomic wrt IRQs
- * running on this CPU. local_t allows exploitation of such capabilities.
- */
-
-/* Implement in terms of atomics. */
-
-/* Don't use typedef: don't want them to be mixed with atomic_t's. */
-typedef struct
-{
- atomic_long_t a;
-} local_t;
-
-#define LOCAL_INIT(i) { ATOMIC_LONG_INIT(i) }
-
-#define local_read(l) atomic_long_read(&(l)->a)
-#define local_set(l,i) atomic_long_set((&(l)->a),(i))
-#define local_inc(l) atomic_long_inc(&(l)->a)
-#define local_dec(l) atomic_long_dec(&(l)->a)
-#define local_add(i,l) atomic_long_add((i),(&(l)->a))
-#define local_sub(i,l) atomic_long_sub((i),(&(l)->a))
-
-/* Non-atomic variants, ie. preemption disabled and won't be touched
- * in interrupt, etc. Some archs can optimize this case well. */
-#define __local_inc(l) local_set((l), local_read(l) + 1)
-#define __local_dec(l) local_set((l), local_read(l) - 1)
-#define __local_add(i,l) local_set((l), local_read(l) + (i))
-#define __local_sub(i,l) local_set((l), local_read(l) - (i))
-
-/* Use these for per-cpu local_t variables: on some archs they are
- * much more efficient than these naive implementations. Note they take
- * a variable (eg. mystruct.foo), not an address.
- */
-#define cpu_local_read(v) local_read(&__get_cpu_var(v))
-#define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i))
-#define cpu_local_inc(v) local_inc(&__get_cpu_var(v))
-#define cpu_local_dec(v) local_dec(&__get_cpu_var(v))
-#define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v))
-#define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v))
-
-/* Non-atomic increments, ie. preemption disabled and won't be touched
- * in interrupt, etc. Some archs can optimize this case well.
- */
-#define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v))
-#define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v))
-#define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v))
-#define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v))
-
-#endif /* _ASM_GENERIC_LOCAL_H */
diff --git a/original/asm-generic/memory_model.h b/original/asm-generic/memory_model.h
deleted file mode 100644
index 8078cbd..0000000
--- a/original/asm-generic/memory_model.h
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __ASM_MEMORY_MODEL_H
-#define __ASM_MEMORY_MODEL_H
-
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
-#if defined(CONFIG_FLATMEM)
-
-#ifndef ARCH_PFN_OFFSET
-#define ARCH_PFN_OFFSET (0UL)
-#endif
-
-#elif defined(CONFIG_DISCONTIGMEM)
-
-#ifndef arch_pfn_to_nid
-#define arch_pfn_to_nid(pfn) pfn_to_nid(pfn)
-#endif
-
-#ifndef arch_local_page_offset
-#define arch_local_page_offset(pfn, nid) \
- ((pfn) - NODE_DATA(nid)->node_start_pfn)
-#endif
-
-#endif /* CONFIG_DISCONTIGMEM */
-
-/*
- * supports 3 memory models.
- */
-#if defined(CONFIG_FLATMEM)
-
-#define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
-#define __page_to_pfn(page) ((unsigned long)((page) - mem_map) + \
- ARCH_PFN_OFFSET)
-#elif defined(CONFIG_DISCONTIGMEM)
-
-#define __pfn_to_page(pfn) \
-({ unsigned long __pfn = (pfn); \
- unsigned long __nid = arch_pfn_to_nid(pfn); \
- NODE_DATA(__nid)->node_mem_map + arch_local_page_offset(__pfn, __nid);\
-})
-
-#define __page_to_pfn(pg) \
-({ struct page *__pg = (pg); \
- struct pglist_data *__pgdat = NODE_DATA(page_to_nid(__pg)); \
- (unsigned long)(__pg - __pgdat->node_mem_map) + \
- __pgdat->node_start_pfn; \
-})
-
-#elif defined(CONFIG_SPARSEMEM)
-/*
- * Note: section's mem_map is encorded to reflect its start_pfn.
- * section[i].section_mem_map == mem_map's address - start_pfn;
- */
-#define __page_to_pfn(pg) \
-({ struct page *__pg = (pg); \
- int __sec = page_to_section(__pg); \
- __pg - __section_mem_map_addr(__nr_to_section(__sec)); \
-})
-
-#define __pfn_to_page(pfn) \
-({ unsigned long __pfn = (pfn); \
- struct mem_section *__sec = __pfn_to_section(__pfn); \
- __section_mem_map_addr(__sec) + __pfn; \
-})
-#endif /* CONFIG_FLATMEM/DISCONTIGMEM/SPARSEMEM */
-
-#ifdef CONFIG_OUT_OF_LINE_PFN_TO_PAGE
-struct page;
-/* this is useful when inlined pfn_to_page is too big */
-extern struct page *pfn_to_page(unsigned long pfn);
-extern unsigned long page_to_pfn(struct page *page);
-#else
-#define page_to_pfn __page_to_pfn
-#define pfn_to_page __pfn_to_page
-#endif /* CONFIG_OUT_OF_LINE_PFN_TO_PAGE */
-
-#endif /* __ASSEMBLY__ */
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/asm-generic/mman-common.h b/original/asm-generic/mman-common.h
deleted file mode 100644
index 787abbb..0000000
--- a/original/asm-generic/mman-common.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef __ASM_GENERIC_MMAN_COMMON_H
-#define __ASM_GENERIC_MMAN_COMMON_H
-
-/*
- Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd.
- Based on: asm-xxx/mman.h
-*/
-
-#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 0x8 /* page may be used for atomic ops */
-#define PROT_NONE 0x0 /* page can not be accessed */
-#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
-#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
-
-#define MAP_SHARED 0x01 /* Share changes */
-#define MAP_PRIVATE 0x02 /* Changes are private */
-#define MAP_TYPE 0x0f /* Mask for type of mapping */
-#define MAP_FIXED 0x10 /* Interpret addr exactly */
-#define MAP_ANONYMOUS 0x20 /* don't use a file */
-#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
-# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */
-#else
-# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
-#endif
-
-#define MS_ASYNC 1 /* sync memory asynchronously */
-#define MS_INVALIDATE 2 /* invalidate the caches */
-#define MS_SYNC 4 /* synchronous memory sync */
-
-#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 */
-#define MADV_HWPOISON 100 /* poison a page for testing */
-#define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */
-
-#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
-#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
-
-#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
-#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
-
-/* compatibility flags */
-#define MAP_FILE 0
-
-#endif /* __ASM_GENERIC_MMAN_COMMON_H */
diff --git a/original/asm-generic/mman.h b/original/asm-generic/mman.h
deleted file mode 100644
index 32c8bd6..0000000
--- a/original/asm-generic/mman.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __ASM_GENERIC_MMAN_H
-#define __ASM_GENERIC_MMAN_H
-
-#include <asm-generic/mman-common.h>
-
-#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
-#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
-#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
-#define MAP_LOCKED 0x2000 /* pages are locked */
-#define MAP_NORESERVE 0x4000 /* don't check for reservations */
-#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
-#define MAP_NONBLOCK 0x10000 /* do not block on IO */
-#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
-#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
-
-#define MCL_CURRENT 1 /* lock all current mappings */
-#define MCL_FUTURE 2 /* lock all future mappings */
-
-#endif /* __ASM_GENERIC_MMAN_H */
diff --git a/original/asm-generic/mutex-xchg.h b/original/asm-generic/mutex-xchg.h
deleted file mode 100644
index 32a2100..0000000
--- a/original/asm-generic/mutex-xchg.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * asm-generic/mutex-xchg.h
- *
- * Generic implementation of the mutex fastpath, based on xchg().
- *
- * NOTE: An xchg based implementation might be less optimal than an atomic
- * decrement/increment based implementation. If your architecture
- * has a reasonable atomic dec/inc then you should probably use
- * asm-generic/mutex-dec.h instead, or you could open-code an
- * optimized version in asm/mutex.h.
- */
-#ifndef _ASM_GENERIC_MUTEX_XCHG_H
-#define _ASM_GENERIC_MUTEX_XCHG_H
-
-/**
- * __mutex_fastpath_lock - try to take the lock by moving the count
- * from 1 to a 0 value
- * @count: pointer of type atomic_t
- * @fail_fn: function to call if the original value was not 1
- *
- * Change the count from 1 to a value lower than 1, and call <fail_fn> if it
- * wasn't 1 originally. This function MUST leave the value lower than 1
- * even when the "1" assertion wasn't true.
- */
-static inline void
-__mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *))
-{
- if (unlikely(atomic_xchg(count, 0) != 1))
- fail_fn(count);
- else
- smp_mb();
-}
-
-/**
- * __mutex_fastpath_lock_retval - try to take the lock by moving the count
- * from 1 to a 0 value
- * @count: pointer of type atomic_t
- * @fail_fn: function to call if the original value was not 1
- *
- * Change the count from 1 to a value lower than 1, and call <fail_fn> if it
- * wasn't 1 originally. This function returns 0 if the fastpath succeeds,
- * or anything the slow path function returns
- */
-static inline int
-__mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *))
-{
- if (unlikely(atomic_xchg(count, 0) != 1))
- return fail_fn(count);
- else {
- smp_mb();
- return 0;
- }
-}
-
-/**
- * __mutex_fastpath_unlock - try to promote the mutex from 0 to 1
- * @count: pointer of type atomic_t
- * @fail_fn: function to call if the original value was not 0
- *
- * try to promote the mutex from 0 to 1. if it wasn't 0, call <function>
- * In the failure case, this function is allowed to either set the value to
- * 1, or to set it to a value lower than one.
- * If the implementation sets it to a value of lower than one, the
- * __mutex_slowpath_needs_to_unlock() macro needs to return 1, it needs
- * to return 0 otherwise.
- */
-static inline void
-__mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *))
-{
- smp_mb();
- if (unlikely(atomic_xchg(count, 1) != 0))
- fail_fn(count);
-}
-
-#define __mutex_slowpath_needs_to_unlock() 0
-
-/**
- * __mutex_fastpath_trylock - try to acquire the mutex, without waiting
- *
- * @count: pointer of type atomic_t
- * @fail_fn: spinlock based trylock implementation
- *
- * Change the count from 1 to a value lower than 1, and return 0 (failure)
- * if it wasn't 1 originally, or return 1 (success) otherwise. This function
- * MUST leave the value lower than 1 even when the "1" assertion wasn't true.
- * Additionally, if the value was < 0 originally, this function must not leave
- * it to 0 on failure.
- *
- * If the architecture has no effective trylock variant, it should call the
- * <fail_fn> spinlock-based trylock variant unconditionally.
- */
-static inline int
-__mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *))
-{
- int prev = atomic_xchg(count, 0);
-
- if (unlikely(prev < 0)) {
- /*
- * The lock was marked contended so we must restore that
- * state. If while doing so we get back a prev value of 1
- * then we just own it.
- *
- * [ In the rare case of the mutex going to 1, to 0, to -1
- * and then back to 0 in this few-instructions window,
- * this has the potential to trigger the slowpath for the
- * owner's unlock path needlessly, but that's not a problem
- * in practice. ]
- */
- prev = atomic_xchg(count, prev);
- if (prev < 0)
- prev = 0;
- }
- smp_mb();
-
- return prev;
-}
-
-#endif
diff --git a/original/asm-generic/percpu.h b/original/asm-generic/percpu.h
deleted file mode 100644
index e160e04..0000000
--- a/original/asm-generic/percpu.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef _ASM_GENERIC_PERCPU_H_
-#define _ASM_GENERIC_PERCPU_H_
-#include <linux/compiler.h>
-
-#define __GENERIC_PER_CPU
-#ifdef CONFIG_SMP
-
-extern unsigned long __per_cpu_offset[NR_CPUS];
-
-#define per_cpu_offset(x) (__per_cpu_offset[x])
-
-/* Separate out the type, so (int[3], foo) works. */
-#define DEFINE_PER_CPU(type, name) \
- __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
-
-/* var is in discarded region: offset to particular copy we want */
-#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
-#define __get_cpu_var(var) per_cpu(var, smp_processor_id())
-#define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id())
-
-/* A macro to avoid #include hell... */
-#define percpu_modcopy(pcpudst, src, size) \
-do { \
- unsigned int __i; \
- for_each_possible_cpu(__i) \
- memcpy((pcpudst)+__per_cpu_offset[__i], \
- (src), (size)); \
-} while (0)
-#else /* ! SMP */
-
-#define DEFINE_PER_CPU(type, name) \
- __typeof__(type) per_cpu__##name
-
-#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
-#define __get_cpu_var(var) per_cpu__##var
-#define __raw_get_cpu_var(var) per_cpu__##var
-
-#endif /* SMP */
-
-#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
-
-#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
-#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
-
-#endif /* _ASM_GENERIC_PERCPU_H_ */
diff --git a/original/asm-generic/pgtable-nopmd.h b/original/asm-generic/pgtable-nopmd.h
deleted file mode 100644
index 725612b..0000000
--- a/original/asm-generic/pgtable-nopmd.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef _PGTABLE_NOPMD_H
-#define _PGTABLE_NOPMD_H
-
-#ifndef __ASSEMBLY__
-
-#include <asm-generic/pgtable-nopud.h>
-
-struct mm_struct;
-
-#define __PAGETABLE_PMD_FOLDED
-
-/*
- * Having the pmd type consist of a pud gets the size right, and allows
- * us to conceptually access the pud entry that this pmd is folded into
- * without casting.
- */
-typedef struct { pud_t pud; } pmd_t;
-
-#define PMD_SHIFT PUD_SHIFT
-#define PTRS_PER_PMD 1
-#define PMD_SIZE (1UL << PMD_SHIFT)
-#define PMD_MASK (~(PMD_SIZE-1))
-
-/*
- * The "pud_xxx()" functions here are trivial for a folded two-level
- * setup: the pmd is never bad, and a pmd always exists (as it's folded
- * into the pud entry)
- */
-static inline int pud_none(pud_t pud) { return 0; }
-static inline int pud_bad(pud_t pud) { return 0; }
-static inline int pud_present(pud_t pud) { return 1; }
-static inline void pud_clear(pud_t *pud) { }
-#define pmd_ERROR(pmd) (pud_ERROR((pmd).pud))
-
-#define pud_populate(mm, pmd, pte) do { } while (0)
-
-/*
- * (pmds are folded into puds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-#define set_pud(pudptr, pudval) set_pmd((pmd_t *)(pudptr), (pmd_t) { pudval })
-
-static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address)
-{
- return (pmd_t *)pud;
-}
-
-#define pmd_val(x) (pud_val((x).pud))
-#define __pmd(x) ((pmd_t) { __pud(x) } )
-
-#define pud_page(pud) (pmd_page((pmd_t){ pud }))
-#define pud_page_vaddr(pud) (pmd_page_vaddr((pmd_t){ pud }))
-
-/*
- * allocating and freeing a pmd is trivial: the 1-entry pmd is
- * inside the pud, so has no extra memory associated with it.
- */
-#define pmd_alloc_one(mm, address) NULL
-static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
-{
-}
-#define __pmd_free_tlb(tlb, x, a) do { } while (0)
-
-#undef pmd_addr_end
-#define pmd_addr_end(addr, end) (end)
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* _PGTABLE_NOPMD_H */
diff --git a/original/asm-generic/pgtable-nopud.h b/original/asm-generic/pgtable-nopud.h
deleted file mode 100644
index 82e29f0..0000000
--- a/original/asm-generic/pgtable-nopud.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _PGTABLE_NOPUD_H
-#define _PGTABLE_NOPUD_H
-
-#ifndef __ASSEMBLY__
-
-#define __PAGETABLE_PUD_FOLDED
-
-/*
- * Having the pud type consist of a pgd gets the size right, and allows
- * us to conceptually access the pgd entry that this pud is folded into
- * without casting.
- */
-typedef struct { pgd_t pgd; } pud_t;
-
-#define PUD_SHIFT PGDIR_SHIFT
-#define PTRS_PER_PUD 1
-#define PUD_SIZE (1UL << PUD_SHIFT)
-#define PUD_MASK (~(PUD_SIZE-1))
-
-/*
- * The "pgd_xxx()" functions here are trivial for a folded two-level
- * setup: the pud is never bad, and a pud always exists (as it's folded
- * into the pgd entry)
- */
-static inline int pgd_none(pgd_t pgd) { return 0; }
-static inline int pgd_bad(pgd_t pgd) { return 0; }
-static inline int pgd_present(pgd_t pgd) { return 1; }
-static inline void pgd_clear(pgd_t *pgd) { }
-#define pud_ERROR(pud) (pgd_ERROR((pud).pgd))
-
-#define pgd_populate(mm, pgd, pud) do { } while (0)
-/*
- * (puds are folded into pgds so this doesn't get actually called,
- * but the define is needed for a generic inline function.)
- */
-#define set_pgd(pgdptr, pgdval) set_pud((pud_t *)(pgdptr), (pud_t) { pgdval })
-
-static inline pud_t * pud_offset(pgd_t * pgd, unsigned long address)
-{
- return (pud_t *)pgd;
-}
-
-#define pud_val(x) (pgd_val((x).pgd))
-#define __pud(x) ((pud_t) { __pgd(x) } )
-
-#define pgd_page(pgd) (pud_page((pud_t){ pgd }))
-#define pgd_page_kernel(pgd) (pud_page_kernel((pud_t){ pgd }))
-
-/*
- * allocating and freeing a pud is trivial: the 1-entry pud is
- * inside the pgd, so has no extra memory associated with it.
- */
-#define pud_alloc_one(mm, address) NULL
-#define pud_free(x) do { } while (0)
-#define __pud_free_tlb(tlb, x) do { } while (0)
-
-#undef pud_addr_end
-#define pud_addr_end(addr, end) (end)
-
-#endif /* __ASSEMBLY__ */
-#endif /* _PGTABLE_NOPUD_H */
diff --git a/original/asm-generic/pgtable.h b/original/asm-generic/pgtable.h
deleted file mode 100644
index c2059a3..0000000
--- a/original/asm-generic/pgtable.h
+++ /dev/null
@@ -1,235 +0,0 @@
-#ifndef _ASM_GENERIC_PGTABLE_H
-#define _ASM_GENERIC_PGTABLE_H
-
-#ifndef __HAVE_ARCH_PTEP_ESTABLISH
-/*
- * Establish a new mapping:
- * - flush the old one
- * - update the page tables
- * - inform the TLB about the new one
- *
- * We hold the mm semaphore for reading, and the pte lock.
- *
- * Note: the old pte is known to not be writable, so we don't need to
- * worry about dirty bits etc getting lost.
- */
-#ifndef __HAVE_ARCH_SET_PTE_ATOMIC
-#define ptep_establish(__vma, __address, __ptep, __entry) \
-do { \
- set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \
- flush_tlb_page(__vma, __address); \
-} while (0)
-#else /* __HAVE_ARCH_SET_PTE_ATOMIC */
-#define ptep_establish(__vma, __address, __ptep, __entry) \
-do { \
- set_pte_atomic(__ptep, __entry); \
- flush_tlb_page(__vma, __address); \
-} while (0)
-#endif /* __HAVE_ARCH_SET_PTE_ATOMIC */
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
-/*
- * Largely same as above, but only sets the access flags (dirty,
- * accessed, and writable). Furthermore, we know it always gets set
- * to a "more permissive" setting, which allows most architectures
- * to optimize this.
- */
-#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
-do { \
- set_pte_at((__vma)->vm_mm, (__address), __ptep, __entry); \
- flush_tlb_page(__vma, __address); \
-} while (0)
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
-#define ptep_test_and_clear_young(__vma, __address, __ptep) \
-({ \
- pte_t __pte = *(__ptep); \
- int r = 1; \
- if (!pte_young(__pte)) \
- r = 0; \
- else \
- set_pte_at((__vma)->vm_mm, (__address), \
- (__ptep), pte_mkold(__pte)); \
- r; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
-#define ptep_clear_flush_young(__vma, __address, __ptep) \
-({ \
- int __young; \
- __young = ptep_test_and_clear_young(__vma, __address, __ptep); \
- if (__young) \
- flush_tlb_page(__vma, __address); \
- __young; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY
-#define ptep_test_and_clear_dirty(__vma, __address, __ptep) \
-({ \
- pte_t __pte = *__ptep; \
- int r = 1; \
- if (!pte_dirty(__pte)) \
- r = 0; \
- else \
- set_pte_at((__vma)->vm_mm, (__address), (__ptep), \
- pte_mkclean(__pte)); \
- r; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_CLEAR_DIRTY_FLUSH
-#define ptep_clear_flush_dirty(__vma, __address, __ptep) \
-({ \
- int __dirty; \
- __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); \
- if (__dirty) \
- flush_tlb_page(__vma, __address); \
- __dirty; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
-#define ptep_get_and_clear(__mm, __address, __ptep) \
-({ \
- pte_t __pte = *(__ptep); \
- pte_clear((__mm), (__address), (__ptep)); \
- __pte; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL
-#define ptep_get_and_clear_full(__mm, __address, __ptep, __full) \
-({ \
- pte_t __pte; \
- __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); \
- __pte; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTE_CLEAR_FULL
-#define pte_clear_full(__mm, __address, __ptep, __full) \
-do { \
- pte_clear((__mm), (__address), (__ptep)); \
-} while (0)
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH
-#define ptep_clear_flush(__vma, __address, __ptep) \
-({ \
- pte_t __pte; \
- __pte = ptep_get_and_clear((__vma)->vm_mm, __address, __ptep); \
- flush_tlb_page(__vma, __address); \
- __pte; \
-})
-#endif
-
-#ifndef __HAVE_ARCH_PTEP_SET_WRPROTECT
-struct mm_struct;
-static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long address, pte_t *ptep)
-{
- pte_t old_pte = *ptep;
- set_pte_at(mm, address, ptep, pte_wrprotect(old_pte));
-}
-#endif
-
-#ifndef __HAVE_ARCH_PTE_SAME
-#define pte_same(A,B) (pte_val(A) == pte_val(B))
-#endif
-
-#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_DIRTY
-#define page_test_and_clear_dirty(page) (0)
-#define pte_maybe_dirty(pte) pte_dirty(pte)
-#else
-#define pte_maybe_dirty(pte) (1)
-#endif
-
-#ifndef __HAVE_ARCH_PAGE_TEST_AND_CLEAR_YOUNG
-#define page_test_and_clear_young(page) (0)
-#endif
-
-#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
-#define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
-#endif
-
-#ifndef __HAVE_ARCH_LAZY_MMU_PROT_UPDATE
-#define lazy_mmu_prot_update(pte) do { } while (0)
-#endif
-
-#ifndef __HAVE_ARCH_MOVE_PTE
-#define move_pte(pte, prot, old_addr, new_addr) (pte)
-#endif
-
-/*
- * When walking page tables, get the address of the next boundary,
- * or the end address of the range if that comes earlier. Although no
- * vma end wraps to 0, rounded up __boundary may wrap to 0 throughout.
- */
-
-#define pgd_addr_end(addr, end) \
-({ unsigned long __boundary = ((addr) + PGDIR_SIZE) & PGDIR_MASK; \
- (__boundary - 1 < (end) - 1)? __boundary: (end); \
-})
-
-#ifndef pud_addr_end
-#define pud_addr_end(addr, end) \
-({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK; \
- (__boundary - 1 < (end) - 1)? __boundary: (end); \
-})
-#endif
-
-#ifndef pmd_addr_end
-#define pmd_addr_end(addr, end) \
-({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; \
- (__boundary - 1 < (end) - 1)? __boundary: (end); \
-})
-#endif
-
-#ifndef __ASSEMBLY__
-/*
- * When walking page tables, we usually want to skip any p?d_none entries;
- * and any p?d_bad entries - reporting the error before resetting to none.
- * Do the tests inline, but report and clear the bad entry in mm/memory.c.
- */
-void pgd_clear_bad(pgd_t *);
-void pud_clear_bad(pud_t *);
-void pmd_clear_bad(pmd_t *);
-
-static inline int pgd_none_or_clear_bad(pgd_t *pgd)
-{
- if (pgd_none(*pgd))
- return 1;
- if (unlikely(pgd_bad(*pgd))) {
- pgd_clear_bad(pgd);
- return 1;
- }
- return 0;
-}
-
-static inline int pud_none_or_clear_bad(pud_t *pud)
-{
- if (pud_none(*pud))
- return 1;
- if (unlikely(pud_bad(*pud))) {
- pud_clear_bad(pud);
- return 1;
- }
- return 0;
-}
-
-static inline int pmd_none_or_clear_bad(pmd_t *pmd)
-{
- if (pmd_none(*pmd))
- return 1;
- if (unlikely(pmd_bad(*pmd))) {
- pmd_clear_bad(pmd);
- return 1;
- }
- return 0;
-}
-#endif /* !__ASSEMBLY__ */
-
-#endif /* _ASM_GENERIC_PGTABLE_H */
diff --git a/original/asm-generic/poll.h b/original/asm-generic/poll.h
deleted file mode 100644
index 44bce83..0000000
--- a/original/asm-generic/poll.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef __ASM_GENERIC_POLL_H
-#define __ASM_GENERIC_POLL_H
-
-/* These are specified by iBCS2 */
-#define POLLIN 0x0001
-#define POLLPRI 0x0002
-#define POLLOUT 0x0004
-#define POLLERR 0x0008
-#define POLLHUP 0x0010
-#define POLLNVAL 0x0020
-
-/* The rest seem to be more-or-less nonstandard. Check them! */
-#define POLLRDNORM 0x0040
-#define POLLRDBAND 0x0080
-#ifndef POLLWRNORM
-#define POLLWRNORM 0x0100
-#endif
-#ifndef POLLWRBAND
-#define POLLWRBAND 0x0200
-#endif
-#ifndef POLLMSG
-#define POLLMSG 0x0400
-#endif
-#ifndef POLLREMOVE
-#define POLLREMOVE 0x1000
-#endif
-#ifndef POLLRDHUP
-#define POLLRDHUP 0x2000
-#endif
-
-struct pollfd {
- int fd;
- short events;
- short revents;
-};
-
-#endif /* __ASM_GENERIC_POLL_H */
diff --git a/original/asm-generic/posix_types.h b/original/asm-generic/posix_types.h
deleted file mode 100644
index 91d44bd..0000000
--- a/original/asm-generic/posix_types.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef __ASM_GENERIC_POSIX_TYPES_H
-#define __ASM_GENERIC_POSIX_TYPES_H
-
-#include <asm/bitsperlong.h>
-/*
- * This file is generally used by user-level software, so you need to
- * be a little careful about namespace pollution etc.
- *
- * First the types that are often defined in different ways across
- * architectures, so that you can override them.
- */
-
-#ifndef __kernel_long_t
-typedef long __kernel_long_t;
-typedef unsigned long __kernel_ulong_t;
-#endif
-
-#ifndef __kernel_ino_t
-typedef __kernel_ulong_t __kernel_ino_t;
-#endif
-
-#ifndef __kernel_mode_t
-typedef unsigned int __kernel_mode_t;
-#endif
-
-#ifndef __kernel_nlink_t
-typedef __kernel_ulong_t __kernel_nlink_t;
-#endif
-
-#ifndef __kernel_pid_t
-typedef int __kernel_pid_t;
-#endif
-
-#ifndef __kernel_ipc_pid_t
-typedef int __kernel_ipc_pid_t;
-#endif
-
-#ifndef __kernel_uid_t
-typedef unsigned int __kernel_uid_t;
-typedef unsigned int __kernel_gid_t;
-#endif
-
-#ifndef __kernel_suseconds_t
-typedef __kernel_long_t __kernel_suseconds_t;
-#endif
-
-#ifndef __kernel_daddr_t
-typedef int __kernel_daddr_t;
-#endif
-
-#ifndef __kernel_uid32_t
-typedef unsigned int __kernel_uid32_t;
-typedef unsigned int __kernel_gid32_t;
-#endif
-
-#ifndef __kernel_old_uid_t
-typedef __kernel_uid_t __kernel_old_uid_t;
-typedef __kernel_gid_t __kernel_old_gid_t;
-#endif
-
-#ifndef __kernel_old_dev_t
-typedef unsigned int __kernel_old_dev_t;
-#endif
-
-/*
- * Most 32 bit architectures use "unsigned int" size_t,
- * and all 64 bit architectures use "unsigned long" size_t.
- */
-#ifndef __kernel_size_t
-#if __BITS_PER_LONG != 64
-typedef unsigned int __kernel_size_t;
-typedef int __kernel_ssize_t;
-typedef int __kernel_ptrdiff_t;
-#else
-typedef __kernel_ulong_t __kernel_size_t;
-typedef __kernel_long_t __kernel_ssize_t;
-typedef __kernel_long_t __kernel_ptrdiff_t;
-#endif
-#endif
-
-#ifndef __kernel_fsid_t
-typedef struct {
- int val[2];
-} __kernel_fsid_t;
-#endif
-
-/*
- * anything below here should be completely generic
- */
-typedef __kernel_long_t __kernel_off_t;
-typedef long long __kernel_loff_t;
-typedef __kernel_long_t __kernel_time_t;
-typedef __kernel_long_t __kernel_clock_t;
-typedef int __kernel_timer_t;
-typedef int __kernel_clockid_t;
-typedef char * __kernel_caddr_t;
-typedef unsigned short __kernel_uid16_t;
-typedef unsigned short __kernel_gid16_t;
-
-#endif /* __ASM_GENERIC_POSIX_TYPES_H */
diff --git a/original/asm-generic/resource.h b/original/asm-generic/resource.h
deleted file mode 100644
index 61fa862..0000000
--- a/original/asm-generic/resource.h
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef _ASM_GENERIC_RESOURCE_H
-#define _ASM_GENERIC_RESOURCE_H
-
-/*
- * Resource limit IDs
- *
- * ( Compatibility detail: there are architectures that have
- * a different rlimit ID order in the 5-9 range and want
- * to keep that order for binary compatibility. The reasons
- * are historic and all new rlimits are identical across all
- * arches. If an arch has such special order for some rlimits
- * then it defines them prior including asm-generic/resource.h. )
- */
-
-#define RLIMIT_CPU 0 /* CPU time in sec */
-#define RLIMIT_FSIZE 1 /* Maximum filesize */
-#define RLIMIT_DATA 2 /* max data size */
-#define RLIMIT_STACK 3 /* max stack size */
-#define RLIMIT_CORE 4 /* max core file size */
-
-#ifndef RLIMIT_RSS
-# define RLIMIT_RSS 5 /* max resident set size */
-#endif
-
-#ifndef RLIMIT_NPROC
-# define RLIMIT_NPROC 6 /* max number of processes */
-#endif
-
-#ifndef RLIMIT_NOFILE
-# define RLIMIT_NOFILE 7 /* max number of open files */
-#endif
-
-#ifndef RLIMIT_MEMLOCK
-# define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */
-#endif
-
-#ifndef RLIMIT_AS
-# define RLIMIT_AS 9 /* address space limit */
-#endif
-
-#define RLIMIT_LOCKS 10 /* maximum file locks held */
-#define RLIMIT_SIGPENDING 11 /* max number of pending signals */
-#define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */
-#define RLIMIT_NICE 13 /* max nice prio allowed to raise to
- 0-39 for nice level 19 .. -20 */
-#define RLIMIT_RTPRIO 14 /* maximum realtime priority */
-#define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */
-#define RLIM_NLIMITS 16
-
-/*
- * SuS says limits have to be unsigned.
- * Which makes a ton more sense anyway.
- *
- * Some architectures override this (for compatibility reasons):
- */
-#ifndef RLIM_INFINITY
-# define RLIM_INFINITY (~0UL)
-#endif
-
-/*
- * RLIMIT_STACK default maximum - some architectures override it:
- */
-#ifndef _STK_LIM_MAX
-# define _STK_LIM_MAX RLIM_INFINITY
-#endif
-
-#ifdef __KERNEL__
-
-/*
- * boot-time rlimit defaults for the init task:
- */
-#define INIT_RLIMITS \
-{ \
- [RLIMIT_CPU] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_FSIZE] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_DATA] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_STACK] = { _STK_LIM, _STK_LIM_MAX }, \
- [RLIMIT_CORE] = { 0, RLIM_INFINITY }, \
- [RLIMIT_RSS] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_NPROC] = { 0, 0 }, \
- [RLIMIT_NOFILE] = { INR_OPEN_CUR, INR_OPEN_MAX }, \
- [RLIMIT_MEMLOCK] = { MLOCK_LIMIT, MLOCK_LIMIT }, \
- [RLIMIT_AS] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_LOCKS] = { RLIM_INFINITY, RLIM_INFINITY }, \
- [RLIMIT_SIGPENDING] = { 0, 0 }, \
- [RLIMIT_MSGQUEUE] = { MQ_BYTES_MAX, MQ_BYTES_MAX }, \
- [RLIMIT_NICE] = { 0, 0 }, \
- [RLIMIT_RTPRIO] = { 0, 0 }, \
- [RLIMIT_RTTIME] = { RLIM_INFINITY, RLIM_INFINITY }, \
-}
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/asm-generic/sections.h b/original/asm-generic/sections.h
deleted file mode 100644
index 962cad7..0000000
--- a/original/asm-generic/sections.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _ASM_GENERIC_SECTIONS_H_
-#define _ASM_GENERIC_SECTIONS_H_
-
-/* References to section boundaries */
-
-extern char _text[], _stext[], _etext[];
-extern char _data[], _sdata[], _edata[];
-extern char __bss_start[], __bss_stop[];
-extern char __init_begin[], __init_end[];
-extern char _sinittext[], _einittext[];
-extern char _sextratext[] __attribute__((weak));
-extern char _eextratext[] __attribute__((weak));
-extern char _end[];
-extern char __per_cpu_start[], __per_cpu_end[];
-extern char __kprobes_text_start[], __kprobes_text_end[];
-extern char __initdata_begin[], __initdata_end[];
-extern char __start_rodata[], __end_rodata[];
-
-#endif /* _ASM_GENERIC_SECTIONS_H_ */
diff --git a/original/asm-generic/siginfo.h b/original/asm-generic/siginfo.h
deleted file mode 100644
index 8786e01..0000000
--- a/original/asm-generic/siginfo.h
+++ /dev/null
@@ -1,294 +0,0 @@
-#ifndef _ASM_GENERIC_SIGINFO_H
-#define _ASM_GENERIC_SIGINFO_H
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-
-typedef union sigval {
- int sival_int;
- void __user *sival_ptr;
-} sigval_t;
-
-/*
- * This is the size (including padding) of the part of the
- * struct siginfo that is before the union.
- */
-#ifndef __ARCH_SI_PREAMBLE_SIZE
-#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
-#endif
-
-#define SI_MAX_SIZE 128
-#ifndef SI_PAD_SIZE
-#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
-#endif
-
-#ifndef __ARCH_SI_UID_T
-#define __ARCH_SI_UID_T uid_t
-#endif
-
-/*
- * The default "si_band" type is "long", as specified by POSIX.
- * However, some architectures want to override this to "int"
- * for historical compatibility reasons, so we allow that.
- */
-#ifndef __ARCH_SI_BAND_T
-#define __ARCH_SI_BAND_T long
-#endif
-
-#ifndef HAVE_ARCH_SIGINFO_T
-
-typedef struct siginfo {
- int si_signo;
- int si_errno;
- int si_code;
-
- union {
- int _pad[SI_PAD_SIZE];
-
- /* kill() */
- struct {
- pid_t _pid; /* sender's pid */
- __ARCH_SI_UID_T _uid; /* sender's uid */
- } _kill;
-
- /* POSIX.1b timers */
- struct {
- timer_t _tid; /* timer id */
- int _overrun; /* overrun count */
- char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
- sigval_t _sigval; /* same as below */
- int _sys_private; /* not to be passed to user */
- } _timer;
-
- /* POSIX.1b signals */
- struct {
- pid_t _pid; /* sender's pid */
- __ARCH_SI_UID_T _uid; /* sender's uid */
- sigval_t _sigval;
- } _rt;
-
- /* SIGCHLD */
- struct {
- pid_t _pid; /* which child */
- __ARCH_SI_UID_T _uid; /* sender's uid */
- int _status; /* exit code */
- clock_t _utime;
- clock_t _stime;
- } _sigchld;
-
- /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
- struct {
- void __user *_addr; /* faulting insn/memory ref. */
-#ifdef __ARCH_SI_TRAPNO
- int _trapno; /* TRAP # which caused the signal */
-#endif
- } _sigfault;
-
- /* SIGPOLL */
- struct {
- __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
- int _fd;
- } _sigpoll;
- } _sifields;
-} siginfo_t;
-
-#endif
-
-/*
- * How these fields are to be accessed.
- */
-#define si_pid _sifields._kill._pid
-#define si_uid _sifields._kill._uid
-#define si_tid _sifields._timer._tid
-#define si_overrun _sifields._timer._overrun
-#define si_sys_private _sifields._timer._sys_private
-#define si_status _sifields._sigchld._status
-#define si_utime _sifields._sigchld._utime
-#define si_stime _sifields._sigchld._stime
-#define si_value _sifields._rt._sigval
-#define si_int _sifields._rt._sigval.sival_int
-#define si_ptr _sifields._rt._sigval.sival_ptr
-#define si_addr _sifields._sigfault._addr
-#ifdef __ARCH_SI_TRAPNO
-#define si_trapno _sifields._sigfault._trapno
-#endif
-#define si_band _sifields._sigpoll._band
-#define si_fd _sifields._sigpoll._fd
-
-#ifdef __KERNEL__
-#define __SI_MASK 0xffff0000u
-#define __SI_KILL (0 << 16)
-#define __SI_TIMER (1 << 16)
-#define __SI_POLL (2 << 16)
-#define __SI_FAULT (3 << 16)
-#define __SI_CHLD (4 << 16)
-#define __SI_RT (5 << 16)
-#define __SI_MESGQ (6 << 16)
-#define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
-#else
-#define __SI_KILL 0
-#define __SI_TIMER 0
-#define __SI_POLL 0
-#define __SI_FAULT 0
-#define __SI_CHLD 0
-#define __SI_RT 0
-#define __SI_MESGQ 0
-#define __SI_CODE(T,N) (N)
-#endif
-
-/*
- * si_code values
- * Digital reserves positive values for kernel-generated signals.
- */
-#define SI_USER 0 /* sent by kill, sigsend, raise */
-#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */
-#define SI_QUEUE -1 /* sent by sigqueue */
-#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
-#define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */
-#define SI_ASYNCIO -4 /* sent by AIO completion */
-#define SI_SIGIO -5 /* sent by queued SIGIO */
-#define SI_TKILL -6 /* sent by tkill system call */
-#define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */
-
-#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0)
-#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0)
-
-/*
- * SIGILL si_codes
- */
-#define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */
-#define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */
-#define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */
-#define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */
-#define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */
-#define ILL_PRVREG (__SI_FAULT|6) /* privileged register */
-#define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */
-#define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */
-#define NSIGILL 8
-
-/*
- * SIGFPE si_codes
- */
-#define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */
-#define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */
-#define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */
-#define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */
-#define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */
-#define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */
-#define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */
-#define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */
-#define NSIGFPE 8
-
-/*
- * SIGSEGV si_codes
- */
-#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */
-#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */
-#define NSIGSEGV 2
-
-/*
- * SIGBUS si_codes
- */
-#define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */
-#define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */
-#define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */
-#define NSIGBUS 3
-
-/*
- * SIGTRAP si_codes
- */
-#define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */
-#define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */
-#define NSIGTRAP 2
-
-/*
- * SIGCHLD si_codes
- */
-#define CLD_EXITED (__SI_CHLD|1) /* child has exited */
-#define CLD_KILLED (__SI_CHLD|2) /* child was killed */
-#define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */
-#define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */
-#define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */
-#define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */
-#define NSIGCHLD 6
-
-/*
- * SIGPOLL si_codes
- */
-#define POLL_IN (__SI_POLL|1) /* data input available */
-#define POLL_OUT (__SI_POLL|2) /* output buffers available */
-#define POLL_MSG (__SI_POLL|3) /* input message available */
-#define POLL_ERR (__SI_POLL|4) /* i/o error */
-#define POLL_PRI (__SI_POLL|5) /* high priority input available */
-#define POLL_HUP (__SI_POLL|6) /* device disconnected */
-#define NSIGPOLL 6
-
-/*
- * sigevent definitions
- *
- * It seems likely that SIGEV_THREAD will have to be handled from
- * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
- * thread manager then catches and does the appropriate nonsense.
- * However, everything is written out here so as to not get lost.
- */
-#define SIGEV_SIGNAL 0 /* notify via signal */
-#define SIGEV_NONE 1 /* other notification: meaningless */
-#define SIGEV_THREAD 2 /* deliver via thread creation */
-#define SIGEV_THREAD_ID 4 /* deliver to thread */
-
-/*
- * This works because the alignment is ok on all current architectures
- * but we leave open this being overridden in the future
- */
-#ifndef __ARCH_SIGEV_PREAMBLE_SIZE
-#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t))
-#endif
-
-#define SIGEV_MAX_SIZE 64
-#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \
- / sizeof(int))
-
-typedef struct sigevent {
- sigval_t sigev_value;
- int sigev_signo;
- int sigev_notify;
- union {
- int _pad[SIGEV_PAD_SIZE];
- int _tid;
-
- struct {
- void (*_function)(sigval_t);
- void *_attribute; /* really pthread_attr_t */
- } _sigev_thread;
- } _sigev_un;
-} sigevent_t;
-
-#define sigev_notify_function _sigev_un._sigev_thread._function
-#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
-#define sigev_notify_thread_id _sigev_un._tid
-
-#ifdef __KERNEL__
-
-struct siginfo;
-void do_schedule_next_timer(struct siginfo *info);
-
-#ifndef HAVE_ARCH_COPY_SIGINFO
-
-#include <linux/string.h>
-
-static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
-{
- if (from->si_code < 0)
- memcpy(to, from, sizeof(*to));
- else
- /* _sigchld is currently the largest know union member */
- memcpy(to, from, __ARCH_SI_PREAMBLE_SIZE + sizeof(from->_sifields._sigchld));
-}
-
-#endif
-
-extern int copy_siginfo_to_user(struct siginfo __user *to, struct siginfo *from);
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/asm-generic/signal.h b/original/asm-generic/signal.h
deleted file mode 100644
index dae1d87..0000000
--- a/original/asm-generic/signal.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef __ASM_GENERIC_SIGNAL_H
-#define __ASM_GENERIC_SIGNAL_H
-
-#include <linux/compiler.h>
-
-#ifndef SIG_BLOCK
-#define SIG_BLOCK 0 /* for blocking signals */
-#endif
-#ifndef SIG_UNBLOCK
-#define SIG_UNBLOCK 1 /* for unblocking signals */
-#endif
-#ifndef SIG_SETMASK
-#define SIG_SETMASK 2 /* for setting the signal mask */
-#endif
-
-#ifndef __ASSEMBLY__
-typedef void __signalfn_t(int);
-typedef __signalfn_t __user *__sighandler_t;
-
-typedef void __restorefn_t(void);
-typedef __restorefn_t __user *__sigrestore_t;
-
-#define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */
-#define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */
-#define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */
-#endif
-
-#endif /* __ASM_GENERIC_SIGNAL_H */
diff --git a/original/asm-generic/socket.h b/original/asm-generic/socket.h
deleted file mode 100644
index 49c1704..0000000
--- a/original/asm-generic/socket.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef __ASM_GENERIC_SOCKET_H
-#define __ASM_GENERIC_SOCKET_H
-
-#include <asm/sockios.h>
-
-/* For setsockopt(2) */
-#define SOL_SOCKET 1
-
-#define SO_DEBUG 1
-#define SO_REUSEADDR 2
-#define SO_TYPE 3
-#define SO_ERROR 4
-#define SO_DONTROUTE 5
-#define SO_BROADCAST 6
-#define SO_SNDBUF 7
-#define SO_RCVBUF 8
-#define SO_SNDBUFFORCE 32
-#define SO_RCVBUFFORCE 33
-#define SO_KEEPALIVE 9
-#define SO_OOBINLINE 10
-#define SO_NO_CHECK 11
-#define SO_PRIORITY 12
-#define SO_LINGER 13
-#define SO_BSDCOMPAT 14
-/* To add :#define SO_REUSEPORT 15 */
-
-#ifndef SO_PASSCRED /* powerpc only differs in these */
-#define SO_PASSCRED 16
-#define SO_PEERCRED 17
-#define SO_RCVLOWAT 18
-#define SO_SNDLOWAT 19
-#define SO_RCVTIMEO 20
-#define SO_SNDTIMEO 21
-#endif
-
-/* Security levels - as per NRL IPv6 - don't actually do anything */
-#define SO_SECURITY_AUTHENTICATION 22
-#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
-#define SO_SECURITY_ENCRYPTION_NETWORK 24
-
-#define SO_BINDTODEVICE 25
-
-/* Socket filtering */
-#define SO_ATTACH_FILTER 26
-#define SO_DETACH_FILTER 27
-
-#define SO_PEERNAME 28
-#define SO_TIMESTAMP 29
-#define SCM_TIMESTAMP SO_TIMESTAMP
-
-#define SO_ACCEPTCONN 30
-
-#define SO_PEERSEC 31
-#define SO_PASSSEC 34
-#define SO_TIMESTAMPNS 35
-#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
-
-#define SO_MARK 36
-
-#define SO_TIMESTAMPING 37
-#define SCM_TIMESTAMPING SO_TIMESTAMPING
-
-#define SO_PROTOCOL 38
-#define SO_DOMAIN 39
-
-#define SO_RXQ_OVFL 40
-
-#define SO_WIFI_STATUS 41
-#define SCM_WIFI_STATUS SO_WIFI_STATUS
-#endif /* __ASM_GENERIC_SOCKET_H */
diff --git a/original/asm-generic/swab.h b/original/asm-generic/swab.h
deleted file mode 100644
index a8e9029..0000000
--- a/original/asm-generic/swab.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _ASM_GENERIC_SWAB_H
-#define _ASM_GENERIC_SWAB_H
-
-#include <asm/bitsperlong.h>
-
-/*
- * 32 bit architectures typically (but not always) want to
- * set __SWAB_64_THRU_32__. In user space, this is only
- * valid if the compiler supports 64 bit data types.
- */
-
-#if __BITS_PER_LONG == 32
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#define __SWAB_64_THRU_32__
-#endif
-#endif
-
-#endif /* _ASM_GENERIC_SWAB_H */
diff --git a/original/asm-generic/tlb.h b/original/asm-generic/tlb.h
deleted file mode 100644
index 867d900..0000000
--- a/original/asm-generic/tlb.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* asm-generic/tlb.h
- *
- * Generic TLB shootdown code
- *
- * Copyright 2001 Red Hat, Inc.
- * Based on code from mm/memory.c Copyright Linus Torvalds and others.
- *
- * 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.
- */
-#ifndef _ASM_GENERIC__TLB_H
-#define _ASM_GENERIC__TLB_H
-
-#include <linux/swap.h>
-#include <asm/pgalloc.h>
-#include <asm/tlbflush.h>
-
-/*
- * For UP we don't need to worry about TLB flush
- * and page free order so much..
- */
-#ifdef CONFIG_SMP
- #ifdef ARCH_FREE_PTR_NR
- #define FREE_PTR_NR ARCH_FREE_PTR_NR
- #else
- #define FREE_PTE_NR 506
- #endif
- #define tlb_fast_mode(tlb) ((tlb)->nr == ~0U)
-#else
- #define FREE_PTE_NR 1
- #define tlb_fast_mode(tlb) 1
-#endif
-
-/* struct mmu_gather is an opaque type used by the mm code for passing around
- * any data needed by arch specific code for tlb_remove_page.
- */
-struct mmu_gather {
- struct mm_struct *mm;
- unsigned int nr; /* set to ~0U means fast mode */
- unsigned int need_flush;/* Really unmapped some ptes? */
- unsigned int fullmm; /* non-zero means full mm flush */
- struct page * pages[FREE_PTE_NR];
-};
-
-/* Users of the generic TLB shootdown code must declare this storage space. */
-DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
-
-/* tlb_gather_mmu
- * Return a pointer to an initialized struct mmu_gather.
- */
-static inline struct mmu_gather *
-tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
-{
- struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);
-
- tlb->mm = mm;
-
- /* Use fast mode if only one CPU is online */
- tlb->nr = num_online_cpus() > 1 ? 0U : ~0U;
-
- tlb->fullmm = full_mm_flush;
-
- return tlb;
-}
-
-static inline void
-tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
-{
- if (!tlb->need_flush)
- return;
- tlb->need_flush = 0;
- tlb_flush(tlb);
- if (!tlb_fast_mode(tlb)) {
- free_pages_and_swap_cache(tlb->pages, tlb->nr);
- tlb->nr = 0;
- }
-}
-
-/* tlb_finish_mmu
- * Called at the end of the shootdown operation to free up any resources
- * that were required.
- */
-static inline void
-tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
-{
- tlb_flush_mmu(tlb, start, end);
-
- /* keep the page table cache within bounds */
- check_pgt_cache();
-
- put_cpu_var(mmu_gathers);
-}
-
-/* tlb_remove_page
- * Must perform the equivalent to __free_pte(pte_get_and_clear(ptep)), while
- * handling the additional races in SMP caused by other CPUs caching valid
- * mappings in their TLBs.
- */
-static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
-{
- tlb->need_flush = 1;
- if (tlb_fast_mode(tlb)) {
- free_page_and_swap_cache(page);
- return;
- }
- tlb->pages[tlb->nr++] = page;
- if (tlb->nr >= FREE_PTE_NR)
- tlb_flush_mmu(tlb, 0, 0);
-}
-
-/**
- * tlb_remove_tlb_entry - remember a pte unmapping for later tlb invalidation.
- *
- * Record the fact that pte's were really umapped in ->need_flush, so we can
- * later optimise away the tlb invalidate. This helps when userspace is
- * unmapping already-unmapped pages, which happens quite a lot.
- */
-#define tlb_remove_tlb_entry(tlb, ptep, address) \
- do { \
- tlb->need_flush = 1; \
- __tlb_remove_tlb_entry(tlb, ptep, address); \
- } while (0)
-
-#define pte_free_tlb(tlb, ptep) \
- do { \
- tlb->need_flush = 1; \
- __pte_free_tlb(tlb, ptep); \
- } while (0)
-
-#ifndef __ARCH_HAS_4LEVEL_HACK
-#define pud_free_tlb(tlb, pudp) \
- do { \
- tlb->need_flush = 1; \
- __pud_free_tlb(tlb, pudp); \
- } while (0)
-#endif
-
-#define pmd_free_tlb(tlb, pmdp) \
- do { \
- tlb->need_flush = 1; \
- __pmd_free_tlb(tlb, pmdp); \
- } while (0)
-
-#define tlb_migrate_finish(mm) do {} while (0)
-
-#endif /* _ASM_GENERIC__TLB_H */
diff --git a/original/asm-generic/topology.h b/original/asm-generic/topology.h
deleted file mode 100644
index 5d9d70c..0000000
--- a/original/asm-generic/topology.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * linux/include/asm-generic/topology.h
- *
- * Written by: Matthew Dobson, IBM Corporation
- *
- * Copyright (C) 2002, IBM Corp.
- *
- * All rights reserved.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <colpatch@us.ibm.com>
- */
-#ifndef _ASM_GENERIC_TOPOLOGY_H
-#define _ASM_GENERIC_TOPOLOGY_H
-
-/* Other architectures wishing to use this simple topology API should fill
- in the below functions as appropriate in their own <asm/topology.h> file. */
-#ifndef cpu_to_node
-#define cpu_to_node(cpu) (0)
-#endif
-#ifndef parent_node
-#define parent_node(node) (0)
-#endif
-#ifndef node_to_cpumask
-#define node_to_cpumask(node) (cpu_online_map)
-#endif
-#ifndef node_to_first_cpu
-#define node_to_first_cpu(node) (0)
-#endif
-#ifndef pcibus_to_node
-#define pcibus_to_node(node) (-1)
-#endif
-
-#ifndef pcibus_to_cpumask
-#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
- CPU_MASK_ALL : \
- node_to_cpumask(pcibus_to_node(bus)) \
- )
-#endif
-
-#endif /* _ASM_GENERIC_TOPOLOGY_H */
diff --git a/original/asm-generic/ucontext.h b/original/asm-generic/ucontext.h
deleted file mode 100644
index ad77343..0000000
--- a/original/asm-generic/ucontext.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __ASM_GENERIC_UCONTEXT_H
-#define __ASM_GENERIC_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 /* __ASM_GENERIC_UCONTEXT_H */
diff --git a/original/asm-generic/xor.h b/original/asm-generic/xor.h
deleted file mode 100644
index aaab875..0000000
--- a/original/asm-generic/xor.h
+++ /dev/null
@@ -1,718 +0,0 @@
-/*
- * include/asm-generic/xor.h
- *
- * Generic optimized RAID-5 checksumming functions.
- *
- * 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, or (at your option)
- * any later version.
- *
- * You should have received a copy of the GNU General Public License
- * (for example /usr/src/linux/COPYING); if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <asm/processor.h>
-
-static void
-xor_8regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- p1[0] ^= p2[0];
- p1[1] ^= p2[1];
- p1[2] ^= p2[2];
- p1[3] ^= p2[3];
- p1[4] ^= p2[4];
- p1[5] ^= p2[5];
- p1[6] ^= p2[6];
- p1[7] ^= p2[7];
- p1 += 8;
- p2 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_8regs_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- p1[0] ^= p2[0] ^ p3[0];
- p1[1] ^= p2[1] ^ p3[1];
- p1[2] ^= p2[2] ^ p3[2];
- p1[3] ^= p2[3] ^ p3[3];
- p1[4] ^= p2[4] ^ p3[4];
- p1[5] ^= p2[5] ^ p3[5];
- p1[6] ^= p2[6] ^ p3[6];
- p1[7] ^= p2[7] ^ p3[7];
- p1 += 8;
- p2 += 8;
- p3 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_8regs_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- p1[0] ^= p2[0] ^ p3[0] ^ p4[0];
- p1[1] ^= p2[1] ^ p3[1] ^ p4[1];
- p1[2] ^= p2[2] ^ p3[2] ^ p4[2];
- p1[3] ^= p2[3] ^ p3[3] ^ p4[3];
- p1[4] ^= p2[4] ^ p3[4] ^ p4[4];
- p1[5] ^= p2[5] ^ p3[5] ^ p4[5];
- p1[6] ^= p2[6] ^ p3[6] ^ p4[6];
- p1[7] ^= p2[7] ^ p3[7] ^ p4[7];
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_8regs_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4, unsigned long *p5)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- p1[0] ^= p2[0] ^ p3[0] ^ p4[0] ^ p5[0];
- p1[1] ^= p2[1] ^ p3[1] ^ p4[1] ^ p5[1];
- p1[2] ^= p2[2] ^ p3[2] ^ p4[2] ^ p5[2];
- p1[3] ^= p2[3] ^ p3[3] ^ p4[3] ^ p5[3];
- p1[4] ^= p2[4] ^ p3[4] ^ p4[4] ^ p5[4];
- p1[5] ^= p2[5] ^ p3[5] ^ p4[5] ^ p5[5];
- p1[6] ^= p2[6] ^ p3[6] ^ p4[6] ^ p5[6];
- p1[7] ^= p2[7] ^ p3[7] ^ p4[7] ^ p5[7];
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- p5 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_32regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_32regs_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- d0 ^= p3[0];
- d1 ^= p3[1];
- d2 ^= p3[2];
- d3 ^= p3[3];
- d4 ^= p3[4];
- d5 ^= p3[5];
- d6 ^= p3[6];
- d7 ^= p3[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- p3 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_32regs_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- d0 ^= p3[0];
- d1 ^= p3[1];
- d2 ^= p3[2];
- d3 ^= p3[3];
- d4 ^= p3[4];
- d5 ^= p3[5];
- d6 ^= p3[6];
- d7 ^= p3[7];
- d0 ^= p4[0];
- d1 ^= p4[1];
- d2 ^= p4[2];
- d3 ^= p4[3];
- d4 ^= p4[4];
- d5 ^= p4[5];
- d6 ^= p4[6];
- d7 ^= p4[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_32regs_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4, unsigned long *p5)
-{
- long lines = bytes / (sizeof (long)) / 8;
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- d0 ^= p3[0];
- d1 ^= p3[1];
- d2 ^= p3[2];
- d3 ^= p3[3];
- d4 ^= p3[4];
- d5 ^= p3[5];
- d6 ^= p3[6];
- d7 ^= p3[7];
- d0 ^= p4[0];
- d1 ^= p4[1];
- d2 ^= p4[2];
- d3 ^= p4[3];
- d4 ^= p4[4];
- d5 ^= p4[5];
- d6 ^= p4[6];
- d7 ^= p4[7];
- d0 ^= p5[0];
- d1 ^= p5[1];
- d2 ^= p5[2];
- d3 ^= p5[3];
- d4 ^= p5[4];
- d5 ^= p5[5];
- d6 ^= p5[6];
- d7 ^= p5[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- p5 += 8;
- } while (--lines > 0);
-}
-
-static void
-xor_8regs_p_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
- prefetchw(p1);
- prefetch(p2);
-
- do {
- prefetchw(p1+8);
- prefetch(p2+8);
- once_more:
- p1[0] ^= p2[0];
- p1[1] ^= p2[1];
- p1[2] ^= p2[2];
- p1[3] ^= p2[3];
- p1[4] ^= p2[4];
- p1[5] ^= p2[5];
- p1[6] ^= p2[6];
- p1[7] ^= p2[7];
- p1 += 8;
- p2 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_8regs_p_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
- prefetchw(p1);
- prefetch(p2);
- prefetch(p3);
-
- do {
- prefetchw(p1+8);
- prefetch(p2+8);
- prefetch(p3+8);
- once_more:
- p1[0] ^= p2[0] ^ p3[0];
- p1[1] ^= p2[1] ^ p3[1];
- p1[2] ^= p2[2] ^ p3[2];
- p1[3] ^= p2[3] ^ p3[3];
- p1[4] ^= p2[4] ^ p3[4];
- p1[5] ^= p2[5] ^ p3[5];
- p1[6] ^= p2[6] ^ p3[6];
- p1[7] ^= p2[7] ^ p3[7];
- p1 += 8;
- p2 += 8;
- p3 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_8regs_p_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
-
- prefetchw(p1);
- prefetch(p2);
- prefetch(p3);
- prefetch(p4);
-
- do {
- prefetchw(p1+8);
- prefetch(p2+8);
- prefetch(p3+8);
- prefetch(p4+8);
- once_more:
- p1[0] ^= p2[0] ^ p3[0] ^ p4[0];
- p1[1] ^= p2[1] ^ p3[1] ^ p4[1];
- p1[2] ^= p2[2] ^ p3[2] ^ p4[2];
- p1[3] ^= p2[3] ^ p3[3] ^ p4[3];
- p1[4] ^= p2[4] ^ p3[4] ^ p4[4];
- p1[5] ^= p2[5] ^ p3[5] ^ p4[5];
- p1[6] ^= p2[6] ^ p3[6] ^ p4[6];
- p1[7] ^= p2[7] ^ p3[7] ^ p4[7];
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_8regs_p_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4, unsigned long *p5)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
-
- prefetchw(p1);
- prefetch(p2);
- prefetch(p3);
- prefetch(p4);
- prefetch(p5);
-
- do {
- prefetchw(p1+8);
- prefetch(p2+8);
- prefetch(p3+8);
- prefetch(p4+8);
- prefetch(p5+8);
- once_more:
- p1[0] ^= p2[0] ^ p3[0] ^ p4[0] ^ p5[0];
- p1[1] ^= p2[1] ^ p3[1] ^ p4[1] ^ p5[1];
- p1[2] ^= p2[2] ^ p3[2] ^ p4[2] ^ p5[2];
- p1[3] ^= p2[3] ^ p3[3] ^ p4[3] ^ p5[3];
- p1[4] ^= p2[4] ^ p3[4] ^ p4[4] ^ p5[4];
- p1[5] ^= p2[5] ^ p3[5] ^ p4[5] ^ p5[5];
- p1[6] ^= p2[6] ^ p3[6] ^ p4[6] ^ p5[6];
- p1[7] ^= p2[7] ^ p3[7] ^ p4[7] ^ p5[7];
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- p5 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_32regs_p_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
-
- prefetchw(p1);
- prefetch(p2);
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
-
- prefetchw(p1+8);
- prefetch(p2+8);
- once_more:
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_32regs_p_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
-
- prefetchw(p1);
- prefetch(p2);
- prefetch(p3);
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
-
- prefetchw(p1+8);
- prefetch(p2+8);
- prefetch(p3+8);
- once_more:
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- d0 ^= p3[0];
- d1 ^= p3[1];
- d2 ^= p3[2];
- d3 ^= p3[3];
- d4 ^= p3[4];
- d5 ^= p3[5];
- d6 ^= p3[6];
- d7 ^= p3[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- p3 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_32regs_p_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
-
- prefetchw(p1);
- prefetch(p2);
- prefetch(p3);
- prefetch(p4);
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
-
- prefetchw(p1+8);
- prefetch(p2+8);
- prefetch(p3+8);
- prefetch(p4+8);
- once_more:
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- d0 ^= p3[0];
- d1 ^= p3[1];
- d2 ^= p3[2];
- d3 ^= p3[3];
- d4 ^= p3[4];
- d5 ^= p3[5];
- d6 ^= p3[6];
- d7 ^= p3[7];
- d0 ^= p4[0];
- d1 ^= p4[1];
- d2 ^= p4[2];
- d3 ^= p4[3];
- d4 ^= p4[4];
- d5 ^= p4[5];
- d6 ^= p4[6];
- d7 ^= p4[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static void
-xor_32regs_p_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
- unsigned long *p3, unsigned long *p4, unsigned long *p5)
-{
- long lines = bytes / (sizeof (long)) / 8 - 1;
-
- prefetchw(p1);
- prefetch(p2);
- prefetch(p3);
- prefetch(p4);
- prefetch(p5);
-
- do {
- register long d0, d1, d2, d3, d4, d5, d6, d7;
-
- prefetchw(p1+8);
- prefetch(p2+8);
- prefetch(p3+8);
- prefetch(p4+8);
- prefetch(p5+8);
- once_more:
- d0 = p1[0]; /* Pull the stuff into registers */
- d1 = p1[1]; /* ... in bursts, if possible. */
- d2 = p1[2];
- d3 = p1[3];
- d4 = p1[4];
- d5 = p1[5];
- d6 = p1[6];
- d7 = p1[7];
- d0 ^= p2[0];
- d1 ^= p2[1];
- d2 ^= p2[2];
- d3 ^= p2[3];
- d4 ^= p2[4];
- d5 ^= p2[5];
- d6 ^= p2[6];
- d7 ^= p2[7];
- d0 ^= p3[0];
- d1 ^= p3[1];
- d2 ^= p3[2];
- d3 ^= p3[3];
- d4 ^= p3[4];
- d5 ^= p3[5];
- d6 ^= p3[6];
- d7 ^= p3[7];
- d0 ^= p4[0];
- d1 ^= p4[1];
- d2 ^= p4[2];
- d3 ^= p4[3];
- d4 ^= p4[4];
- d5 ^= p4[5];
- d6 ^= p4[6];
- d7 ^= p4[7];
- d0 ^= p5[0];
- d1 ^= p5[1];
- d2 ^= p5[2];
- d3 ^= p5[3];
- d4 ^= p5[4];
- d5 ^= p5[5];
- d6 ^= p5[6];
- d7 ^= p5[7];
- p1[0] = d0; /* Store the result (in bursts) */
- p1[1] = d1;
- p1[2] = d2;
- p1[3] = d3;
- p1[4] = d4;
- p1[5] = d5;
- p1[6] = d6;
- p1[7] = d7;
- p1 += 8;
- p2 += 8;
- p3 += 8;
- p4 += 8;
- p5 += 8;
- } while (--lines > 0);
- if (lines == 0)
- goto once_more;
-}
-
-static struct xor_block_template xor_block_8regs = {
- .name = "8regs",
- .do_2 = xor_8regs_2,
- .do_3 = xor_8regs_3,
- .do_4 = xor_8regs_4,
- .do_5 = xor_8regs_5,
-};
-
-static struct xor_block_template xor_block_32regs = {
- .name = "32regs",
- .do_2 = xor_32regs_2,
- .do_3 = xor_32regs_3,
- .do_4 = xor_32regs_4,
- .do_5 = xor_32regs_5,
-};
-
-static struct xor_block_template xor_block_8regs_p = {
- .name = "8regs_prefetch",
- .do_2 = xor_8regs_p_2,
- .do_3 = xor_8regs_p_3,
- .do_4 = xor_8regs_p_4,
- .do_5 = xor_8regs_p_5,
-};
-
-static struct xor_block_template xor_block_32regs_p = {
- .name = "32regs_prefetch",
- .do_2 = xor_32regs_p_2,
- .do_3 = xor_32regs_p_3,
- .do_4 = xor_32regs_p_4,
- .do_5 = xor_32regs_p_5,
-};
-
-#define XOR_TRY_TEMPLATES \
- do { \
- xor_speed(&xor_block_8regs); \
- xor_speed(&xor_block_8regs_p); \
- xor_speed(&xor_block_32regs); \
- xor_speed(&xor_block_32regs_p); \
- } while (0)
diff --git a/original/linux/a.out.h b/original/linux/a.out.h
deleted file mode 100644
index f913cc3..0000000
--- a/original/linux/a.out.h
+++ /dev/null
@@ -1,268 +0,0 @@
-#ifndef __A_OUT_GNU_H__
-#define __A_OUT_GNU_H__
-
-#define __GNU_EXEC_MACROS__
-
-#ifndef __STRUCT_EXEC_OVERRIDE__
-
-#include <asm/a.out.h>
-
-#endif /* __STRUCT_EXEC_OVERRIDE__ */
-
-/* these go in the N_MACHTYPE field */
-enum machine_type {
-#if defined (M_OLDSUN2)
- M__OLDSUN2 = M_OLDSUN2,
-#else
- M_OLDSUN2 = 0,
-#endif
-#if defined (M_68010)
- M__68010 = M_68010,
-#else
- M_68010 = 1,
-#endif
-#if defined (M_68020)
- M__68020 = M_68020,
-#else
- M_68020 = 2,
-#endif
-#if defined (M_SPARC)
- M__SPARC = M_SPARC,
-#else
- M_SPARC = 3,
-#endif
- /* skip a bunch so we don't run into any of sun's numbers */
- M_386 = 100,
- M_MIPS1 = 151, /* MIPS R3000/R3000 binary */
- M_MIPS2 = 152 /* MIPS R6000/R4000 binary */
-};
-
-#if !defined (N_MAGIC)
-#define N_MAGIC(exec) ((exec).a_info & 0xffff)
-#endif
-#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
-#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
-#define N_SET_INFO(exec, magic, type, flags) \
- ((exec).a_info = ((magic) & 0xffff) \
- | (((int)(type) & 0xff) << 16) \
- | (((flags) & 0xff) << 24))
-#define N_SET_MAGIC(exec, magic) \
- ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
-
-#define N_SET_MACHTYPE(exec, machtype) \
- ((exec).a_info = \
- ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
-
-#define N_SET_FLAGS(exec, flags) \
- ((exec).a_info = \
- ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
-
-/* Code indicating object file or impure executable. */
-#define OMAGIC 0407
-/* Code indicating pure executable. */
-#define NMAGIC 0410
-/* Code indicating demand-paged executable. */
-#define ZMAGIC 0413
-/* This indicates a demand-paged executable with the header in the text.
- The first page is unmapped to help trap NULL pointer references */
-#define QMAGIC 0314
-
-/* Code indicating core file. */
-#define CMAGIC 0421
-
-#if !defined (N_BADMAG)
-#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
- && N_MAGIC(x) != NMAGIC \
- && N_MAGIC(x) != ZMAGIC \
- && N_MAGIC(x) != QMAGIC)
-#endif
-
-#define _N_HDROFF(x) (1024 - sizeof (struct exec))
-
-#if !defined (N_TXTOFF)
-#define N_TXTOFF(x) \
- (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \
- (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
-#endif
-
-#if !defined (N_DATOFF)
-#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text)
-#endif
-
-#if !defined (N_TRELOFF)
-#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
-#endif
-
-#if !defined (N_DRELOFF)
-#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x))
-#endif
-
-#if !defined (N_SYMOFF)
-#define N_SYMOFF(x) (N_DRELOFF(x) + N_DRSIZE(x))
-#endif
-
-#if !defined (N_STROFF)
-#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x))
-#endif
-
-/* Address of text segment in memory after it is loaded. */
-#if !defined (N_TXTADDR)
-#define N_TXTADDR(x) (N_MAGIC(x) == QMAGIC ? PAGE_SIZE : 0)
-#endif
-
-/* Address of data segment in memory after it is loaded.
- Note that it is up to you to define SEGMENT_SIZE
- on machines not listed here. */
-#if defined(vax) || defined(hp300) || defined(pyr)
-#define SEGMENT_SIZE page_size
-#endif
-#ifdef sony
-#define SEGMENT_SIZE 0x2000
-#endif /* Sony. */
-#ifdef is68k
-#define SEGMENT_SIZE 0x20000
-#endif
-#if defined(m68k) && defined(PORTAR)
-#define PAGE_SIZE 0x400
-#define SEGMENT_SIZE PAGE_SIZE
-#endif
-
-#ifdef linux
-#include <asm/page.h>
-#if defined(__i386__) || defined(__mc68000__)
-#define SEGMENT_SIZE 1024
-#else
-#ifndef SEGMENT_SIZE
-#define SEGMENT_SIZE PAGE_SIZE
-#endif
-#endif
-#endif
-
-#define _N_SEGMENT_ROUND(x) ALIGN(x, SEGMENT_SIZE)
-
-#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
-
-#ifndef N_DATADDR
-#define N_DATADDR(x) \
- (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \
- : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
-#endif
-
-/* Address of bss segment in memory after it is loaded. */
-#if !defined (N_BSSADDR)
-#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
-#endif
-
-#if !defined (N_NLIST_DECLARED)
-struct nlist {
- union {
- char *n_name;
- struct nlist *n_next;
- long n_strx;
- } n_un;
- unsigned char n_type;
- char n_other;
- short n_desc;
- unsigned long n_value;
-};
-#endif /* no N_NLIST_DECLARED. */
-
-#if !defined (N_UNDF)
-#define N_UNDF 0
-#endif
-#if !defined (N_ABS)
-#define N_ABS 2
-#endif
-#if !defined (N_TEXT)
-#define N_TEXT 4
-#endif
-#if !defined (N_DATA)
-#define N_DATA 6
-#endif
-#if !defined (N_BSS)
-#define N_BSS 8
-#endif
-#if !defined (N_FN)
-#define N_FN 15
-#endif
-
-#if !defined (N_EXT)
-#define N_EXT 1
-#endif
-#if !defined (N_TYPE)
-#define N_TYPE 036
-#endif
-#if !defined (N_STAB)
-#define N_STAB 0340
-#endif
-
-/* The following type indicates the definition of a symbol as being
- an indirect reference to another symbol. The other symbol
- appears as an undefined reference, immediately following this symbol.
-
- Indirection is asymmetrical. The other symbol's value will be used
- to satisfy requests for the indirect symbol, but not vice versa.
- If the other symbol does not have a definition, libraries will
- be searched to find a definition. */
-#define N_INDR 0xa
-
-/* The following symbols refer to set elements.
- All the N_SET[ATDB] symbols with the same name form one set.
- Space is allocated for the set in the text section, and each set
- element's value is stored into one word of the space.
- The first word of the space is the length of the set (number of elements).
-
- The address of the set is made into an N_SETV symbol
- whose name is the same as the name of the set.
- This symbol acts like a N_DATA global symbol
- in that it can satisfy undefined external references. */
-
-/* These appear as input to LD, in a .o file. */
-#define N_SETA 0x14 /* Absolute set element symbol */
-#define N_SETT 0x16 /* Text set element symbol */
-#define N_SETD 0x18 /* Data set element symbol */
-#define N_SETB 0x1A /* Bss set element symbol */
-
-/* This is output from LD. */
-#define N_SETV 0x1C /* Pointer to set vector in data area. */
-
-#if !defined (N_RELOCATION_INFO_DECLARED)
-/* This structure describes a single relocation to be performed.
- The text-relocation section of the file is a vector of these structures,
- all of which apply to the text section.
- Likewise, the data-relocation section applies to the data section. */
-
-struct relocation_info
-{
- /* Address (within segment) to be relocated. */
- int r_address;
- /* The meaning of r_symbolnum depends on r_extern. */
- unsigned int r_symbolnum:24;
- /* Nonzero means value is a pc-relative offset
- and it should be relocated for changes in its own address
- as well as for changes in the symbol or section specified. */
- unsigned int r_pcrel:1;
- /* Length (as exponent of 2) of the field to be relocated.
- Thus, a value of 2 indicates 1<<2 bytes. */
- unsigned int r_length:2;
- /* 1 => relocate with value of symbol.
- r_symbolnum is the index of the symbol
- in file's the symbol table.
- 0 => relocate with the address of a segment.
- r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS
- (the N_EXT bit may be set also, but signifies nothing). */
- unsigned int r_extern:1;
- /* Four bits that aren't used, but when writing an object file
- it is desirable to clear them. */
-#ifdef NS32K
- unsigned r_bsr:1;
- unsigned r_disp:1;
- unsigned r_pad:2;
-#else
- unsigned int r_pad:4;
-#endif
-};
-#endif /* no N_RELOCATION_INFO_DECLARED. */
-
-
-#endif /* __A_OUT_GNU_H__ */
diff --git a/original/linux/a1026.h b/original/linux/a1026.h
deleted file mode 100644
index 44cdf4d..0000000
--- a/original/linux/a1026.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/* include/linux/a1026.h - a1026 voice processor driver
- *
- * Copyright (C) 2009 HTC Corporation.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_A1026_H
-#define __LINUX_A1026_H
-
-#include <linux/ioctl.h>
-
-#define A1026_MAX_FW_SIZE (32*1024)
-struct a1026img {
- unsigned char *buf;
- unsigned img_size;
-};
-
-enum A1026_PathID {
- A1026_PATH_SUSPEND,
- A1026_PATH_INCALL_RECEIVER,
- A1026_PATH_INCALL_HEADSET,
- A1026_PATH_INCALL_SPEAKER,
- A1026_PATH_INCALL_BT,
- A1026_PATH_VR_NO_NS_RECEIVER,
- A1026_PATH_VR_NO_NS_HEADSET,
- A1026_PATH_VR_NO_NS_SPEAKER,
- A1026_PATH_VR_NO_NS_BT,
- A1026_PATH_VR_NS_RECEIVER,
- A1026_PATH_VR_NS_HEADSET,
- A1026_PATH_VR_NS_SPEAKER,
- A1026_PATH_VR_NS_BT,
- A1026_PATH_RECORD_RECEIVER,
- A1026_PATH_RECORD_HEADSET,
- A1026_PATH_RECORD_SPEAKER,
- A1026_PATH_RECORD_BT,
- A1026_PATH_CAMCORDER,
- A1026_PATH_INCALL_TTY
-};
-
-/* noise suppression states */
-enum A1026_NS_states {
- A1026_NS_STATE_AUTO, /* leave mode as selected by driver */
- A1026_NS_STATE_OFF, /* disable noise suppression */
- A1026_NS_STATE_CT, /* force close talk mode */
- A1026_NS_STATE_FT, /* force far talk mode */
- A1026_NS_NUM_STATES
-};
-
-/* indicates if a1026_set_config() performs a full configuration or only
- * a voice processing algorithm configuration */
-/* IOCTLs for Audience A1026 */
-#define A1026_IOCTL_MAGIC 'u'
-
-#define A1026_BOOTUP_INIT _IOW(A1026_IOCTL_MAGIC, 0x01, struct a1026img *)
-#define A1026_SET_CONFIG _IOW(A1026_IOCTL_MAGIC, 0x02, enum A1026_PathID)
-#define A1026_SET_NS_STATE _IOW(A1026_IOCTL_MAGIC, 0x03, enum A1026_NS_states)
-
-/* For Diag */
-#define A1026_SET_MIC_ONOFF _IOW(A1026_IOCTL_MAGIC, 0x50, unsigned)
-#define A1026_SET_MICSEL_ONOFF _IOW(A1026_IOCTL_MAGIC, 0x51, unsigned)
-#define A1026_READ_DATA _IOR(A1026_IOCTL_MAGIC, 0x52, unsigned)
-#define A1026_WRITE_MSG _IOW(A1026_IOCTL_MAGIC, 0x53, unsigned)
-#define A1026_SYNC_CMD _IO(A1026_IOCTL_MAGIC, 0x54)
-#define A1026_SET_CMD_FILE _IOW(A1026_IOCTL_MAGIC, 0x55, unsigned)
-
-#ifdef __KERNEL__
-
-/* A1026 Command codes */
-#define CtrlMode_LAL 0x0001 /* Level Active Low */
-#define CtrlMode_LAH 0x0002 /* Level Active High */
-#define CtrlMode_FE 0x0003 /* Falling Edge */
-#define CtrlMode_RE 0x0004 /* Rising Edge */
-#define A100_msg_Sync 0x80000000
-#define A100_msg_Sync_Ack 0x80000000
-
-#define A100_msg_Reset 0x8002
-#define RESET_IMMEDIATE 0x0000
-#define RESET_DELAYED 0x0001
-
-#define A100_msg_BootloadInitiate 0x8003
-#define A100_msg_GetDeviceParm 0x800B
-#define A100_msg_SetDeviceParmID 0x800C
-#define A100_msg_SetDeviceParm 0x800D
-
-/* Get/Set PCM Device Parameter ID List */
-/* PCM-0 */
-#define PCM0WordLength 0x0100
-#define PCM0DelFromFsTx 0x0101
-#define PCM0DelFromFsRx 0x0102
-#define PCM0LatchEdge 0x0103
-#define PCM0Endianness 0x0105
-#define PCM0TristateEnable 0x0107
-
-/* PCM-1 */
-#define PCM1WordLength 0x0200
-#define PCM1DelFromFsTx 0x0201
-#define PCM1DelFromFsRx 0x0202
-#define PCM1LatchEdge 0x0203
-#define PCM1Endianness 0x0205
-#define PCM1TristateEnable 0x0207
-
-/* Possible setting values for PCM I/F */
-#define PCMWordLength_16bit 0x10 /* Default */
-#define PCMWordLength_24bit 0x18
-#define PCMWordLength_32bit 0x20
-#define PCMLatchEdge_Tx_F_Rx_R 0x00 /* Tx/Rx on falling/rising edge */
-#define PCMLatchEdge_Tx_R_Rx_F 0x03 /* Tx/Rx on falling/rising edge */
-#define PCMEndianness_Little 0x00
-#define PCMEndianness_Big 0x01 /* Default */
-#define PCMTristate_Disable 0x00 /* Default */
-#define PCMTristate_Enable 0x01
-
-/* Get/Set ADC Device Parameter ID List */
-/* ADC-0 */
-#define ADC0Gain 0x0300
-#define ADC0Rate 0x0301
-#define ADC0CutoffFreq 0x0302
-
-/* ADC-1 */
-#define ADC1Gain 0x0400
-#define ADC1Rate 0x0401
-#define ADC1CutoffFreq 0x0402
-
-/* Possible setting values for ADC I/F */
-#define ADC_Gain_0db 0x00
-#define ADC_Gain_6db 0x01
-#define ADC_Gain_12db 0x02
-#define ADC_Gain_18db 0x03
-#define ADC_Gain_24db 0x04 /* Default */
-#define ADC_Gain_30db 0x05
-#define ADC_Rate_8kHz 0x00 /* Default */
-#define ADC_Rate_16kHz 0x01
-#define ADC_CutoffFreq_NO_DC_Filter 0x00
-#define ADC_CutoffFreq_59p68Hz 0x01 /* Default */
-#define ADC_CutoffFreq_7p46Hz 0x02
-#define ADC_CutoffFreq_3p73Hz 0x03
-
-/* Set Power State */
-#define A100_msg_Sleep 0x80100001
-
-/* Get/Set Algorithm Parameter command codes list */
-#define A100_msg_GetAlgorithmParm 0x8016
-#define A100_msg_SetAlgorithmParmID 0x8017
-#define A100_msg_SetAlgorithmParm 0x8018
-
-/* Get/Set Algorithm Parameter ID List (Transmit Feature) */
-#define AIS_Global_Supression_Level 0x0000
-#define Mic_Config 0x0002
-#define AEC_Mode 0x0003
-#define AEC_CNG 0x0023
-#define Output_AGC 0x0004
-#define Output_AGC_Target_Level 0x0005
-#define Output_AGC_Noise_Floor 0x0006
-#define Output_AGC_SNR_Improvement 0x0007
-#define Comfort_Noise 0x001A
-#define Comfort_Noise_Level 0x001B
-
-/* Get/Set Algorithm Parameter ID List (Receive Feature) */
-#define Speaker_Volume 0x0012
-#define VEQ_Mode 0x0009
-#define VEQ_Max_FarEnd_Limiter_Level 0x000D
-#define VEQ_Noise_Estimation_Adj 0x0025
-#define Receive_NS 0x000E
-#define Receive_NS_Level 0x000F
-#define SideTone 0x0015
-#define SideTone_Gain 0x0016
-
-/* Audio Path Commands */
-/* Get/Set Transmit Digital Input Gain */
-#define A100_msg_GetTxDigitalInputGain 0x801A
-#define A100_msg_SetTxDigitalInputGain 0x801B
-
-/* Get/Set Receive Digital Input Gain */
-#define A100_msg_GetRcvDigitalInputGain 0x8022
-#define A100_msg_SetRcvDigitalInputGain 0x8023
-
-/* Get/Set Transmit Digital Output Gain */
-#define A100_msg_GetTxDigitalOutputGain 0x801D
-#define A100_msg_SetTxDigitalOutputGain 0x8015
-
-/* Bypass */
-#define A100_msg_Bypass 0x801C /* 0ff = 0x0000; on = 0x0001 (Default) */
-#define A1026_msg_VP_ON 0x801C0001
-#define A1026_msg_VP_OFF 0x801C0000
-
-/* Diagnostic API Commands */
-#define A100_msg_GetMicRMS 0x8013
-#define A100_msg_GetMicPeak 0x8014
-#define DiagPath_Pri_Input_Mic 0x0000
-#define DiagPath_Sec_Input_Mic 0x0001
-#define DiagPath_Output_Mic 0x0002
-#define DiagPath_Far_End_Input 0x0003
-#define DiagPath_Far_End_Output 0x0004
-#define A100_msg_SwapInputCh 0x8019
-#define A100_msg_OutputKnownSig 0x801E
-
-#define A1026_msg_BOOT 0x0001
-#define A1026_msg_BOOT_ACK 0x01
-
-/* general definitions */
-#define TIMEOUT 20 /* ms */
-#define RETRY_CNT 5
-#define POLLING_RETRY_CNT 3
-#define A1026_ERROR_CODE 0xffff
-#define A1026_SLEEP 0
-#define A1026_ACTIVE 1
-#define A1026_CMD_FIFO_DEPTH 64
-#define ERROR 0xffffffff
-
-enum A1026_config_mode {
- A1026_CONFIG_FULL,
- A1026_CONFIG_VP
-};
-
-struct a1026_platform_data {
- uint32_t gpio_a1026_micsel;
- uint32_t gpio_a1026_wakeup;
- uint32_t gpio_a1026_reset;
- uint32_t gpio_a1026_int;
- uint32_t gpio_a1026_clk;
-};
-
-
-#endif /* __KERNEL__ */
-#endif /* __LINUX_A1026_H */
diff --git a/original/linux/aio_abi.h b/original/linux/aio_abi.h
deleted file mode 100644
index 30fdcc8..0000000
--- a/original/linux/aio_abi.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* linux/aio_abi.h
- *
- * Copyright 2000,2001,2002 Red Hat.
- *
- * Written by Benjamin LaHaise <bcrl@kvack.org>
- *
- * Distribute under the terms of the GPLv2 (see ../../COPYING) or under
- * the following terms.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. Red Hat makes no representations about
- * the suitability of this software for any purpose.
- *
- * IN NO EVENT SHALL RED HAT BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
- * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
- * THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF RED HAT HAS BEEN ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * RED HAT DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
- * RED HAT HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
- * ENHANCEMENTS, OR MODIFICATIONS.
- */
-#ifndef __LINUX__AIO_ABI_H
-#define __LINUX__AIO_ABI_H
-
-#include <asm/byteorder.h>
-
-typedef unsigned long aio_context_t;
-
-enum {
- IOCB_CMD_PREAD = 0,
- IOCB_CMD_PWRITE = 1,
- IOCB_CMD_FSYNC = 2,
- IOCB_CMD_FDSYNC = 3,
- /* These two are experimental.
- * IOCB_CMD_PREADX = 4,
- * IOCB_CMD_POLL = 5,
- */
- IOCB_CMD_NOOP = 6,
-};
-
-/* read() from /dev/aio returns these structures. */
-struct io_event {
- __u64 data; /* the data field from the iocb */
- __u64 obj; /* what iocb this event came from */
- __s64 res; /* result code for this event */
- __s64 res2; /* secondary result */
-};
-
-#if defined(__LITTLE_ENDIAN)
-#define PADDED(x,y) x, y
-#elif defined(__BIG_ENDIAN)
-#define PADDED(x,y) y, x
-#else
-#error edit for your odd byteorder.
-#endif
-
-/*
- * we always use a 64bit off_t when communicating
- * with userland. its up to libraries to do the
- * proper padding and aio_error abstraction
- */
-
-struct iocb {
- /* these are internal to the kernel/libc. */
- __u64 aio_data; /* data to be returned in event's data */
- __u32 PADDED(aio_key, aio_reserved1);
- /* the kernel sets aio_key to the req # */
-
- /* common fields */
- __u16 aio_lio_opcode; /* see IOCB_CMD_ above */
- __s16 aio_reqprio;
- __u32 aio_fildes;
-
- __u64 aio_buf;
- __u64 aio_nbytes;
- __s64 aio_offset;
-
- /* extra parameters */
- __u64 aio_reserved2; /* TODO: use this for a (struct sigevent *) */
- __u64 aio_reserved3;
-}; /* 64 bytes */
-
-#undef IFBIG
-#undef IFLITTLE
-
-#endif /* __LINUX__AIO_ABI_H */
-
diff --git a/original/linux/akm8973.h b/original/linux/akm8973.h
deleted file mode 100644
index 0798cf6..0000000
--- a/original/linux/akm8973.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef AKM8973_H
-#define AKM8973_H
-
-#include <linux/ioctl.h>
-
-#define AKMIO 0xA1
-
-#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x01, char[5])
-#define ECS_IOCTL_READ _IOWR(AKMIO, 0x02, char[5])
-#define ECS_IOCTL_RESET _IO(AKMIO, 0x03)
-#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x04, short)
-#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x05, char[RBUFF_SIZE+1])
-#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x06, short[12])
-#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x07, int)
-#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x08, int)
-#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short)
-
-#define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short)
-#define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short)
-#define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short)
-#define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short)
-#define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short)
-#define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short)
-#define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short)
-#define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17)
-#define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short)
-#define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY
-#define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) /* Set raw magnetic vector flag */
-#define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) /* Get raw magnetic vector flag */
-
-#define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short)
-#endif
-
diff --git a/original/linux/akm8975.h b/original/linux/akm8975.h
deleted file mode 100644
index 916d2da..0000000
--- a/original/linux/akm8975.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Definitions for akm8975 compass chip.
- */
-#ifndef AKM8975_H
-#define AKM8975_H
-
-#include <linux/ioctl.h>
-
-/*! \name AK8975 operation mode
- \anchor AK8975_Mode
- Defines an operation mode of the AK8975.*/
-/*! @{*/
-#define AK8975_MODE_SNG_MEASURE 0x01
-#define AK8975_MODE_SELF_TEST 0x08
-#define AK8975_MODE_FUSE_ACCESS 0x0F
-#define AK8975_MODE_POWER_DOWN 0x00
-/*! @}*/
-
-#define RBUFF_SIZE 8 /* Rx buffer size */
-
-/*! \name AK8975 register address
-\anchor AK8975_REG
-Defines a register address of the AK8975.*/
-/*! @{*/
-#define AK8975_REG_WIA 0x00
-#define AK8975_REG_INFO 0x01
-#define AK8975_REG_ST1 0x02
-#define AK8975_REG_HXL 0x03
-#define AK8975_REG_HXH 0x04
-#define AK8975_REG_HYL 0x05
-#define AK8975_REG_HYH 0x06
-#define AK8975_REG_HZL 0x07
-#define AK8975_REG_HZH 0x08
-#define AK8975_REG_ST2 0x09
-#define AK8975_REG_CNTL 0x0A
-#define AK8975_REG_RSV 0x0B
-#define AK8975_REG_ASTC 0x0C
-#define AK8975_REG_TS1 0x0D
-#define AK8975_REG_TS2 0x0E
-#define AK8975_REG_I2CDIS 0x0F
-/*! @}*/
-
-/*! \name AK8975 fuse-rom address
-\anchor AK8975_FUSE
-Defines a read-only address of the fuse ROM of the AK8975.*/
-/*! @{*/
-#define AK8975_FUSE_ASAX 0x10
-#define AK8975_FUSE_ASAY 0x11
-#define AK8975_FUSE_ASAZ 0x12
-/*! @}*/
-
-#define AKMIO 0xA1
-
-/* IOCTLs for AKM library */
-#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5])
-#define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5])
-#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE])
-#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12])
-#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int)
-#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int)
-#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short)
-
-/* IOCTLs for APPs */
-#define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short)
-#define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short)
-#define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short)
-#define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short)
-#define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short)
-#define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY
-#define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) /* Set raw magnetic vector flag */
-#define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) /* Get raw magnetic vector flag */
-#define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short)
-
-
-/* Default GPIO setting */
-#define ECS_INTR 140
-
-struct akm8975_platform_data {
- int intr;
-};
-
-#endif
-
diff --git a/original/linux/akm8976.h b/original/linux/akm8976.h
deleted file mode 100644
index 9c21b4e..0000000
--- a/original/linux/akm8976.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Definitions for akm8976 compass chip.
- */
-#ifndef AKM8976_H
-#define AKM8976_H
-
-#include <linux/ioctl.h>
-
-/* Compass device dependent definition */
-#define AKECS_MODE_MEASURE 0x00 /* Starts measurement. Please use AKECS_MODE_MEASURE_SNG */
- /* or AKECS_MODE_MEASURE_SEQ instead of this. */
-#define AKECS_MODE_PFFD 0x01 /* Start pedometer and free fall detect. */
-#define AKECS_MODE_E2P_READ 0x02 /* E2P access mode (read). */
-#define AKECS_MODE_POWERDOWN 0x03 /* Power down mode */
-
-#define AKECS_MODE_MEASURE_SNG 0x10 /* Starts single measurement */
-#define AKECS_MODE_MEASURE_SEQ 0x11 /* Starts sequential measurement */
-
-/* Default register settings */
-#define CSPEC_AINT 0x01 /* Amplification for acceleration sensor */
-#define CSPEC_SNG_NUM 0x01 /* Single measurement mode */
-#define CSPEC_SEQ_NUM 0x02 /* Sequential measurement mode */
-#define CSPEC_SFRQ_32 0x00 /* Measurement frequency: 32Hz */
-#define CSPEC_SFRQ_64 0x01 /* Measurement frequency: 64Hz */
-#define CSPEC_MCS 0x07 /* Clock frequency */
-#define CSPEC_MKS 0x01 /* Clock type: CMOS level */
-#define CSPEC_INTEN 0x01 /* Interruption pin enable: Enable */
-
-#define RBUFF_SIZE 31 /* Rx buffer size */
-#define MAX_CALI_SIZE 0x1000U /* calibration buffer size */
-
-/* AK8976A register address */
-#define AKECS_REG_ST 0xC0
-#define AKECS_REG_TMPS 0xC1
-#define AKECS_REG_MS1 0xE0
-#define AKECS_REG_MS2 0xE1
-#define AKECS_REG_MS3 0xE2
-
-#define AKMIO 0xA1
-
-/* IOCTLs for AKM library */
-#define ECS_IOCTL_INIT _IO(AKMIO, 0x01)
-#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5])
-#define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5])
-#define ECS_IOCTL_RESET _IO(AKMIO, 0x04)
-#define ECS_IOCTL_INT_STATUS _IO(AKMIO, 0x05)
-#define ECS_IOCTL_FFD_STATUS _IO(AKMIO, 0x06)
-#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x07, short)
-#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE+1])
-#define ECS_IOCTL_GET_NUMFRQ _IOR(AKMIO, 0x09, char[2])
-#define ECS_IOCTL_SET_PERST _IO(AKMIO, 0x0A)
-#define ECS_IOCTL_SET_G0RST _IO(AKMIO, 0x0B)
-#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12])
-#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int)
-#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int)
-#define ECS_IOCTL_GET_CALI_DATA _IOR(AKMIO, 0x0F, char[MAX_CALI_SIZE])
-#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short)
-
-/* IOCTLs for APPs */
-#define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short)
-#define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short)
-#define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short)
-#define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short)
-#define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short)
-#define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short)
-#define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short)
-#define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17)
-#define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short)
-#define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY
-#define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) /* Set raw magnetic vector flag */
-#define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) /* Get raw magnetic vector flag */
-
-/* IOCTLs for pedometer */
-#define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short)
-
-/* Default GPIO setting */
-#define ECS_RST 146 /*MISC4, bit2 */
-#define ECS_CLK_ON 155 /*MISC5, bit3 */
-#define ECS_INTR 161 /*INT2, bit1 */
-
-struct akm8976_platform_data {
- int reset;
- int clk_on;
- int intr;
-};
-extern char *get_akm_cal_ram(void);
-
-#endif
-
diff --git a/original/linux/android_alarm.h b/original/linux/android_alarm.h
deleted file mode 100644
index 3e63d05..0000000
--- a/original/linux/android_alarm.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* linux/android_alarm.h
-**
-** Copyright 2006, The Android Open Source Project
-** Author: Arve Hjønnevåg
-**
-** This file is dual licensed. It may be redistributed and/or modified
-** under the terms of the Apache 2.0 License OR version 2 of the GNU
-** General Public License.
-*/
-
-#ifndef _LINUX_ANDROID_ALARM_H
-#define _LINUX_ANDROID_ALARM_H
-
-#include <asm/ioctl.h>
-#include <linux/time.h>
-
-typedef enum {
- // return code bit numbers or set alarm arg
- ANDROID_ALARM_RTC_WAKEUP,
- ANDROID_ALARM_RTC,
- ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
- ANDROID_ALARM_ELAPSED_REALTIME,
- ANDROID_ALARM_SYSTEMTIME,
- //
- ANDROID_ALARM_TYPE_COUNT,
-
- // return code bit numbers
-// ANDROID_ALARM_TIME_CHANGE = 16
-} android_alarm_type_t;
-
-typedef enum {
- ANDROID_ALARM_RTC_WAKEUP_MASK = 1U << ANDROID_ALARM_RTC_WAKEUP,
- ANDROID_ALARM_RTC_MASK = 1U << ANDROID_ALARM_RTC,
- ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP_MASK = 1U << ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP,
- ANDROID_ALARM_ELAPSED_REALTIME_MASK = 1U << ANDROID_ALARM_ELAPSED_REALTIME,
- ANDROID_ALARM_SYSTEMTIME_MASK = 1U << ANDROID_ALARM_SYSTEMTIME,
- ANDROID_ALARM_TIME_CHANGE_MASK = 1U << 16
-} android_alarm_return_flags_t;
-
-#define ANDROID_ALARM_CLEAR(type) _IO('a', 0 | ((type) << 4)) // diasable alarm
-#define ANDROID_ALARM_WAIT _IO('a', 1) // ack last alarm and wait for next
-#define ANDROID_ALARM_SET(type) _IOW('a', 2 | ((type) << 4), struct timespec) // set alarm
-#define ANDROID_ALARM_SET_AND_WAIT(type) _IOW('a', 3 | ((type) << 4), struct timespec)
-#define ANDROID_ALARM_GET_TIME(type) _IOW('a', 4 | ((type) << 4), struct timespec)
-#define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec)
-#define ANDROID_ALARM_SET_TIMEZONE _IOW('a', 6, struct timezone)
-
-#define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0)))
-#define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4)
-
-#endif
diff --git a/original/linux/android_pmem.h b/original/linux/android_pmem.h
deleted file mode 100755
index f633621..0000000
--- a/original/linux/android_pmem.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* include/linux/android_pmem.h
- *
- * Copyright (C) 2007 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _ANDROID_PMEM_H_
-#define _ANDROID_PMEM_H_
-
-#define PMEM_IOCTL_MAGIC 'p'
-#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, unsigned int)
-#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, unsigned int)
-#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, unsigned int)
-#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, unsigned int)
-/* This ioctl will allocate pmem space, backing the file, it will fail
- * if the file already has an allocation, pass it the len as the argument
- * to the ioctl */
-#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
-/* This will connect a one pmem file to another, pass the file that is already
- * backed in memory as the argument to the ioctl
- */
-#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
-/* Returns the total size of the pmem region it is sent to as a pmem_region
- * struct (with offset set to 0).
- */
-#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int)
-#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
-
-struct android_pmem_platform_data
-{
- const char* name;
- /* starting physical address of memory region */
- unsigned long start;
- /* size of memory region */
- unsigned long size;
- /* set to indicate the region should not be managed with an allocator */
- unsigned no_allocator;
- /* set to indicate maps of this region should be cached, if a mix of
- * cached and uncached is desired, set this and open the device with
- * O_SYNC to get an uncached region */
- unsigned cached;
- /* The MSM7k has bits to enable a write buffer in the bus controller*/
- unsigned buffered;
-};
-
-struct pmem_region {
- unsigned long offset;
- unsigned long len;
-};
-
-#ifdef CONFIG_ANDROID_PMEM
-int is_pmem_file(struct file *file);
-int get_pmem_file(int fd, unsigned long *start, unsigned long *vstart,
- unsigned long *end, struct file **filp);
-int get_pmem_user_addr(struct file *file, unsigned long *start,
- unsigned long *end);
-void put_pmem_file(struct file* file);
-void flush_pmem_file(struct file *file, unsigned long start, unsigned long len);
-int pmem_setup(struct android_pmem_platform_data *pdata,
- long (*ioctl)(struct file *, unsigned int, unsigned long),
- int (*release)(struct inode *, struct file *));
-int pmem_remap(struct pmem_region *region, struct file *file,
- unsigned operation);
-
-#else
-static inline int is_pmem_file(struct file *file) { return 0; }
-static inline int get_pmem_file(int fd, unsigned long *start,
- unsigned long *vstart, unsigned long *end,
- struct file **filp) { return -ENOSYS; }
-static inline int get_pmem_user_addr(struct file *file, unsigned long *start,
- unsigned long *end) { return -ENOSYS; }
-static inline void put_pmem_file(struct file* file) { return; }
-static inline void flush_pmem_file(struct file *file, unsigned long start,
- unsigned long len) { return; }
-static inline int pmem_setup(struct android_pmem_platform_data *pdata,
- long (*ioctl)(struct file *, unsigned int, unsigned long),
- int (*release)(struct inode *, struct file *)) { return -ENOSYS; }
-
-static inline int pmem_remap(struct pmem_region *region, struct file *file,
- unsigned operation) { return -ENOSYS; }
-#endif
-
-#endif //_ANDROID_PPP_H_
-
diff --git a/original/linux/android_power.h b/original/linux/android_power.h
deleted file mode 100644
index f42f662..0000000
--- a/original/linux/android_power.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* linux/android_power.h
-**
-** Copyright 2005-2006, The Android Open Source Project
-** Author: Arve Hjønnevåg
-**
-** This file is dual licensed. It may be redistributed and/or modified
-** under the terms of the Apache 2.0 License OR version 2 of the GNU
-** General Public License.
-*/
-
-#ifndef _LINUX_ANDROID_POWER_H
-#define _LINUX_ANDROID_POWER_H
-
-#include <linux/list.h>
-
-typedef struct
-{
- struct list_head link;
- int lock_count;
- int flags;
- const char *name;
- int expires;
-} android_suspend_lock_t;
-
-#define ANDROID_SUSPEND_LOCK_FLAG_COUNTED (1U << 0)
-#define ANDROID_SUSPEND_LOCK_FLAG_USER_READABLE (1U << 1)
-#define ANDROID_SUSPEND_LOCK_FLAG_USER_SET (1U << 2)
-#define ANDROID_SUSPEND_LOCK_FLAG_USER_CLEAR (1U << 3)
-#define ANDROID_SUSPEND_LOCK_FLAG_USER_INC (1U << 4)
-#define ANDROID_SUSPEND_LOCK_FLAG_USER_DEC (1U << 5)
-#define ANDROID_SUSPEND_LOCK_FLAG_USER_VISIBLE_MASK (0x1fU << 1)
-#define ANDROID_SUSPEND_LOCK_AUTO_EXPIRE (1U << 6)
-
-
-typedef struct android_early_suspend android_early_suspend_t;
-struct android_early_suspend
-{
- struct list_head link;
- int level;
- void (*suspend)(android_early_suspend_t *h);
- void (*resume)(android_early_suspend_t *h);
-};
-
-typedef enum {
- ANDROID_CHARGING_STATE_UNKNOWN,
- ANDROID_CHARGING_STATE_DISCHARGE,
- ANDROID_CHARGING_STATE_MAINTAIN, // or trickle
- ANDROID_CHARGING_STATE_SLOW,
- ANDROID_CHARGING_STATE_NORMAL,
- ANDROID_CHARGING_STATE_FAST,
- ANDROID_CHARGING_STATE_OVERHEAT
-} android_charging_state_t;
-
-//android_suspend_lock_t *android_allocate_suspend_lock(const char *debug_name);
-//void android_free_suspend_lock(android_suspend_lock_t *lock);
-int android_init_suspend_lock(android_suspend_lock_t *lock);
-void android_uninit_suspend_lock(android_suspend_lock_t *lock);
-void android_lock_suspend(android_suspend_lock_t *lock);
-void android_lock_suspend_auto_expire(android_suspend_lock_t *lock, int timeout);
-void android_unlock_suspend(android_suspend_lock_t *lock);
-void android_power_wakeup(int notification); /* notification = 0: normal wakeup, notification = 1: temporary wakeup */
-
-int android_power_is_driver_suspended(void);
-
-void android_register_early_suspend(android_early_suspend_t *handler);
-void android_unregister_early_suspend(android_early_suspend_t *handler);
-
-void android_power_set_battery_level(int level); // level 0-100
-void android_power_set_charging_state(android_charging_state_t state);
-
-#endif
-
diff --git a/original/linux/apm_bios.h b/original/linux/apm_bios.h
deleted file mode 100644
index 290aef3..0000000
--- a/original/linux/apm_bios.h
+++ /dev/null
@@ -1,218 +0,0 @@
-#ifndef _LINUX_APM_H
-#define _LINUX_APM_H
-
-/*
- * Include file for the interface to an APM BIOS
- * Copyright 1994-2001 Stephen Rothwell (sfr@canb.auug.org.au)
- *
- * 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, or (at your option) any
- * later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- */
-
-typedef unsigned short apm_event_t;
-typedef unsigned short apm_eventinfo_t;
-
-#ifdef __KERNEL__
-
-#define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)
-#define APM_CS_16 (APM_CS + 8)
-#define APM_DS (APM_CS_16 + 8)
-
-struct apm_bios_info {
- unsigned short version;
- unsigned short cseg;
- unsigned long offset;
- unsigned short cseg_16;
- unsigned short dseg;
- unsigned short flags;
- unsigned short cseg_len;
- unsigned short cseg_16_len;
- unsigned short dseg_len;
-};
-
-/* Results of APM Installation Check */
-#define APM_16_BIT_SUPPORT 0x0001
-#define APM_32_BIT_SUPPORT 0x0002
-#define APM_IDLE_SLOWS_CLOCK 0x0004
-#define APM_BIOS_DISABLED 0x0008
-#define APM_BIOS_DISENGAGED 0x0010
-
-/*
- * Data for APM that is persistent across module unload/load
- */
-struct apm_info {
- struct apm_bios_info bios;
- unsigned short connection_version;
- int get_power_status_broken;
- int get_power_status_swabinminutes;
- int allow_ints;
- int forbid_idle;
- int realmode_power_off;
- int disabled;
-};
-
-/*
- * The APM function codes
- */
-#define APM_FUNC_INST_CHECK 0x5300
-#define APM_FUNC_REAL_CONN 0x5301
-#define APM_FUNC_16BIT_CONN 0x5302
-#define APM_FUNC_32BIT_CONN 0x5303
-#define APM_FUNC_DISCONN 0x5304
-#define APM_FUNC_IDLE 0x5305
-#define APM_FUNC_BUSY 0x5306
-#define APM_FUNC_SET_STATE 0x5307
-#define APM_FUNC_ENABLE_PM 0x5308
-#define APM_FUNC_RESTORE_BIOS 0x5309
-#define APM_FUNC_GET_STATUS 0x530a
-#define APM_FUNC_GET_EVENT 0x530b
-#define APM_FUNC_GET_STATE 0x530c
-#define APM_FUNC_ENABLE_DEV_PM 0x530d
-#define APM_FUNC_VERSION 0x530e
-#define APM_FUNC_ENGAGE_PM 0x530f
-#define APM_FUNC_GET_CAP 0x5310
-#define APM_FUNC_RESUME_TIMER 0x5311
-#define APM_FUNC_RESUME_ON_RING 0x5312
-#define APM_FUNC_TIMER 0x5313
-
-/*
- * Function code for APM_FUNC_RESUME_TIMER
- */
-#define APM_FUNC_DISABLE_TIMER 0
-#define APM_FUNC_GET_TIMER 1
-#define APM_FUNC_SET_TIMER 2
-
-/*
- * Function code for APM_FUNC_RESUME_ON_RING
- */
-#define APM_FUNC_DISABLE_RING 0
-#define APM_FUNC_ENABLE_RING 1
-#define APM_FUNC_GET_RING 2
-
-/*
- * Function code for APM_FUNC_TIMER_STATUS
- */
-#define APM_FUNC_TIMER_DISABLE 0
-#define APM_FUNC_TIMER_ENABLE 1
-#define APM_FUNC_TIMER_GET 2
-
-/*
- * in arch/i386/kernel/setup.c
- */
-extern struct apm_info apm_info;
-
-#endif /* __KERNEL__ */
-
-/*
- * Power states
- */
-#define APM_STATE_READY 0x0000
-#define APM_STATE_STANDBY 0x0001
-#define APM_STATE_SUSPEND 0x0002
-#define APM_STATE_OFF 0x0003
-#define APM_STATE_BUSY 0x0004
-#define APM_STATE_REJECT 0x0005
-#define APM_STATE_OEM_SYS 0x0020
-#define APM_STATE_OEM_DEV 0x0040
-
-#define APM_STATE_DISABLE 0x0000
-#define APM_STATE_ENABLE 0x0001
-
-#define APM_STATE_DISENGAGE 0x0000
-#define APM_STATE_ENGAGE 0x0001
-
-/*
- * Events (results of Get PM Event)
- */
-#define APM_SYS_STANDBY 0x0001
-#define APM_SYS_SUSPEND 0x0002
-#define APM_NORMAL_RESUME 0x0003
-#define APM_CRITICAL_RESUME 0x0004
-#define APM_LOW_BATTERY 0x0005
-#define APM_POWER_STATUS_CHANGE 0x0006
-#define APM_UPDATE_TIME 0x0007
-#define APM_CRITICAL_SUSPEND 0x0008
-#define APM_USER_STANDBY 0x0009
-#define APM_USER_SUSPEND 0x000a
-#define APM_STANDBY_RESUME 0x000b
-#define APM_CAPABILITY_CHANGE 0x000c
-
-/*
- * Error codes
- */
-#define APM_SUCCESS 0x00
-#define APM_DISABLED 0x01
-#define APM_CONNECTED 0x02
-#define APM_NOT_CONNECTED 0x03
-#define APM_16_CONNECTED 0x05
-#define APM_16_UNSUPPORTED 0x06
-#define APM_32_CONNECTED 0x07
-#define APM_32_UNSUPPORTED 0x08
-#define APM_BAD_DEVICE 0x09
-#define APM_BAD_PARAM 0x0a
-#define APM_NOT_ENGAGED 0x0b
-#define APM_BAD_FUNCTION 0x0c
-#define APM_RESUME_DISABLED 0x0d
-#define APM_NO_ERROR 0x53
-#define APM_BAD_STATE 0x60
-#define APM_NO_EVENTS 0x80
-#define APM_NOT_PRESENT 0x86
-
-/*
- * APM Device IDs
- */
-#define APM_DEVICE_BIOS 0x0000
-#define APM_DEVICE_ALL 0x0001
-#define APM_DEVICE_DISPLAY 0x0100
-#define APM_DEVICE_STORAGE 0x0200
-#define APM_DEVICE_PARALLEL 0x0300
-#define APM_DEVICE_SERIAL 0x0400
-#define APM_DEVICE_NETWORK 0x0500
-#define APM_DEVICE_PCMCIA 0x0600
-#define APM_DEVICE_BATTERY 0x8000
-#define APM_DEVICE_OEM 0xe000
-#define APM_DEVICE_OLD_ALL 0xffff
-#define APM_DEVICE_CLASS 0x00ff
-#define APM_DEVICE_MASK 0xff00
-
-#ifdef __KERNEL__
-/*
- * This is the "All Devices" ID communicated to the BIOS
- */
-#define APM_DEVICE_BALL ((apm_info.connection_version > 0x0100) ? \
- APM_DEVICE_ALL : APM_DEVICE_OLD_ALL)
-#endif
-
-/*
- * Battery status
- */
-#define APM_MAX_BATTERIES 2
-
-/*
- * APM defined capability bit flags
- */
-#define APM_CAP_GLOBAL_STANDBY 0x0001
-#define APM_CAP_GLOBAL_SUSPEND 0x0002
-#define APM_CAP_RESUME_STANDBY_TIMER 0x0004 /* Timer resume from standby */
-#define APM_CAP_RESUME_SUSPEND_TIMER 0x0008 /* Timer resume from suspend */
-#define APM_CAP_RESUME_STANDBY_RING 0x0010 /* Resume on Ring fr standby */
-#define APM_CAP_RESUME_SUSPEND_RING 0x0020 /* Resume on Ring fr suspend */
-#define APM_CAP_RESUME_STANDBY_PCMCIA 0x0040 /* Resume on PCMCIA Ring */
-#define APM_CAP_RESUME_SUSPEND_PCMCIA 0x0080 /* Resume on PCMCIA Ring */
-
-/*
- * ioctl operations
- */
-#include <linux/ioctl.h>
-
-#define APM_IOC_STANDBY _IO('A', 1)
-#define APM_IOC_SUSPEND _IO('A', 2)
-
-#endif /* LINUX_APM_H */
diff --git a/original/linux/ashmem.h b/original/linux/ashmem.h
deleted file mode 100644
index 53b1bae..0000000
--- a/original/linux/ashmem.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * include/linux/ashmem.h
- *
- * Copyright 2008 The Android Open Source Project
- * Author: Robert Love
- *
- * This file is dual licensed. It may be redistributed and/or modified
- * under the terms of the Apache 2.0 License OR version 2 of the GNU
- * General Public License.
- */
-
-#ifndef _LINUX_ASHMEM_H
-#define _LINUX_ASHMEM_H
-
-#include <linux/limits.h>
-#include <linux/ioctl.h>
-
-#define ASHMEM_NAME_LEN 256
-
-#define ASHMEM_NAME_DEF "dev/ashmem"
-
-/* Return values from ASHMEM_PIN: Was the mapping purged while unpinned? */
-#define ASHMEM_NOT_PURGED 0
-#define ASHMEM_WAS_PURGED 1
-
-/* Return values from ASHMEM_GET_PIN_STATUS: Is the mapping pinned? */
-#define ASHMEM_IS_UNPINNED 0
-#define ASHMEM_IS_PINNED 1
-
-struct ashmem_pin {
- __u32 offset; /* offset into region, in bytes, page-aligned */
- __u32 len; /* length forward from offset, in bytes, page-aligned */
-};
-
-#define __ASHMEMIOC 0x77
-
-#define ASHMEM_SET_NAME _IOW(__ASHMEMIOC, 1, char[ASHMEM_NAME_LEN])
-#define ASHMEM_GET_NAME _IOR(__ASHMEMIOC, 2, char[ASHMEM_NAME_LEN])
-#define ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, size_t)
-#define ASHMEM_GET_SIZE _IO(__ASHMEMIOC, 4)
-#define ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned long)
-#define ASHMEM_GET_PROT_MASK _IO(__ASHMEMIOC, 6)
-#define ASHMEM_PIN _IOW(__ASHMEMIOC, 7, struct ashmem_pin)
-#define ASHMEM_UNPIN _IOW(__ASHMEMIOC, 8, struct ashmem_pin)
-#define ASHMEM_GET_PIN_STATUS _IO(__ASHMEMIOC, 9)
-#define ASHMEM_PURGE_ALL_CACHES _IO(__ASHMEMIOC, 10)
-
-#endif /* _LINUX_ASHMEM_H */
diff --git a/original/linux/ata.h b/original/linux/ata.h
deleted file mode 100644
index 3671af8..0000000
--- a/original/linux/ata.h
+++ /dev/null
@@ -1,369 +0,0 @@
-
-/*
- * Copyright 2003-2004 Red Hat, Inc. All rights reserved.
- * Copyright 2003-2004 Jeff Garzik
- *
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * libata documentation is available via 'make {ps|pdf}docs',
- * as Documentation/DocBook/libata.*
- *
- * Hardware documentation available from http://www.t13.org/
- *
- */
-
-#ifndef __LINUX_ATA_H__
-#define __LINUX_ATA_H__
-
-#include <linux/types.h>
-
-/* defines only for the constants which don't work well as enums */
-#define ATA_DMA_BOUNDARY 0xffffUL
-#define ATA_DMA_MASK 0xffffffffULL
-
-enum {
- /* various global constants */
- ATA_MAX_DEVICES = 2, /* per bus/port */
- ATA_MAX_PRD = 256, /* we could make these 256/256 */
- ATA_SECT_SIZE = 512,
-
- ATA_ID_WORDS = 256,
- ATA_ID_SERNO_OFS = 10,
- ATA_ID_FW_REV_OFS = 23,
- ATA_ID_PROD_OFS = 27,
- ATA_ID_OLD_PIO_MODES = 51,
- ATA_ID_FIELD_VALID = 53,
- ATA_ID_MWDMA_MODES = 63,
- ATA_ID_PIO_MODES = 64,
- ATA_ID_EIDE_DMA_MIN = 65,
- ATA_ID_EIDE_PIO = 67,
- ATA_ID_EIDE_PIO_IORDY = 68,
- ATA_ID_UDMA_MODES = 88,
- ATA_ID_MAJOR_VER = 80,
- ATA_ID_PIO4 = (1 << 1),
-
- ATA_PCI_CTL_OFS = 2,
- ATA_SERNO_LEN = 20,
- ATA_UDMA0 = (1 << 0),
- ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
- ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
- ATA_UDMA3 = ATA_UDMA2 | (1 << 3),
- ATA_UDMA4 = ATA_UDMA3 | (1 << 4),
- ATA_UDMA5 = ATA_UDMA4 | (1 << 5),
- ATA_UDMA6 = ATA_UDMA5 | (1 << 6),
- ATA_UDMA7 = ATA_UDMA6 | (1 << 7),
- /* ATA_UDMA7 is just for completeness... doesn't exist (yet?). */
-
- ATA_UDMA_MASK_40C = ATA_UDMA2, /* udma0-2 */
-
- /* DMA-related */
- ATA_PRD_SZ = 8,
- ATA_PRD_TBL_SZ = (ATA_MAX_PRD * ATA_PRD_SZ),
- ATA_PRD_EOT = (1 << 31), /* end-of-table flag */
-
- ATA_DMA_TABLE_OFS = 4,
- ATA_DMA_STATUS = 2,
- ATA_DMA_CMD = 0,
- ATA_DMA_WR = (1 << 3),
- ATA_DMA_START = (1 << 0),
- ATA_DMA_INTR = (1 << 2),
- ATA_DMA_ERR = (1 << 1),
- ATA_DMA_ACTIVE = (1 << 0),
-
- /* bits in ATA command block registers */
- ATA_HOB = (1 << 7), /* LBA48 selector */
- ATA_NIEN = (1 << 1), /* disable-irq flag */
- ATA_LBA = (1 << 6), /* LBA28 selector */
- ATA_DEV1 = (1 << 4), /* Select Device 1 (slave) */
- ATA_DEVICE_OBS = (1 << 7) | (1 << 5), /* obs bits in dev reg */
- ATA_DEVCTL_OBS = (1 << 3), /* obsolete bit in devctl reg */
- ATA_BUSY = (1 << 7), /* BSY status bit */
- ATA_DRDY = (1 << 6), /* device ready */
- ATA_DF = (1 << 5), /* device fault */
- ATA_DRQ = (1 << 3), /* data request i/o */
- ATA_ERR = (1 << 0), /* have an error */
- ATA_SRST = (1 << 2), /* software reset */
- ATA_ICRC = (1 << 7), /* interface CRC error */
- ATA_UNC = (1 << 6), /* uncorrectable media error */
- ATA_IDNF = (1 << 4), /* ID not found */
- ATA_ABORTED = (1 << 2), /* command aborted */
-
- /* ATA command block registers */
- ATA_REG_DATA = 0x00,
- ATA_REG_ERR = 0x01,
- ATA_REG_NSECT = 0x02,
- ATA_REG_LBAL = 0x03,
- ATA_REG_LBAM = 0x04,
- ATA_REG_LBAH = 0x05,
- ATA_REG_DEVICE = 0x06,
- ATA_REG_STATUS = 0x07,
-
- ATA_REG_FEATURE = ATA_REG_ERR, /* and their aliases */
- ATA_REG_CMD = ATA_REG_STATUS,
- ATA_REG_BYTEL = ATA_REG_LBAM,
- ATA_REG_BYTEH = ATA_REG_LBAH,
- ATA_REG_DEVSEL = ATA_REG_DEVICE,
- ATA_REG_IRQ = ATA_REG_NSECT,
-
- /* ATA device commands */
- ATA_CMD_CHK_POWER = 0xE5, /* check power mode */
- ATA_CMD_STANDBY = 0xE2, /* place in standby power mode */
- ATA_CMD_IDLE = 0xE3, /* place in idle power mode */
- ATA_CMD_EDD = 0x90, /* execute device diagnostic */
- ATA_CMD_FLUSH = 0xE7,
- ATA_CMD_FLUSH_EXT = 0xEA,
- ATA_CMD_ID_ATA = 0xEC,
- ATA_CMD_ID_ATAPI = 0xA1,
- ATA_CMD_READ = 0xC8,
- ATA_CMD_READ_EXT = 0x25,
- ATA_CMD_WRITE = 0xCA,
- ATA_CMD_WRITE_EXT = 0x35,
- ATA_CMD_WRITE_FUA_EXT = 0x3D,
- ATA_CMD_FPDMA_READ = 0x60,
- ATA_CMD_FPDMA_WRITE = 0x61,
- ATA_CMD_PIO_READ = 0x20,
- ATA_CMD_PIO_READ_EXT = 0x24,
- ATA_CMD_PIO_WRITE = 0x30,
- ATA_CMD_PIO_WRITE_EXT = 0x34,
- ATA_CMD_READ_MULTI = 0xC4,
- ATA_CMD_READ_MULTI_EXT = 0x29,
- ATA_CMD_WRITE_MULTI = 0xC5,
- ATA_CMD_WRITE_MULTI_EXT = 0x39,
- ATA_CMD_WRITE_MULTI_FUA_EXT = 0xCE,
- ATA_CMD_SET_FEATURES = 0xEF,
- ATA_CMD_PACKET = 0xA0,
- ATA_CMD_VERIFY = 0x40,
- ATA_CMD_VERIFY_EXT = 0x42,
- ATA_CMD_STANDBYNOW1 = 0xE0,
- ATA_CMD_IDLEIMMEDIATE = 0xE1,
- ATA_CMD_INIT_DEV_PARAMS = 0x91,
- ATA_CMD_READ_NATIVE_MAX = 0xF8,
- ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
- ATA_CMD_READ_LOG_EXT = 0x2f,
-
- /* READ_LOG_EXT pages */
- ATA_LOG_SATA_NCQ = 0x10,
-
- /* SETFEATURES stuff */
- SETFEATURES_XFER = 0x03,
- XFER_UDMA_7 = 0x47,
- XFER_UDMA_6 = 0x46,
- XFER_UDMA_5 = 0x45,
- XFER_UDMA_4 = 0x44,
- XFER_UDMA_3 = 0x43,
- XFER_UDMA_2 = 0x42,
- XFER_UDMA_1 = 0x41,
- XFER_UDMA_0 = 0x40,
- XFER_MW_DMA_2 = 0x22,
- XFER_MW_DMA_1 = 0x21,
- XFER_MW_DMA_0 = 0x20,
- XFER_SW_DMA_2 = 0x12,
- XFER_SW_DMA_1 = 0x11,
- XFER_SW_DMA_0 = 0x10,
- XFER_PIO_4 = 0x0C,
- XFER_PIO_3 = 0x0B,
- XFER_PIO_2 = 0x0A,
- XFER_PIO_1 = 0x09,
- XFER_PIO_0 = 0x08,
- XFER_PIO_SLOW = 0x00,
-
- SETFEATURES_WC_ON = 0x02, /* Enable write cache */
- SETFEATURES_WC_OFF = 0x82, /* Disable write cache */
-
- /* ATAPI stuff */
- ATAPI_PKT_DMA = (1 << 0),
- ATAPI_DMADIR = (1 << 2), /* ATAPI data dir:
- 0=to device, 1=to host */
- ATAPI_CDB_LEN = 16,
-
- /* cable types */
- ATA_CBL_NONE = 0,
- ATA_CBL_PATA40 = 1,
- ATA_CBL_PATA80 = 2,
- ATA_CBL_PATA_UNK = 3,
- ATA_CBL_SATA = 4,
-
- /* SATA Status and Control Registers */
- SCR_STATUS = 0,
- SCR_ERROR = 1,
- SCR_CONTROL = 2,
- SCR_ACTIVE = 3,
- SCR_NOTIFICATION = 4,
-
- /* SError bits */
- SERR_DATA_RECOVERED = (1 << 0), /* recovered data error */
- SERR_COMM_RECOVERED = (1 << 1), /* recovered comm failure */
- SERR_DATA = (1 << 8), /* unrecovered data error */
- SERR_PERSISTENT = (1 << 9), /* persistent data/comm error */
- SERR_PROTOCOL = (1 << 10), /* protocol violation */
- SERR_INTERNAL = (1 << 11), /* host internal error */
- SERR_PHYRDY_CHG = (1 << 16), /* PHY RDY changed */
- SERR_DEV_XCHG = (1 << 26), /* device exchanged */
-
- /* struct ata_taskfile flags */
- ATA_TFLAG_LBA48 = (1 << 0), /* enable 48-bit LBA and "HOB" */
- ATA_TFLAG_ISADDR = (1 << 1), /* enable r/w to nsect/lba regs */
- ATA_TFLAG_DEVICE = (1 << 2), /* enable r/w to device reg */
- ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */
- ATA_TFLAG_LBA = (1 << 4), /* enable LBA */
- ATA_TFLAG_FUA = (1 << 5), /* enable FUA */
- ATA_TFLAG_POLLING = (1 << 6), /* set nIEN to 1 and use polling */
-};
-
-enum ata_tf_protocols {
- /* ATA taskfile protocols */
- ATA_PROT_UNKNOWN, /* unknown/invalid */
- ATA_PROT_NODATA, /* no data */
- ATA_PROT_PIO, /* PIO single sector */
- ATA_PROT_DMA, /* DMA */
- ATA_PROT_NCQ, /* NCQ */
- ATA_PROT_ATAPI, /* packet command, PIO data xfer*/
- ATA_PROT_ATAPI_NODATA, /* packet command, no data */
- ATA_PROT_ATAPI_DMA, /* packet command with special DMA sauce */
-};
-
-enum ata_ioctls {
- ATA_IOC_GET_IO32 = 0x309,
- ATA_IOC_SET_IO32 = 0x324,
-};
-
-/* core structures */
-
-struct ata_prd {
- u32 addr;
- u32 flags_len;
-};
-
-struct ata_taskfile {
- unsigned long flags; /* ATA_TFLAG_xxx */
- u8 protocol; /* ATA_PROT_xxx */
-
- u8 ctl; /* control reg */
-
- u8 hob_feature; /* additional data */
- u8 hob_nsect; /* to support LBA48 */
- u8 hob_lbal;
- u8 hob_lbam;
- u8 hob_lbah;
-
- u8 feature;
- u8 nsect;
- u8 lbal;
- u8 lbam;
- u8 lbah;
-
- u8 device;
-
- u8 command; /* IO operation */
-};
-
-#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
-#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
-#define ata_id_is_sata(id) ((id)[93] == 0)
-#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
-#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
-#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
-#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
-#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
-#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
-#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
-#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
-#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
-#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
-#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
-#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
-#define ata_id_has_ncq(id) ((id)[76] & (1 << 8))
-#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1)
-#define ata_id_removeable(id) ((id)[0] & (1 << 7))
-#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
-#define ata_id_u32(id,n) \
- (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
-#define ata_id_u64(id,n) \
- ( ((u64) (id)[(n) + 3] << 48) | \
- ((u64) (id)[(n) + 2] << 32) | \
- ((u64) (id)[(n) + 1] << 16) | \
- ((u64) (id)[(n) + 0]) )
-
-#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
-
-static inline unsigned int ata_id_major_version(const u16 *id)
-{
- unsigned int mver;
-
- for (mver = 14; mver >= 1; mver--)
- if (id[ATA_ID_MAJOR_VER] & (1 << mver))
- break;
- return mver;
-}
-
-static inline int ata_id_current_chs_valid(const u16 *id)
-{
- /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
- has not been issued to the device then the values of
- id[54] to id[56] are vendor specific. */
- return (id[53] & 0x01) && /* Current translation valid */
- id[54] && /* cylinders in current translation */
- id[55] && /* heads in current translation */
- id[55] <= 16 &&
- id[56]; /* sectors in current translation */
-}
-
-static inline int atapi_cdb_len(const u16 *dev_id)
-{
- u16 tmp = dev_id[0] & 0x3;
- switch (tmp) {
- case 0: return 12;
- case 1: return 16;
- default: return -1;
- }
-}
-
-static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
-{
- return (tf->protocol == ATA_PROT_ATAPI) ||
- (tf->protocol == ATA_PROT_ATAPI_NODATA) ||
- (tf->protocol == ATA_PROT_ATAPI_DMA);
-}
-
-static inline int is_multi_taskfile(struct ata_taskfile *tf)
-{
- return (tf->command == ATA_CMD_READ_MULTI) ||
- (tf->command == ATA_CMD_WRITE_MULTI) ||
- (tf->command == ATA_CMD_READ_MULTI_EXT) ||
- (tf->command == ATA_CMD_WRITE_MULTI_EXT) ||
- (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT);
-}
-
-static inline int ata_ok(u8 status)
-{
- return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR))
- == ATA_DRDY);
-}
-
-static inline int lba_28_ok(u64 block, u32 n_block)
-{
- /* check the ending block number */
- return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256);
-}
-
-static inline int lba_48_ok(u64 block, u32 n_block)
-{
- /* check the ending block number */
- return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536);
-}
-
-#endif /* __LINUX_ATA_H__ */
diff --git a/original/linux/atm.h b/original/linux/atm.h
deleted file mode 100644
index 6013668..0000000
--- a/original/linux/atm.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/* atm.h - general ATM declarations */
-
-/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
-
-
-/*
- * WARNING: User-space programs should not #include <linux/atm.h> directly.
- * Instead, #include <atm.h>
- */
-
-#ifndef _LINUX_ATM_H
-#define _LINUX_ATM_H
-
-/*
- * BEGIN_xx and END_xx markers are used for automatic generation of
- * documentation. Do not change them.
- */
-
-#ifdef __KERNEL__
-#include <linux/socket.h>
-#include <linux/types.h>
-#endif
-#include <linux/compiler.h>
-#include <linux/atmapi.h>
-#include <linux/atmsap.h>
-#include <linux/atmioc.h>
-
-
-/* general ATM constants */
-#define ATM_CELL_SIZE 53 /* ATM cell size incl. header */
-#define ATM_CELL_PAYLOAD 48 /* ATM payload size */
-#define ATM_AAL0_SDU 52 /* AAL0 SDU size */
-#define ATM_MAX_AAL34_PDU 65535 /* maximum AAL3/4 PDU payload */
-#define ATM_AAL5_TRAILER 8 /* AAL5 trailer size */
-#define ATM_MAX_AAL5_PDU 65535 /* maximum AAL5 PDU payload */
-#define ATM_MAX_CDV 9999 /* maximum (default) CDV */
-#define ATM_NOT_RSV_VCI 32 /* first non-reserved VCI value */
-
-#define ATM_MAX_VPI 255 /* maximum VPI at the UNI */
-#define ATM_MAX_VPI_NNI 4096 /* maximum VPI at the NNI */
-#define ATM_MAX_VCI 65535 /* maximum VCI */
-
-
-/* "protcol" values for the socket system call */
-#define ATM_NO_AAL 0 /* AAL not specified */
-#define ATM_AAL0 13 /* "raw" ATM cells */
-#define ATM_AAL1 1 /* AAL1 (CBR) */
-#define ATM_AAL2 2 /* AAL2 (VBR) */
-#define ATM_AAL34 3 /* AAL3/4 (data) */
-#define ATM_AAL5 5 /* AAL5 (data) */
-
-/*
- * socket option name coding functions
- *
- * Note that __SO_ENCODE and __SO_LEVEL are somewhat a hack since the
- * << 22 only reserves 9 bits for the level. On some architectures
- * SOL_SOCKET is 0xFFFF, so that's a bit of a problem
- */
-
-#define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | \
- sizeof(t))
-#define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
-#define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
-#define __SO_SIZE(c) ((c) & 0x3fff)
-
-/*
- * ATM layer
- */
-
-#define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
- /* set CLP bit value - TODO */
-#define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
- /* connection identifier range; socket must be
- bound or connected */
-#define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
- /* Quality of Service setting */
-#define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
- /* Service Access Point */
-#define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
- /* "PVC" address (also for SVCs); get only */
-#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
- /* make this vc a p2mp */
-
-
-/*
- * Note @@@: since the socket layers don't really distinguish the control and
- * the data plane but generally seems to be data plane-centric, any layer is
- * about equally wrong for the SAP. If you have a better idea about this,
- * please speak up ...
- */
-
-
-/* ATM cell header (for AAL0) */
-
-/* BEGIN_CH */
-#define ATM_HDR_GFC_MASK 0xf0000000
-#define ATM_HDR_GFC_SHIFT 28
-#define ATM_HDR_VPI_MASK 0x0ff00000
-#define ATM_HDR_VPI_SHIFT 20
-#define ATM_HDR_VCI_MASK 0x000ffff0
-#define ATM_HDR_VCI_SHIFT 4
-#define ATM_HDR_PTI_MASK 0x0000000e
-#define ATM_HDR_PTI_SHIFT 1
-#define ATM_HDR_CLP 0x00000001
-/* END_CH */
-
-
-/* PTI codings */
-
-/* BEGIN_PTI */
-#define ATM_PTI_US0 0 /* user data cell, congestion not exp, SDU-type 0 */
-#define ATM_PTI_US1 1 /* user data cell, congestion not exp, SDU-type 1 */
-#define ATM_PTI_UCES0 2 /* user data cell, cong. experienced, SDU-type 0 */
-#define ATM_PTI_UCES1 3 /* user data cell, cong. experienced, SDU-type 1 */
-#define ATM_PTI_SEGF5 4 /* segment OAM F5 flow related cell */
-#define ATM_PTI_E2EF5 5 /* end-to-end OAM F5 flow related cell */
-#define ATM_PTI_RSV_RM 6 /* reserved for traffic control/resource mgmt */
-#define ATM_PTI_RSV 7 /* reserved */
-/* END_PTI */
-
-
-/*
- * The following items should stay in linux/atm.h, which should be linked to
- * netatm/atm.h
- */
-
-/* Traffic description */
-
-#define ATM_NONE 0 /* no traffic */
-#define ATM_UBR 1
-#define ATM_CBR 2
-#define ATM_VBR 3
-#define ATM_ABR 4
-#define ATM_ANYCLASS 5 /* compatible with everything */
-
-#define ATM_MAX_PCR -1 /* maximum available PCR */
-
-struct atm_trafprm {
- unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */
- int max_pcr; /* maximum PCR in cells per second */
- int pcr; /* desired PCR in cells per second */
- int min_pcr; /* minimum PCR in cells per second */
- int max_cdv; /* maximum CDV in microseconds */
- int max_sdu; /* maximum SDU in bytes */
- /* extra params for ABR */
- unsigned int icr; /* Initial Cell Rate (24-bit) */
- unsigned int tbe; /* Transient Buffer Exposure (24-bit) */
- unsigned int frtt : 24; /* Fixed Round Trip Time (24-bit) */
- unsigned int rif : 4; /* Rate Increment Factor (4-bit) */
- unsigned int rdf : 4; /* Rate Decrease Factor (4-bit) */
- unsigned int nrm_pres :1; /* nrm present bit */
- unsigned int trm_pres :1; /* rm present bit */
- unsigned int adtf_pres :1; /* adtf present bit */
- unsigned int cdf_pres :1; /* cdf present bit*/
- unsigned int nrm :3; /* Max # of Cells for each forward RM cell (3-bit) */
- unsigned int trm :3; /* Time between forward RM cells (3-bit) */
- unsigned int adtf :10; /* ACR Decrease Time Factor (10-bit) */
- unsigned int cdf :3; /* Cutoff Decrease Factor (3-bit) */
- unsigned int spare :9; /* spare bits */
-};
-
-struct atm_qos {
- struct atm_trafprm txtp; /* parameters in TX direction */
- struct atm_trafprm rxtp __ATM_API_ALIGN;
- /* parameters in RX direction */
- unsigned char aal __ATM_API_ALIGN;
-};
-
-/* PVC addressing */
-
-#define ATM_ITF_ANY -1 /* "magic" PVC address values */
-#define ATM_VPI_ANY -1
-#define ATM_VCI_ANY -1
-#define ATM_VPI_UNSPEC -2
-#define ATM_VCI_UNSPEC -2
-
-
-struct sockaddr_atmpvc {
- unsigned short sap_family; /* address family, AF_ATMPVC */
- struct { /* PVC address */
- short itf; /* ATM interface */
- short vpi; /* VPI (only 8 bits at UNI) */
- int vci; /* VCI (only 16 bits at UNI) */
- } sap_addr __ATM_API_ALIGN; /* PVC address */
-};
-
-/* SVC addressing */
-
-#define ATM_ESA_LEN 20 /* ATM End System Address length */
-#define ATM_E164_LEN 12 /* maximum E.164 number length */
-
-#define ATM_AFI_DCC 0x39 /* DCC ATM Format */
-#define ATM_AFI_ICD 0x47 /* ICD ATM Format */
-#define ATM_AFI_E164 0x45 /* E.164 ATM Format */
-#define ATM_AFI_LOCAL 0x49 /* Local ATM Format */
-
-#define ATM_AFI_DCC_GROUP 0xBD /* DCC ATM Group Format */
-#define ATM_AFI_ICD_GROUP 0xC5 /* ICD ATM Group Format */
-#define ATM_AFI_E164_GROUP 0xC3 /* E.164 ATM Group Format */
-#define ATM_AFI_LOCAL_GROUP 0xC7 /* Local ATM Group Format */
-
-#define ATM_LIJ_NONE 0 /* no leaf-initiated join */
-#define ATM_LIJ 1 /* request joining */
-#define ATM_LIJ_RPJ 2 /* set to root-prompted join */
-#define ATM_LIJ_NJ 3 /* set to network join */
-
-
-struct sockaddr_atmsvc {
- unsigned short sas_family; /* address family, AF_ATMSVC */
- struct { /* SVC address */
- unsigned char prv[ATM_ESA_LEN];/* private ATM address */
- char pub[ATM_E164_LEN+1]; /* public address (E.164) */
- /* unused addresses must be bzero'ed */
- char lij_type; /* role in LIJ call; one of ATM_LIJ* */
- uint32_t lij_id; /* LIJ call identifier */
- } sas_addr __ATM_API_ALIGN; /* SVC address */
-};
-
-
-static __inline__ int atmsvc_addr_in_use(struct sockaddr_atmsvc addr)
-{
- return *addr.sas_addr.prv || *addr.sas_addr.pub;
-}
-
-
-static __inline__ int atmpvc_addr_in_use(struct sockaddr_atmpvc addr)
-{
- return addr.sap_addr.itf || addr.sap_addr.vpi || addr.sap_addr.vci;
-}
-
-
-/*
- * Some stuff for linux/sockios.h
- */
-
-struct atmif_sioc {
- int number;
- int length;
- void __user *arg;
-};
-
-typedef unsigned short atm_backend_t;
-#endif
diff --git a/original/linux/atmapi.h b/original/linux/atmapi.h
deleted file mode 100644
index 8fe54d9..0000000
--- a/original/linux/atmapi.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* atmapi.h - ATM API user space/kernel compatibility */
-
-/* Written 1999,2000 by Werner Almesberger, EPFL ICA */
-
-
-#ifndef _LINUX_ATMAPI_H
-#define _LINUX_ATMAPI_H
-
-#if defined(__sparc__) || defined(__ia64__)
-/* such alignment is not required on 32 bit sparcs, but we can't
- figure that we are on a sparc64 while compiling user-space programs. */
-#define __ATM_API_ALIGN __attribute__((aligned(8)))
-#else
-#define __ATM_API_ALIGN
-#endif
-
-
-/*
- * Opaque type for kernel pointers. Note that _ is never accessed. We need
- * the struct in order hide the array, so that we can make simple assignments
- * instead of being forced to use memcpy. It also improves error reporting for
- * code that still assumes that we're passing unsigned longs.
- *
- * Convention: NULL pointers are passed as a field of all zeroes.
- */
-
-typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
-
-#endif
diff --git a/original/linux/atmdev.h b/original/linux/atmdev.h
deleted file mode 100644
index 2096e5c..0000000
--- a/original/linux/atmdev.h
+++ /dev/null
@@ -1,500 +0,0 @@
-/* atmdev.h - ATM device driver declarations and various related items */
-
-/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef LINUX_ATMDEV_H
-#define LINUX_ATMDEV_H
-
-
-#include <linux/atmapi.h>
-#include <linux/atm.h>
-#include <linux/atmioc.h>
-
-
-#define ESI_LEN 6
-
-#define ATM_OC3_PCR (155520000/270*260/8/53)
- /* OC3 link rate: 155520000 bps
- SONET overhead: /270*260 (9 section, 1 path)
- bits per cell: /8/53
- max cell rate: 353207.547 cells/sec */
-#define ATM_25_PCR ((25600000/8-8000)/54)
- /* 25 Mbps ATM cell rate (59111) */
-#define ATM_OC12_PCR (622080000/1080*1040/8/53)
- /* OC12 link rate: 622080000 bps
- SONET overhead: /1080*1040
- bits per cell: /8/53
- max cell rate: 1412830.188 cells/sec */
-#define ATM_DS3_PCR (8000*12)
- /* DS3: 12 cells in a 125 usec time slot */
-
-
-#define __AAL_STAT_ITEMS \
- __HANDLE_ITEM(tx); /* TX okay */ \
- __HANDLE_ITEM(tx_err); /* TX errors */ \
- __HANDLE_ITEM(rx); /* RX okay */ \
- __HANDLE_ITEM(rx_err); /* RX errors */ \
- __HANDLE_ITEM(rx_drop); /* RX out of memory */
-
-struct atm_aal_stats {
-#define __HANDLE_ITEM(i) int i
- __AAL_STAT_ITEMS
-#undef __HANDLE_ITEM
-};
-
-
-struct atm_dev_stats {
- struct atm_aal_stats aal0;
- struct atm_aal_stats aal34;
- struct atm_aal_stats aal5;
-} __ATM_API_ALIGN;
-
-
-#define ATM_GETLINKRATE _IOW('a',ATMIOC_ITF+1,struct atmif_sioc)
- /* get link rate */
-#define ATM_GETNAMES _IOW('a',ATMIOC_ITF+3,struct atm_iobuf)
- /* get interface names (numbers) */
-#define ATM_GETTYPE _IOW('a',ATMIOC_ITF+4,struct atmif_sioc)
- /* get interface type name */
-#define ATM_GETESI _IOW('a',ATMIOC_ITF+5,struct atmif_sioc)
- /* get interface ESI */
-#define ATM_GETADDR _IOW('a',ATMIOC_ITF+6,struct atmif_sioc)
- /* get itf's local ATM addr. list */
-#define ATM_RSTADDR _IOW('a',ATMIOC_ITF+7,struct atmif_sioc)
- /* reset itf's ATM address list */
-#define ATM_ADDADDR _IOW('a',ATMIOC_ITF+8,struct atmif_sioc)
- /* add a local ATM address */
-#define ATM_DELADDR _IOW('a',ATMIOC_ITF+9,struct atmif_sioc)
- /* remove a local ATM address */
-#define ATM_GETCIRANGE _IOW('a',ATMIOC_ITF+10,struct atmif_sioc)
- /* get connection identifier range */
-#define ATM_SETCIRANGE _IOW('a',ATMIOC_ITF+11,struct atmif_sioc)
- /* set connection identifier range */
-#define ATM_SETESI _IOW('a',ATMIOC_ITF+12,struct atmif_sioc)
- /* set interface ESI */
-#define ATM_SETESIF _IOW('a',ATMIOC_ITF+13,struct atmif_sioc)
- /* force interface ESI */
-#define ATM_ADDLECSADDR _IOW('a', ATMIOC_ITF+14, struct atmif_sioc)
- /* register a LECS address */
-#define ATM_DELLECSADDR _IOW('a', ATMIOC_ITF+15, struct atmif_sioc)
- /* unregister a LECS address */
-#define ATM_GETLECSADDR _IOW('a', ATMIOC_ITF+16, struct atmif_sioc)
- /* retrieve LECS address(es) */
-
-#define ATM_GETSTAT _IOW('a',ATMIOC_SARCOM+0,struct atmif_sioc)
- /* get AAL layer statistics */
-#define ATM_GETSTATZ _IOW('a',ATMIOC_SARCOM+1,struct atmif_sioc)
- /* get AAL layer statistics and zero */
-#define ATM_GETLOOP _IOW('a',ATMIOC_SARCOM+2,struct atmif_sioc)
- /* get loopback mode */
-#define ATM_SETLOOP _IOW('a',ATMIOC_SARCOM+3,struct atmif_sioc)
- /* set loopback mode */
-#define ATM_QUERYLOOP _IOW('a',ATMIOC_SARCOM+4,struct atmif_sioc)
- /* query supported loopback modes */
-#define ATM_SETSC _IOW('a',ATMIOC_SPECIAL+1,int)
- /* enable or disable single-copy */
-#define ATM_SETBACKEND _IOW('a',ATMIOC_SPECIAL+2,atm_backend_t)
- /* set backend handler */
-#define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t)
- /* use backend to make new if */
-#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf)
- /* add party to p2mp call */
-#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int)
- /* drop party from p2mp call */
-
-/*
- * These are backend handkers that can be set via the ATM_SETBACKEND call
- * above. In the future we may support dynamic loading of these - for now,
- * they're just being used to share the ATMIOC_BACKEND ioctls
- */
-#define ATM_BACKEND_RAW 0
-#define ATM_BACKEND_PPP 1 /* PPPoATM - RFC2364 */
-#define ATM_BACKEND_BR2684 2 /* Bridged RFC1483/2684 */
-
-/* for ATM_GETTYPE */
-#define ATM_ITFTYP_LEN 8 /* maximum length of interface type name */
-
-/*
- * Loopback modes for ATM_{PHY,SAR}_{GET,SET}LOOP
- */
-
-/* Point of loopback CPU-->SAR-->PHY-->line--> ... */
-#define __ATM_LM_NONE 0 /* no loop back ^ ^ ^ ^ */
-#define __ATM_LM_AAL 1 /* loop back PDUs --' | | | */
-#define __ATM_LM_ATM 2 /* loop back ATM cells ---' | | */
-/* RESERVED 4 loop back on PHY side ---' */
-#define __ATM_LM_PHY 8 /* loop back bits (digital) ----' | */
-#define __ATM_LM_ANALOG 16 /* loop back the analog signal --------' */
-
-/* Direction of loopback */
-#define __ATM_LM_MKLOC(n) ((n)) /* Local (i.e. loop TX to RX) */
-#define __ATM_LM_MKRMT(n) ((n) << 8) /* Remote (i.e. loop RX to TX) */
-
-#define __ATM_LM_XTLOC(n) ((n) & 0xff)
-#define __ATM_LM_XTRMT(n) (((n) >> 8) & 0xff)
-
-#define ATM_LM_NONE 0 /* no loopback */
-
-#define ATM_LM_LOC_AAL __ATM_LM_MKLOC(__ATM_LM_AAL)
-#define ATM_LM_LOC_ATM __ATM_LM_MKLOC(__ATM_LM_ATM)
-#define ATM_LM_LOC_PHY __ATM_LM_MKLOC(__ATM_LM_PHY)
-#define ATM_LM_LOC_ANALOG __ATM_LM_MKLOC(__ATM_LM_ANALOG)
-
-#define ATM_LM_RMT_AAL __ATM_LM_MKRMT(__ATM_LM_AAL)
-#define ATM_LM_RMT_ATM __ATM_LM_MKRMT(__ATM_LM_ATM)
-#define ATM_LM_RMT_PHY __ATM_LM_MKRMT(__ATM_LM_PHY)
-#define ATM_LM_RMT_ANALOG __ATM_LM_MKRMT(__ATM_LM_ANALOG)
-
-/*
- * Note: ATM_LM_LOC_* and ATM_LM_RMT_* can be combined, provided that
- * __ATM_LM_XTLOC(x) <= __ATM_LM_XTRMT(x)
- */
-
-
-struct atm_iobuf {
- int length;
- void __user *buffer;
-};
-
-/* for ATM_GETCIRANGE / ATM_SETCIRANGE */
-
-#define ATM_CI_MAX -1 /* use maximum range of VPI/VCI */
-
-struct atm_cirange {
- signed char vpi_bits; /* 1..8, ATM_CI_MAX (-1) for maximum */
- signed char vci_bits; /* 1..16, ATM_CI_MAX (-1) for maximum */
-};
-
-/* for ATM_SETSC; actually taken from the ATM_VF number space */
-
-#define ATM_SC_RX 1024 /* enable RX single-copy */
-#define ATM_SC_TX 2048 /* enable TX single-copy */
-
-#define ATM_BACKLOG_DEFAULT 32 /* if we get more, we're likely to time out
- anyway */
-
-/* MF: change_qos (Modify) flags */
-
-#define ATM_MF_IMMED 1 /* Block until change is effective */
-#define ATM_MF_INC_RSV 2 /* Change reservation on increase */
-#define ATM_MF_INC_SHP 4 /* Change shaping on increase */
-#define ATM_MF_DEC_RSV 8 /* Change reservation on decrease */
-#define ATM_MF_DEC_SHP 16 /* Change shaping on decrease */
-#define ATM_MF_BWD 32 /* Set the backward direction parameters */
-
-#define ATM_MF_SET (ATM_MF_INC_RSV | ATM_MF_INC_SHP | ATM_MF_DEC_RSV | \
- ATM_MF_DEC_SHP | ATM_MF_BWD)
-
-/*
- * ATM_VS_* are used to express VC state in a human-friendly way.
- */
-
-#define ATM_VS_IDLE 0 /* VC is not used */
-#define ATM_VS_CONNECTED 1 /* VC is connected */
-#define ATM_VS_CLOSING 2 /* VC is closing */
-#define ATM_VS_LISTEN 3 /* VC is listening for incoming setups */
-#define ATM_VS_INUSE 4 /* VC is in use (registered with atmsigd) */
-#define ATM_VS_BOUND 5 /* VC is bound */
-
-#define ATM_VS2TXT_MAP \
- "IDLE", "CONNECTED", "CLOSING", "LISTEN", "INUSE", "BOUND"
-
-#define ATM_VF2TXT_MAP \
- "ADDR", "READY", "PARTIAL", "REGIS", \
- "RELEASED", "HASQOS", "LISTEN", "META", \
- "256", "512", "1024", "2048", \
- "SESSION", "HASSAP", "BOUND", "CLOSE"
-
-
-#ifdef __KERNEL__
-
-#include <linux/device.h>
-#include <linux/wait.h> /* wait_queue_head_t */
-#include <linux/time.h> /* struct timeval */
-#include <linux/net.h>
-#include <linux/skbuff.h> /* struct sk_buff */
-#include <linux/uio.h>
-#include <net/sock.h>
-#include <asm/atomic.h>
-
-#ifdef CONFIG_PROC_FS
-#include <linux/proc_fs.h>
-
-extern struct proc_dir_entry *atm_proc_root;
-#endif
-
-
-struct k_atm_aal_stats {
-#define __HANDLE_ITEM(i) atomic_t i
- __AAL_STAT_ITEMS
-#undef __HANDLE_ITEM
-};
-
-
-struct k_atm_dev_stats {
- struct k_atm_aal_stats aal0;
- struct k_atm_aal_stats aal34;
- struct k_atm_aal_stats aal5;
-};
-
-
-enum {
- ATM_VF_ADDR, /* Address is in use. Set by anybody, cleared
- by device driver. */
- ATM_VF_READY, /* VC is ready to transfer data. Set by device
- driver, cleared by anybody. */
- ATM_VF_PARTIAL, /* resources are bound to PVC (partial PVC
- setup), controlled by socket layer */
- ATM_VF_REGIS, /* registered with demon, controlled by SVC
- socket layer */
- ATM_VF_BOUND, /* local SAP is set, controlled by SVC socket
- layer */
- ATM_VF_RELEASED, /* demon has indicated/requested release,
- controlled by SVC socket layer */
- ATM_VF_HASQOS, /* QOS parameters have been set */
- ATM_VF_LISTEN, /* socket is used for listening */
- ATM_VF_META, /* SVC socket isn't used for normal data
- traffic and doesn't depend on signaling
- to be available */
- ATM_VF_SESSION, /* VCC is p2mp session control descriptor */
- ATM_VF_HASSAP, /* SAP has been set */
- ATM_VF_CLOSE, /* asynchronous close - treat like VF_RELEASED*/
- ATM_VF_WAITING, /* waiting for reply from sigd */
- ATM_VF_IS_CLIP, /* in use by CLIP protocol */
-};
-
-
-#define ATM_VF2VS(flags) \
- (test_bit(ATM_VF_READY,&(flags)) ? ATM_VS_CONNECTED : \
- test_bit(ATM_VF_RELEASED,&(flags)) ? ATM_VS_CLOSING : \
- test_bit(ATM_VF_LISTEN,&(flags)) ? ATM_VS_LISTEN : \
- test_bit(ATM_VF_REGIS,&(flags)) ? ATM_VS_INUSE : \
- test_bit(ATM_VF_BOUND,&(flags)) ? ATM_VS_BOUND : ATM_VS_IDLE)
-
-
-enum {
- ATM_DF_REMOVED, /* device was removed from atm_devs list */
-};
-
-
-#define ATM_PHY_SIG_LOST 0 /* no carrier/light */
-#define ATM_PHY_SIG_UNKNOWN 1 /* carrier/light status is unknown */
-#define ATM_PHY_SIG_FOUND 2 /* carrier/light okay */
-
-#define ATM_ATMOPT_CLP 1 /* set CLP bit */
-
-struct atm_vcc {
- /* struct sock has to be the first member of atm_vcc */
- struct sock sk;
- unsigned long flags; /* VCC flags (ATM_VF_*) */
- short vpi; /* VPI and VCI (types must be equal */
- /* with sockaddr) */
- int vci;
- unsigned long aal_options; /* AAL layer options */
- unsigned long atm_options; /* ATM layer options */
- struct atm_dev *dev; /* device back pointer */
- struct atm_qos qos; /* QOS */
- struct atm_sap sap; /* SAP */
- void (*push)(struct atm_vcc *vcc,struct sk_buff *skb);
- void (*pop)(struct atm_vcc *vcc,struct sk_buff *skb); /* optional */
- int (*push_oam)(struct atm_vcc *vcc,void *cell);
- int (*send)(struct atm_vcc *vcc,struct sk_buff *skb);
- void *dev_data; /* per-device data */
- void *proto_data; /* per-protocol data */
- struct k_atm_aal_stats *stats; /* pointer to AAL stats group */
- /* SVC part --- may move later ------------------------------------- */
- short itf; /* interface number */
- struct sockaddr_atmsvc local;
- struct sockaddr_atmsvc remote;
- /* Multipoint part ------------------------------------------------- */
- struct atm_vcc *session; /* session VCC descriptor */
- /* Other stuff ----------------------------------------------------- */
- void *user_back; /* user backlink - not touched by */
- /* native ATM stack. Currently used */
- /* by CLIP and sch_atm. */
-};
-
-static inline struct atm_vcc *atm_sk(struct sock *sk)
-{
- return (struct atm_vcc *)sk;
-}
-
-static inline struct atm_vcc *ATM_SD(struct socket *sock)
-{
- return atm_sk(sock->sk);
-}
-
-static inline struct sock *sk_atm(struct atm_vcc *vcc)
-{
- return (struct sock *)vcc;
-}
-
-struct atm_dev_addr {
- struct sockaddr_atmsvc addr; /* ATM address */
- struct list_head entry; /* next address */
-};
-
-enum atm_addr_type_t { ATM_ADDR_LOCAL, ATM_ADDR_LECS };
-
-struct atm_dev {
- const struct atmdev_ops *ops; /* device operations; NULL if unused */
- const struct atmphy_ops *phy; /* PHY operations, may be undefined */
- /* (NULL) */
- const char *type; /* device type name */
- int number; /* device index */
- void *dev_data; /* per-device data */
- void *phy_data; /* private PHY date */
- unsigned long flags; /* device flags (ATM_DF_*) */
- struct list_head local; /* local ATM addresses */
- struct list_head lecs; /* LECS ATM addresses learned via ILMI */
- unsigned char esi[ESI_LEN]; /* ESI ("MAC" addr) */
- struct atm_cirange ci_range; /* VPI/VCI range */
- struct k_atm_dev_stats stats; /* statistics */
- char signal; /* signal status (ATM_PHY_SIG_*) */
- int link_rate; /* link rate (default: OC3) */
- atomic_t refcnt; /* reference count */
- spinlock_t lock; /* protect internal members */
-#ifdef CONFIG_PROC_FS
- struct proc_dir_entry *proc_entry; /* proc entry */
- char *proc_name; /* proc entry name */
-#endif
- struct class_device class_dev; /* sysfs class device */
- struct list_head dev_list; /* linkage */
-};
-
-
-/* OF: send_Oam Flags */
-
-#define ATM_OF_IMMED 1 /* Attempt immediate delivery */
-#define ATM_OF_INRATE 2 /* Attempt in-rate delivery */
-
-
-/*
- * ioctl, getsockopt, and setsockopt are optional and can be set to NULL.
- */
-
-struct atmdev_ops { /* only send is required */
- void (*dev_close)(struct atm_dev *dev);
- int (*open)(struct atm_vcc *vcc);
- void (*close)(struct atm_vcc *vcc);
- int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg);
- int (*getsockopt)(struct atm_vcc *vcc,int level,int optname,
- void __user *optval,int optlen);
- int (*setsockopt)(struct atm_vcc *vcc,int level,int optname,
- void __user *optval,int optlen);
- int (*send)(struct atm_vcc *vcc,struct sk_buff *skb);
- int (*send_oam)(struct atm_vcc *vcc,void *cell,int flags);
- void (*phy_put)(struct atm_dev *dev,unsigned char value,
- unsigned long addr);
- unsigned char (*phy_get)(struct atm_dev *dev,unsigned long addr);
- int (*change_qos)(struct atm_vcc *vcc,struct atm_qos *qos,int flags);
- int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page);
- struct module *owner;
-};
-
-struct atmphy_ops {
- int (*start)(struct atm_dev *dev);
- int (*ioctl)(struct atm_dev *dev,unsigned int cmd,void __user *arg);
- void (*interrupt)(struct atm_dev *dev);
- int (*stop)(struct atm_dev *dev);
-};
-
-struct atm_skb_data {
- struct atm_vcc *vcc; /* ATM VCC */
- unsigned long atm_options; /* ATM layer options */
-};
-
-#define VCC_HTABLE_SIZE 32
-
-extern struct hlist_head vcc_hash[VCC_HTABLE_SIZE];
-extern rwlock_t vcc_sklist_lock;
-
-#define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb))
-
-struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops,
- int number,unsigned long *flags); /* number == -1: pick first available */
-struct atm_dev *atm_dev_lookup(int number);
-void atm_dev_deregister(struct atm_dev *dev);
-void vcc_insert_socket(struct sock *sk);
-
-
-/*
- * This is approximately the algorithm used by alloc_skb.
- *
- */
-
-static inline int atm_guess_pdu2truesize(int size)
-{
- return (SKB_DATA_ALIGN(size) + sizeof(struct skb_shared_info));
-}
-
-
-static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
-{
- atomic_add(truesize, &sk_atm(vcc)->sk_rmem_alloc);
-}
-
-
-static inline void atm_return(struct atm_vcc *vcc,int truesize)
-{
- atomic_sub(truesize, &sk_atm(vcc)->sk_rmem_alloc);
-}
-
-
-static inline int atm_may_send(struct atm_vcc *vcc,unsigned int size)
-{
- return (size + atomic_read(&sk_atm(vcc)->sk_wmem_alloc)) <
- sk_atm(vcc)->sk_sndbuf;
-}
-
-
-static inline void atm_dev_hold(struct atm_dev *dev)
-{
- atomic_inc(&dev->refcnt);
-}
-
-
-static inline void atm_dev_put(struct atm_dev *dev)
-{
- if (atomic_dec_and_test(&dev->refcnt)) {
- BUG_ON(!test_bit(ATM_DF_REMOVED, &dev->flags));
- if (dev->ops->dev_close)
- dev->ops->dev_close(dev);
- class_device_put(&dev->class_dev);
- }
-}
-
-
-int atm_charge(struct atm_vcc *vcc,int truesize);
-struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
- gfp_t gfp_flags);
-int atm_pcr_goal(const struct atm_trafprm *tp);
-
-void vcc_release_async(struct atm_vcc *vcc, int reply);
-
-struct atm_ioctl {
- struct module *owner;
- /* A module reference is kept if appropriate over this call.
- * Return -ENOIOCTLCMD if you don't handle it. */
- int (*ioctl)(struct socket *, unsigned int cmd, unsigned long arg);
- struct list_head list;
-};
-
-/**
- * register_atm_ioctl - register handler for ioctl operations
- *
- * Special (non-device) handlers of ioctl's should
- * register here. If you're a normal device, you should
- * set .ioctl in your atmdev_ops instead.
- */
-void register_atm_ioctl(struct atm_ioctl *);
-
-/**
- * deregister_atm_ioctl - remove the ioctl handler
- */
-void deregister_atm_ioctl(struct atm_ioctl *);
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/atmioc.h b/original/linux/atmioc.h
deleted file mode 100644
index 37f67aa..0000000
--- a/original/linux/atmioc.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* atmioc.h - ranges for ATM-related ioctl numbers */
-
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
-
-
-/*
- * See http://icawww1.epfl.ch/linux-atm/magic.html for the complete list of
- * "magic" ioctl numbers.
- */
-
-
-#ifndef _LINUX_ATMIOC_H
-#define _LINUX_ATMIOC_H
-
-#include <asm/ioctl.h>
- /* everybody including atmioc.h will also need _IO{,R,W,WR} */
-
-#define ATMIOC_PHYCOM 0x00 /* PHY device common ioctls, globally unique */
-#define ATMIOC_PHYCOM_END 0x0f
-#define ATMIOC_PHYTYP 0x10 /* PHY dev type ioctls, unique per PHY type */
-#define ATMIOC_PHYTYP_END 0x2f
-#define ATMIOC_PHYPRV 0x30 /* PHY dev private ioctls, unique per driver */
-#define ATMIOC_PHYPRV_END 0x4f
-#define ATMIOC_SARCOM 0x50 /* SAR device common ioctls, globally unique */
-#define ATMIOC_SARCOM_END 0x50
-#define ATMIOC_SARPRV 0x60 /* SAR dev private ioctls, unique per driver */
-#define ATMIOC_SARPRV_END 0x7f
-#define ATMIOC_ITF 0x80 /* Interface ioctls, globally unique */
-#define ATMIOC_ITF_END 0x8f
-#define ATMIOC_BACKEND 0x90 /* ATM generic backend ioctls, u. per backend */
-#define ATMIOC_BACKEND_END 0xaf
-/* 0xb0-0xbf: Reserved for future use */
-#define ATMIOC_AREQUIPA 0xc0 /* Application requested IP over ATM, glob. u. */
-#define ATMIOC_LANE 0xd0 /* LAN Emulation, globally unique */
-#define ATMIOC_MPOA 0xd8 /* MPOA, globally unique */
-#define ATMIOC_CLIP 0xe0 /* Classical IP over ATM control, globally u. */
-#define ATMIOC_CLIP_END 0xef
-#define ATMIOC_SPECIAL 0xf0 /* Special-purpose controls, globally unique */
-#define ATMIOC_SPECIAL_END 0xff
-
-#endif
diff --git a/original/linux/atmppp.h b/original/linux/atmppp.h
deleted file mode 100644
index 300dcce..0000000
--- a/original/linux/atmppp.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* atmppp.h - RFC2364 PPPoATM */
-
-/* Written 2000 by Mitchell Blank Jr */
-
-#ifndef _LINUX_ATMPPP_H
-#define _LINUX_ATMPPP_H
-
-#include <linux/atm.h>
-
-#define PPPOATM_ENCAPS_AUTODETECT (0)
-#define PPPOATM_ENCAPS_VC (1)
-#define PPPOATM_ENCAPS_LLC (2)
-
-/*
- * This is for the ATM_SETBACKEND call - these are like socket families:
- * the first element of the structure is the backend number and the rest
- * is per-backend specific
- */
-struct atm_backend_ppp {
- atm_backend_t backend_num; /* ATM_BACKEND_PPP */
- int encaps; /* PPPOATM_ENCAPS_* */
-};
-
-#endif /* _LINUX_ATMPPP_H */
diff --git a/original/linux/atmsap.h b/original/linux/atmsap.h
deleted file mode 100644
index 799b104..0000000
--- a/original/linux/atmsap.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* atmsap.h - ATM Service Access Point addressing definitions */
-
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef _LINUX_ATMSAP_H
-#define _LINUX_ATMSAP_H
-
-#include <linux/atmapi.h>
-
-/*
- * BEGIN_xx and END_xx markers are used for automatic generation of
- * documentation. Do not change them.
- */
-
-
-/*
- * Layer 2 protocol identifiers
- */
-
-/* BEGIN_L2 */
-#define ATM_L2_NONE 0 /* L2 not specified */
-#define ATM_L2_ISO1745 0x01 /* Basic mode ISO 1745 */
-#define ATM_L2_Q291 0x02 /* ITU-T Q.291 (Rec. I.441) */
-#define ATM_L2_X25_LL 0x06 /* ITU-T X.25, link layer */
-#define ATM_L2_X25_ML 0x07 /* ITU-T X.25, multilink */
-#define ATM_L2_LAPB 0x08 /* Extended LAPB, half-duplex (Rec. T.71) */
-#define ATM_L2_HDLC_ARM 0x09 /* HDLC ARM (ISO/IEC 4335) */
-#define ATM_L2_HDLC_NRM 0x0a /* HDLC NRM (ISO/IEC 4335) */
-#define ATM_L2_HDLC_ABM 0x0b /* HDLC ABM (ISO/IEC 4335) */
-#define ATM_L2_ISO8802 0x0c /* LAN LLC (ISO/IEC 8802/2) */
-#define ATM_L2_X75 0x0d /* ITU-T X.75, SLP */
-#define ATM_L2_Q922 0x0e /* ITU-T Q.922 */
-#define ATM_L2_USER 0x10 /* user-specified */
-#define ATM_L2_ISO7776 0x11 /* ISO 7776 DTE-DTE */
-/* END_L2 */
-
-
-/*
- * Layer 3 protocol identifiers
- */
-
-/* BEGIN_L3 */
-#define ATM_L3_NONE 0 /* L3 not specified */
-#define ATM_L3_X25 0x06 /* ITU-T X.25, packet layer */
-#define ATM_L3_ISO8208 0x07 /* ISO/IEC 8208 */
-#define ATM_L3_X223 0x08 /* ITU-T X.223 | ISO/IEC 8878 */
-#define ATM_L3_ISO8473 0x09 /* ITU-T X.233 | ISO/IEC 8473 */
-#define ATM_L3_T70 0x0a /* ITU-T T.70 minimum network layer */
-#define ATM_L3_TR9577 0x0b /* ISO/IEC TR 9577 */
-#define ATM_L3_H310 0x0c /* ITU-T Recommendation H.310 */
-#define ATM_L3_H321 0x0d /* ITU-T Recommendation H.321 */
-#define ATM_L3_USER 0x10 /* user-specified */
-/* END_L3 */
-
-
-/*
- * High layer identifiers
- */
-
-/* BEGIN_HL */
-#define ATM_HL_NONE 0 /* HL not specified */
-#define ATM_HL_ISO 0x01 /* ISO */
-#define ATM_HL_USER 0x02 /* user-specific */
-#define ATM_HL_HLP 0x03 /* high layer profile - UNI 3.0 only */
-#define ATM_HL_VENDOR 0x04 /* vendor-specific application identifier */
-/* END_HL */
-
-
-/*
- * ITU-T coded mode of operation
- */
-
-/* BEGIN_IMD */
-#define ATM_IMD_NONE 0 /* mode not specified */
-#define ATM_IMD_NORMAL 1 /* normal mode of operation */
-#define ATM_IMD_EXTENDED 2 /* extended mode of operation */
-/* END_IMD */
-
-/*
- * H.310 code points
- */
-
-#define ATM_TT_NONE 0 /* terminal type not specified */
-#define ATM_TT_RX 1 /* receive only */
-#define ATM_TT_TX 2 /* send only */
-#define ATM_TT_RXTX 3 /* receive and send */
-
-#define ATM_MC_NONE 0 /* no multiplexing */
-#define ATM_MC_TS 1 /* transport stream (TS) */
-#define ATM_MC_TS_FEC 2 /* transport stream with forward error corr. */
-#define ATM_MC_PS 3 /* program stream (PS) */
-#define ATM_MC_PS_FEC 4 /* program stream with forward error corr. */
-#define ATM_MC_H221 5 /* ITU-T Rec. H.221 */
-
-/*
- * SAP structures
- */
-
-#define ATM_MAX_HLI 8 /* maximum high-layer information length */
-
-
-struct atm_blli {
- unsigned char l2_proto; /* layer 2 protocol */
- union {
- struct {
- unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */
- /* absent */
- unsigned char window; /* window size (k), 1-127 (0 to omit) */
- } itu; /* ITU-T encoding */
- unsigned char user; /* user-specified l2 information */
- } l2;
- unsigned char l3_proto; /* layer 3 protocol */
- union {
- struct {
- unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */
- /* absent */
- unsigned char def_size; /* default packet size (log2), 4-12 (0 to */
- /* omit) */
- unsigned char window;/* packet window size, 1-127 (0 to omit) */
- } itu; /* ITU-T encoding */
- unsigned char user; /* user specified l3 information */
- struct { /* if l3_proto = ATM_L3_H310 */
- unsigned char term_type; /* terminal type */
- unsigned char fw_mpx_cap; /* forward multiplexing capability */
- /* only if term_type != ATM_TT_NONE */
- unsigned char bw_mpx_cap; /* backward multiplexing capability */
- /* only if term_type != ATM_TT_NONE */
- } h310;
- struct { /* if l3_proto = ATM_L3_TR9577 */
- unsigned char ipi; /* initial protocol id */
- unsigned char snap[5];/* IEEE 802.1 SNAP identifier */
- /* (only if ipi == NLPID_IEEE802_1_SNAP) */
- } tr9577;
- } l3;
-} __ATM_API_ALIGN;
-
-
-struct atm_bhli {
- unsigned char hl_type; /* high layer information type */
- unsigned char hl_length; /* length (only if hl_type == ATM_HL_USER || */
- /* hl_type == ATM_HL_ISO) */
- unsigned char hl_info[ATM_MAX_HLI];/* high layer information */
-};
-
-
-#define ATM_MAX_BLLI 3 /* maximum number of BLLI elements */
-
-
-struct atm_sap {
- struct atm_bhli bhli; /* local SAP, high-layer information */
- struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN;
- /* local SAP, low-layer info */
-};
-
-
-static __inline__ int blli_in_use(struct atm_blli blli)
-{
- return blli.l2_proto || blli.l3_proto;
-}
-
-#endif
diff --git a/original/linux/attribute_container.h b/original/linux/attribute_container.h
deleted file mode 100644
index 93bfb0b..0000000
--- a/original/linux/attribute_container.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * class_container.h - a generic container for all classes
- *
- * Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com>
- *
- * This file is licensed under GPLv2
- */
-
-#ifndef _ATTRIBUTE_CONTAINER_H_
-#define _ATTRIBUTE_CONTAINER_H_
-
-#include <linux/device.h>
-#include <linux/list.h>
-#include <linux/klist.h>
-#include <linux/spinlock.h>
-
-struct attribute_container {
- struct list_head node;
- struct klist containers;
- struct class *class;
- struct class_device_attribute **attrs;
- int (*match)(struct attribute_container *, struct device *);
-#define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01
- unsigned long flags;
-};
-
-static inline int
-attribute_container_no_classdevs(struct attribute_container *atc)
-{
- return atc->flags & ATTRIBUTE_CONTAINER_NO_CLASSDEVS;
-}
-
-static inline void
-attribute_container_set_no_classdevs(struct attribute_container *atc)
-{
- atc->flags |= ATTRIBUTE_CONTAINER_NO_CLASSDEVS;
-}
-
-int attribute_container_register(struct attribute_container *cont);
-int attribute_container_unregister(struct attribute_container *cont);
-void attribute_container_create_device(struct device *dev,
- int (*fn)(struct attribute_container *,
- struct device *,
- struct class_device *));
-void attribute_container_add_device(struct device *dev,
- int (*fn)(struct attribute_container *,
- struct device *,
- struct class_device *));
-void attribute_container_remove_device(struct device *dev,
- void (*fn)(struct attribute_container *,
- struct device *,
- struct class_device *));
-void attribute_container_device_trigger(struct device *dev,
- int (*fn)(struct attribute_container *,
- struct device *,
- struct class_device *));
-void attribute_container_trigger(struct device *dev,
- int (*fn)(struct attribute_container *,
- struct device *));
-int attribute_container_add_attrs(struct class_device *classdev);
-int attribute_container_add_class_device(struct class_device *classdev);
-int attribute_container_add_class_device_adapter(struct attribute_container *cont,
- struct device *dev,
- struct class_device *classdev);
-void attribute_container_remove_attrs(struct class_device *classdev);
-void attribute_container_class_device_del(struct class_device *classdev);
-struct attribute_container *attribute_container_classdev_to_container(struct class_device *);
-struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *);
-struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev);
-
-#endif
diff --git a/original/linux/audit.h b/original/linux/audit.h
deleted file mode 100644
index 22f292a..0000000
--- a/original/linux/audit.h
+++ /dev/null
@@ -1,723 +0,0 @@
-/* audit.h -- Auditing support
- *
- * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
- * All Rights Reserved.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Written by Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-#ifndef _LINUX_AUDIT_H_
-#define _LINUX_AUDIT_H_
-
-#include <linux/types.h>
-#include <linux/elf-em.h>
-#include <linux/ptrace.h>
-
-/* The netlink messages for the audit system is divided into blocks:
- * 1000 - 1099 are for commanding the audit system
- * 1100 - 1199 user space trusted application messages
- * 1200 - 1299 messages internal to the audit daemon
- * 1300 - 1399 audit event messages
- * 1400 - 1499 SE Linux use
- * 1500 - 1599 kernel LSPP events
- * 1600 - 1699 kernel crypto events
- * 1700 - 1799 kernel anomaly records
- * 1800 - 1899 kernel integrity events
- * 1900 - 1999 future kernel use
- * 2000 is for otherwise unclassified kernel audit messages (legacy)
- * 2001 - 2099 unused (kernel)
- * 2100 - 2199 user space anomaly records
- * 2200 - 2299 user space actions taken in response to anomalies
- * 2300 - 2399 user space generated LSPP events
- * 2400 - 2499 user space crypto events
- * 2500 - 2999 future user space (maybe integrity labels and related events)
- *
- * Messages from 1000-1199 are bi-directional. 1200-1299 & 2100 - 2999 are
- * exclusively user space. 1300-2099 is kernel --> user space
- * communication.
- */
-#define AUDIT_GET 1000 /* Get status */
-#define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */
-#define AUDIT_LIST 1002 /* List syscall rules -- deprecated */
-#define AUDIT_ADD 1003 /* Add syscall rule -- deprecated */
-#define AUDIT_DEL 1004 /* Delete syscall rule -- deprecated */
-#define AUDIT_USER 1005 /* Message from userspace -- deprecated */
-#define AUDIT_LOGIN 1006 /* Define the login id and information */
-#define AUDIT_WATCH_INS 1007 /* Insert file/dir watch entry */
-#define AUDIT_WATCH_REM 1008 /* Remove file/dir watch entry */
-#define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */
-#define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */
-#define AUDIT_ADD_RULE 1011 /* Add syscall filtering rule */
-#define AUDIT_DEL_RULE 1012 /* Delete syscall filtering rule */
-#define AUDIT_LIST_RULES 1013 /* List syscall filtering rules */
-#define AUDIT_TRIM 1014 /* Trim junk from watched tree */
-#define AUDIT_MAKE_EQUIV 1015 /* Append to watched tree */
-#define AUDIT_TTY_GET 1016 /* Get TTY auditing status */
-#define AUDIT_TTY_SET 1017 /* Set TTY auditing status */
-
-#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages mostly uninteresting to kernel */
-#define AUDIT_USER_AVC 1107 /* We filter this differently */
-#define AUDIT_USER_TTY 1124 /* Non-ICANON TTY input meaning */
-#define AUDIT_LAST_USER_MSG 1199
-#define AUDIT_FIRST_USER_MSG2 2100 /* More user space messages */
-#define AUDIT_LAST_USER_MSG2 2999
-
-#define AUDIT_DAEMON_START 1200 /* Daemon startup record */
-#define AUDIT_DAEMON_END 1201 /* Daemon normal stop record */
-#define AUDIT_DAEMON_ABORT 1202 /* Daemon error stop record */
-#define AUDIT_DAEMON_CONFIG 1203 /* Daemon config change */
-
-#define AUDIT_SYSCALL 1300 /* Syscall event */
-/* #define AUDIT_FS_WATCH 1301 * Deprecated */
-#define AUDIT_PATH 1302 /* Filename path information */
-#define AUDIT_IPC 1303 /* IPC record */
-#define AUDIT_SOCKETCALL 1304 /* sys_socketcall arguments */
-#define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */
-#define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */
-#define AUDIT_CWD 1307 /* Current working directory */
-#define AUDIT_EXECVE 1309 /* execve arguments */
-#define AUDIT_IPC_SET_PERM 1311 /* IPC new permissions record type */
-#define AUDIT_MQ_OPEN 1312 /* POSIX MQ open record type */
-#define AUDIT_MQ_SENDRECV 1313 /* POSIX MQ send/receive record type */
-#define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */
-#define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */
-#define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */
-#define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */
-#define AUDIT_OBJ_PID 1318 /* ptrace target */
-#define AUDIT_TTY 1319 /* Input on an administrative TTY */
-#define AUDIT_EOE 1320 /* End of multi-record event */
-#define AUDIT_BPRM_FCAPS 1321 /* Information about fcaps increasing perms */
-#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */
-#define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */
-#define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */
-#define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */
-
-#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
-#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
-#define AUDIT_AVC_PATH 1402 /* dentry, vfsmount pair from avc */
-#define AUDIT_MAC_POLICY_LOAD 1403 /* Policy file load */
-#define AUDIT_MAC_STATUS 1404 /* Changed enforcing,permissive,off */
-#define AUDIT_MAC_CONFIG_CHANGE 1405 /* Changes to booleans */
-#define AUDIT_MAC_UNLBL_ALLOW 1406 /* NetLabel: allow unlabeled traffic */
-#define AUDIT_MAC_CIPSOV4_ADD 1407 /* NetLabel: add CIPSOv4 DOI entry */
-#define AUDIT_MAC_CIPSOV4_DEL 1408 /* NetLabel: del CIPSOv4 DOI entry */
-#define AUDIT_MAC_MAP_ADD 1409 /* NetLabel: add LSM domain mapping */
-#define AUDIT_MAC_MAP_DEL 1410 /* NetLabel: del LSM domain mapping */
-#define AUDIT_MAC_IPSEC_ADDSA 1411 /* Not used */
-#define AUDIT_MAC_IPSEC_DELSA 1412 /* Not used */
-#define AUDIT_MAC_IPSEC_ADDSPD 1413 /* Not used */
-#define AUDIT_MAC_IPSEC_DELSPD 1414 /* Not used */
-#define AUDIT_MAC_IPSEC_EVENT 1415 /* Audit an IPSec event */
-#define AUDIT_MAC_UNLBL_STCADD 1416 /* NetLabel: add a static label */
-#define AUDIT_MAC_UNLBL_STCDEL 1417 /* NetLabel: del a static label */
-
-#define AUDIT_FIRST_KERN_ANOM_MSG 1700
-#define AUDIT_LAST_KERN_ANOM_MSG 1799
-#define AUDIT_ANOM_PROMISCUOUS 1700 /* Device changed promiscuous mode */
-#define AUDIT_ANOM_ABEND 1701 /* Process ended abnormally */
-#define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */
-#define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */
-#define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */
-#define AUDIT_INTEGRITY_HASH 1803 /* Integrity HASH type */
-#define AUDIT_INTEGRITY_PCR 1804 /* PCR invalidation msgs */
-#define AUDIT_INTEGRITY_RULE 1805 /* policy rule */
-
-#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
-
-/* Rule flags */
-#define AUDIT_FILTER_USER 0x00 /* Apply rule to user-generated messages */
-#define AUDIT_FILTER_TASK 0x01 /* Apply rule at task creation (not syscall) */
-#define AUDIT_FILTER_ENTRY 0x02 /* Apply rule at syscall entry */
-#define AUDIT_FILTER_WATCH 0x03 /* Apply rule to file system watches */
-#define AUDIT_FILTER_EXIT 0x04 /* Apply rule at syscall exit */
-#define AUDIT_FILTER_TYPE 0x05 /* Apply rule at audit_log_start */
-
-#define AUDIT_NR_FILTERS 6
-
-#define AUDIT_FILTER_PREPEND 0x10 /* Prepend to front of list */
-
-/* Rule actions */
-#define AUDIT_NEVER 0 /* Do not build context if rule matches */
-#define AUDIT_POSSIBLE 1 /* Build context if rule matches */
-#define AUDIT_ALWAYS 2 /* Generate audit record if rule matches */
-
-/* Rule structure sizes -- if these change, different AUDIT_ADD and
- * AUDIT_LIST commands must be implemented. */
-#define AUDIT_MAX_FIELDS 64
-#define AUDIT_MAX_KEY_LEN 256
-#define AUDIT_BITMASK_SIZE 64
-#define AUDIT_WORD(nr) ((__u32)((nr)/32))
-#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))
-
-#define AUDIT_SYSCALL_CLASSES 16
-#define AUDIT_CLASS_DIR_WRITE 0
-#define AUDIT_CLASS_DIR_WRITE_32 1
-#define AUDIT_CLASS_CHATTR 2
-#define AUDIT_CLASS_CHATTR_32 3
-#define AUDIT_CLASS_READ 4
-#define AUDIT_CLASS_READ_32 5
-#define AUDIT_CLASS_WRITE 6
-#define AUDIT_CLASS_WRITE_32 7
-#define AUDIT_CLASS_SIGNAL 8
-#define AUDIT_CLASS_SIGNAL_32 9
-
-/* This bitmask is used to validate user input. It represents all bits that
- * are currently used in an audit field constant understood by the kernel.
- * If you are adding a new #define AUDIT_<whatever>, please ensure that
- * AUDIT_UNUSED_BITS is updated if need be. */
-#define AUDIT_UNUSED_BITS 0x07FFFC00
-
-/* AUDIT_FIELD_COMPARE rule list */
-#define AUDIT_COMPARE_UID_TO_OBJ_UID 1
-#define AUDIT_COMPARE_GID_TO_OBJ_GID 2
-#define AUDIT_COMPARE_EUID_TO_OBJ_UID 3
-#define AUDIT_COMPARE_EGID_TO_OBJ_GID 4
-#define AUDIT_COMPARE_AUID_TO_OBJ_UID 5
-#define AUDIT_COMPARE_SUID_TO_OBJ_UID 6
-#define AUDIT_COMPARE_SGID_TO_OBJ_GID 7
-#define AUDIT_COMPARE_FSUID_TO_OBJ_UID 8
-#define AUDIT_COMPARE_FSGID_TO_OBJ_GID 9
-
-#define AUDIT_COMPARE_UID_TO_AUID 10
-#define AUDIT_COMPARE_UID_TO_EUID 11
-#define AUDIT_COMPARE_UID_TO_FSUID 12
-#define AUDIT_COMPARE_UID_TO_SUID 13
-
-#define AUDIT_COMPARE_AUID_TO_FSUID 14
-#define AUDIT_COMPARE_AUID_TO_SUID 15
-#define AUDIT_COMPARE_AUID_TO_EUID 16
-
-#define AUDIT_COMPARE_EUID_TO_SUID 17
-#define AUDIT_COMPARE_EUID_TO_FSUID 18
-
-#define AUDIT_COMPARE_SUID_TO_FSUID 19
-
-#define AUDIT_COMPARE_GID_TO_EGID 20
-#define AUDIT_COMPARE_GID_TO_FSGID 21
-#define AUDIT_COMPARE_GID_TO_SGID 22
-
-#define AUDIT_COMPARE_EGID_TO_FSGID 23
-#define AUDIT_COMPARE_EGID_TO_SGID 24
-#define AUDIT_COMPARE_SGID_TO_FSGID 25
-
-#define AUDIT_MAX_FIELD_COMPARE AUDIT_COMPARE_SGID_TO_FSGID
-
-/* Rule fields */
- /* These are useful when checking the
- * task structure at task creation time
- * (AUDIT_PER_TASK). */
-#define AUDIT_PID 0
-#define AUDIT_UID 1
-#define AUDIT_EUID 2
-#define AUDIT_SUID 3
-#define AUDIT_FSUID 4
-#define AUDIT_GID 5
-#define AUDIT_EGID 6
-#define AUDIT_SGID 7
-#define AUDIT_FSGID 8
-#define AUDIT_LOGINUID 9
-#define AUDIT_PERS 10
-#define AUDIT_ARCH 11
-#define AUDIT_MSGTYPE 12
-#define AUDIT_SUBJ_USER 13 /* security label user */
-#define AUDIT_SUBJ_ROLE 14 /* security label role */
-#define AUDIT_SUBJ_TYPE 15 /* security label type */
-#define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */
-#define AUDIT_SUBJ_CLR 17 /* security label clearance label */
-#define AUDIT_PPID 18
-#define AUDIT_OBJ_USER 19
-#define AUDIT_OBJ_ROLE 20
-#define AUDIT_OBJ_TYPE 21
-#define AUDIT_OBJ_LEV_LOW 22
-#define AUDIT_OBJ_LEV_HIGH 23
-
- /* These are ONLY useful when checking
- * at syscall exit time (AUDIT_AT_EXIT). */
-#define AUDIT_DEVMAJOR 100
-#define AUDIT_DEVMINOR 101
-#define AUDIT_INODE 102
-#define AUDIT_EXIT 103
-#define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */
-#define AUDIT_WATCH 105
-#define AUDIT_PERM 106
-#define AUDIT_DIR 107
-#define AUDIT_FILETYPE 108
-#define AUDIT_OBJ_UID 109
-#define AUDIT_OBJ_GID 110
-#define AUDIT_FIELD_COMPARE 111
-
-#define AUDIT_ARG0 200
-#define AUDIT_ARG1 (AUDIT_ARG0+1)
-#define AUDIT_ARG2 (AUDIT_ARG0+2)
-#define AUDIT_ARG3 (AUDIT_ARG0+3)
-
-#define AUDIT_FILTERKEY 210
-
-#define AUDIT_NEGATE 0x80000000
-
-/* These are the supported operators.
- * 4 2 1 8
- * = > < ?
- * ----------
- * 0 0 0 0 00 nonsense
- * 0 0 0 1 08 & bit mask
- * 0 0 1 0 10 <
- * 0 1 0 0 20 >
- * 0 1 1 0 30 !=
- * 1 0 0 0 40 =
- * 1 0 0 1 48 &= bit test
- * 1 0 1 0 50 <=
- * 1 1 0 0 60 >=
- * 1 1 1 1 78 all operators
- */
-#define AUDIT_BIT_MASK 0x08000000
-#define AUDIT_LESS_THAN 0x10000000
-#define AUDIT_GREATER_THAN 0x20000000
-#define AUDIT_NOT_EQUAL 0x30000000
-#define AUDIT_EQUAL 0x40000000
-#define AUDIT_BIT_TEST (AUDIT_BIT_MASK|AUDIT_EQUAL)
-#define AUDIT_LESS_THAN_OR_EQUAL (AUDIT_LESS_THAN|AUDIT_EQUAL)
-#define AUDIT_GREATER_THAN_OR_EQUAL (AUDIT_GREATER_THAN|AUDIT_EQUAL)
-#define AUDIT_OPERATORS (AUDIT_EQUAL|AUDIT_NOT_EQUAL|AUDIT_BIT_MASK)
-
-enum {
- Audit_equal,
- Audit_not_equal,
- Audit_bitmask,
- Audit_bittest,
- Audit_lt,
- Audit_gt,
- Audit_le,
- Audit_ge,
- Audit_bad
-};
-
-/* Status symbols */
- /* Mask values */
-#define AUDIT_STATUS_ENABLED 0x0001
-#define AUDIT_STATUS_FAILURE 0x0002
-#define AUDIT_STATUS_PID 0x0004
-#define AUDIT_STATUS_RATE_LIMIT 0x0008
-#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
- /* Failure-to-log actions */
-#define AUDIT_FAIL_SILENT 0
-#define AUDIT_FAIL_PRINTK 1
-#define AUDIT_FAIL_PANIC 2
-
-/* distinguish syscall tables */
-#define __AUDIT_ARCH_64BIT 0x80000000
-#define __AUDIT_ARCH_LE 0x40000000
-#define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_ARMEB (EM_ARM)
-#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_FRV (EM_FRV)
-#define AUDIT_ARCH_H8300 (EM_H8_300)
-#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_M32R (EM_M32R)
-#define AUDIT_ARCH_M68K (EM_68K)
-#define AUDIT_ARCH_MIPS (EM_MIPS)
-#define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT)
-#define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_PARISC (EM_PARISC)
-#define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT)
-#define AUDIT_ARCH_PPC (EM_PPC)
-#define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT)
-#define AUDIT_ARCH_S390 (EM_S390)
-#define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT)
-#define AUDIT_ARCH_SH (EM_SH)
-#define AUDIT_ARCH_SHEL (EM_SH|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT)
-#define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
-#define AUDIT_ARCH_SPARC (EM_SPARC)
-#define AUDIT_ARCH_SPARC64 (EM_SPARCV9|__AUDIT_ARCH_64BIT)
-#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
-
-#define AUDIT_PERM_EXEC 1
-#define AUDIT_PERM_WRITE 2
-#define AUDIT_PERM_READ 4
-#define AUDIT_PERM_ATTR 8
-
-struct audit_status {
- __u32 mask; /* Bit mask for valid entries */
- __u32 enabled; /* 1 = enabled, 0 = disabled */
- __u32 failure; /* Failure-to-log action */
- __u32 pid; /* pid of auditd process */
- __u32 rate_limit; /* messages rate limit (per second) */
- __u32 backlog_limit; /* waiting messages limit */
- __u32 lost; /* messages lost */
- __u32 backlog; /* messages waiting in queue */
-};
-
-struct audit_tty_status {
- __u32 enabled; /* 1 = enabled, 0 = disabled */
-};
-
-/* audit_rule_data supports filter rules with both integer and string
- * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and
- * AUDIT_LIST_RULES requests.
- */
-struct audit_rule_data {
- __u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
- __u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
- __u32 field_count;
- __u32 mask[AUDIT_BITMASK_SIZE]; /* syscall(s) affected */
- __u32 fields[AUDIT_MAX_FIELDS];
- __u32 values[AUDIT_MAX_FIELDS];
- __u32 fieldflags[AUDIT_MAX_FIELDS];
- __u32 buflen; /* total length of string fields */
- char buf[0]; /* string fields buffer */
-};
-
-/* audit_rule is supported to maintain backward compatibility with
- * userspace. It supports integer fields only and corresponds to
- * AUDIT_ADD, AUDIT_DEL and AUDIT_LIST requests.
- */
-struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
- __u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
- __u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
- __u32 field_count;
- __u32 mask[AUDIT_BITMASK_SIZE];
- __u32 fields[AUDIT_MAX_FIELDS];
- __u32 values[AUDIT_MAX_FIELDS];
-};
-
-#ifdef __KERNEL__
-#include <linux/sched.h>
-
-struct audit_sig_info {
- uid_t uid;
- pid_t pid;
- char ctx[0];
-};
-
-struct audit_buffer;
-struct audit_context;
-struct inode;
-struct netlink_skb_parms;
-struct path;
-struct linux_binprm;
-struct mq_attr;
-struct mqstat;
-struct audit_watch;
-struct audit_tree;
-
-struct audit_krule {
- int vers_ops;
- u32 flags;
- u32 listnr;
- u32 action;
- u32 mask[AUDIT_BITMASK_SIZE];
- u32 buflen; /* for data alloc on list rules */
- u32 field_count;
- char *filterkey; /* ties events to rules */
- struct audit_field *fields;
- struct audit_field *arch_f; /* quick access to arch field */
- struct audit_field *inode_f; /* quick access to an inode field */
- struct audit_watch *watch; /* associated watch */
- struct audit_tree *tree; /* associated watched tree */
- struct list_head rlist; /* entry in audit_{watch,tree}.rules list */
- struct list_head list; /* for AUDIT_LIST* purposes only */
- u64 prio;
-};
-
-struct audit_field {
- u32 type;
- u32 val;
- u32 op;
- char *lsm_str;
- void *lsm_rule;
-};
-
-extern int __init audit_register_class(int class, unsigned *list);
-extern int audit_classify_syscall(int abi, unsigned syscall);
-extern int audit_classify_arch(int arch);
-#ifdef CONFIG_AUDITSYSCALL
-/* These are defined in auditsc.c */
- /* Public API */
-extern int audit_alloc(struct task_struct *task);
-extern void __audit_free(struct task_struct *task);
-extern void __audit_syscall_entry(int arch,
- int major, unsigned long a0, unsigned long a1,
- unsigned long a2, unsigned long a3);
-extern void __audit_syscall_exit(int ret_success, long ret_value);
-extern void __audit_getname(const char *name);
-extern void audit_putname(const char *name);
-extern void __audit_inode(const char *name, const struct dentry *dentry);
-extern void __audit_inode_child(const struct dentry *dentry,
- const struct inode *parent);
-extern void __audit_seccomp(unsigned long syscall, long signr, int code);
-extern void __audit_ptrace(struct task_struct *t);
-
-static inline int audit_dummy_context(void)
-{
- void *p = current->audit_context;
- return !p || *(int *)p;
-}
-static inline void audit_free(struct task_struct *task)
-{
- if (unlikely(task->audit_context))
- __audit_free(task);
-}
-static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
- unsigned long a1, unsigned long a2,
- unsigned long a3)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_syscall_entry(arch, major, a0, a1, a2, a3);
-}
-static inline void audit_syscall_exit(void *pt_regs)
-{
- if (unlikely(current->audit_context)) {
- int success = is_syscall_success(pt_regs);
- int return_code = regs_return_value(pt_regs);
-
- __audit_syscall_exit(success, return_code);
- }
-}
-static inline void audit_getname(const char *name)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_getname(name);
-}
-static inline void audit_inode(const char *name, const struct dentry *dentry) {
- if (unlikely(!audit_dummy_context()))
- __audit_inode(name, dentry);
-}
-static inline void audit_inode_child(const struct dentry *dentry,
- const struct inode *parent) {
- if (unlikely(!audit_dummy_context()))
- __audit_inode_child(dentry, parent);
-}
-void audit_core_dumps(long signr);
-
-static inline void audit_seccomp(unsigned long syscall, long signr, int code)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_seccomp(syscall, signr, code);
-}
-
-static inline void audit_ptrace(struct task_struct *t)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_ptrace(t);
-}
-
- /* Private API (for audit.c only) */
-extern unsigned int audit_serial(void);
-extern int auditsc_get_stamp(struct audit_context *ctx,
- struct timespec *t, unsigned int *serial);
-extern int audit_set_loginuid(uid_t loginuid);
-#define audit_get_loginuid(t) ((t)->loginuid)
-#define audit_get_sessionid(t) ((t)->sessionid)
-extern void audit_log_task_context(struct audit_buffer *ab);
-extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
-extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
-extern int __audit_bprm(struct linux_binprm *bprm);
-extern void __audit_socketcall(int nargs, unsigned long *args);
-extern int __audit_sockaddr(int len, void *addr);
-extern void __audit_fd_pair(int fd1, int fd2);
-extern void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr);
-extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout);
-extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification);
-extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
-extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
- const struct cred *new,
- const struct cred *old);
-extern void __audit_log_capset(pid_t pid, const struct cred *new, const struct cred *old);
-extern void __audit_mmap_fd(int fd, int flags);
-
-static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_ipc_obj(ipcp);
-}
-static inline void audit_fd_pair(int fd1, int fd2)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_fd_pair(fd1, fd2);
-}
-static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_ipc_set_perm(qbytes, uid, gid, mode);
-}
-static inline int audit_bprm(struct linux_binprm *bprm)
-{
- if (unlikely(!audit_dummy_context()))
- return __audit_bprm(bprm);
- return 0;
-}
-static inline void audit_socketcall(int nargs, unsigned long *args)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_socketcall(nargs, args);
-}
-static inline int audit_sockaddr(int len, void *addr)
-{
- if (unlikely(!audit_dummy_context()))
- return __audit_sockaddr(len, addr);
- return 0;
-}
-static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_mq_open(oflag, mode, attr);
-}
-static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_mq_sendrecv(mqdes, msg_len, msg_prio, abs_timeout);
-}
-static inline void audit_mq_notify(mqd_t mqdes, const struct sigevent *notification)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_mq_notify(mqdes, notification);
-}
-static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_mq_getsetattr(mqdes, mqstat);
-}
-
-static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
- const struct cred *new,
- const struct cred *old)
-{
- if (unlikely(!audit_dummy_context()))
- return __audit_log_bprm_fcaps(bprm, new, old);
- return 0;
-}
-
-static inline void audit_log_capset(pid_t pid, const struct cred *new,
- const struct cred *old)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_log_capset(pid, new, old);
-}
-
-static inline void audit_mmap_fd(int fd, int flags)
-{
- if (unlikely(!audit_dummy_context()))
- __audit_mmap_fd(fd, flags);
-}
-
-extern int audit_n_rules;
-extern int audit_signals;
-#else /* CONFIG_AUDITSYSCALL */
-#define audit_alloc(t) ({ 0; })
-#define audit_free(t) do { ; } while (0)
-#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
-#define audit_syscall_exit(r) do { ; } while (0)
-#define audit_dummy_context() 1
-#define audit_getname(n) do { ; } while (0)
-#define audit_putname(n) do { ; } while (0)
-#define __audit_inode(n,d) do { ; } while (0)
-#define __audit_inode_child(i,p) do { ; } while (0)
-#define audit_inode(n,d) do { (void)(d); } while (0)
-#define audit_inode_child(i,p) do { ; } while (0)
-#define audit_core_dumps(i) do { ; } while (0)
-#define audit_seccomp(i,s,c) do { ; } while (0)
-#define auditsc_get_stamp(c,t,s) (0)
-#define audit_get_loginuid(t) (-1)
-#define audit_get_sessionid(t) (-1)
-#define audit_log_task_context(b) do { ; } while (0)
-#define audit_ipc_obj(i) ((void)0)
-#define audit_ipc_set_perm(q,u,g,m) ((void)0)
-#define audit_bprm(p) ({ 0; })
-#define audit_socketcall(n,a) ((void)0)
-#define audit_fd_pair(n,a) ((void)0)
-#define audit_sockaddr(len, addr) ({ 0; })
-#define audit_mq_open(o,m,a) ((void)0)
-#define audit_mq_sendrecv(d,l,p,t) ((void)0)
-#define audit_mq_notify(d,n) ((void)0)
-#define audit_mq_getsetattr(d,s) ((void)0)
-#define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
-#define audit_log_capset(pid, ncr, ocr) ((void)0)
-#define audit_mmap_fd(fd, flags) ((void)0)
-#define audit_ptrace(t) ((void)0)
-#define audit_n_rules 0
-#define audit_signals 0
-#endif /* CONFIG_AUDITSYSCALL */
-
-#ifdef CONFIG_AUDIT
-/* These are defined in audit.c */
- /* Public API */
-extern __printf(4, 5)
-void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
- const char *fmt, ...);
-
-extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
-extern __printf(2, 3)
-void audit_log_format(struct audit_buffer *ab, const char *fmt, ...);
-extern void audit_log_end(struct audit_buffer *ab);
-extern int audit_string_contains_control(const char *string,
- size_t len);
-extern void audit_log_n_hex(struct audit_buffer *ab,
- const unsigned char *buf,
- size_t len);
-extern void audit_log_n_string(struct audit_buffer *ab,
- const char *buf,
- size_t n);
-#define audit_log_string(a,b) audit_log_n_string(a, b, strlen(b));
-extern void audit_log_n_untrustedstring(struct audit_buffer *ab,
- const char *string,
- size_t n);
-extern void audit_log_untrustedstring(struct audit_buffer *ab,
- const char *string);
-extern void audit_log_d_path(struct audit_buffer *ab,
- const char *prefix,
- const struct path *path);
-extern void audit_log_key(struct audit_buffer *ab,
- char *key);
-extern void audit_log_lost(const char *message);
-#ifdef CONFIG_SECURITY
-extern void audit_log_secctx(struct audit_buffer *ab, u32 secid);
-#else
-#define audit_log_secctx(b,s) do { ; } while (0)
-#endif
-
-extern int audit_update_lsm_rules(void);
-
- /* Private API (for audit.c only) */
-extern int audit_filter_user(struct netlink_skb_parms *cb);
-extern int audit_filter_type(int type);
-extern int audit_receive_filter(int type, int pid, int uid, int seq,
- void *data, size_t datasz, uid_t loginuid,
- u32 sessionid, u32 sid);
-extern int audit_enabled;
-#else
-#define audit_log(c,g,t,f,...) do { ; } while (0)
-#define audit_log_start(c,g,t) ({ NULL; })
-#define audit_log_vformat(b,f,a) do { ; } while (0)
-#define audit_log_format(b,f,...) do { ; } while (0)
-#define audit_log_end(b) do { ; } while (0)
-#define audit_log_n_hex(a,b,l) do { ; } while (0)
-#define audit_log_n_string(a,c,l) do { ; } while (0)
-#define audit_log_string(a,c) do { ; } while (0)
-#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
-#define audit_log_untrustedstring(a,s) do { ; } while (0)
-#define audit_log_d_path(b, p, d) do { ; } while (0)
-#define audit_log_key(b, k) do { ; } while (0)
-#define audit_log_secctx(b,s) do { ; } while (0)
-#define audit_enabled 0
-#endif
-#endif
-#endif
diff --git a/original/linux/auto_fs.h b/original/linux/auto_fs.h
deleted file mode 100644
index c21e597..0000000
--- a/original/linux/auto_fs.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- linux-c -*- ------------------------------------------------------- *
- *
- * linux/include/linux/auto_fs.h
- *
- * Copyright 1997 Transmeta Corporation - All Rights Reserved
- *
- * This file is part of the Linux kernel and is made available under
- * the terms of the GNU General Public License, version 2, or at your
- * option, any later version, incorporated herein by reference.
- *
- * ----------------------------------------------------------------------- */
-
-
-#ifndef _LINUX_AUTO_FS_H
-#define _LINUX_AUTO_FS_H
-
-#ifdef __KERNEL__
-#include <linux/fs.h>
-#include <linux/limits.h>
-#include <asm/types.h>
-#endif /* __KERNEL__ */
-
-#include <linux/ioctl.h>
-
-/* This file describes autofs v3 */
-#define AUTOFS_PROTO_VERSION 3
-
-/* Range of protocol versions defined */
-#define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
-#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
-
-/*
- * Architectures where both 32- and 64-bit binaries can be executed
- * on 64-bit kernels need this. This keeps the structure format
- * uniform, and makes sure the wait_queue_token isn't too big to be
- * passed back down to the kernel.
- *
- * This assumes that on these architectures:
- * mode 32 bit 64 bit
- * -------------------------
- * int 32 bit 32 bit
- * long 32 bit 64 bit
- *
- * If so, 32-bit user-space code should be backwards compatible.
- */
-
-#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
- || defined(__powerpc__) || defined(__s390__)
-typedef unsigned int autofs_wqt_t;
-#else
-typedef unsigned long autofs_wqt_t;
-#endif
-
-/* Packet types */
-#define autofs_ptype_missing 0 /* Missing entry (mount request) */
-#define autofs_ptype_expire 1 /* Expire entry (umount request) */
-
-struct autofs_packet_hdr {
- int proto_version; /* Protocol version */
- int type; /* Type of packet */
-};
-
-struct autofs_packet_missing {
- struct autofs_packet_hdr hdr;
- autofs_wqt_t wait_queue_token;
- int len;
- char name[NAME_MAX+1];
-};
-
-/* v3 expire (via ioctl) */
-struct autofs_packet_expire {
- struct autofs_packet_hdr hdr;
- int len;
- char name[NAME_MAX+1];
-};
-
-#define AUTOFS_IOC_READY _IO(0x93,0x60)
-#define AUTOFS_IOC_FAIL _IO(0x93,0x61)
-#define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
-#define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
-#define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
-#define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
-
-#endif /* _LINUX_AUTO_FS_H */
diff --git a/original/linux/autoconf.h b/original/linux/autoconf.h
deleted file mode 100644
index 0f45b5a..0000000
--- a/original/linux/autoconf.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef LINUX_AUTOCONF_CRAP_GOES_HERE
-#define LINUX_AUTOCONF_CRAP_GOES_HERE
-
-/* we're not using this to build kernel stuff, so a subset should do */
-
-#define AUTOCONF_INCLUDED
-
-#endif
diff --git a/original/linux/auxvec.h b/original/linux/auxvec.h
deleted file mode 100644
index 835c065..0000000
--- a/original/linux/auxvec.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _UAPI_LINUX_AUXVEC_H
-#define _UAPI_LINUX_AUXVEC_H
-
-#include <asm/auxvec.h>
-
-/* Symbolic values for the entries in the auxiliary table
- put on the initial stack */
-#define AT_NULL 0 /* end of vector */
-#define AT_IGNORE 1 /* entry should be ignored */
-#define AT_EXECFD 2 /* file descriptor of program */
-#define AT_PHDR 3 /* program headers for program */
-#define AT_PHENT 4 /* size of program header entry */
-#define AT_PHNUM 5 /* number of program headers */
-#define AT_PAGESZ 6 /* system page size */
-#define AT_BASE 7 /* base address of interpreter */
-#define AT_FLAGS 8 /* flags */
-#define AT_ENTRY 9 /* entry point of program */
-#define AT_NOTELF 10 /* program is not ELF */
-#define AT_UID 11 /* real uid */
-#define AT_EUID 12 /* effective uid */
-#define AT_GID 13 /* real gid */
-#define AT_EGID 14 /* effective gid */
-#define AT_PLATFORM 15 /* string identifying CPU for optimizations */
-#define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */
-#define AT_CLKTCK 17 /* frequency at which times() increments */
-/* AT_* values 18 through 22 are reserved */
-#define AT_SECURE 23 /* secure mode boolean */
-#define AT_BASE_PLATFORM 24 /* string identifying real platform, may
- * differ from AT_PLATFORM. */
-#define AT_RANDOM 25 /* address of 16 random bytes */
-#define AT_HWCAP2 26 /* extension of AT_HWCAP */
-
-#define AT_EXECFN 31 /* filename of program */
-
-
-#endif /* _UAPI_LINUX_AUXVEC_H */
diff --git a/original/linux/backing-dev.h b/original/linux/backing-dev.h
deleted file mode 100644
index f7a1390..0000000
--- a/original/linux/backing-dev.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * include/linux/backing-dev.h
- *
- * low-level device information and state which is propagated up through
- * to high-level code.
- */
-
-#ifndef _LINUX_BACKING_DEV_H
-#define _LINUX_BACKING_DEV_H
-
-#include <asm/atomic.h>
-
-/*
- * Bits in backing_dev_info.state
- */
-enum bdi_state {
- BDI_pdflush, /* A pdflush thread is working this device */
- BDI_write_congested, /* The write queue is getting full */
- BDI_read_congested, /* The read queue is getting full */
- BDI_unused, /* Available bits start here */
-};
-
-typedef int (congested_fn)(void *, int);
-
-struct backing_dev_info {
- unsigned long ra_pages; /* max readahead in PAGE_CACHE_SIZE units */
- unsigned long state; /* Always use atomic bitops on this */
- unsigned int capabilities; /* Device capabilities */
- congested_fn *congested_fn; /* Function pointer if device is md/dm */
- void *congested_data; /* Pointer to aux data for congested func */
- void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
- void *unplug_io_data;
-};
-
-
-/*
- * Flags in backing_dev_info::capability
- * - The first two flags control whether dirty pages will contribute to the
- * VM's accounting and whether writepages() should be called for dirty pages
- * (something that would not, for example, be appropriate for ramfs)
- * - These flags let !MMU mmap() govern direct device mapping vs immediate
- * copying more easily for MAP_PRIVATE, especially for ROM filesystems
- */
-#define BDI_CAP_NO_ACCT_DIRTY 0x00000001 /* Dirty pages shouldn't contribute to accounting */
-#define BDI_CAP_NO_WRITEBACK 0x00000002 /* Don't write pages back */
-#define BDI_CAP_MAP_COPY 0x00000004 /* Copy can be mapped (MAP_PRIVATE) */
-#define BDI_CAP_MAP_DIRECT 0x00000008 /* Can be mapped directly (MAP_SHARED) */
-#define BDI_CAP_READ_MAP 0x00000010 /* Can be mapped for reading */
-#define BDI_CAP_WRITE_MAP 0x00000020 /* Can be mapped for writing */
-#define BDI_CAP_EXEC_MAP 0x00000040 /* Can be mapped for execution */
-#define BDI_CAP_VMFLAGS \
- (BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
-
-#if defined(VM_MAYREAD) && \
- (BDI_CAP_READ_MAP != VM_MAYREAD || \
- BDI_CAP_WRITE_MAP != VM_MAYWRITE || \
- BDI_CAP_EXEC_MAP != VM_MAYEXEC)
-#error please change backing_dev_info::capabilities flags
-#endif
-
-extern struct backing_dev_info default_backing_dev_info;
-void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);
-
-int writeback_acquire(struct backing_dev_info *bdi);
-int writeback_in_progress(struct backing_dev_info *bdi);
-void writeback_release(struct backing_dev_info *bdi);
-
-static inline int bdi_congested(struct backing_dev_info *bdi, int bdi_bits)
-{
- if (bdi->congested_fn)
- return bdi->congested_fn(bdi->congested_data, bdi_bits);
- return (bdi->state & bdi_bits);
-}
-
-static inline int bdi_read_congested(struct backing_dev_info *bdi)
-{
- return bdi_congested(bdi, 1 << BDI_read_congested);
-}
-
-static inline int bdi_write_congested(struct backing_dev_info *bdi)
-{
- return bdi_congested(bdi, 1 << BDI_write_congested);
-}
-
-static inline int bdi_rw_congested(struct backing_dev_info *bdi)
-{
- return bdi_congested(bdi, (1 << BDI_read_congested)|
- (1 << BDI_write_congested));
-}
-
-#define bdi_cap_writeback_dirty(bdi) \
- (!((bdi)->capabilities & BDI_CAP_NO_WRITEBACK))
-
-#define bdi_cap_account_dirty(bdi) \
- (!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY))
-
-#define mapping_cap_writeback_dirty(mapping) \
- bdi_cap_writeback_dirty((mapping)->backing_dev_info)
-
-#define mapping_cap_account_dirty(mapping) \
- bdi_cap_account_dirty((mapping)->backing_dev_info)
-
-
-#endif /* _LINUX_BACKING_DEV_H */
diff --git a/original/linux/binder.h b/original/linux/binder.h
deleted file mode 100644
index a150769..0000000
--- a/original/linux/binder.h
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Based on, but no longer compatible with, the original
- * OpenBinder.org binder driver interface, which is:
- *
- * Copyright (c) 2005 Palmsource, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_BINDER_H
-#define _LINUX_BINDER_H
-
-#include <linux/ioctl.h>
-
-#define B_PACK_CHARS(c1, c2, c3, c4) \
- ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4))
-#define B_TYPE_LARGE 0x85
-
-enum {
- BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE),
- BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE),
- BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE),
- BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE),
- BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE),
-};
-
-enum {
- FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
- FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
-};
-
-/*
- * This is the flattened representation of a Binder object for transfer
- * between processes. The 'offsets' supplied as part of a binder transaction
- * contains offsets into the data where these structures occur. The Binder
- * driver takes care of re-writing the structure type and data as it moves
- * between processes.
- */
-struct flat_binder_object {
- /* 8 bytes for large_flat_header. */
- unsigned long type;
- unsigned long flags;
-
- /* 8 bytes of data. */
- union {
- void *binder; /* local object */
- signed long handle; /* remote object */
- };
-
- /* extra data associated with local object */
- void *cookie;
-};
-
-/*
- * On 64-bit platforms where user code may run in 32-bits the driver must
- * translate the buffer (and local binder) addresses apropriately.
- */
-
-struct binder_write_read {
- signed long write_size; /* bytes to write */
- signed long write_consumed; /* bytes consumed by driver */
- unsigned long write_buffer;
- signed long read_size; /* bytes to read */
- signed long read_consumed; /* bytes consumed by driver */
- unsigned long read_buffer;
-};
-
-/* Use with BINDER_VERSION, driver fills in fields. */
-struct binder_version {
- /* driver protocol version -- increment with incompatible change */
- signed long protocol_version;
-};
-
-/* This is the current protocol version. */
-#define BINDER_CURRENT_PROTOCOL_VERSION 7
-
-#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
-#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, int64_t)
-#define BINDER_SET_MAX_THREADS _IOW('b', 5, size_t)
-#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, int)
-#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, int)
-#define BINDER_THREAD_EXIT _IOW('b', 8, int)
-#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
-
-/*
- * NOTE: Two special error codes you should check for when calling
- * in to the driver are:
- *
- * EINTR -- The operation has been interupted. This should be
- * handled by retrying the ioctl() until a different error code
- * is returned.
- *
- * ECONNREFUSED -- The driver is no longer accepting operations
- * from your process. That is, the process is being destroyed.
- * You should handle this by exiting from your process. Note
- * that once this error code is returned, all further calls to
- * the driver from any thread will return this same code.
- */
-
-enum transaction_flags {
- TF_ONE_WAY = 0x01, /* this is a one-way call: async, no return */
- TF_ROOT_OBJECT = 0x04, /* contents are the component's root object */
- TF_STATUS_CODE = 0x08, /* contents are a 32-bit status code */
- TF_ACCEPT_FDS = 0x10, /* allow replies with file descriptors */
-};
-
-struct binder_transaction_data {
- /* The first two are only used for bcTRANSACTION and brTRANSACTION,
- * identifying the target and contents of the transaction.
- */
- union {
- size_t handle; /* target descriptor of command transaction */
- void *ptr; /* target descriptor of return transaction */
- } target;
- void *cookie; /* target object cookie */
- unsigned int code; /* transaction command */
-
- /* General information about the transaction. */
- unsigned int flags;
- pid_t sender_pid;
- uid_t sender_euid;
- size_t data_size; /* number of bytes of data */
- size_t offsets_size; /* number of bytes of offsets */
-
- /* If this transaction is inline, the data immediately
- * follows here; otherwise, it ends with a pointer to
- * the data buffer.
- */
- union {
- struct {
- /* transaction data */
- const void *buffer;
- /* offsets from buffer to flat_binder_object structs */
- const void *offsets;
- } ptr;
- uint8_t buf[8];
- } data;
-};
-
-struct binder_ptr_cookie {
- void *ptr;
- void *cookie;
-};
-
-struct binder_pri_desc {
- int priority;
- int desc;
-};
-
-struct binder_pri_ptr_cookie {
- int priority;
- void *ptr;
- void *cookie;
-};
-
-/* The _IO?_BAD() macros required so that these evaluate to a
- * constant expression, otherwise this fails to compile in C++
- */
-enum BinderDriverReturnProtocol {
- BR_ERROR = _IOR_BAD('r', 0, int),
- /*
- * int: error code
- */
-
- BR_OK = _IO('r', 1),
- /* No parameters! */
-
- BR_TRANSACTION = _IOR_BAD('r', 2, struct binder_transaction_data),
- BR_REPLY = _IOR_BAD('r', 3, struct binder_transaction_data),
- /*
- * binder_transaction_data: the received command.
- */
-
- BR_ACQUIRE_RESULT = _IOR_BAD('r', 4, int),
- /*
- * not currently supported
- * int: 0 if the last bcATTEMPT_ACQUIRE was not successful.
- * Else the remote object has acquired a primary reference.
- */
-
- BR_DEAD_REPLY = _IO('r', 5),
- /*
- * The target of the last transaction (either a bcTRANSACTION or
- * a bcATTEMPT_ACQUIRE) is no longer with us. No parameters.
- */
-
- BR_TRANSACTION_COMPLETE = _IO('r', 6),
- /*
- * No parameters... always refers to the last transaction requested
- * (including replies). Note that this will be sent even for
- * asynchronous transactions.
- */
-
- BR_INCREFS = _IOR_BAD('r', 7, struct binder_ptr_cookie),
- BR_ACQUIRE = _IOR_BAD('r', 8, struct binder_ptr_cookie),
- BR_RELEASE = _IOR_BAD('r', 9, struct binder_ptr_cookie),
- BR_DECREFS = _IOR_BAD('r', 10, struct binder_ptr_cookie),
- /*
- * void *: ptr to binder
- * void *: cookie for binder
- */
-
- BR_ATTEMPT_ACQUIRE = _IOR_BAD('r', 11, struct binder_pri_ptr_cookie),
- /*
- * not currently supported
- * int: priority
- * void *: ptr to binder
- * void *: cookie for binder
- */
-
- BR_NOOP = _IO('r', 12),
- /*
- * No parameters. Do nothing and examine the next command. It exists
- * primarily so that we can replace it with a BR_SPAWN_LOOPER command.
- */
-
- BR_SPAWN_LOOPER = _IO('r', 13),
- /*
- * No parameters. The driver has determined that a process has no
- * threads waiting to service incomming transactions. When a process
- * receives this command, it must spawn a new service thread and
- * register it via bcENTER_LOOPER.
- */
-
- BR_FINISHED = _IO('r', 14),
- /*
- * not currently supported
- * stop threadpool thread
- */
-
- BR_DEAD_BINDER = _IOR_BAD('r', 15, void *),
- /*
- * void *: cookie
- */
- BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR_BAD('r', 16, void *),
- /*
- * void *: cookie
- */
-
- BR_FAILED_REPLY = _IO('r', 17),
- /*
- * The the last transaction (either a bcTRANSACTION or
- * a bcATTEMPT_ACQUIRE) failed (e.g. out of memory). No parameters.
- */
-};
-
-enum BinderDriverCommandProtocol {
- BC_TRANSACTION = _IOW_BAD('c', 0, struct binder_transaction_data),
- BC_REPLY = _IOW_BAD('c', 1, struct binder_transaction_data),
- /*
- * binder_transaction_data: the sent command.
- */
-
- BC_ACQUIRE_RESULT = _IOW_BAD('c', 2, int),
- /*
- * not currently supported
- * int: 0 if the last BR_ATTEMPT_ACQUIRE was not successful.
- * Else you have acquired a primary reference on the object.
- */
-
- BC_FREE_BUFFER = _IOW_BAD('c', 3, int),
- /*
- * void *: ptr to transaction data received on a read
- */
-
- BC_INCREFS = _IOW_BAD('c', 4, int),
- BC_ACQUIRE = _IOW_BAD('c', 5, int),
- BC_RELEASE = _IOW_BAD('c', 6, int),
- BC_DECREFS = _IOW_BAD('c', 7, int),
- /*
- * int: descriptor
- */
-
- BC_INCREFS_DONE = _IOW_BAD('c', 8, struct binder_ptr_cookie),
- BC_ACQUIRE_DONE = _IOW_BAD('c', 9, struct binder_ptr_cookie),
- /*
- * void *: ptr to binder
- * void *: cookie for binder
- */
-
- BC_ATTEMPT_ACQUIRE = _IOW_BAD('c', 10, struct binder_pri_desc),
- /*
- * not currently supported
- * int: priority
- * int: descriptor
- */
-
- BC_REGISTER_LOOPER = _IO('c', 11),
- /*
- * No parameters.
- * Register a spawned looper thread with the device.
- */
-
- BC_ENTER_LOOPER = _IO('c', 12),
- BC_EXIT_LOOPER = _IO('c', 13),
- /*
- * No parameters.
- * These two commands are sent as an application-level thread
- * enters and exits the binder loop, respectively. They are
- * used so the binder can have an accurate count of the number
- * of looping threads it has available.
- */
-
- BC_REQUEST_DEATH_NOTIFICATION = _IOW_BAD('c', 14, struct binder_ptr_cookie),
- /*
- * void *: ptr to binder
- * void *: cookie
- */
-
- BC_CLEAR_DEATH_NOTIFICATION = _IOW_BAD('c', 15, struct binder_ptr_cookie),
- /*
- * void *: ptr to binder
- * void *: cookie
- */
-
- BC_DEAD_BINDER_DONE = _IOW_BAD('c', 16, void *),
- /*
- * void *: cookie
- */
-};
-
-#endif /* _LINUX_BINDER_H */
-
diff --git a/original/linux/binfmts.h b/original/linux/binfmts.h
deleted file mode 100644
index c1e82c5..0000000
--- a/original/linux/binfmts.h
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef _LINUX_BINFMTS_H
-#define _LINUX_BINFMTS_H
-
-#include <linux/capability.h>
-
-struct pt_regs;
-
-/*
- * MAX_ARG_PAGES defines the number of pages allocated for arguments
- * and envelope for the new program. 32 should suffice, this gives
- * a maximum env+arg of 128kB w/4KB pages!
- */
-#define MAX_ARG_PAGES 32
-
-/* sizeof(linux_binprm->buf) */
-#define BINPRM_BUF_SIZE 128
-
-#ifdef __KERNEL__
-
-/*
- * This structure is used to hold the arguments that are used when loading binaries.
- */
-struct linux_binprm{
- char buf[BINPRM_BUF_SIZE];
- struct page *page[MAX_ARG_PAGES];
- struct mm_struct *mm;
- unsigned long p; /* current top of mem */
- int sh_bang;
- struct file * file;
- int e_uid, e_gid;
- kernel_cap_t cap_inheritable, cap_permitted, cap_effective;
- void *security;
- int argc, envc;
- char * filename; /* Name of binary as seen by procps */
- char * interp; /* Name of the binary really executed. Most
- of the time same as filename, but could be
- different for binfmt_{misc,script} */
- unsigned interp_flags;
- unsigned interp_data;
- unsigned long loader, exec;
-};
-
-#define BINPRM_FLAGS_ENFORCE_NONDUMP_BIT 0
-#define BINPRM_FLAGS_ENFORCE_NONDUMP (1 << BINPRM_FLAGS_ENFORCE_NONDUMP_BIT)
-
-/* fd of the binary should be passed to the interpreter */
-#define BINPRM_FLAGS_EXECFD_BIT 1
-#define BINPRM_FLAGS_EXECFD (1 << BINPRM_FLAGS_EXECFD_BIT)
-
-
-/*
- * This structure defines the functions that are used to load the binary formats that
- * linux accepts.
- */
-struct linux_binfmt {
- struct linux_binfmt * next;
- struct module *module;
- int (*load_binary)(struct linux_binprm *, struct pt_regs * regs);
- int (*load_shlib)(struct file *);
- int (*core_dump)(long signr, struct pt_regs * regs, struct file * file);
- unsigned long min_coredump; /* minimal dump size */
-};
-
-extern int register_binfmt(struct linux_binfmt *);
-extern int unregister_binfmt(struct linux_binfmt *);
-
-extern int prepare_binprm(struct linux_binprm *);
-extern void remove_arg_zero(struct linux_binprm *);
-extern int search_binary_handler(struct linux_binprm *,struct pt_regs *);
-extern int flush_old_exec(struct linux_binprm * bprm);
-
-extern int suid_dumpable;
-#define SUID_DUMP_DISABLE 0 /* No setuid dumping */
-#define SUID_DUMP_USER 1 /* Dump as user of process */
-#define SUID_DUMP_ROOT 2 /* Dump as root */
-
-/* Stack area protections */
-#define EXSTACK_DEFAULT 0 /* Whatever the arch defaults to */
-#define EXSTACK_DISABLE_X 1 /* Disable executable stacks */
-#define EXSTACK_ENABLE_X 2 /* Enable executable stacks */
-
-extern int setup_arg_pages(struct linux_binprm * bprm,
- unsigned long stack_top,
- int executable_stack);
-extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
-extern void compute_creds(struct linux_binprm *binprm);
-extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
-extern int set_binfmt(struct linux_binfmt *new);
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_BINFMTS_H */
diff --git a/original/linux/bio.h b/original/linux/bio.h
deleted file mode 100644
index 76bdaea..0000000
--- a/original/linux/bio.h
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * 2.5 block I/O model
- *
- * Copyright (C) 2001 Jens Axboe <axboe@suse.de>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public Licens
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-
- */
-#ifndef __LINUX_BIO_H
-#define __LINUX_BIO_H
-
-#include <linux/highmem.h>
-#include <linux/mempool.h>
-#include <linux/ioprio.h>
-
-/* Platforms may set this to teach the BIO layer about IOMMU hardware. */
-#include <asm/io.h>
-
-#if defined(BIO_VMERGE_MAX_SIZE) && defined(BIO_VMERGE_BOUNDARY)
-#define BIOVEC_VIRT_START_SIZE(x) (bvec_to_phys(x) & (BIO_VMERGE_BOUNDARY - 1))
-#define BIOVEC_VIRT_OVERSIZE(x) ((x) > BIO_VMERGE_MAX_SIZE)
-#else
-#define BIOVEC_VIRT_START_SIZE(x) 0
-#define BIOVEC_VIRT_OVERSIZE(x) 0
-#endif
-
-#ifndef BIO_VMERGE_BOUNDARY
-#define BIO_VMERGE_BOUNDARY 0
-#endif
-
-#define BIO_DEBUG
-
-#ifdef BIO_DEBUG
-#define BIO_BUG_ON BUG_ON
-#else
-#define BIO_BUG_ON
-#endif
-
-#define BIO_MAX_PAGES 256
-#define BIO_MAX_SIZE (BIO_MAX_PAGES << PAGE_CACHE_SHIFT)
-#define BIO_MAX_SECTORS (BIO_MAX_SIZE >> 9)
-
-/*
- * was unsigned short, but we might as well be ready for > 64kB I/O pages
- */
-struct bio_vec {
- struct page *bv_page;
- unsigned int bv_len;
- unsigned int bv_offset;
-};
-
-struct bio_set;
-struct bio;
-typedef int (bio_end_io_t) (struct bio *, unsigned int, int);
-typedef void (bio_destructor_t) (struct bio *);
-
-/*
- * main unit of I/O for the block layer and lower layers (ie drivers and
- * stacking drivers)
- */
-struct bio {
- sector_t bi_sector;
- struct bio *bi_next; /* request queue link */
- struct block_device *bi_bdev;
- unsigned long bi_flags; /* status, command, etc */
- unsigned long bi_rw; /* bottom bits READ/WRITE,
- * top bits priority
- */
-
- unsigned short bi_vcnt; /* how many bio_vec's */
- unsigned short bi_idx; /* current index into bvl_vec */
-
- /* Number of segments in this BIO after
- * physical address coalescing is performed.
- */
- unsigned short bi_phys_segments;
-
- /* Number of segments after physical and DMA remapping
- * hardware coalescing is performed.
- */
- unsigned short bi_hw_segments;
-
- unsigned int bi_size; /* residual I/O count */
-
- /*
- * To keep track of the max hw size, we account for the
- * sizes of the first and last virtually mergeable segments
- * in this bio
- */
- unsigned int bi_hw_front_size;
- unsigned int bi_hw_back_size;
-
- unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
-
- struct bio_vec *bi_io_vec; /* the actual vec list */
-
- bio_end_io_t *bi_end_io;
- atomic_t bi_cnt; /* pin count */
-
- void *bi_private;
-
- bio_destructor_t *bi_destructor; /* destructor */
-};
-
-/*
- * bio flags
- */
-#define BIO_UPTODATE 0 /* ok after I/O completion */
-#define BIO_RW_BLOCK 1 /* RW_AHEAD set, and read/write would block */
-#define BIO_EOF 2 /* out-out-bounds error */
-#define BIO_SEG_VALID 3 /* nr_hw_seg valid */
-#define BIO_CLONED 4 /* doesn't own data */
-#define BIO_BOUNCED 5 /* bio is a bounce bio */
-#define BIO_USER_MAPPED 6 /* contains user pages */
-#define BIO_EOPNOTSUPP 7 /* not supported */
-#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
-
-/*
- * top 4 bits of bio flags indicate the pool this bio came from
- */
-#define BIO_POOL_BITS (4)
-#define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS)
-#define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET)
-#define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET)
-
-/*
- * bio bi_rw flags
- *
- * bit 0 -- read (not set) or write (set)
- * bit 1 -- rw-ahead when set
- * bit 2 -- barrier
- * bit 3 -- fail fast, don't want low level driver retries
- * bit 4 -- synchronous I/O hint: the block layer will unplug immediately
- */
-#define BIO_RW 0
-#define BIO_RW_AHEAD 1
-#define BIO_RW_BARRIER 2
-#define BIO_RW_FAILFAST 3
-#define BIO_RW_SYNC 4
-
-/*
- * upper 16 bits of bi_rw define the io priority of this bio
- */
-#define BIO_PRIO_SHIFT (8 * sizeof(unsigned long) - IOPRIO_BITS)
-#define bio_prio(bio) ((bio)->bi_rw >> BIO_PRIO_SHIFT)
-#define bio_prio_valid(bio) ioprio_valid(bio_prio(bio))
-
-#define bio_set_prio(bio, prio) do { \
- WARN_ON(prio >= (1 << IOPRIO_BITS)); \
- (bio)->bi_rw &= ((1UL << BIO_PRIO_SHIFT) - 1); \
- (bio)->bi_rw |= ((unsigned long) (prio) << BIO_PRIO_SHIFT); \
-} while (0)
-
-/*
- * various member access, note that bio_data should of course not be used
- * on highmem page vectors
- */
-#define bio_iovec_idx(bio, idx) (&((bio)->bi_io_vec[(idx)]))
-#define bio_iovec(bio) bio_iovec_idx((bio), (bio)->bi_idx)
-#define bio_page(bio) bio_iovec((bio))->bv_page
-#define bio_offset(bio) bio_iovec((bio))->bv_offset
-#define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx)
-#define bio_sectors(bio) ((bio)->bi_size >> 9)
-#define bio_cur_sectors(bio) (bio_iovec(bio)->bv_len >> 9)
-#define bio_data(bio) (page_address(bio_page((bio))) + bio_offset((bio)))
-#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
-#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
-#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
-#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
-
-/*
- * will die
- */
-#define bio_to_phys(bio) (page_to_phys(bio_page((bio))) + (unsigned long) bio_offset((bio)))
-#define bvec_to_phys(bv) (page_to_phys((bv)->bv_page) + (unsigned long) (bv)->bv_offset)
-
-/*
- * queues that have highmem support enabled may still need to revert to
- * PIO transfers occasionally and thus map high pages temporarily. For
- * permanent PIO fall back, user is probably better off disabling highmem
- * I/O completely on that queue (see ide-dma for example)
- */
-#define __bio_kmap_atomic(bio, idx, kmtype) \
- (kmap_atomic(bio_iovec_idx((bio), (idx))->bv_page, kmtype) + \
- bio_iovec_idx((bio), (idx))->bv_offset)
-
-#define __bio_kunmap_atomic(addr, kmtype) kunmap_atomic(addr, kmtype)
-
-/*
- * merge helpers etc
- */
-
-#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
-#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
-
-/*
- * allow arch override, for eg virtualized architectures (put in asm/io.h)
- */
-#ifndef BIOVEC_PHYS_MERGEABLE
-#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
- ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
-#endif
-
-#define BIOVEC_VIRT_MERGEABLE(vec1, vec2) \
- ((((bvec_to_phys((vec1)) + (vec1)->bv_len) | bvec_to_phys((vec2))) & (BIO_VMERGE_BOUNDARY - 1)) == 0)
-#define __BIO_SEG_BOUNDARY(addr1, addr2, mask) \
- (((addr1) | (mask)) == (((addr2) - 1) | (mask)))
-#define BIOVEC_SEG_BOUNDARY(q, b1, b2) \
- __BIO_SEG_BOUNDARY(bvec_to_phys((b1)), bvec_to_phys((b2)) + (b2)->bv_len, (q)->seg_boundary_mask)
-#define BIO_SEG_BOUNDARY(q, b1, b2) \
- BIOVEC_SEG_BOUNDARY((q), __BVEC_END((b1)), __BVEC_START((b2)))
-
-#define bio_io_error(bio, bytes) bio_endio((bio), (bytes), -EIO)
-
-/*
- * drivers should not use the __ version unless they _really_ want to
- * run through the entire bio and not just pending pieces
- */
-#define __bio_for_each_segment(bvl, bio, i, start_idx) \
- for (bvl = bio_iovec_idx((bio), (start_idx)), i = (start_idx); \
- i < (bio)->bi_vcnt; \
- bvl++, i++)
-
-#define bio_for_each_segment(bvl, bio, i) \
- __bio_for_each_segment(bvl, bio, i, (bio)->bi_idx)
-
-/*
- * get a reference to a bio, so it won't disappear. the intended use is
- * something like:
- *
- * bio_get(bio);
- * submit_bio(rw, bio);
- * if (bio->bi_flags ...)
- * do_something
- * bio_put(bio);
- *
- * without the bio_get(), it could potentially complete I/O before submit_bio
- * returns. and then bio would be freed memory when if (bio->bi_flags ...)
- * runs
- */
-#define bio_get(bio) atomic_inc(&(bio)->bi_cnt)
-
-
-/*
- * A bio_pair is used when we need to split a bio.
- * This can only happen for a bio that refers to just one
- * page of data, and in the unusual situation when the
- * page crosses a chunk/device boundary
- *
- * The address of the master bio is stored in bio1.bi_private
- * The address of the pool the pair was allocated from is stored
- * in bio2.bi_private
- */
-struct bio_pair {
- struct bio bio1, bio2;
- struct bio_vec bv1, bv2;
- atomic_t cnt;
- int error;
-};
-extern struct bio_pair *bio_split(struct bio *bi, mempool_t *pool,
- int first_sectors);
-extern mempool_t *bio_split_pool;
-extern void bio_pair_release(struct bio_pair *dbio);
-
-extern struct bio_set *bioset_create(int, int, int);
-extern void bioset_free(struct bio_set *);
-
-extern struct bio *bio_alloc(gfp_t, int);
-extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
-extern void bio_put(struct bio *);
-extern void bio_free(struct bio *, struct bio_set *);
-
-extern void bio_endio(struct bio *, unsigned int, int);
-struct request_queue;
-extern int bio_phys_segments(struct request_queue *, struct bio *);
-extern int bio_hw_segments(struct request_queue *, struct bio *);
-
-extern void __bio_clone(struct bio *, struct bio *);
-extern struct bio *bio_clone(struct bio *, gfp_t);
-
-extern void bio_init(struct bio *);
-
-extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
-extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
- unsigned int, unsigned int);
-extern int bio_get_nr_vecs(struct block_device *);
-extern struct bio *bio_map_user(struct request_queue *, struct block_device *,
- unsigned long, unsigned int, int);
-struct sg_iovec;
-extern struct bio *bio_map_user_iov(struct request_queue *,
- struct block_device *,
- struct sg_iovec *, int, int);
-extern void bio_unmap_user(struct bio *);
-extern struct bio *bio_map_kern(struct request_queue *, void *, unsigned int,
- gfp_t);
-extern void bio_set_pages_dirty(struct bio *bio);
-extern void bio_check_pages_dirty(struct bio *bio);
-extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int);
-extern int bio_uncopy_user(struct bio *);
-void zero_fill_bio(struct bio *bio);
-
-#ifdef CONFIG_HIGHMEM
-/*
- * remember to add offset! and never ever reenable interrupts between a
- * bvec_kmap_irq and bvec_kunmap_irq!!
- *
- * This function MUST be inlined - it plays with the CPU interrupt flags.
- */
-static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
-{
- unsigned long addr;
-
- /*
- * might not be a highmem page, but the preempt/irq count
- * balancing is a lot nicer this way
- */
- local_irq_save(*flags);
- addr = (unsigned long) kmap_atomic(bvec->bv_page, KM_BIO_SRC_IRQ);
-
- BUG_ON(addr & ~PAGE_MASK);
-
- return (char *) addr + bvec->bv_offset;
-}
-
-static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
-{
- unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
-
- kunmap_atomic((void *) ptr, KM_BIO_SRC_IRQ);
- local_irq_restore(*flags);
-}
-
-#else
-#define bvec_kmap_irq(bvec, flags) (page_address((bvec)->bv_page) + (bvec)->bv_offset)
-#define bvec_kunmap_irq(buf, flags) do { *(flags) = 0; } while (0)
-#endif
-
-static inline char *__bio_kmap_irq(struct bio *bio, unsigned short idx,
- unsigned long *flags)
-{
- return bvec_kmap_irq(bio_iovec_idx(bio, idx), flags);
-}
-#define __bio_kunmap_irq(buf, flags) bvec_kunmap_irq(buf, flags)
-
-#define bio_kmap_irq(bio, flags) \
- __bio_kmap_irq((bio), (bio)->bi_idx, (flags))
-#define bio_kunmap_irq(buf,flags) __bio_kunmap_irq(buf, flags)
-
-#endif /* __LINUX_BIO_H */
diff --git a/original/linux/bitmap.h b/original/linux/bitmap.h
deleted file mode 100644
index dcc5de7..0000000
--- a/original/linux/bitmap.h
+++ /dev/null
@@ -1,275 +0,0 @@
-#ifndef __LINUX_BITMAP_H
-#define __LINUX_BITMAP_H
-
-#ifndef __ASSEMBLY__
-
-#include <linux/types.h>
-#include <linux/bitops.h>
-#include <linux/string.h>
-
-/*
- * bitmaps provide bit arrays that consume one or more unsigned
- * longs. The bitmap interface and available operations are listed
- * here, in bitmap.h
- *
- * Function implementations generic to all architectures are in
- * lib/bitmap.c. Functions implementations that are architecture
- * specific are in various include/asm-<arch>/bitops.h headers
- * and other arch/<arch> specific files.
- *
- * See lib/bitmap.c for more details.
- */
-
-/*
- * The available bitmap operations and their rough meaning in the
- * case that the bitmap is a single unsigned long are thus:
- *
- * Note that nbits should be always a compile time evaluable constant.
- * Otherwise many inlines will generate horrible code.
- *
- * bitmap_zero(dst, nbits) *dst = 0UL
- * bitmap_fill(dst, nbits) *dst = ~0UL
- * bitmap_copy(dst, src, nbits) *dst = *src
- * bitmap_and(dst, src1, src2, nbits) *dst = *src1 & *src2
- * bitmap_or(dst, src1, src2, nbits) *dst = *src1 | *src2
- * bitmap_xor(dst, src1, src2, nbits) *dst = *src1 ^ *src2
- * bitmap_andnot(dst, src1, src2, nbits) *dst = *src1 & ~(*src2)
- * bitmap_complement(dst, src, nbits) *dst = ~(*src)
- * bitmap_equal(src1, src2, nbits) Are *src1 and *src2 equal?
- * bitmap_intersects(src1, src2, nbits) Do *src1 and *src2 overlap?
- * bitmap_subset(src1, src2, nbits) Is *src1 a subset of *src2?
- * bitmap_empty(src, nbits) Are all bits zero in *src?
- * bitmap_full(src, nbits) Are all bits set in *src?
- * bitmap_weight(src, nbits) Hamming Weight: number set bits
- * bitmap_shift_right(dst, src, n, nbits) *dst = *src >> n
- * bitmap_shift_left(dst, src, n, nbits) *dst = *src << n
- * bitmap_remap(dst, src, old, new, nbits) *dst = map(old, new)(src)
- * bitmap_bitremap(oldbit, old, new, nbits) newbit = map(old, new)(oldbit)
- * bitmap_scnprintf(buf, len, src, nbits) Print bitmap src to buf
- * bitmap_parse(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf
- * bitmap_scnlistprintf(buf, len, src, nbits) Print bitmap src as list to buf
- * bitmap_parselist(buf, dst, nbits) Parse bitmap dst from list
- * bitmap_find_free_region(bitmap, bits, order) Find and allocate bit region
- * bitmap_release_region(bitmap, pos, order) Free specified bit region
- * bitmap_allocate_region(bitmap, pos, order) Allocate specified bit region
- */
-
-/*
- * Also the following operations in asm/bitops.h apply to bitmaps.
- *
- * set_bit(bit, addr) *addr |= bit
- * clear_bit(bit, addr) *addr &= ~bit
- * change_bit(bit, addr) *addr ^= bit
- * test_bit(bit, addr) Is bit set in *addr?
- * test_and_set_bit(bit, addr) Set bit and return old value
- * test_and_clear_bit(bit, addr) Clear bit and return old value
- * test_and_change_bit(bit, addr) Change bit and return old value
- * find_first_zero_bit(addr, nbits) Position first zero bit in *addr
- * find_first_bit(addr, nbits) Position first set bit in *addr
- * find_next_zero_bit(addr, nbits, bit) Position next zero bit in *addr >= bit
- * find_next_bit(addr, nbits, bit) Position next set bit in *addr >= bit
- */
-
-/*
- * The DECLARE_BITMAP(name,bits) macro, in linux/types.h, can be used
- * to declare an array named 'name' of just enough unsigned longs to
- * contain all bit positions from 0 to 'bits' - 1.
- */
-
-/*
- * lib/bitmap.c provides these functions:
- */
-
-extern int __bitmap_empty(const unsigned long *bitmap, int bits);
-extern int __bitmap_full(const unsigned long *bitmap, int bits);
-extern int __bitmap_equal(const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern void __bitmap_complement(unsigned long *dst, const unsigned long *src,
- int bits);
-extern void __bitmap_shift_right(unsigned long *dst,
- const unsigned long *src, int shift, int bits);
-extern void __bitmap_shift_left(unsigned long *dst,
- const unsigned long *src, int shift, int bits);
-extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern int __bitmap_intersects(const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern int __bitmap_subset(const unsigned long *bitmap1,
- const unsigned long *bitmap2, int bits);
-extern int __bitmap_weight(const unsigned long *bitmap, int bits);
-
-extern int bitmap_scnprintf(char *buf, unsigned int len,
- const unsigned long *src, int nbits);
-extern int bitmap_parse(const char __user *ubuf, unsigned int ulen,
- unsigned long *dst, int nbits);
-extern int bitmap_scnlistprintf(char *buf, unsigned int len,
- const unsigned long *src, int nbits);
-extern int bitmap_parselist(const char *buf, unsigned long *maskp,
- int nmaskbits);
-extern void bitmap_remap(unsigned long *dst, const unsigned long *src,
- const unsigned long *old, const unsigned long *new, int bits);
-extern int bitmap_bitremap(int oldbit,
- const unsigned long *old, const unsigned long *new, int bits);
-extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order);
-extern void bitmap_release_region(unsigned long *bitmap, int pos, int order);
-extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order);
-
-#define BITMAP_LAST_WORD_MASK(nbits) \
-( \
- ((nbits) % BITS_PER_LONG) ? \
- (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \
-)
-
-static inline void bitmap_zero(unsigned long *dst, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = 0UL;
- else {
- int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
- memset(dst, 0, len);
- }
-}
-
-static inline void bitmap_fill(unsigned long *dst, int nbits)
-{
- size_t nlongs = BITS_TO_LONGS(nbits);
- if (nlongs > 1) {
- int len = (nlongs - 1) * sizeof(unsigned long);
- memset(dst, 0xff, len);
- }
- dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits);
-}
-
-static inline void bitmap_copy(unsigned long *dst, const unsigned long *src,
- int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = *src;
- else {
- int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long);
- memcpy(dst, src, len);
- }
-}
-
-static inline void bitmap_and(unsigned long *dst, const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = *src1 & *src2;
- else
- __bitmap_and(dst, src1, src2, nbits);
-}
-
-static inline void bitmap_or(unsigned long *dst, const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = *src1 | *src2;
- else
- __bitmap_or(dst, src1, src2, nbits);
-}
-
-static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = *src1 ^ *src2;
- else
- __bitmap_xor(dst, src1, src2, nbits);
-}
-
-static inline void bitmap_andnot(unsigned long *dst, const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = *src1 & ~(*src2);
- else
- __bitmap_andnot(dst, src1, src2, nbits);
-}
-
-static inline void bitmap_complement(unsigned long *dst, const unsigned long *src,
- int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = ~(*src) & BITMAP_LAST_WORD_MASK(nbits);
- else
- __bitmap_complement(dst, src, nbits);
-}
-
-static inline int bitmap_equal(const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- return ! ((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits));
- else
- return __bitmap_equal(src1, src2, nbits);
-}
-
-static inline int bitmap_intersects(const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0;
- else
- return __bitmap_intersects(src1, src2, nbits);
-}
-
-static inline int bitmap_subset(const unsigned long *src1,
- const unsigned long *src2, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits));
- else
- return __bitmap_subset(src1, src2, nbits);
-}
-
-static inline int bitmap_empty(const unsigned long *src, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- return ! (*src & BITMAP_LAST_WORD_MASK(nbits));
- else
- return __bitmap_empty(src, nbits);
-}
-
-static inline int bitmap_full(const unsigned long *src, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits));
- else
- return __bitmap_full(src, nbits);
-}
-
-static inline int bitmap_weight(const unsigned long *src, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits));
- return __bitmap_weight(src, nbits);
-}
-
-static inline void bitmap_shift_right(unsigned long *dst,
- const unsigned long *src, int n, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = *src >> n;
- else
- __bitmap_shift_right(dst, src, n, nbits);
-}
-
-static inline void bitmap_shift_left(unsigned long *dst,
- const unsigned long *src, int n, int nbits)
-{
- if (nbits <= BITS_PER_LONG)
- *dst = (*src << n) & BITMAP_LAST_WORD_MASK(nbits);
- else
- __bitmap_shift_left(dst, src, n, nbits);
-}
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __LINUX_BITMAP_H */
diff --git a/original/linux/bitops.h b/original/linux/bitops.h
deleted file mode 100644
index 5d1eabc..0000000
--- a/original/linux/bitops.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _LINUX_BITOPS_H
-#define _LINUX_BITOPS_H
-#include <asm/types.h>
-
-/*
- * Include this here because some architectures need generic_ffs/fls in
- * scope
- */
-#include <asm/bitops.h>
-
-static __inline__ int get_bitmask_order(unsigned int count)
-{
- int order;
-
- order = fls(count);
- return order; /* We could be slightly more clever with -1 here... */
-}
-
-static __inline__ int get_count_order(unsigned int count)
-{
- int order;
-
- order = fls(count) - 1;
- if (count & (count - 1))
- order++;
- return order;
-}
-
-static inline unsigned long hweight_long(unsigned long w)
-{
- return sizeof(w) == 4 ? hweight32(w) : hweight64(w);
-}
-
-/*
- * rol32 - rotate a 32-bit value left
- *
- * @word: value to rotate
- * @shift: bits to roll
- */
-static inline __u32 rol32(__u32 word, unsigned int shift)
-{
- return (word << shift) | (word >> (32 - shift));
-}
-
-/*
- * ror32 - rotate a 32-bit value right
- *
- * @word: value to rotate
- * @shift: bits to roll
- */
-static inline __u32 ror32(__u32 word, unsigned int shift)
-{
- return (word >> shift) | (word << (32 - shift));
-}
-
-static inline unsigned fls_long(unsigned long l)
-{
- if (sizeof(l) == 4)
- return fls(l);
- return fls64(l);
-}
-
-#endif
diff --git a/original/linux/blk_types.h b/original/linux/blk_types.h
deleted file mode 100644
index 6395692..0000000
--- a/original/linux/blk_types.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Block data types and constants. Directly include this file only to
- * break include dependency loop.
- */
-#ifndef __LINUX_BLK_TYPES_H
-#define __LINUX_BLK_TYPES_H
-
-#ifdef CONFIG_BLOCK
-
-#include <linux/types.h>
-
-struct bio_set;
-struct bio;
-struct bio_integrity_payload;
-struct page;
-struct block_device;
-typedef void (bio_end_io_t) (struct bio *, int);
-typedef void (bio_destructor_t) (struct bio *);
-
-/*
- * was unsigned short, but we might as well be ready for > 64kB I/O pages
- */
-struct bio_vec {
- struct page *bv_page;
- unsigned int bv_len;
- unsigned int bv_offset;
-};
-
-/*
- * main unit of I/O for the block layer and lower layers (ie drivers and
- * stacking drivers)
- */
-struct bio {
- sector_t bi_sector; /* device address in 512 byte
- sectors */
- struct bio *bi_next; /* request queue link */
- struct block_device *bi_bdev;
- unsigned long bi_flags; /* status, command, etc */
- unsigned long bi_rw; /* bottom bits READ/WRITE,
- * top bits priority
- */
-
- unsigned short bi_vcnt; /* how many bio_vec's */
- unsigned short bi_idx; /* current index into bvl_vec */
-
- /* Number of segments in this BIO after
- * physical address coalescing is performed.
- */
- unsigned int bi_phys_segments;
-
- unsigned int bi_size; /* residual I/O count */
-
- /*
- * To keep track of the max segment size, we account for the
- * sizes of the first and last mergeable segments in this bio.
- */
- unsigned int bi_seg_front_size;
- unsigned int bi_seg_back_size;
-
- unsigned int bi_max_vecs; /* max bvl_vecs we can hold */
-
- unsigned int bi_comp_cpu; /* completion CPU */
-
- atomic_t bi_cnt; /* pin count */
-
- struct bio_vec *bi_io_vec; /* the actual vec list */
-
- bio_end_io_t *bi_end_io;
-
- void *bi_private;
-#if defined(CONFIG_BLK_DEV_INTEGRITY)
- struct bio_integrity_payload *bi_integrity; /* data integrity */
-#endif
-
- bio_destructor_t *bi_destructor; /* destructor */
-
- /*
- * We can inline a number of vecs at the end of the bio, to avoid
- * double allocations for a small number of bio_vecs. This member
- * MUST obviously be kept at the very end of the bio.
- */
- struct bio_vec bi_inline_vecs[0];
-};
-
-/*
- * bio flags
- */
-#define BIO_UPTODATE 0 /* ok after I/O completion */
-#define BIO_RW_BLOCK 1 /* RW_AHEAD set, and read/write would block */
-#define BIO_EOF 2 /* out-out-bounds error */
-#define BIO_SEG_VALID 3 /* bi_phys_segments valid */
-#define BIO_CLONED 4 /* doesn't own data */
-#define BIO_BOUNCED 5 /* bio is a bounce bio */
-#define BIO_USER_MAPPED 6 /* contains user pages */
-#define BIO_EOPNOTSUPP 7 /* not supported */
-#define BIO_CPU_AFFINE 8 /* complete bio on same CPU as submitted */
-#define BIO_NULL_MAPPED 9 /* contains invalid user pages */
-#define BIO_FS_INTEGRITY 10 /* fs owns integrity data, not block layer */
-#define BIO_QUIET 11 /* Make BIO Quiet */
-#define BIO_MAPPED_INTEGRITY 12/* integrity metadata has been remapped */
-#define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
-
-/*
- * top 4 bits of bio flags indicate the pool this bio came from
- */
-#define BIO_POOL_BITS (4)
-#define BIO_POOL_NONE ((1UL << BIO_POOL_BITS) - 1)
-#define BIO_POOL_OFFSET (BITS_PER_LONG - BIO_POOL_BITS)
-#define BIO_POOL_MASK (1UL << BIO_POOL_OFFSET)
-#define BIO_POOL_IDX(bio) ((bio)->bi_flags >> BIO_POOL_OFFSET)
-
-#endif /* CONFIG_BLOCK */
-
-/*
- * Request flags. For use in the cmd_flags field of struct request, and in
- * bi_rw of struct bio. Note that some flags are only valid in either one.
- */
-enum rq_flag_bits {
- /* common flags */
- __REQ_WRITE, /* not set, read. set, write */
- __REQ_FAILFAST_DEV, /* no driver retries of device errors */
- __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
- __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */
-
- __REQ_SYNC, /* request is sync (sync write or read) */
- __REQ_META, /* metadata io request */
- __REQ_DISCARD, /* request to discard sectors */
- __REQ_NOIDLE, /* don't anticipate more IO after this one */
-
- /* bio only flags */
- __REQ_RAHEAD, /* read ahead, can fail anytime */
- __REQ_THROTTLED, /* This bio has already been subjected to
- * throttling rules. Don't do it again. */
-
- /* request only flags */
- __REQ_SORTED, /* elevator knows about this request */
- __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
- __REQ_FUA, /* forced unit access */
- __REQ_NOMERGE, /* don't touch this for merging */
- __REQ_STARTED, /* drive already may have started this one */
- __REQ_DONTPREP, /* don't call prep for this one */
- __REQ_QUEUED, /* uses queueing */
- __REQ_ELVPRIV, /* elevator private data attached */
- __REQ_FAILED, /* set if the request failed */
- __REQ_QUIET, /* don't worry about errors */
- __REQ_PREEMPT, /* set for "ide_preempt" requests */
- __REQ_ALLOCED, /* request came from our alloc pool */
- __REQ_COPY_USER, /* contains copies of user pages */
- __REQ_FLUSH, /* request for cache flush */
- __REQ_FLUSH_SEQ, /* request for flush sequence */
- __REQ_IO_STAT, /* account I/O stat */
- __REQ_MIXED_MERGE, /* merge of different types, fail separately */
- __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */
- __REQ_NR_BITS, /* stops here */
-};
-
-#define REQ_WRITE (1 << __REQ_WRITE)
-#define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV)
-#define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT)
-#define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER)
-#define REQ_SYNC (1 << __REQ_SYNC)
-#define REQ_META (1 << __REQ_META)
-#define REQ_DISCARD (1 << __REQ_DISCARD)
-#define REQ_NOIDLE (1 << __REQ_NOIDLE)
-
-#define REQ_FAILFAST_MASK \
- (REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT | REQ_FAILFAST_DRIVER)
-#define REQ_COMMON_MASK \
- (REQ_WRITE | REQ_FAILFAST_MASK | REQ_SYNC | REQ_META | REQ_DISCARD | \
- REQ_NOIDLE | REQ_FLUSH | REQ_FUA | REQ_SECURE)
-#define REQ_CLONE_MASK REQ_COMMON_MASK
-
-#define REQ_RAHEAD (1 << __REQ_RAHEAD)
-#define REQ_THROTTLED (1 << __REQ_THROTTLED)
-
-#define REQ_SORTED (1 << __REQ_SORTED)
-#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
-#define REQ_FUA (1 << __REQ_FUA)
-#define REQ_NOMERGE (1 << __REQ_NOMERGE)
-#define REQ_STARTED (1 << __REQ_STARTED)
-#define REQ_DONTPREP (1 << __REQ_DONTPREP)
-#define REQ_QUEUED (1 << __REQ_QUEUED)
-#define REQ_ELVPRIV (1 << __REQ_ELVPRIV)
-#define REQ_FAILED (1 << __REQ_FAILED)
-#define REQ_QUIET (1 << __REQ_QUIET)
-#define REQ_PREEMPT (1 << __REQ_PREEMPT)
-#define REQ_ALLOCED (1 << __REQ_ALLOCED)
-#define REQ_COPY_USER (1 << __REQ_COPY_USER)
-#define REQ_FLUSH (1 << __REQ_FLUSH)
-#define REQ_FLUSH_SEQ (1 << __REQ_FLUSH_SEQ)
-#define REQ_IO_STAT (1 << __REQ_IO_STAT)
-#define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE)
-#define REQ_SECURE (1 << __REQ_SECURE)
-
-#endif /* __LINUX_BLK_TYPES_H */
diff --git a/original/linux/blkdev.h b/original/linux/blkdev.h
deleted file mode 100644
index aafe827..0000000
--- a/original/linux/blkdev.h
+++ /dev/null
@@ -1,844 +0,0 @@
-#ifndef _LINUX_BLKDEV_H
-#define _LINUX_BLKDEV_H
-
-#include <linux/major.h>
-#include <linux/genhd.h>
-#include <linux/list.h>
-#include <linux/timer.h>
-#include <linux/workqueue.h>
-#include <linux/pagemap.h>
-#include <linux/backing-dev.h>
-#include <linux/wait.h>
-#include <linux/mempool.h>
-#include <linux/bio.h>
-#include <linux/module.h>
-#include <linux/stringify.h>
-
-#include <asm/scatterlist.h>
-
-struct scsi_ioctl_command;
-
-struct request_queue;
-typedef struct request_queue request_queue_t;
-struct elevator_queue;
-typedef struct elevator_queue elevator_t;
-struct request_pm_state;
-struct blk_trace;
-
-#define BLKDEV_MIN_RQ 4
-#define BLKDEV_MAX_RQ 128 /* Default maximum */
-
-/*
- * This is the per-process anticipatory I/O scheduler state.
- */
-struct as_io_context {
- spinlock_t lock;
-
- void (*dtor)(struct as_io_context *aic); /* destructor */
- void (*exit)(struct as_io_context *aic); /* called on task exit */
-
- unsigned long state;
- atomic_t nr_queued; /* queued reads & sync writes */
- atomic_t nr_dispatched; /* number of requests gone to the drivers */
-
- /* IO History tracking */
- /* Thinktime */
- unsigned long last_end_request;
- unsigned long ttime_total;
- unsigned long ttime_samples;
- unsigned long ttime_mean;
- /* Layout pattern */
- unsigned int seek_samples;
- sector_t last_request_pos;
- u64 seek_total;
- sector_t seek_mean;
-};
-
-struct cfq_queue;
-struct cfq_io_context {
- struct rb_node rb_node;
- void *key;
-
- struct cfq_queue *cfqq[2];
-
- struct io_context *ioc;
-
- unsigned long last_end_request;
- sector_t last_request_pos;
- unsigned long last_queue;
-
- unsigned long ttime_total;
- unsigned long ttime_samples;
- unsigned long ttime_mean;
-
- unsigned int seek_samples;
- u64 seek_total;
- sector_t seek_mean;
-
- struct list_head queue_list;
-
- void (*dtor)(struct io_context *); /* destructor */
- void (*exit)(struct io_context *); /* called on task exit */
-};
-
-/*
- * This is the per-process I/O subsystem state. It is refcounted and
- * kmalloc'ed. Currently all fields are modified in process io context
- * (apart from the atomic refcount), so require no locking.
- */
-struct io_context {
- atomic_t refcount;
- struct task_struct *task;
-
- int (*set_ioprio)(struct io_context *, unsigned int);
-
- /*
- * For request batching
- */
- unsigned long last_waited; /* Time last woken after wait for request */
- int nr_batch_requests; /* Number of requests left in the batch */
-
- struct as_io_context *aic;
- struct rb_root cic_root;
-};
-
-void put_io_context(struct io_context *ioc);
-void exit_io_context(void);
-struct io_context *current_io_context(gfp_t gfp_flags);
-struct io_context *get_io_context(gfp_t gfp_flags);
-void copy_io_context(struct io_context **pdst, struct io_context **psrc);
-void swap_io_context(struct io_context **ioc1, struct io_context **ioc2);
-
-struct request;
-typedef void (rq_end_io_fn)(struct request *, int);
-
-struct request_list {
- int count[2];
- int starved[2];
- int elvpriv;
- mempool_t *rq_pool;
- wait_queue_head_t wait[2];
-};
-
-#define BLK_MAX_CDB 16
-
-/*
- * try to put the fields that are referenced together in the same cacheline
- */
-struct request {
- struct list_head queuelist;
- struct list_head donelist;
-
- unsigned long flags; /* see REQ_ bits below */
-
- /* Maintain bio traversal state for part by part I/O submission.
- * hard_* are block layer internals, no driver should touch them!
- */
-
- sector_t sector; /* next sector to submit */
- unsigned long nr_sectors; /* no. of sectors left to submit */
- /* no. of sectors left to submit in the current segment */
- unsigned int current_nr_sectors;
-
- sector_t hard_sector; /* next sector to complete */
- unsigned long hard_nr_sectors; /* no. of sectors left to complete */
- /* no. of sectors left to complete in the current segment */
- unsigned int hard_cur_sectors;
-
- struct bio *bio;
- struct bio *biotail;
-
- void *elevator_private;
- void *completion_data;
-
- int rq_status; /* should split this into a few status bits */
- int errors;
- struct gendisk *rq_disk;
- unsigned long start_time;
-
- /* Number of scatter-gather DMA addr+len pairs after
- * physical address coalescing is performed.
- */
- unsigned short nr_phys_segments;
-
- /* Number of scatter-gather addr+len pairs after
- * physical and DMA remapping hardware coalescing is performed.
- * This is the number of scatter-gather entries the driver
- * will actually have to deal with after DMA mapping is done.
- */
- unsigned short nr_hw_segments;
-
- unsigned short ioprio;
-
- int tag;
-
- int ref_count;
- request_queue_t *q;
- struct request_list *rl;
-
- struct completion *waiting;
- void *special;
- char *buffer;
-
- /*
- * when request is used as a packet command carrier
- */
- unsigned int cmd_len;
- unsigned char cmd[BLK_MAX_CDB];
-
- unsigned int data_len;
- unsigned int sense_len;
- void *data;
- void *sense;
-
- unsigned int timeout;
- int retries;
-
- /*
- * completion callback. end_io_data should be folded in with waiting
- */
- rq_end_io_fn *end_io;
- void *end_io_data;
-};
-
-/*
- * first three bits match BIO_RW* bits, important
- */
-enum rq_flag_bits {
- __REQ_RW, /* not set, read. set, write */
- __REQ_FAILFAST, /* no low level driver retries */
- __REQ_SORTED, /* elevator knows about this request */
- __REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
- __REQ_HARDBARRIER, /* may not be passed by drive either */
- __REQ_FUA, /* forced unit access */
- __REQ_CMD, /* is a regular fs rw request */
- __REQ_NOMERGE, /* don't touch this for merging */
- __REQ_STARTED, /* drive already may have started this one */
- __REQ_DONTPREP, /* don't call prep for this one */
- __REQ_QUEUED, /* uses queueing */
- __REQ_ELVPRIV, /* elevator private data attached */
- /*
- * for ATA/ATAPI devices
- */
- __REQ_PC, /* packet command (special) */
- __REQ_BLOCK_PC, /* queued down pc from block layer */
- __REQ_SENSE, /* sense retrival */
-
- __REQ_FAILED, /* set if the request failed */
- __REQ_QUIET, /* don't worry about errors */
- __REQ_SPECIAL, /* driver suplied command */
- __REQ_DRIVE_CMD,
- __REQ_DRIVE_TASK,
- __REQ_DRIVE_TASKFILE,
- __REQ_PREEMPT, /* set for "ide_preempt" requests */
- __REQ_PM_SUSPEND, /* suspend request */
- __REQ_PM_RESUME, /* resume request */
- __REQ_PM_SHUTDOWN, /* shutdown request */
- __REQ_ORDERED_COLOR, /* is before or after barrier */
- __REQ_RW_SYNC, /* request is sync (O_DIRECT) */
- __REQ_NR_BITS, /* stops here */
-};
-
-#define REQ_RW (1 << __REQ_RW)
-#define REQ_FAILFAST (1 << __REQ_FAILFAST)
-#define REQ_SORTED (1 << __REQ_SORTED)
-#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
-#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
-#define REQ_FUA (1 << __REQ_FUA)
-#define REQ_CMD (1 << __REQ_CMD)
-#define REQ_NOMERGE (1 << __REQ_NOMERGE)
-#define REQ_STARTED (1 << __REQ_STARTED)
-#define REQ_DONTPREP (1 << __REQ_DONTPREP)
-#define REQ_QUEUED (1 << __REQ_QUEUED)
-#define REQ_ELVPRIV (1 << __REQ_ELVPRIV)
-#define REQ_PC (1 << __REQ_PC)
-#define REQ_BLOCK_PC (1 << __REQ_BLOCK_PC)
-#define REQ_SENSE (1 << __REQ_SENSE)
-#define REQ_FAILED (1 << __REQ_FAILED)
-#define REQ_QUIET (1 << __REQ_QUIET)
-#define REQ_SPECIAL (1 << __REQ_SPECIAL)
-#define REQ_DRIVE_CMD (1 << __REQ_DRIVE_CMD)
-#define REQ_DRIVE_TASK (1 << __REQ_DRIVE_TASK)
-#define REQ_DRIVE_TASKFILE (1 << __REQ_DRIVE_TASKFILE)
-#define REQ_PREEMPT (1 << __REQ_PREEMPT)
-#define REQ_PM_SUSPEND (1 << __REQ_PM_SUSPEND)
-#define REQ_PM_RESUME (1 << __REQ_PM_RESUME)
-#define REQ_PM_SHUTDOWN (1 << __REQ_PM_SHUTDOWN)
-#define REQ_ORDERED_COLOR (1 << __REQ_ORDERED_COLOR)
-#define REQ_RW_SYNC (1 << __REQ_RW_SYNC)
-
-/*
- * State information carried for REQ_PM_SUSPEND and REQ_PM_RESUME
- * requests. Some step values could eventually be made generic.
- */
-struct request_pm_state
-{
- /* PM state machine step value, currently driver specific */
- int pm_step;
- /* requested PM state value (S1, S2, S3, S4, ...) */
- u32 pm_state;
- void* data; /* for driver use */
-};
-
-#include <linux/elevator.h>
-
-typedef int (merge_request_fn) (request_queue_t *, struct request *,
- struct bio *);
-typedef int (merge_requests_fn) (request_queue_t *, struct request *,
- struct request *);
-typedef void (request_fn_proc) (request_queue_t *q);
-typedef int (make_request_fn) (request_queue_t *q, struct bio *bio);
-typedef int (prep_rq_fn) (request_queue_t *, struct request *);
-typedef void (unplug_fn) (request_queue_t *);
-
-struct bio_vec;
-typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
-typedef void (activity_fn) (void *data, int rw);
-typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
-typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
-typedef void (softirq_done_fn)(struct request *);
-
-enum blk_queue_state {
- Queue_down,
- Queue_up,
-};
-
-struct blk_queue_tag {
- struct request **tag_index; /* map of busy tags */
- unsigned long *tag_map; /* bit map of free/busy tags */
- struct list_head busy_list; /* fifo list of busy tags */
- int busy; /* current depth */
- int max_depth; /* what we will send to device */
- int real_max_depth; /* what the array can hold */
- atomic_t refcnt; /* map can be shared */
-};
-
-struct request_queue
-{
- /*
- * Together with queue_head for cacheline sharing
- */
- struct list_head queue_head;
- struct request *last_merge;
- elevator_t *elevator;
-
- /*
- * the queue request freelist, one for reads and one for writes
- */
- struct request_list rq;
-
- request_fn_proc *request_fn;
- merge_request_fn *back_merge_fn;
- merge_request_fn *front_merge_fn;
- merge_requests_fn *merge_requests_fn;
- make_request_fn *make_request_fn;
- prep_rq_fn *prep_rq_fn;
- unplug_fn *unplug_fn;
- merge_bvec_fn *merge_bvec_fn;
- activity_fn *activity_fn;
- issue_flush_fn *issue_flush_fn;
- prepare_flush_fn *prepare_flush_fn;
- softirq_done_fn *softirq_done_fn;
-
- /*
- * Dispatch queue sorting
- */
- sector_t end_sector;
- struct request *boundary_rq;
-
- /*
- * Auto-unplugging state
- */
- struct timer_list unplug_timer;
- int unplug_thresh; /* After this many requests */
- unsigned long unplug_delay; /* After this many jiffies */
- struct work_struct unplug_work;
-
- struct backing_dev_info backing_dev_info;
-
- /*
- * The queue owner gets to use this for whatever they like.
- * ll_rw_blk doesn't touch it.
- */
- void *queuedata;
-
- void *activity_data;
-
- /*
- * queue needs bounce pages for pages above this limit
- */
- unsigned long bounce_pfn;
- gfp_t bounce_gfp;
-
- /*
- * various queue flags, see QUEUE_* below
- */
- unsigned long queue_flags;
-
- /*
- * protects queue structures from reentrancy. ->__queue_lock should
- * _never_ be used directly, it is queue private. always use
- * ->queue_lock.
- */
- spinlock_t __queue_lock;
- spinlock_t *queue_lock;
-
- /*
- * queue kobject
- */
- struct kobject kobj;
-
- /*
- * queue settings
- */
- unsigned long nr_requests; /* Max # of requests */
- unsigned int nr_congestion_on;
- unsigned int nr_congestion_off;
- unsigned int nr_batching;
-
- unsigned int max_sectors;
- unsigned int max_hw_sectors;
- unsigned short max_phys_segments;
- unsigned short max_hw_segments;
- unsigned short hardsect_size;
- unsigned int max_segment_size;
-
- unsigned long seg_boundary_mask;
- unsigned int dma_alignment;
-
- struct blk_queue_tag *queue_tags;
-
- unsigned int nr_sorted;
- unsigned int in_flight;
-
- /*
- * sg stuff
- */
- unsigned int sg_timeout;
- unsigned int sg_reserved_size;
- int node;
-
- struct blk_trace *blk_trace;
-
- /*
- * reserved for flush operations
- */
- unsigned int ordered, next_ordered, ordseq;
- int orderr, ordcolor;
- struct request pre_flush_rq, bar_rq, post_flush_rq;
- struct request *orig_bar_rq;
- unsigned int bi_size;
-
- struct mutex sysfs_lock;
-};
-
-#define RQ_INACTIVE (-1)
-#define RQ_ACTIVE 1
-
-#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */
-#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
-#define QUEUE_FLAG_STOPPED 2 /* queue is stopped */
-#define QUEUE_FLAG_READFULL 3 /* write queue has been filled */
-#define QUEUE_FLAG_WRITEFULL 4 /* read queue has been filled */
-#define QUEUE_FLAG_DEAD 5 /* queue being torn down */
-#define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */
-#define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */
-#define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */
-
-enum {
- /*
- * Hardbarrier is supported with one of the following methods.
- *
- * NONE : hardbarrier unsupported
- * DRAIN : ordering by draining is enough
- * DRAIN_FLUSH : ordering by draining w/ pre and post flushes
- * DRAIN_FUA : ordering by draining w/ pre flush and FUA write
- * TAG : ordering by tag is enough
- * TAG_FLUSH : ordering by tag w/ pre and post flushes
- * TAG_FUA : ordering by tag w/ pre flush and FUA write
- */
- QUEUE_ORDERED_NONE = 0x00,
- QUEUE_ORDERED_DRAIN = 0x01,
- QUEUE_ORDERED_TAG = 0x02,
-
- QUEUE_ORDERED_PREFLUSH = 0x10,
- QUEUE_ORDERED_POSTFLUSH = 0x20,
- QUEUE_ORDERED_FUA = 0x40,
-
- QUEUE_ORDERED_DRAIN_FLUSH = QUEUE_ORDERED_DRAIN |
- QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
- QUEUE_ORDERED_DRAIN_FUA = QUEUE_ORDERED_DRAIN |
- QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
- QUEUE_ORDERED_TAG_FLUSH = QUEUE_ORDERED_TAG |
- QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH,
- QUEUE_ORDERED_TAG_FUA = QUEUE_ORDERED_TAG |
- QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_FUA,
-
- /*
- * Ordered operation sequence
- */
- QUEUE_ORDSEQ_STARTED = 0x01, /* flushing in progress */
- QUEUE_ORDSEQ_DRAIN = 0x02, /* waiting for the queue to be drained */
- QUEUE_ORDSEQ_PREFLUSH = 0x04, /* pre-flushing in progress */
- QUEUE_ORDSEQ_BAR = 0x08, /* original barrier req in progress */
- QUEUE_ORDSEQ_POSTFLUSH = 0x10, /* post-flushing in progress */
- QUEUE_ORDSEQ_DONE = 0x20,
-};
-
-#define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags)
-#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
-#define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags)
-#define blk_queue_flushing(q) ((q)->ordseq)
-
-#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
-#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
-#define blk_noretry_request(rq) ((rq)->flags & REQ_FAILFAST)
-#define blk_rq_started(rq) ((rq)->flags & REQ_STARTED)
-
-#define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq))
-
-#define blk_pm_suspend_request(rq) ((rq)->flags & REQ_PM_SUSPEND)
-#define blk_pm_resume_request(rq) ((rq)->flags & REQ_PM_RESUME)
-#define blk_pm_request(rq) \
- ((rq)->flags & (REQ_PM_SUSPEND | REQ_PM_RESUME))
-
-#define blk_sorted_rq(rq) ((rq)->flags & REQ_SORTED)
-#define blk_barrier_rq(rq) ((rq)->flags & REQ_HARDBARRIER)
-#define blk_fua_rq(rq) ((rq)->flags & REQ_FUA)
-
-#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
-
-#define rq_data_dir(rq) ((rq)->flags & 1)
-
-static inline int blk_queue_full(struct request_queue *q, int rw)
-{
- if (rw == READ)
- return test_bit(QUEUE_FLAG_READFULL, &q->queue_flags);
- return test_bit(QUEUE_FLAG_WRITEFULL, &q->queue_flags);
-}
-
-static inline void blk_set_queue_full(struct request_queue *q, int rw)
-{
- if (rw == READ)
- set_bit(QUEUE_FLAG_READFULL, &q->queue_flags);
- else
- set_bit(QUEUE_FLAG_WRITEFULL, &q->queue_flags);
-}
-
-static inline void blk_clear_queue_full(struct request_queue *q, int rw)
-{
- if (rw == READ)
- clear_bit(QUEUE_FLAG_READFULL, &q->queue_flags);
- else
- clear_bit(QUEUE_FLAG_WRITEFULL, &q->queue_flags);
-}
-
-
-/*
- * mergeable request must not have _NOMERGE or _BARRIER bit set, nor may
- * it already be started by driver.
- */
-#define RQ_NOMERGE_FLAGS \
- (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
-#define rq_mergeable(rq) \
- (!((rq)->flags & RQ_NOMERGE_FLAGS) && blk_fs_request((rq)))
-
-/*
- * noop, requests are automagically marked as active/inactive by I/O
- * scheduler -- see elv_next_request
- */
-#define blk_queue_headactive(q, head_active)
-
-/*
- * q->prep_rq_fn return values
- */
-#define BLKPREP_OK 0 /* serve it */
-#define BLKPREP_KILL 1 /* fatal error, kill */
-#define BLKPREP_DEFER 2 /* leave on queue */
-
-extern unsigned long blk_max_low_pfn, blk_max_pfn;
-
-/*
- * standard bounce addresses:
- *
- * BLK_BOUNCE_HIGH : bounce all highmem pages
- * BLK_BOUNCE_ANY : don't bounce anything
- * BLK_BOUNCE_ISA : bounce pages above ISA DMA boundary
- */
-#define BLK_BOUNCE_HIGH ((u64)blk_max_low_pfn << PAGE_SHIFT)
-#define BLK_BOUNCE_ANY ((u64)blk_max_pfn << PAGE_SHIFT)
-#define BLK_BOUNCE_ISA (ISA_DMA_THRESHOLD)
-
-#ifdef CONFIG_MMU
-extern int init_emergency_isa_pool(void);
-extern void blk_queue_bounce(request_queue_t *q, struct bio **bio);
-#else
-static inline int init_emergency_isa_pool(void)
-{
- return 0;
-}
-static inline void blk_queue_bounce(request_queue_t *q, struct bio **bio)
-{
-}
-#endif /* CONFIG_MMU */
-
-#define rq_for_each_bio(_bio, rq) \
- if ((rq->bio)) \
- for (_bio = (rq)->bio; _bio; _bio = _bio->bi_next)
-
-struct sec_size {
- unsigned block_size;
- unsigned block_size_bits;
-};
-
-extern int blk_register_queue(struct gendisk *disk);
-extern void blk_unregister_queue(struct gendisk *disk);
-extern void register_disk(struct gendisk *dev);
-extern void generic_make_request(struct bio *bio);
-extern void blk_put_request(struct request *);
-extern void __blk_put_request(request_queue_t *, struct request *);
-extern void blk_end_sync_rq(struct request *rq, int error);
-extern struct request *blk_get_request(request_queue_t *, int, gfp_t);
-extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
-extern void blk_requeue_request(request_queue_t *, struct request *);
-extern void blk_plug_device(request_queue_t *);
-extern int blk_remove_plug(request_queue_t *);
-extern void blk_recount_segments(request_queue_t *, struct bio *);
-extern int scsi_cmd_ioctl(struct file *, struct gendisk *, unsigned int, void __user *);
-extern int sg_scsi_ioctl(struct file *, struct request_queue *,
- struct gendisk *, struct scsi_ioctl_command __user *);
-extern void blk_start_queue(request_queue_t *q);
-extern void blk_stop_queue(request_queue_t *q);
-extern void blk_sync_queue(struct request_queue *q);
-extern void __blk_stop_queue(request_queue_t *q);
-extern void blk_run_queue(request_queue_t *);
-extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
-extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned int);
-extern int blk_rq_unmap_user(struct bio *, unsigned int);
-extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
-extern int blk_rq_map_user_iov(request_queue_t *, struct request *, struct sg_iovec *, int);
-extern int blk_execute_rq(request_queue_t *, struct gendisk *,
- struct request *, int);
-extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *,
- struct request *, int, rq_end_io_fn *);
-
-static inline request_queue_t *bdev_get_queue(struct block_device *bdev)
-{
- return bdev->bd_disk->queue;
-}
-
-static inline void blk_run_backing_dev(struct backing_dev_info *bdi,
- struct page *page)
-{
- if (bdi && bdi->unplug_io_fn)
- bdi->unplug_io_fn(bdi, page);
-}
-
-static inline void blk_run_address_space(struct address_space *mapping)
-{
- if (mapping)
- blk_run_backing_dev(mapping->backing_dev_info, NULL);
-}
-
-/*
- * end_request() and friends. Must be called with the request queue spinlock
- * acquired. All functions called within end_request() _must_be_ atomic.
- *
- * Several drivers define their own end_request and call
- * end_that_request_first() and end_that_request_last()
- * for parts of the original function. This prevents
- * code duplication in drivers.
- */
-extern int end_that_request_first(struct request *, int, int);
-extern int end_that_request_chunk(struct request *, int, int);
-extern void end_that_request_last(struct request *, int);
-extern void end_request(struct request *req, int uptodate);
-extern void blk_complete_request(struct request *);
-
-static inline int rq_all_done(struct request *rq, unsigned int nr_bytes)
-{
- if (blk_fs_request(rq))
- return (nr_bytes >= (rq->hard_nr_sectors << 9));
- else if (blk_pc_request(rq))
- return nr_bytes >= rq->data_len;
-
- return 0;
-}
-
-/*
- * end_that_request_first/chunk() takes an uptodate argument. we account
- * any value <= as an io error. 0 means -EIO for compatability reasons,
- * any other < 0 value is the direct error type. An uptodate value of
- * 1 indicates successful io completion
- */
-#define end_io_error(uptodate) (unlikely((uptodate) <= 0))
-
-static inline void blkdev_dequeue_request(struct request *req)
-{
- elv_dequeue_request(req->q, req);
-}
-
-/*
- * This should be in elevator.h, but that requires pulling in rq and q
- */
-static inline void elv_dispatch_add_tail(struct request_queue *q,
- struct request *rq)
-{
- if (q->last_merge == rq)
- q->last_merge = NULL;
- q->nr_sorted--;
-
- q->end_sector = rq_end_sector(rq);
- q->boundary_rq = rq;
- list_add_tail(&rq->queuelist, &q->queue_head);
-}
-
-/*
- * Access functions for manipulating queue properties
- */
-extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn,
- spinlock_t *lock, int node_id);
-extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *);
-extern void blk_cleanup_queue(request_queue_t *);
-extern void blk_queue_make_request(request_queue_t *, make_request_fn *);
-extern void blk_queue_bounce_limit(request_queue_t *, u64);
-extern void blk_queue_max_sectors(request_queue_t *, unsigned int);
-extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short);
-extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short);
-extern void blk_queue_max_segment_size(request_queue_t *, unsigned int);
-extern void blk_queue_hardsect_size(request_queue_t *, unsigned short);
-extern void blk_queue_stack_limits(request_queue_t *t, request_queue_t *b);
-extern void blk_queue_segment_boundary(request_queue_t *, unsigned long);
-extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn);
-extern void blk_queue_merge_bvec(request_queue_t *, merge_bvec_fn *);
-extern void blk_queue_dma_alignment(request_queue_t *, int);
-extern void blk_queue_softirq_done(request_queue_t *, softirq_done_fn *);
-extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev);
-extern int blk_queue_ordered(request_queue_t *, unsigned, prepare_flush_fn *);
-extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *);
-extern int blk_do_ordered(request_queue_t *, struct request **);
-extern unsigned blk_ordered_cur_seq(request_queue_t *);
-extern unsigned blk_ordered_req_seq(struct request *);
-extern void blk_ordered_complete_seq(request_queue_t *, unsigned, int);
-
-extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *);
-extern void blk_dump_rq_flags(struct request *, char *);
-extern void generic_unplug_device(request_queue_t *);
-extern void __generic_unplug_device(request_queue_t *);
-extern long nr_blockdev_pages(void);
-
-int blk_get_queue(request_queue_t *);
-request_queue_t *blk_alloc_queue(gfp_t);
-request_queue_t *blk_alloc_queue_node(gfp_t, int);
-extern void blk_put_queue(request_queue_t *);
-
-/*
- * tag stuff
- */
-#define blk_queue_tag_depth(q) ((q)->queue_tags->busy)
-#define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth)
-#define blk_rq_tagged(rq) ((rq)->flags & REQ_QUEUED)
-extern int blk_queue_start_tag(request_queue_t *, struct request *);
-extern struct request *blk_queue_find_tag(request_queue_t *, int);
-extern void blk_queue_end_tag(request_queue_t *, struct request *);
-extern int blk_queue_init_tags(request_queue_t *, int, struct blk_queue_tag *);
-extern void blk_queue_free_tags(request_queue_t *);
-extern int blk_queue_resize_tags(request_queue_t *, int);
-extern void blk_queue_invalidate_tags(request_queue_t *);
-extern long blk_congestion_wait(int rw, long timeout);
-
-extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *);
-extern int blkdev_issue_flush(struct block_device *, sector_t *);
-
-#define MAX_PHYS_SEGMENTS 128
-#define MAX_HW_SEGMENTS 128
-#define SAFE_MAX_SECTORS 255
-#define BLK_DEF_MAX_SECTORS 1024
-
-#define MAX_SEGMENT_SIZE 65536
-
-#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
-
-static inline int queue_hardsect_size(request_queue_t *q)
-{
- int retval = 512;
-
- if (q && q->hardsect_size)
- retval = q->hardsect_size;
-
- return retval;
-}
-
-static inline int bdev_hardsect_size(struct block_device *bdev)
-{
- return queue_hardsect_size(bdev_get_queue(bdev));
-}
-
-static inline int queue_dma_alignment(request_queue_t *q)
-{
- int retval = 511;
-
- if (q && q->dma_alignment)
- retval = q->dma_alignment;
-
- return retval;
-}
-
-static inline int bdev_dma_aligment(struct block_device *bdev)
-{
- return queue_dma_alignment(bdev_get_queue(bdev));
-}
-
-#define blk_finished_io(nsects) do { } while (0)
-#define blk_started_io(nsects) do { } while (0)
-
-/* assumes size > 256 */
-static inline unsigned int blksize_bits(unsigned int size)
-{
- unsigned int bits = 8;
- do {
- bits++;
- size >>= 1;
- } while (size > 256);
- return bits;
-}
-
-static inline unsigned int block_size(struct block_device *bdev)
-{
- return bdev->bd_block_size;
-}
-
-typedef struct {struct page *v;} Sector;
-
-unsigned char *read_dev_sector(struct block_device *, sector_t, Sector *);
-
-static inline void put_dev_sector(Sector p)
-{
- page_cache_release(p.v);
-}
-
-struct work_struct;
-int kblockd_schedule_work(struct work_struct *work);
-void kblockd_flush(void);
-
-#ifdef CONFIG_LBD
-# include <asm/div64.h>
-# define sector_div(a, b) do_div(a, b)
-#else
-# define sector_div(n, b)( \
-{ \
- int _res; \
- _res = (n) % (b); \
- (n) /= (b); \
- _res; \
-} \
-)
-#endif
-
-#define MODULE_ALIAS_BLOCKDEV(major,minor) \
- MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
-#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \
- MODULE_ALIAS("block-major-" __stringify(major) "-*")
-
-
-#endif
diff --git a/original/linux/blkpg.h b/original/linux/blkpg.h
deleted file mode 100644
index faf8a45..0000000
--- a/original/linux/blkpg.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef _LINUX_BLKPG_H
-#define _LINUX_BLKPG_H
-
-/*
- * Partition table and disk geometry handling
- *
- * A single ioctl with lots of subfunctions:
- *
- * Device number stuff:
- * get_whole_disk() (given the device number of a partition,
- * find the device number of the encompassing disk)
- * get_all_partitions() (given the device number of a disk, return the
- * device numbers of all its known partitions)
- *
- * Partition stuff:
- * add_partition()
- * delete_partition()
- * test_partition_in_use() (also for test_disk_in_use)
- *
- * Geometry stuff:
- * get_geometry()
- * set_geometry()
- * get_bios_drivedata()
- *
- * For today, only the partition stuff - aeb, 990515
- */
-#include <linux/compiler.h>
-#include <linux/ioctl.h>
-
-#define BLKPG _IO(0x12,105)
-
-/* The argument structure */
-struct blkpg_ioctl_arg {
- int op;
- int flags;
- int datalen;
- void __user *data;
-};
-
-/* The subfunctions (for the op field) */
-#define BLKPG_ADD_PARTITION 1
-#define BLKPG_DEL_PARTITION 2
-
-/* Sizes of name fields. Unused at present. */
-#define BLKPG_DEVNAMELTH 64
-#define BLKPG_VOLNAMELTH 64
-
-/* The data structure for ADD_PARTITION and DEL_PARTITION */
-struct blkpg_partition {
- long long start; /* starting offset in bytes */
- long long length; /* length in bytes */
- int pno; /* partition number */
- char devname[BLKPG_DEVNAMELTH]; /* partition name, like sda5 or c0d1p2,
- to be used in kernel messages */
- char volname[BLKPG_VOLNAMELTH]; /* volume label */
-};
-
-#endif /* _LINUX_BLKPG_H */
diff --git a/original/linux/blockgroup_lock.h b/original/linux/blockgroup_lock.h
deleted file mode 100644
index 8607312..0000000
--- a/original/linux/blockgroup_lock.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef _LINUX_BLOCKGROUP_LOCK_H
-#define _LINUX_BLOCKGROUP_LOCK_H
-/*
- * Per-blockgroup locking for ext2 and ext3.
- *
- * Simple hashed spinlocking.
- */
-
-#include <linux/spinlock.h>
-#include <linux/cache.h>
-
-#ifdef CONFIG_SMP
-
-/*
- * We want a power-of-two. Is there a better way than this?
- */
-
-#if NR_CPUS >= 32
-#define NR_BG_LOCKS 128
-#elif NR_CPUS >= 16
-#define NR_BG_LOCKS 64
-#elif NR_CPUS >= 8
-#define NR_BG_LOCKS 32
-#elif NR_CPUS >= 4
-#define NR_BG_LOCKS 16
-#elif NR_CPUS >= 2
-#define NR_BG_LOCKS 8
-#else
-#define NR_BG_LOCKS 4
-#endif
-
-#else /* CONFIG_SMP */
-#define NR_BG_LOCKS 1
-#endif /* CONFIG_SMP */
-
-struct bgl_lock {
- spinlock_t lock;
-} ____cacheline_aligned_in_smp;
-
-struct blockgroup_lock {
- struct bgl_lock locks[NR_BG_LOCKS];
-};
-
-static inline void bgl_lock_init(struct blockgroup_lock *bgl)
-{
- int i;
-
- for (i = 0; i < NR_BG_LOCKS; i++)
- spin_lock_init(&bgl->locks[i].lock);
-}
-
-/*
- * The accessor is a macro so we can embed a blockgroup_lock into different
- * superblock types
- */
-#define sb_bgl_lock(sb, block_group) \
- (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock)
-
-#endif
diff --git a/original/linux/bmp085.h b/original/linux/bmp085.h
deleted file mode 100755
index 6bbe91c..0000000
--- a/original/linux/bmp085.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2010 Motorola, Inc.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-#ifndef __BMP085_H__
-#define __BMP085_H__
-
-#include <linux/ioctl.h> /* For IOCTL macros */
-
-#define BMP085_NAME "bmp085"
-
-#define BMP085_IOCTL_BASE 78
-/** The following define the IOCTL command values via the ioctl macros */
-#define BMP085_IOCTL_SET_DELAY _IOW(BMP085_IOCTL_BASE, 0, int)
-#define BMP085_IOCTL_GET_DELAY _IOR(BMP085_IOCTL_BASE, 1, int)
-#define BMP085_IOCTL_SET_ENABLE _IOW(BMP085_IOCTL_BASE, 2, int)
-#define BMP085_IOCTL_GET_ENABLE _IOR(BMP085_IOCTL_BASE, 3, int)
-#define BMP085_IOCTL_ACCURACY _IOW(BMP085_IOCTL_BASE, 4, int)
-
-#ifdef __KERNEL__
-struct bmp085_platform_data {
- int poll_interval;
- int min_interval;
-
- int (*init)(void);
- void (*exit)(void);
- int (*power_on)(void);
- int (*power_off)(void);
-
-};
-#endif /* __KERNEL__ */
-
-#endif /* __BMP085_H__ */
-
diff --git a/original/linux/byteorder/big_endian.h b/original/linux/byteorder/big_endian.h
deleted file mode 100644
index bef8789..0000000
--- a/original/linux/byteorder/big_endian.h
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H
-#define _LINUX_BYTEORDER_BIG_ENDIAN_H
-
-#ifndef __BIG_ENDIAN
-#define __BIG_ENDIAN 4321
-#endif
-#ifndef __BIG_ENDIAN_BITFIELD
-#define __BIG_ENDIAN_BITFIELD
-#endif
-
-#include <linux/types.h>
-#include <linux/byteorder/swab.h>
-
-#define __constant_htonl(x) ((__force __be32)(__u32)(x))
-#define __constant_ntohl(x) ((__force __u32)(__be32)(x))
-#define __constant_htons(x) ((__force __be16)(__u16)(x))
-#define __constant_ntohs(x) ((__force __u16)(__be16)(x))
-#define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x)))
-#define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x))
-#define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x)))
-#define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x))
-#define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x)))
-#define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x))
-#define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x))
-#define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x))
-#define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x))
-#define __constant_be32_to_cpu(x) ((__force __u32)(__be32)(x))
-#define __constant_cpu_to_be16(x) ((__force __be16)(__u16)(x))
-#define __constant_be16_to_cpu(x) ((__force __u16)(__be16)(x))
-#define __cpu_to_le64(x) ((__force __le64)__swab64((x)))
-#define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x))
-#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
-#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
-#define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
-#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
-#define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
-#define __be64_to_cpu(x) ((__force __u64)(__be64)(x))
-#define __cpu_to_be32(x) ((__force __be32)(__u32)(x))
-#define __be32_to_cpu(x) ((__force __u32)(__be32)(x))
-#define __cpu_to_be16(x) ((__force __be16)(__u16)(x))
-#define __be16_to_cpu(x) ((__force __u16)(__be16)(x))
-
-static inline __le64 __cpu_to_le64p(const __u64 *p)
-{
- return (__force __le64)__swab64p(p);
-}
-static inline __u64 __le64_to_cpup(const __le64 *p)
-{
- return __swab64p((__u64 *)p);
-}
-static inline __le32 __cpu_to_le32p(const __u32 *p)
-{
- return (__force __le32)__swab32p(p);
-}
-static inline __u32 __le32_to_cpup(const __le32 *p)
-{
- return __swab32p((__u32 *)p);
-}
-static inline __le16 __cpu_to_le16p(const __u16 *p)
-{
- return (__force __le16)__swab16p(p);
-}
-static inline __u16 __le16_to_cpup(const __le16 *p)
-{
- return __swab16p((__u16 *)p);
-}
-static inline __be64 __cpu_to_be64p(const __u64 *p)
-{
- return (__force __be64)*p;
-}
-static inline __u64 __be64_to_cpup(const __be64 *p)
-{
- return (__force __u64)*p;
-}
-static inline __be32 __cpu_to_be32p(const __u32 *p)
-{
- return (__force __be32)*p;
-}
-static inline __u32 __be32_to_cpup(const __be32 *p)
-{
- return (__force __u32)*p;
-}
-static inline __be16 __cpu_to_be16p(const __u16 *p)
-{
- return (__force __be16)*p;
-}
-static inline __u16 __be16_to_cpup(const __be16 *p)
-{
- return (__force __u16)*p;
-}
-#define __cpu_to_le64s(x) __swab64s((x))
-#define __le64_to_cpus(x) __swab64s((x))
-#define __cpu_to_le32s(x) __swab32s((x))
-#define __le32_to_cpus(x) __swab32s((x))
-#define __cpu_to_le16s(x) __swab16s((x))
-#define __le16_to_cpus(x) __swab16s((x))
-#define __cpu_to_be64s(x) do {} while (0)
-#define __be64_to_cpus(x) do {} while (0)
-#define __cpu_to_be32s(x) do {} while (0)
-#define __be32_to_cpus(x) do {} while (0)
-#define __cpu_to_be16s(x) do {} while (0)
-#define __be16_to_cpus(x) do {} while (0)
-
-#include <linux/byteorder/generic.h>
-
-#endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */
diff --git a/original/linux/byteorder/generic.h b/original/linux/byteorder/generic.h
deleted file mode 100644
index e86e4a9..0000000
--- a/original/linux/byteorder/generic.h
+++ /dev/null
@@ -1,176 +0,0 @@
-#ifndef _LINUX_BYTEORDER_GENERIC_H
-#define _LINUX_BYTEORDER_GENERIC_H
-
-/*
- * linux/byteorder_generic.h
- * Generic Byte-reordering support
- *
- * The "... p" macros, like le64_to_cpup, can be used with pointers
- * to unaligned data, but there will be a performance penalty on
- * some architectures. Use get_unaligned for unaligned data.
- *
- * Francois-Rene Rideau <fare@tunes.org> 19970707
- * gathered all the good ideas from all asm-foo/byteorder.h into one file,
- * cleaned them up.
- * I hope it is compliant with non-GCC compilers.
- * I decided to put __BYTEORDER_HAS_U64__ in byteorder.h,
- * because I wasn't sure it would be ok to put it in types.h
- * Upgraded it to 2.1.43
- * Francois-Rene Rideau <fare@tunes.org> 19971012
- * Upgraded it to 2.1.57
- * to please Linus T., replaced huge #ifdef's between little/big endian
- * by nestedly #include'd files.
- * Francois-Rene Rideau <fare@tunes.org> 19971205
- * Made it to 2.1.71; now a facelift:
- * Put files under include/linux/byteorder/
- * Split swab from generic support.
- *
- * TODO:
- * = Regular kernel maintainers could also replace all these manual
- * byteswap macros that remain, disseminated among drivers,
- * after some grep or the sources...
- * = Linus might want to rename all these macros and files to fit his taste,
- * to fit his personal naming scheme.
- * = it seems that a few drivers would also appreciate
- * nybble swapping support...
- * = every architecture could add their byteswap macro in asm/byteorder.h
- * see how some architectures already do (i386, alpha, ppc, etc)
- * = cpu_to_beXX and beXX_to_cpu might some day need to be well
- * distinguished throughout the kernel. This is not the case currently,
- * since little endian, big endian, and pdp endian machines needn't it.
- * But this might be the case for, say, a port of Linux to 20/21 bit
- * architectures (and F21 Linux addict around?).
- */
-
-/*
- * The following macros are to be defined by <asm/byteorder.h>:
- *
- * Conversion of long and short int between network and host format
- * ntohl(__u32 x)
- * ntohs(__u16 x)
- * htonl(__u32 x)
- * htons(__u16 x)
- * It seems that some programs (which? where? or perhaps a standard? POSIX?)
- * might like the above to be functions, not macros (why?).
- * if that's true, then detect them, and take measures.
- * Anyway, the measure is: define only ___ntohl as a macro instead,
- * and in a separate file, have
- * unsigned long inline ntohl(x){return ___ntohl(x);}
- *
- * The same for constant arguments
- * __constant_ntohl(__u32 x)
- * __constant_ntohs(__u16 x)
- * __constant_htonl(__u32 x)
- * __constant_htons(__u16 x)
- *
- * Conversion of XX-bit integers (16- 32- or 64-)
- * between native CPU format and little/big endian format
- * 64-bit stuff only defined for proper architectures
- * cpu_to_[bl]eXX(__uXX x)
- * [bl]eXX_to_cpu(__uXX x)
- *
- * The same, but takes a pointer to the value to convert
- * cpu_to_[bl]eXXp(__uXX x)
- * [bl]eXX_to_cpup(__uXX x)
- *
- * The same, but change in situ
- * cpu_to_[bl]eXXs(__uXX x)
- * [bl]eXX_to_cpus(__uXX x)
- *
- * See asm-foo/byteorder.h for examples of how to provide
- * architecture-optimized versions
- *
- */
-
-
-#if defined(__KERNEL__)
-/*
- * inside the kernel, we can use nicknames;
- * outside of it, we must avoid POSIX namespace pollution...
- */
-#define cpu_to_le64 __cpu_to_le64
-#define le64_to_cpu __le64_to_cpu
-#define cpu_to_le32 __cpu_to_le32
-#define le32_to_cpu __le32_to_cpu
-#define cpu_to_le16 __cpu_to_le16
-#define le16_to_cpu __le16_to_cpu
-#define cpu_to_be64 __cpu_to_be64
-#define be64_to_cpu __be64_to_cpu
-#define cpu_to_be32 __cpu_to_be32
-#define be32_to_cpu __be32_to_cpu
-#define cpu_to_be16 __cpu_to_be16
-#define be16_to_cpu __be16_to_cpu
-#define cpu_to_le64p __cpu_to_le64p
-#define le64_to_cpup __le64_to_cpup
-#define cpu_to_le32p __cpu_to_le32p
-#define le32_to_cpup __le32_to_cpup
-#define cpu_to_le16p __cpu_to_le16p
-#define le16_to_cpup __le16_to_cpup
-#define cpu_to_be64p __cpu_to_be64p
-#define be64_to_cpup __be64_to_cpup
-#define cpu_to_be32p __cpu_to_be32p
-#define be32_to_cpup __be32_to_cpup
-#define cpu_to_be16p __cpu_to_be16p
-#define be16_to_cpup __be16_to_cpup
-#define cpu_to_le64s __cpu_to_le64s
-#define le64_to_cpus __le64_to_cpus
-#define cpu_to_le32s __cpu_to_le32s
-#define le32_to_cpus __le32_to_cpus
-#define cpu_to_le16s __cpu_to_le16s
-#define le16_to_cpus __le16_to_cpus
-#define cpu_to_be64s __cpu_to_be64s
-#define be64_to_cpus __be64_to_cpus
-#define cpu_to_be32s __cpu_to_be32s
-#define be32_to_cpus __be32_to_cpus
-#define cpu_to_be16s __cpu_to_be16s
-#define be16_to_cpus __be16_to_cpus
-#endif
-
-
-#if defined(__KERNEL__)
-/*
- * Handle ntohl and suches. These have various compatibility
- * issues - like we want to give the prototype even though we
- * also have a macro for them in case some strange program
- * wants to take the address of the thing or something..
- *
- * Note that these used to return a "long" in libc5, even though
- * long is often 64-bit these days.. Thus the casts.
- *
- * They have to be macros in order to do the constant folding
- * correctly - if the argument passed into a inline function
- * it is no longer constant according to gcc..
- */
-
-#undef ntohl
-#undef ntohs
-#undef htonl
-#undef htons
-
-/*
- * Do the prototypes. Somebody might want to take the
- * address or some such sick thing..
- */
-extern __u32 ntohl(__be32);
-extern __be32 htonl(__u32);
-extern __u16 ntohs(__be16);
-extern __be16 htons(__u16);
-
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
-
-#define ___htonl(x) __cpu_to_be32(x)
-#define ___htons(x) __cpu_to_be16(x)
-#define ___ntohl(x) __be32_to_cpu(x)
-#define ___ntohs(x) __be16_to_cpu(x)
-
-#define htonl(x) ___htonl(x)
-#define ntohl(x) ___ntohl(x)
-#define htons(x) ___htons(x)
-#define ntohs(x) ___ntohs(x)
-
-#endif /* OPTIMIZE */
-
-#endif /* KERNEL */
-
-
-#endif /* _LINUX_BYTEORDER_GENERIC_H */
diff --git a/original/linux/byteorder/little_endian.h b/original/linux/byteorder/little_endian.h
deleted file mode 100644
index 86e62b7..0000000
--- a/original/linux/byteorder/little_endian.h
+++ /dev/null
@@ -1,106 +0,0 @@
-#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H
-#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
-
-#ifndef __LITTLE_ENDIAN
-#define __LITTLE_ENDIAN 1234
-#endif
-#ifndef __LITTLE_ENDIAN_BITFIELD
-#define __LITTLE_ENDIAN_BITFIELD
-#endif
-
-#include <linux/types.h>
-#include <linux/byteorder/swab.h>
-
-#define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
-#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
-#define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
-#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
-#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
-#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
-#define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
-#define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
-#define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
-#define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
-#define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
-#define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
-#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
-#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
-#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
-#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
-#define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
-#define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
-#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
-#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
-#define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
-#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
-#define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
-#define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
-#define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
-#define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
-#define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
-#define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
-
-static inline __le64 __cpu_to_le64p(const __u64 *p)
-{
- return (__force __le64)*p;
-}
-static inline __u64 __le64_to_cpup(const __le64 *p)
-{
- return (__force __u64)*p;
-}
-static inline __le32 __cpu_to_le32p(const __u32 *p)
-{
- return (__force __le32)*p;
-}
-static inline __u32 __le32_to_cpup(const __le32 *p)
-{
- return (__force __u32)*p;
-}
-static inline __le16 __cpu_to_le16p(const __u16 *p)
-{
- return (__force __le16)*p;
-}
-static inline __u16 __le16_to_cpup(const __le16 *p)
-{
- return (__force __u16)*p;
-}
-static inline __be64 __cpu_to_be64p(const __u64 *p)
-{
- return (__force __be64)__swab64p(p);
-}
-static inline __u64 __be64_to_cpup(const __be64 *p)
-{
- return __swab64p((__u64 *)p);
-}
-static inline __be32 __cpu_to_be32p(const __u32 *p)
-{
- return (__force __be32)__swab32p(p);
-}
-static inline __u32 __be32_to_cpup(const __be32 *p)
-{
- return __swab32p((__u32 *)p);
-}
-static inline __be16 __cpu_to_be16p(const __u16 *p)
-{
- return (__force __be16)__swab16p(p);
-}
-static inline __u16 __be16_to_cpup(const __be16 *p)
-{
- return __swab16p((__u16 *)p);
-}
-#define __cpu_to_le64s(x) do {} while (0)
-#define __le64_to_cpus(x) do {} while (0)
-#define __cpu_to_le32s(x) do {} while (0)
-#define __le32_to_cpus(x) do {} while (0)
-#define __cpu_to_le16s(x) do {} while (0)
-#define __le16_to_cpus(x) do {} while (0)
-#define __cpu_to_be64s(x) __swab64s((x))
-#define __be64_to_cpus(x) __swab64s((x))
-#define __cpu_to_be32s(x) __swab32s((x))
-#define __be32_to_cpus(x) __swab32s((x))
-#define __cpu_to_be16s(x) __swab16s((x))
-#define __be16_to_cpus(x) __swab16s((x))
-
-#include <linux/byteorder/generic.h>
-
-#endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */
diff --git a/original/linux/byteorder/swab.h b/original/linux/byteorder/swab.h
deleted file mode 100644
index 25f7f32..0000000
--- a/original/linux/byteorder/swab.h
+++ /dev/null
@@ -1,192 +0,0 @@
-#ifndef _LINUX_BYTEORDER_SWAB_H
-#define _LINUX_BYTEORDER_SWAB_H
-
-/*
- * linux/byteorder/swab.h
- * Byte-swapping, independently from CPU endianness
- * swabXX[ps]?(foo)
- *
- * Francois-Rene Rideau <fare@tunes.org> 19971205
- * separated swab functions from cpu_to_XX,
- * to clean up support for bizarre-endian architectures.
- *
- * See asm-i386/byteorder.h and suches for examples of how to provide
- * architecture-dependent optimized versions
- *
- */
-
-#include <linux/compiler.h>
-
-/* casts are necessary for constants, because we never know how for sure
- * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
- */
-#define ___swab16(x) \
-({ \
- __u16 __x = (x); \
- ((__u16)( \
- (((__u16)(__x) & (__u16)0x00ffU) << 8) | \
- (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \
-})
-
-#define ___swab32(x) \
-({ \
- __u32 __x = (x); \
- ((__u32)( \
- (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \
- (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | \
- (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | \
- (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \
-})
-
-#define ___swab64(x) \
-({ \
- __u64 __x = (x); \
- ((__u64)( \
- (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \
- (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \
- (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \
- (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | \
- (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | \
- (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
- (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \
- (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \
-})
-
-#define ___constant_swab16(x) \
- ((__u16)( \
- (((__u16)(x) & (__u16)0x00ffU) << 8) | \
- (((__u16)(x) & (__u16)0xff00U) >> 8) ))
-#define ___constant_swab32(x) \
- ((__u32)( \
- (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
- (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
- (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
- (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
-#define ___constant_swab64(x) \
- ((__u64)( \
- (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
- (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
- (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
- (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
- (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
- (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
- (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
- (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
-
-/*
- * provide defaults when no architecture-specific optimization is detected
- */
-#ifndef __arch__swab16
-# define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); })
-#endif
-#ifndef __arch__swab32
-# define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); })
-#endif
-#ifndef __arch__swab64
-# define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); })
-#endif
-
-#ifndef __arch__swab16p
-# define __arch__swab16p(x) __arch__swab16(*(x))
-#endif
-#ifndef __arch__swab32p
-# define __arch__swab32p(x) __arch__swab32(*(x))
-#endif
-#ifndef __arch__swab64p
-# define __arch__swab64p(x) __arch__swab64(*(x))
-#endif
-
-#ifndef __arch__swab16s
-# define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0)
-#endif
-#ifndef __arch__swab32s
-# define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0)
-#endif
-#ifndef __arch__swab64s
-# define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0)
-#endif
-
-
-/*
- * Allow constant folding
- */
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
-# define __swab16(x) \
-(__builtin_constant_p((__u16)(x)) ? \
- ___swab16((x)) : \
- __fswab16((x)))
-# define __swab32(x) \
-(__builtin_constant_p((__u32)(x)) ? \
- ___swab32((x)) : \
- __fswab32((x)))
-# define __swab64(x) \
-(__builtin_constant_p((__u64)(x)) ? \
- ___swab64((x)) : \
- __fswab64((x)))
-#else
-# define __swab16(x) __fswab16(x)
-# define __swab32(x) __fswab32(x)
-# define __swab64(x) __fswab64(x)
-#endif /* OPTIMIZE */
-
-
-static __inline__ __attribute_const__ __u16 __fswab16(__u16 x)
-{
- return __arch__swab16(x);
-}
-static __inline__ __u16 __swab16p(const __u16 *x)
-{
- return __arch__swab16p(x);
-}
-static __inline__ void __swab16s(__u16 *addr)
-{
- __arch__swab16s(addr);
-}
-
-static __inline__ __attribute_const__ __u32 __fswab32(__u32 x)
-{
- return __arch__swab32(x);
-}
-static __inline__ __u32 __swab32p(const __u32 *x)
-{
- return __arch__swab32p(x);
-}
-static __inline__ void __swab32s(__u32 *addr)
-{
- __arch__swab32s(addr);
-}
-
-#ifdef __BYTEORDER_HAS_U64__
-static __inline__ __attribute_const__ __u64 __fswab64(__u64 x)
-{
-# ifdef __SWAB_64_THRU_32__
- __u32 h = x >> 32;
- __u32 l = x & ((1ULL<<32)-1);
- return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h)));
-# else
- return __arch__swab64(x);
-# endif
-}
-static __inline__ __u64 __swab64p(const __u64 *x)
-{
- return __arch__swab64p(x);
-}
-static __inline__ void __swab64s(__u64 *addr)
-{
- __arch__swab64s(addr);
-}
-#endif /* __BYTEORDER_HAS_U64__ */
-
-#if defined(__KERNEL__)
-#define swab16 __swab16
-#define swab32 __swab32
-#define swab64 __swab64
-#define swab16p __swab16p
-#define swab32p __swab32p
-#define swab64p __swab64p
-#define swab16s __swab16s
-#define swab32s __swab32s
-#define swab64s __swab64s
-#endif
-
-#endif /* _LINUX_BYTEORDER_SWAB_H */
diff --git a/original/linux/byteorder/swabb.h b/original/linux/byteorder/swabb.h
deleted file mode 100644
index ae5e5f9..0000000
--- a/original/linux/byteorder/swabb.h
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef _LINUX_BYTEORDER_SWABB_H
-#define _LINUX_BYTEORDER_SWABB_H
-
-/*
- * linux/byteorder/swabb.h
- * SWAp Bytes Bizarrely
- * swaHHXX[ps]?(foo)
- *
- * Support for obNUXIous pdp-endian and other bizarre architectures.
- * Will Linux ever run on such ancient beasts? if not, this file
- * will be but a programming pearl. Still, it's a reminder that we
- * shouldn't be making too many assumptions when trying to be portable.
- *
- */
-
-/*
- * Meaning of the names I chose (vaxlinux people feel free to correct them):
- * swahw32 swap 16-bit half-words in a 32-bit word
- * swahb32 swap 8-bit halves of each 16-bit half-word in a 32-bit word
- *
- * No 64-bit support yet. I don't know NUXI conventions for long longs.
- * I guarantee it will be a mess when it's there, though :->
- * It will be even worse if there are conflicting 64-bit conventions.
- * Hopefully, no one ever used 64-bit objects on NUXI machines.
- *
- */
-
-#define ___swahw32(x) \
-({ \
- __u32 __x = (x); \
- ((__u32)( \
- (((__u32)(__x) & (__u32)0x0000ffffUL) << 16) | \
- (((__u32)(__x) & (__u32)0xffff0000UL) >> 16) )); \
-})
-#define ___swahb32(x) \
-({ \
- __u32 __x = (x); \
- ((__u32)( \
- (((__u32)(__x) & (__u32)0x00ff00ffUL) << 8) | \
- (((__u32)(__x) & (__u32)0xff00ff00UL) >> 8) )); \
-})
-
-#define ___constant_swahw32(x) \
- ((__u32)( \
- (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \
- (((__u32)(x) & (__u32)0xffff0000UL) >> 16) ))
-#define ___constant_swahb32(x) \
- ((__u32)( \
- (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \
- (((__u32)(x) & (__u32)0xff00ff00UL) >> 8) ))
-
-/*
- * provide defaults when no architecture-specific optimization is detected
- */
-#ifndef __arch__swahw32
-# define __arch__swahw32(x) ___swahw32(x)
-#endif
-#ifndef __arch__swahb32
-# define __arch__swahb32(x) ___swahb32(x)
-#endif
-
-#ifndef __arch__swahw32p
-# define __arch__swahw32p(x) __swahw32(*(x))
-#endif
-#ifndef __arch__swahb32p
-# define __arch__swahb32p(x) __swahb32(*(x))
-#endif
-
-#ifndef __arch__swahw32s
-# define __arch__swahw32s(x) do { *(x) = __swahw32p((x)); } while (0)
-#endif
-#ifndef __arch__swahb32s
-# define __arch__swahb32s(x) do { *(x) = __swahb32p((x)); } while (0)
-#endif
-
-
-/*
- * Allow constant folding
- */
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
-# define __swahw32(x) \
-(__builtin_constant_p((__u32)(x)) ? \
- ___swahw32((x)) : \
- __fswahw32((x)))
-# define __swahb32(x) \
-(__builtin_constant_p((__u32)(x)) ? \
- ___swahb32((x)) : \
- __fswahb32((x)))
-#else
-# define __swahw32(x) __fswahw32(x)
-# define __swahb32(x) __fswahb32(x)
-#endif /* OPTIMIZE */
-
-
-static inline __u32 __fswahw32(__u32 x)
-{
- return __arch__swahw32(x);
-}
-
-static inline __u32 __swahw32p(__u32 *x)
-{
- return __arch__swahw32p(x);
-}
-
-static inline void __swahw32s(__u32 *addr)
-{
- __arch__swahw32s(addr);
-}
-
-static inline __u32 __fswahb32(__u32 x)
-{
- return __arch__swahb32(x);
-}
-
-static inline __u32 __swahb32p(__u32 *x)
-{
- return __arch__swahb32p(x);
-}
-
-static inline void __swahb32s(__u32 *addr)
-{
- __arch__swahb32s(addr);
-}
-
-#ifdef __BYTEORDER_HAS_U64__
-/*
- * Not supported yet
- */
-#endif /* __BYTEORDER_HAS_U64__ */
-
-#if defined(__KERNEL__)
-#define swahw32 __swahw32
-#define swahb32 __swahb32
-#define swahw32p __swahw32p
-#define swahb32p __swahb32p
-#define swahw32s __swahw32s
-#define swahb32s __swahb32s
-#endif
-
-#endif /* _LINUX_BYTEORDER_SWABB_H */
diff --git a/original/linux/cache.h b/original/linux/cache.h
deleted file mode 100644
index 4552504..0000000
--- a/original/linux/cache.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef __LINUX_CACHE_H
-#define __LINUX_CACHE_H
-
-#include <linux/kernel.h>
-#include <asm/cache.h>
-
-#ifndef L1_CACHE_ALIGN
-#define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
-#endif
-
-#ifndef SMP_CACHE_BYTES
-#define SMP_CACHE_BYTES L1_CACHE_BYTES
-#endif
-
-#ifndef __read_mostly
-#define __read_mostly
-#endif
-
-#ifndef ____cacheline_aligned
-#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
-#endif
-
-#ifndef ____cacheline_aligned_in_smp
-#ifdef CONFIG_SMP
-#define ____cacheline_aligned_in_smp ____cacheline_aligned
-#else
-#define ____cacheline_aligned_in_smp
-#endif /* CONFIG_SMP */
-#endif
-
-#ifndef __cacheline_aligned
-#define __cacheline_aligned \
- __attribute__((__aligned__(SMP_CACHE_BYTES), \
- __section__(".data.cacheline_aligned")))
-#endif /* __cacheline_aligned */
-
-#ifndef __cacheline_aligned_in_smp
-#ifdef CONFIG_SMP
-#define __cacheline_aligned_in_smp __cacheline_aligned
-#else
-#define __cacheline_aligned_in_smp
-#endif /* CONFIG_SMP */
-#endif
-
-/*
- * The maximum alignment needed for some critical structures
- * These could be inter-node cacheline sizes/L3 cacheline
- * size etc. Define this in asm/cache.h for your arch
- */
-#ifndef INTERNODE_CACHE_SHIFT
-#define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT
-#endif
-
-#if !defined(____cacheline_internodealigned_in_smp)
-#if defined(CONFIG_SMP)
-#define ____cacheline_internodealigned_in_smp \
- __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT))))
-#else
-#define ____cacheline_internodealigned_in_smp
-#endif
-#endif
-
-#endif /* __LINUX_CACHE_H */
diff --git a/original/linux/calc64.h b/original/linux/calc64.h
deleted file mode 100644
index ebf4b8f..0000000
--- a/original/linux/calc64.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef _LINUX_CALC64_H
-#define _LINUX_CALC64_H
-
-#include <linux/types.h>
-#include <asm/div64.h>
-
-/*
- * This is a generic macro which is used when the architecture
- * specific div64.h does not provide a optimized one.
- *
- * The 64bit dividend is divided by the divisor (data type long), the
- * result is returned and the remainder stored in the variable
- * referenced by remainder (data type long *). In contrast to the
- * do_div macro the dividend is kept intact.
- */
-#ifndef div_long_long_rem
-#define div_long_long_rem(dividend, divisor, remainder) \
- do_div_llr((dividend), divisor, remainder)
-
-static inline unsigned long do_div_llr(const long long dividend,
- const long divisor, long *remainder)
-{
- u64 result = dividend;
-
- *(remainder) = do_div(result, divisor);
- return (unsigned long) result;
-}
-#endif
-
-/*
- * Sign aware variation of the above. On some architectures a
- * negative dividend leads to an divide overflow exception, which
- * is avoided by the sign check.
- */
-static inline long div_long_long_rem_signed(const long long dividend,
- const long divisor, long *remainder)
-{
- long res;
-
- if (unlikely(dividend < 0)) {
- res = -div_long_long_rem(-dividend, divisor, remainder);
- *remainder = -(*remainder);
- } else
- res = div_long_long_rem(dividend, divisor, remainder);
-
- return res;
-}
-
-#endif
diff --git a/original/linux/can.h b/original/linux/can.h
deleted file mode 100644
index 9a19bcb..0000000
--- a/original/linux/can.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * linux/can.h
- *
- * Definitions for CAN network layer (socket addr / CAN frame / CAN filter)
- *
- * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
- * Urs Thuermann <urs.thuermann@volkswagen.de>
- * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
- * All rights reserved.
- *
- */
-
-#ifndef CAN_H
-#define CAN_H
-
-#include <linux/types.h>
-#include <linux/socket.h>
-
-/* controller area network (CAN) kernel definitions */
-
-/* special address description flags for the CAN_ID */
-#define CAN_EFF_FLAG 0x80000000U /* EFF/SFF is set in the MSB */
-#define CAN_RTR_FLAG 0x40000000U /* remote transmission request */
-#define CAN_ERR_FLAG 0x20000000U /* error frame */
-
-/* valid bits in CAN ID for frame formats */
-#define CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */
-#define CAN_EFF_MASK 0x1FFFFFFFU /* extended frame format (EFF) */
-#define CAN_ERR_MASK 0x1FFFFFFFU /* omit EFF, RTR, ERR flags */
-
-/*
- * Controller Area Network Identifier structure
- *
- * bit 0-28 : CAN identifier (11/29 bit)
- * bit 29 : error frame flag (0 = data frame, 1 = error frame)
- * bit 30 : remote transmission request flag (1 = rtr frame)
- * bit 31 : frame format flag (0 = standard 11 bit, 1 = extended 29 bit)
- */
-typedef __u32 canid_t;
-
-/*
- * Controller Area Network Error Frame Mask structure
- *
- * bit 0-28 : error class mask (see include/linux/can/error.h)
- * bit 29-31 : set to zero
- */
-typedef __u32 can_err_mask_t;
-
-/**
- * struct can_frame - basic CAN frame structure
- * @can_id: the CAN ID of the frame and CAN_*_FLAG flags, see above.
- * @can_dlc: the data length field of the CAN frame
- * @data: the CAN frame payload.
- */
-struct can_frame {
- canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
- __u8 can_dlc; /* data length code: 0 .. 8 */
- __u8 data[8] __attribute__((aligned(8)));
-};
-
-/* particular protocols of the protocol family PF_CAN */
-#define CAN_RAW 1 /* RAW sockets */
-#define CAN_BCM 2 /* Broadcast Manager */
-#define CAN_TP16 3 /* VAG Transport Protocol v1.6 */
-#define CAN_TP20 4 /* VAG Transport Protocol v2.0 */
-#define CAN_MCNET 5 /* Bosch MCNet */
-#define CAN_ISOTP 6 /* ISO 15765-2 Transport Protocol */
-#define CAN_NPROTO 7
-
-#define SOL_CAN_BASE 100
-
-/**
- * struct sockaddr_can - the sockaddr structure for CAN sockets
- * @can_family: address family number AF_CAN.
- * @can_ifindex: CAN network interface index.
- * @can_addr: protocol specific address information
- */
-struct sockaddr_can {
- __kernel_sa_family_t can_family;
- int can_ifindex;
- union {
- /* transport protocol class address information (e.g. ISOTP) */
- struct { canid_t rx_id, tx_id; } tp;
-
- /* reserved for future CAN protocols address information */
- } can_addr;
-};
-
-/**
- * struct can_filter - CAN ID based filter in can_register().
- * @can_id: relevant bits of CAN ID which are not masked out.
- * @can_mask: CAN mask (see description)
- *
- * Description:
- * A filter matches, when
- *
- * <received_can_id> & mask == can_id & mask
- *
- * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can
- * filter for error frames (CAN_ERR_FLAG bit set in mask).
- */
-struct can_filter {
- canid_t can_id;
- canid_t can_mask;
-};
-
-#define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
-
-#endif /* CAN_H */
diff --git a/original/linux/can/bcm.h b/original/linux/can/bcm.h
deleted file mode 100644
index 3ebe387..0000000
--- a/original/linux/can/bcm.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * linux/can/bcm.h
- *
- * Definitions for CAN Broadcast Manager (BCM)
- *
- * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
- * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
- * All rights reserved.
- *
- */
-
-#ifndef CAN_BCM_H
-#define CAN_BCM_H
-
-#include <linux/types.h>
-#include <linux/can.h>
-
-/**
- * struct bcm_msg_head - head of messages to/from the broadcast manager
- * @opcode: opcode, see enum below.
- * @flags: special flags, see below.
- * @count: number of frames to send before changing interval.
- * @ival1: interval for the first @count frames.
- * @ival2: interval for the following frames.
- * @can_id: CAN ID of frames to be sent or received.
- * @nframes: number of frames appended to the message head.
- * @frames: array of CAN frames.
- */
-struct bcm_msg_head {
- __u32 opcode;
- __u32 flags;
- __u32 count;
- struct timeval ival1, ival2;
- canid_t can_id;
- __u32 nframes;
- struct can_frame frames[0];
-};
-
-enum {
- TX_SETUP = 1, /* create (cyclic) transmission task */
- TX_DELETE, /* remove (cyclic) transmission task */
- TX_READ, /* read properties of (cyclic) transmission task */
- TX_SEND, /* send one CAN frame */
- RX_SETUP, /* create RX content filter subscription */
- RX_DELETE, /* remove RX content filter subscription */
- RX_READ, /* read properties of RX content filter subscription */
- TX_STATUS, /* reply to TX_READ request */
- TX_EXPIRED, /* notification on performed transmissions (count=0) */
- RX_STATUS, /* reply to RX_READ request */
- RX_TIMEOUT, /* cyclic message is absent */
- RX_CHANGED /* updated CAN frame (detected content change) */
-};
-
-#define SETTIMER 0x0001
-#define STARTTIMER 0x0002
-#define TX_COUNTEVT 0x0004
-#define TX_ANNOUNCE 0x0008
-#define TX_CP_CAN_ID 0x0010
-#define RX_FILTER_ID 0x0020
-#define RX_CHECK_DLC 0x0040
-#define RX_NO_AUTOTIMER 0x0080
-#define RX_ANNOUNCE_RESUME 0x0100
-#define TX_RESET_MULTI_IDX 0x0200
-#define RX_RTR_FRAME 0x0400
-
-#endif /* CAN_BCM_H */
diff --git a/original/linux/can/error.h b/original/linux/can/error.h
deleted file mode 100644
index 63e855e..0000000
--- a/original/linux/can/error.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * linux/can/error.h
- *
- * Definitions of the CAN error frame to be filtered and passed to the user.
- *
- * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
- * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
- * All rights reserved.
- *
- */
-
-#ifndef CAN_ERROR_H
-#define CAN_ERROR_H
-
-#define CAN_ERR_DLC 8 /* dlc for error frames */
-
-/* error class (mask) in can_id */
-#define CAN_ERR_TX_TIMEOUT 0x00000001U /* TX timeout (by netdevice driver) */
-#define CAN_ERR_LOSTARB 0x00000002U /* lost arbitration / data[0] */
-#define CAN_ERR_CRTL 0x00000004U /* controller problems / data[1] */
-#define CAN_ERR_PROT 0x00000008U /* protocol violations / data[2..3] */
-#define CAN_ERR_TRX 0x00000010U /* transceiver status / data[4] */
-#define CAN_ERR_ACK 0x00000020U /* received no ACK on transmission */
-#define CAN_ERR_BUSOFF 0x00000040U /* bus off */
-#define CAN_ERR_BUSERROR 0x00000080U /* bus error (may flood!) */
-#define CAN_ERR_RESTARTED 0x00000100U /* controller restarted */
-
-/* arbitration lost in bit ... / data[0] */
-#define CAN_ERR_LOSTARB_UNSPEC 0x00 /* unspecified */
- /* else bit number in bitstream */
-
-/* error status of CAN-controller / data[1] */
-#define CAN_ERR_CRTL_UNSPEC 0x00 /* unspecified */
-#define CAN_ERR_CRTL_RX_OVERFLOW 0x01 /* RX buffer overflow */
-#define CAN_ERR_CRTL_TX_OVERFLOW 0x02 /* TX buffer overflow */
-#define CAN_ERR_CRTL_RX_WARNING 0x04 /* reached warning level for RX errors */
-#define CAN_ERR_CRTL_TX_WARNING 0x08 /* reached warning level for TX errors */
-#define CAN_ERR_CRTL_RX_PASSIVE 0x10 /* reached error passive status RX */
-#define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */
- /* (at least one error counter exceeds */
- /* the protocol-defined level of 127) */
-
-/* error in CAN protocol (type) / data[2] */
-#define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */
-#define CAN_ERR_PROT_BIT 0x01 /* single bit error */
-#define CAN_ERR_PROT_FORM 0x02 /* frame format error */
-#define CAN_ERR_PROT_STUFF 0x04 /* bit stuffing error */
-#define CAN_ERR_PROT_BIT0 0x08 /* unable to send dominant bit */
-#define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */
-#define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */
-#define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */
-#define CAN_ERR_PROT_TX 0x80 /* error occurred on transmission */
-
-/* error in CAN protocol (location) / data[3] */
-#define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */
-#define CAN_ERR_PROT_LOC_SOF 0x03 /* start of frame */
-#define CAN_ERR_PROT_LOC_ID28_21 0x02 /* ID bits 28 - 21 (SFF: 10 - 3) */
-#define CAN_ERR_PROT_LOC_ID20_18 0x06 /* ID bits 20 - 18 (SFF: 2 - 0 )*/
-#define CAN_ERR_PROT_LOC_SRTR 0x04 /* substitute RTR (SFF: RTR) */
-#define CAN_ERR_PROT_LOC_IDE 0x05 /* identifier extension */
-#define CAN_ERR_PROT_LOC_ID17_13 0x07 /* ID bits 17-13 */
-#define CAN_ERR_PROT_LOC_ID12_05 0x0F /* ID bits 12-5 */
-#define CAN_ERR_PROT_LOC_ID04_00 0x0E /* ID bits 4-0 */
-#define CAN_ERR_PROT_LOC_RTR 0x0C /* RTR */
-#define CAN_ERR_PROT_LOC_RES1 0x0D /* reserved bit 1 */
-#define CAN_ERR_PROT_LOC_RES0 0x09 /* reserved bit 0 */
-#define CAN_ERR_PROT_LOC_DLC 0x0B /* data length code */
-#define CAN_ERR_PROT_LOC_DATA 0x0A /* data section */
-#define CAN_ERR_PROT_LOC_CRC_SEQ 0x08 /* CRC sequence */
-#define CAN_ERR_PROT_LOC_CRC_DEL 0x18 /* CRC delimiter */
-#define CAN_ERR_PROT_LOC_ACK 0x19 /* ACK slot */
-#define CAN_ERR_PROT_LOC_ACK_DEL 0x1B /* ACK delimiter */
-#define CAN_ERR_PROT_LOC_EOF 0x1A /* end of frame */
-#define CAN_ERR_PROT_LOC_INTERM 0x12 /* intermission */
-
-/* error status of CAN-transceiver / data[4] */
-/* CANH CANL */
-#define CAN_ERR_TRX_UNSPEC 0x00 /* 0000 0000 */
-#define CAN_ERR_TRX_CANH_NO_WIRE 0x04 /* 0000 0100 */
-#define CAN_ERR_TRX_CANH_SHORT_TO_BAT 0x05 /* 0000 0101 */
-#define CAN_ERR_TRX_CANH_SHORT_TO_VCC 0x06 /* 0000 0110 */
-#define CAN_ERR_TRX_CANH_SHORT_TO_GND 0x07 /* 0000 0111 */
-#define CAN_ERR_TRX_CANL_NO_WIRE 0x40 /* 0100 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_BAT 0x50 /* 0101 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_VCC 0x60 /* 0110 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_GND 0x70 /* 0111 0000 */
-#define CAN_ERR_TRX_CANL_SHORT_TO_CANH 0x80 /* 1000 0000 */
-
-/* controller specific additional information / data[5..7] */
-
-#endif /* CAN_ERROR_H */
diff --git a/original/linux/can/gw.h b/original/linux/can/gw.h
deleted file mode 100644
index 8e1db18..0000000
--- a/original/linux/can/gw.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * linux/can/gw.h
- *
- * Definitions for CAN frame Gateway/Router/Bridge
- *
- * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
- * Copyright (c) 2011 Volkswagen Group Electronic Research
- * All rights reserved.
- *
- */
-
-#ifndef CAN_GW_H
-#define CAN_GW_H
-
-#include <linux/types.h>
-#include <linux/can.h>
-
-struct rtcanmsg {
- __u8 can_family;
- __u8 gwtype;
- __u16 flags;
-};
-
-/* CAN gateway types */
-enum {
- CGW_TYPE_UNSPEC,
- CGW_TYPE_CAN_CAN, /* CAN->CAN routing */
- __CGW_TYPE_MAX
-};
-
-#define CGW_TYPE_MAX (__CGW_TYPE_MAX - 1)
-
-/* CAN rtnetlink attribute definitions */
-enum {
- CGW_UNSPEC,
- CGW_MOD_AND, /* CAN frame modification binary AND */
- CGW_MOD_OR, /* CAN frame modification binary OR */
- CGW_MOD_XOR, /* CAN frame modification binary XOR */
- CGW_MOD_SET, /* CAN frame modification set alternate values */
- CGW_CS_XOR, /* set data[] XOR checksum into data[index] */
- CGW_CS_CRC8, /* set data[] CRC8 checksum into data[index] */
- CGW_HANDLED, /* number of handled CAN frames */
- CGW_DROPPED, /* number of dropped CAN frames */
- CGW_SRC_IF, /* ifindex of source network interface */
- CGW_DST_IF, /* ifindex of destination network interface */
- CGW_FILTER, /* specify struct can_filter on source CAN device */
- __CGW_MAX
-};
-
-#define CGW_MAX (__CGW_MAX - 1)
-
-#define CGW_FLAGS_CAN_ECHO 0x01
-#define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
-
-#define CGW_MOD_FUNCS 4 /* AND OR XOR SET */
-
-/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
-#define CGW_MOD_ID 0x01
-#define CGW_MOD_DLC 0x02
-#define CGW_MOD_DATA 0x04
-
-#define CGW_FRAME_MODS 3 /* ID DLC DATA */
-
-#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)
-
-struct cgw_frame_mod {
- struct can_frame cf;
- __u8 modtype;
-} __attribute__((packed));
-
-#define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod)
-
-struct cgw_csum_xor {
- __s8 from_idx;
- __s8 to_idx;
- __s8 result_idx;
- __u8 init_xor_val;
-} __attribute__((packed));
-
-struct cgw_csum_crc8 {
- __s8 from_idx;
- __s8 to_idx;
- __s8 result_idx;
- __u8 init_crc_val;
- __u8 final_xor_val;
- __u8 crctab[256];
- __u8 profile;
- __u8 profile_data[20];
-} __attribute__((packed));
-
-/* length of checksum operation parameters. idx = index in CAN frame data[] */
-#define CGW_CS_XOR_LEN sizeof(struct cgw_csum_xor)
-#define CGW_CS_CRC8_LEN sizeof(struct cgw_csum_crc8)
-
-/* CRC8 profiles (compute CRC for additional data elements - see below) */
-enum {
- CGW_CRC8PRF_UNSPEC,
- CGW_CRC8PRF_1U8, /* compute one additional u8 value */
- CGW_CRC8PRF_16U8, /* u8 value table indexed by data[1] & 0xF */
- CGW_CRC8PRF_SFFID_XOR, /* (can_id & 0xFF) ^ (can_id >> 8 & 0xFF) */
- __CGW_CRC8PRF_MAX
-};
-
-#define CGW_CRC8PRF_MAX (__CGW_CRC8PRF_MAX - 1)
-
-/*
- * CAN rtnetlink attribute contents in detail
- *
- * CGW_XXX_IF (length 4 bytes):
- * Sets an interface index for source/destination network interfaces.
- * For the CAN->CAN gwtype the indices of _two_ CAN interfaces are mandatory.
- *
- * CGW_FILTER (length 8 bytes):
- * Sets a CAN receive filter for the gateway job specified by the
- * struct can_filter described in include/linux/can.h
- *
- * CGW_MOD_XXX (length 17 bytes):
- * Specifies a modification that's done to a received CAN frame before it is
- * send out to the destination interface.
- *
- * <struct can_frame> data used as operator
- * <u8> affected CAN frame elements
- *
- * CGW_CS_XOR (length 4 bytes):
- * Set a simple XOR checksum starting with an initial value into
- * data[result-idx] using data[start-idx] .. data[end-idx]
- *
- * The XOR checksum is calculated like this:
- *
- * xor = init_xor_val
- *
- * for (i = from_idx .. to_idx)
- * xor ^= can_frame.data[i]
- *
- * can_frame.data[ result_idx ] = xor
- *
- * CGW_CS_CRC8 (length 282 bytes):
- * Set a CRC8 value into data[result-idx] using a given 256 byte CRC8 table,
- * a given initial value and a defined input data[start-idx] .. data[end-idx].
- * Finally the result value is XOR'ed with the final_xor_val.
- *
- * The CRC8 checksum is calculated like this:
- *
- * crc = init_crc_val
- *
- * for (i = from_idx .. to_idx)
- * crc = crctab[ crc ^ can_frame.data[i] ]
- *
- * can_frame.data[ result_idx ] = crc ^ final_xor_val
- *
- * The calculated CRC may contain additional source data elements that can be
- * defined in the handling of 'checksum profiles' e.g. shown in AUTOSAR specs
- * like http://www.autosar.org/download/R4.0/AUTOSAR_SWS_E2ELibrary.pdf
- * E.g. the profile_data[] may contain additional u8 values (called DATA_IDs)
- * that are used depending on counter values inside the CAN frame data[].
- * So far only three profiles have been implemented for illustration.
- *
- * Remark: In general the attribute data is a linear buffer.
- * Beware of sending unpacked or aligned structs!
- */
-
-#endif
diff --git a/original/linux/can/netlink.h b/original/linux/can/netlink.h
deleted file mode 100644
index 14966dd..0000000
--- a/original/linux/can/netlink.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * linux/can/netlink.h
- *
- * Definitions for the CAN netlink interface
- *
- * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
- *
- */
-
-#ifndef CAN_NETLINK_H
-#define CAN_NETLINK_H
-
-#include <linux/types.h>
-
-/*
- * CAN bit-timing parameters
- *
- * For further information, please read chapter "8 BIT TIMING
- * REQUIREMENTS" of the "Bosch CAN Specification version 2.0"
- * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf.
- */
-struct can_bittiming {
- __u32 bitrate; /* Bit-rate in bits/second */
- __u32 sample_point; /* Sample point in one-tenth of a percent */
- __u32 tq; /* Time quanta (TQ) in nanoseconds */
- __u32 prop_seg; /* Propagation segment in TQs */
- __u32 phase_seg1; /* Phase buffer segment 1 in TQs */
- __u32 phase_seg2; /* Phase buffer segment 2 in TQs */
- __u32 sjw; /* Synchronisation jump width in TQs */
- __u32 brp; /* Bit-rate prescaler */
-};
-
-/*
- * CAN harware-dependent bit-timing constant
- *
- * Used for calculating and checking bit-timing parameters
- */
-struct can_bittiming_const {
- char name[16]; /* Name of the CAN controller hardware */
- __u32 tseg1_min; /* Time segement 1 = prop_seg + phase_seg1 */
- __u32 tseg1_max;
- __u32 tseg2_min; /* Time segement 2 = phase_seg2 */
- __u32 tseg2_max;
- __u32 sjw_max; /* Synchronisation jump width */
- __u32 brp_min; /* Bit-rate prescaler */
- __u32 brp_max;
- __u32 brp_inc;
-};
-
-/*
- * CAN clock parameters
- */
-struct can_clock {
- __u32 freq; /* CAN system clock frequency in Hz */
-};
-
-/*
- * CAN operational and error states
- */
-enum can_state {
- CAN_STATE_ERROR_ACTIVE = 0, /* RX/TX error count < 96 */
- CAN_STATE_ERROR_WARNING, /* RX/TX error count < 128 */
- CAN_STATE_ERROR_PASSIVE, /* RX/TX error count < 256 */
- CAN_STATE_BUS_OFF, /* RX/TX error count >= 256 */
- CAN_STATE_STOPPED, /* Device is stopped */
- CAN_STATE_SLEEPING, /* Device is sleeping */
- CAN_STATE_MAX
-};
-
-/*
- * CAN bus error counters
- */
-struct can_berr_counter {
- __u16 txerr;
- __u16 rxerr;
-};
-
-/*
- * CAN controller mode
- */
-struct can_ctrlmode {
- __u32 mask;
- __u32 flags;
-};
-
-#define CAN_CTRLMODE_LOOPBACK 0x01 /* Loopback mode */
-#define CAN_CTRLMODE_LISTENONLY 0x02 /* Listen-only mode */
-#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */
-#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */
-#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
-
-/*
- * CAN device statistics
- */
-struct can_device_stats {
- __u32 bus_error; /* Bus errors */
- __u32 error_warning; /* Changes to error warning state */
- __u32 error_passive; /* Changes to error passive state */
- __u32 bus_off; /* Changes to bus off state */
- __u32 arbitration_lost; /* Arbitration lost errors */
- __u32 restarts; /* CAN controller re-starts */
-};
-
-/*
- * CAN netlink interface
- */
-enum {
- IFLA_CAN_UNSPEC,
- IFLA_CAN_BITTIMING,
- IFLA_CAN_BITTIMING_CONST,
- IFLA_CAN_CLOCK,
- IFLA_CAN_STATE,
- IFLA_CAN_CTRLMODE,
- IFLA_CAN_RESTART_MS,
- IFLA_CAN_RESTART,
- IFLA_CAN_BERR_COUNTER,
- __IFLA_CAN_MAX
-};
-
-#define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1)
-
-#endif /* CAN_NETLINK_H */
diff --git a/original/linux/can/raw.h b/original/linux/can/raw.h
deleted file mode 100644
index 781f3a3..0000000
--- a/original/linux/can/raw.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * linux/can/raw.h
- *
- * Definitions for raw CAN sockets
- *
- * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
- * Urs Thuermann <urs.thuermann@volkswagen.de>
- * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
- * All rights reserved.
- *
- */
-
-#ifndef CAN_RAW_H
-#define CAN_RAW_H
-
-#include <linux/can.h>
-
-#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
-
-/* for socket options affecting the socket (not the global system) */
-
-enum {
- CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s) */
- CAN_RAW_ERR_FILTER, /* set filter for error frames */
- CAN_RAW_LOOPBACK, /* local loopback (default:on) */
- CAN_RAW_RECV_OWN_MSGS /* receive my own msgs (default:off) */
-};
-
-#endif
diff --git a/original/linux/capability.h b/original/linux/capability.h
deleted file mode 100644
index ba478fa..0000000
--- a/original/linux/capability.h
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * This is <linux/capability.h>
- *
- * Andrew G. Morgan <morgan@kernel.org>
- * Alexander Kjeldaas <astor@guardian.no>
- * with help from Aleph1, Roland Buresund and Andrew Main.
- *
- * See here for the libcap library ("POSIX draft" compliance):
- *
- * ftp://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/
- */
-
-#ifndef _UAPI_LINUX_CAPABILITY_H
-#define _UAPI_LINUX_CAPABILITY_H
-
-#include <linux/types.h>
-
-struct task_struct;
-
-/* User-level do most of the mapping between kernel and user
- capabilities based on the version tag given by the kernel. The
- kernel might be somewhat backwards compatible, but don't bet on
- it. */
-
-/* Note, cap_t, is defined by POSIX (draft) to be an "opaque" pointer to
- a set of three capability sets. The transposition of 3*the
- following structure to such a composite is better handled in a user
- library since the draft standard requires the use of malloc/free
- etc.. */
-
-#define _LINUX_CAPABILITY_VERSION_1 0x19980330
-#define _LINUX_CAPABILITY_U32S_1 1
-
-#define _LINUX_CAPABILITY_VERSION_2 0x20071026 /* deprecated - use v3 */
-#define _LINUX_CAPABILITY_U32S_2 2
-
-#define _LINUX_CAPABILITY_VERSION_3 0x20080522
-#define _LINUX_CAPABILITY_U32S_3 2
-
-typedef struct __user_cap_header_struct {
- __u32 version;
- int pid;
-} __user *cap_user_header_t;
-
-typedef struct __user_cap_data_struct {
- __u32 effective;
- __u32 permitted;
- __u32 inheritable;
-} __user *cap_user_data_t;
-
-
-#define VFS_CAP_REVISION_MASK 0xFF000000
-#define VFS_CAP_REVISION_SHIFT 24
-#define VFS_CAP_FLAGS_MASK ~VFS_CAP_REVISION_MASK
-#define VFS_CAP_FLAGS_EFFECTIVE 0x000001
-
-#define VFS_CAP_REVISION_1 0x01000000
-#define VFS_CAP_U32_1 1
-#define XATTR_CAPS_SZ_1 (sizeof(__le32)*(1 + 2*VFS_CAP_U32_1))
-
-#define VFS_CAP_REVISION_2 0x02000000
-#define VFS_CAP_U32_2 2
-#define XATTR_CAPS_SZ_2 (sizeof(__le32)*(1 + 2*VFS_CAP_U32_2))
-
-#define XATTR_CAPS_SZ XATTR_CAPS_SZ_2
-#define VFS_CAP_U32 VFS_CAP_U32_2
-#define VFS_CAP_REVISION VFS_CAP_REVISION_2
-
-struct vfs_cap_data {
- __le32 magic_etc; /* Little endian */
- struct {
- __le32 permitted; /* Little endian */
- __le32 inheritable; /* Little endian */
- } data[VFS_CAP_U32];
-};
-
-#ifndef __KERNEL__
-
-/*
- * Backwardly compatible definition for source code - trapped in a
- * 32-bit world. If you find you need this, please consider using
- * libcap to untrap yourself...
- */
-#define _LINUX_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_1
-#define _LINUX_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_1
-
-#endif
-
-
-/**
- ** POSIX-draft defined capabilities.
- **/
-
-/* In a system with the [_POSIX_CHOWN_RESTRICTED] option defined, this
- overrides the restriction of changing file ownership and group
- ownership. */
-
-#define CAP_CHOWN 0
-
-/* Override all DAC access, including ACL execute access if
- [_POSIX_ACL] is defined. Excluding DAC access covered by
- CAP_LINUX_IMMUTABLE. */
-
-#define CAP_DAC_OVERRIDE 1
-
-/* Overrides all DAC restrictions regarding read and search on files
- and directories, including ACL restrictions if [_POSIX_ACL] is
- defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE. */
-
-#define CAP_DAC_READ_SEARCH 2
-
-/* Overrides all restrictions about allowed operations on files, where
- file owner ID must be equal to the user ID, except where CAP_FSETID
- is applicable. It doesn't override MAC and DAC restrictions. */
-
-#define CAP_FOWNER 3
-
-/* Overrides the following restrictions that the effective user ID
- shall match the file owner ID when setting the S_ISUID and S_ISGID
- bits on that file; that the effective group ID (or one of the
- supplementary group IDs) shall match the file owner ID when setting
- the S_ISGID bit on that file; that the S_ISUID and S_ISGID bits are
- cleared on successful return from chown(2) (not implemented). */
-
-#define CAP_FSETID 4
-
-/* Overrides the restriction that the real or effective user ID of a
- process sending a signal must match the real or effective user ID
- of the process receiving the signal. */
-
-#define CAP_KILL 5
-
-/* Allows setgid(2) manipulation */
-/* Allows setgroups(2) */
-/* Allows forged gids on socket credentials passing. */
-
-#define CAP_SETGID 6
-
-/* Allows set*uid(2) manipulation (including fsuid). */
-/* Allows forged pids on socket credentials passing. */
-
-#define CAP_SETUID 7
-
-
-/**
- ** Linux-specific capabilities
- **/
-
-/* Without VFS support for capabilities:
- * Transfer any capability in your permitted set to any pid,
- * remove any capability in your permitted set from any pid
- * With VFS support for capabilities (neither of above, but)
- * Add any capability from current's capability bounding set
- * to the current process' inheritable set
- * Allow taking bits out of capability bounding set
- * Allow modification of the securebits for a process
- */
-
-#define CAP_SETPCAP 8
-
-/* Allow modification of S_IMMUTABLE and S_APPEND file attributes */
-
-#define CAP_LINUX_IMMUTABLE 9
-
-/* Allows binding to TCP/UDP sockets below 1024 */
-/* Allows binding to ATM VCIs below 32 */
-
-#define CAP_NET_BIND_SERVICE 10
-
-/* Allow broadcasting, listen to multicast */
-
-#define CAP_NET_BROADCAST 11
-
-/* Allow interface configuration */
-/* Allow administration of IP firewall, masquerading and accounting */
-/* Allow setting debug option on sockets */
-/* Allow modification of routing tables */
-/* Allow setting arbitrary process / process group ownership on
- sockets */
-/* Allow binding to any address for transparent proxying (also via NET_RAW) */
-/* Allow setting TOS (type of service) */
-/* Allow setting promiscuous mode */
-/* Allow clearing driver statistics */
-/* Allow multicasting */
-/* Allow read/write of device-specific registers */
-/* Allow activation of ATM control sockets */
-
-#define CAP_NET_ADMIN 12
-
-/* Allow use of RAW sockets */
-/* Allow use of PACKET sockets */
-/* Allow binding to any address for transparent proxying (also via NET_ADMIN) */
-
-#define CAP_NET_RAW 13
-
-/* Allow locking of shared memory segments */
-/* Allow mlock and mlockall (which doesn't really have anything to do
- with IPC) */
-
-#define CAP_IPC_LOCK 14
-
-/* Override IPC ownership checks */
-
-#define CAP_IPC_OWNER 15
-
-/* Insert and remove kernel modules - modify kernel without limit */
-#define CAP_SYS_MODULE 16
-
-/* Allow ioperm/iopl access */
-/* Allow sending USB messages to any device via /proc/bus/usb */
-
-#define CAP_SYS_RAWIO 17
-
-/* Allow use of chroot() */
-
-#define CAP_SYS_CHROOT 18
-
-/* Allow ptrace() of any process */
-
-#define CAP_SYS_PTRACE 19
-
-/* Allow configuration of process accounting */
-
-#define CAP_SYS_PACCT 20
-
-/* Allow configuration of the secure attention key */
-/* Allow administration of the random device */
-/* Allow examination and configuration of disk quotas */
-/* Allow setting the domainname */
-/* Allow setting the hostname */
-/* Allow calling bdflush() */
-/* Allow mount() and umount(), setting up new smb connection */
-/* Allow some autofs root ioctls */
-/* Allow nfsservctl */
-/* Allow VM86_REQUEST_IRQ */
-/* Allow to read/write pci config on alpha */
-/* Allow irix_prctl on mips (setstacksize) */
-/* Allow flushing all cache on m68k (sys_cacheflush) */
-/* Allow removing semaphores */
-/* Used instead of CAP_CHOWN to "chown" IPC message queues, semaphores
- and shared memory */
-/* Allow locking/unlocking of shared memory segment */
-/* Allow turning swap on/off */
-/* Allow forged pids on socket credentials passing */
-/* Allow setting readahead and flushing buffers on block devices */
-/* Allow setting geometry in floppy driver */
-/* Allow turning DMA on/off in xd driver */
-/* Allow administration of md devices (mostly the above, but some
- extra ioctls) */
-/* Allow tuning the ide driver */
-/* Allow access to the nvram device */
-/* Allow administration of apm_bios, serial and bttv (TV) device */
-/* Allow manufacturer commands in isdn CAPI support driver */
-/* Allow reading non-standardized portions of pci configuration space */
-/* Allow DDI debug ioctl on sbpcd driver */
-/* Allow setting up serial ports */
-/* Allow sending raw qic-117 commands */
-/* Allow enabling/disabling tagged queuing on SCSI controllers and sending
- arbitrary SCSI commands */
-/* Allow setting encryption key on loopback filesystem */
-/* Allow setting zone reclaim policy */
-
-#define CAP_SYS_ADMIN 21
-
-/* Allow use of reboot() */
-
-#define CAP_SYS_BOOT 22
-
-/* Allow raising priority and setting priority on other (different
- UID) processes */
-/* Allow use of FIFO and round-robin (realtime) scheduling on own
- processes and setting the scheduling algorithm used by another
- process. */
-/* Allow setting cpu affinity on other processes */
-
-#define CAP_SYS_NICE 23
-
-/* Override resource limits. Set resource limits. */
-/* Override quota limits. */
-/* Override reserved space on ext2 filesystem */
-/* Modify data journaling mode on ext3 filesystem (uses journaling
- resources) */
-/* NOTE: ext2 honors fsuid when checking for resource overrides, so
- you can override using fsuid too */
-/* Override size restrictions on IPC message queues */
-/* Allow more than 64hz interrupts from the real-time clock */
-/* Override max number of consoles on console allocation */
-/* Override max number of keymaps */
-
-#define CAP_SYS_RESOURCE 24
-
-/* Allow manipulation of system clock */
-/* Allow irix_stime on mips */
-/* Allow setting the real-time clock */
-
-#define CAP_SYS_TIME 25
-
-/* Allow configuration of tty devices */
-/* Allow vhangup() of tty */
-
-#define CAP_SYS_TTY_CONFIG 26
-
-/* Allow the privileged aspects of mknod() */
-
-#define CAP_MKNOD 27
-
-/* Allow taking of leases on files */
-
-#define CAP_LEASE 28
-
-#define CAP_AUDIT_WRITE 29
-
-#define CAP_AUDIT_CONTROL 30
-
-#define CAP_SETFCAP 31
-
-/* Override MAC access.
- The base kernel enforces no MAC policy.
- An LSM may enforce a MAC policy, and if it does and it chooses
- to implement capability based overrides of that policy, this is
- the capability it should use to do so. */
-
-#define CAP_MAC_OVERRIDE 32
-
-/* Allow MAC configuration or state changes.
- The base kernel requires no MAC configuration.
- An LSM may enforce a MAC policy, and if it does and it chooses
- to implement capability based checks on modifications to that
- policy or the data required to maintain it, this is the
- capability it should use to do so. */
-
-#define CAP_MAC_ADMIN 33
-
-/* Allow configuring the kernel's syslog (printk behaviour) */
-
-#define CAP_SYSLOG 34
-
-/* Allow triggering something that will wake the system */
-
-#define CAP_WAKE_ALARM 35
-
-/* Allow preventing system suspends */
-
-#define CAP_BLOCK_SUSPEND 36
-
-#define CAP_LAST_CAP CAP_BLOCK_SUSPEND
-
-#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
-
-/*
- * Bit location of each capability (used by user-space library and kernel)
- */
-
-#define CAP_TO_INDEX(x) ((x) >> 5) /* 1 << 5 == bits in __u32 */
-#define CAP_TO_MASK(x) (1 << ((x) & 31)) /* mask for indexed __u32 */
-
-
-#endif /* _UAPI_LINUX_CAPABILITY_H */
diff --git a/original/linux/capella_cm3602.h b/original/linux/capella_cm3602.h
deleted file mode 100644
index 3dcffdd..0000000
--- a/original/linux/capella_cm3602.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* include/linux/capella_cm3602.h
- *
- * Copyright (C) 2009 Google, Inc.
- * Author: Iliyan Malchev <malchev@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_CAPELLA_CM3602_H
-#define __LINUX_CAPELLA_CM3602_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#define CAPELLA_CM3602_IOCTL_MAGIC 'c'
-#define CAPELLA_CM3602_IOCTL_GET_ENABLED \
- _IOR(CAPELLA_CM3602_IOCTL_MAGIC, 1, int *)
-#define CAPELLA_CM3602_IOCTL_ENABLE \
- _IOW(CAPELLA_CM3602_IOCTL_MAGIC, 2, int *)
-
-#ifdef __KERNEL__
-#define CAPELLA_CM3602 "capella_cm3602"
-struct capella_cm3602_platform_data {
- int (*power)(int); /* power to the chip */
- int p_en; /* proximity-sensor enable */
- int p_out; /* proximity-sensor outpuCAPELLA_CM3602_IOCTL_ENABLE,t */
-};
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/capi.h b/original/linux/capi.h
deleted file mode 100644
index fdebaaa..0000000
--- a/original/linux/capi.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* $Id: capi.h,v 1.4.6.1 2001/09/23 22:25:05 kai Exp $
- *
- * CAPI 2.0 Interface for Linux
- *
- * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- */
-
-#ifndef __LINUX_CAPI_H__
-#define __LINUX_CAPI_H__
-
-#include <asm/types.h>
-#include <linux/ioctl.h>
-#ifndef __KERNEL__
-#include <linux/kernelcapi.h>
-#endif
-
-/*
- * CAPI_REGISTER
- */
-
-typedef struct capi_register_params { /* CAPI_REGISTER */
- __u32 level3cnt; /* No. of simulatneous user data connections */
- __u32 datablkcnt; /* No. of buffered data messages */
- __u32 datablklen; /* Size of buffered data messages */
-} capi_register_params;
-
-#define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params)
-
-/*
- * CAPI_GET_MANUFACTURER
- */
-
-#define CAPI_MANUFACTURER_LEN 64
-
-#define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int) /* broken: wanted size 64 (CAPI_MANUFACTURER_LEN) */
-
-/*
- * CAPI_GET_VERSION
- */
-
-typedef struct capi_version {
- __u32 majorversion;
- __u32 minorversion;
- __u32 majormanuversion;
- __u32 minormanuversion;
-} capi_version;
-
-#define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version)
-
-/*
- * CAPI_GET_SERIAL
- */
-
-#define CAPI_SERIAL_LEN 8
-#define CAPI_GET_SERIAL _IOWR('C',0x08,int) /* broken: wanted size 8 (CAPI_SERIAL_LEN) */
-
-/*
- * CAPI_GET_PROFILE
- */
-
-typedef struct capi_profile {
- __u16 ncontroller; /* number of installed controller */
- __u16 nbchannel; /* number of B-Channels */
- __u32 goptions; /* global options */
- __u32 support1; /* B1 protocols support */
- __u32 support2; /* B2 protocols support */
- __u32 support3; /* B3 protocols support */
- __u32 reserved[6]; /* reserved */
- __u32 manu[5]; /* manufacturer specific information */
-} capi_profile;
-
-#define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile)
-
-typedef struct capi_manufacturer_cmd {
- unsigned long cmd;
- void __user *data;
-} capi_manufacturer_cmd;
-
-/*
- * CAPI_MANUFACTURER_CMD
- */
-
-#define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd)
-
-/*
- * CAPI_GET_ERRCODE
- * capi errcode is set, * if read, write, or ioctl returns EIO,
- * ioctl returns errcode directly, and in arg, if != 0
- */
-
-#define CAPI_GET_ERRCODE _IOR('C',0x21, __u16)
-
-/*
- * CAPI_INSTALLED
- */
-#define CAPI_INSTALLED _IOR('C',0x22, __u16)
-
-
-/*
- * member contr is input for
- * CAPI_GET_MANUFACTURER, CAPI_VERSION, CAPI_GET_SERIAL
- * and CAPI_GET_PROFILE
- */
-typedef union capi_ioctl_struct {
- __u32 contr;
- capi_register_params rparams;
- __u8 manufacturer[CAPI_MANUFACTURER_LEN];
- capi_version version;
- __u8 serial[CAPI_SERIAL_LEN];
- capi_profile profile;
- capi_manufacturer_cmd cmd;
- __u16 errcode;
-} capi_ioctl_struct;
-
-/*
- * Middleware extension
- */
-
-#define CAPIFLAG_HIGHJACKING 0x0001
-
-#define CAPI_GET_FLAGS _IOR('C',0x23, unsigned)
-#define CAPI_SET_FLAGS _IOR('C',0x24, unsigned)
-#define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned)
-
-#define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned)
-
-#define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned)
-
-#endif /* __LINUX_CAPI_H__ */
diff --git a/original/linux/cdev.h b/original/linux/cdev.h
deleted file mode 100644
index 2216638..0000000
--- a/original/linux/cdev.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _LINUX_CDEV_H
-#define _LINUX_CDEV_H
-#ifdef __KERNEL__
-
-struct cdev {
- struct kobject kobj;
- struct module *owner;
- const struct file_operations *ops;
- struct list_head list;
- dev_t dev;
- unsigned int count;
-};
-
-void cdev_init(struct cdev *, const struct file_operations *);
-
-struct cdev *cdev_alloc(void);
-
-void cdev_put(struct cdev *p);
-
-int cdev_add(struct cdev *, dev_t, unsigned);
-
-void cdev_del(struct cdev *);
-
-void cd_forget(struct inode *);
-
-#endif
-#endif
diff --git a/original/linux/cdrom.h b/original/linux/cdrom.h
deleted file mode 100644
index 3c9b0bc..0000000
--- a/original/linux/cdrom.h
+++ /dev/null
@@ -1,1189 +0,0 @@
-/*
- * -- <linux/cdrom.h>
- * General header file for linux CD-ROM drivers
- * Copyright (C) 1992 David Giller, rafetmad@oxy.edu
- * 1994, 1995 Eberhard Moenkeberg, emoenke@gwdg.de
- * 1996 David van Leeuwen, david@tm.tno.nl
- * 1997, 1998 Erik Andersen, andersee@debian.org
- * 1998-2002 Jens Axboe, axboe@suse.de
- */
-
-#ifndef _LINUX_CDROM_H
-#define _LINUX_CDROM_H
-
-#include <asm/byteorder.h>
-
-/*******************************************************
- * As of Linux 2.1.x, all Linux CD-ROM application programs will use this
- * (and only this) include file. It is my hope to provide Linux with
- * a uniform interface between software accessing CD-ROMs and the various
- * device drivers that actually talk to the drives. There may still be
- * 23 different kinds of strange CD-ROM drives, but at least there will
- * now be one, and only one, Linux CD-ROM interface.
- *
- * Additionally, as of Linux 2.1.x, all Linux application programs
- * should use the O_NONBLOCK option when opening a CD-ROM device
- * for subsequent ioctl commands. This allows for neat system errors
- * like "No medium found" or "Wrong medium type" upon attempting to
- * mount or play an empty slot, mount an audio disc, or play a data disc.
- * Generally, changing an application program to support O_NONBLOCK
- * is as easy as the following:
- * - drive = open("/dev/cdrom", O_RDONLY);
- * + drive = open("/dev/cdrom", O_RDONLY | O_NONBLOCK);
- * It is worth the small change.
- *
- * Patches for many common CD programs (provided by David A. van Leeuwen)
- * can be found at: ftp://ftp.gwdg.de/pub/linux/cdrom/drivers/cm206/
- *
- *******************************************************/
-
-/* When a driver supports a certain function, but the cdrom drive we are
- * using doesn't, we will return the error EDRIVE_CANT_DO_THIS. We will
- * borrow the "Operation not supported" error from the network folks to
- * accomplish this. Maybe someday we will get a more targeted error code,
- * but this will do for now... */
-#define EDRIVE_CANT_DO_THIS EOPNOTSUPP
-
-/*******************************************************
- * The CD-ROM IOCTL commands -- these should be supported by
- * all the various cdrom drivers. For the CD-ROM ioctls, we
- * will commandeer byte 0x53, or 'S'.
- *******************************************************/
-#define CDROMPAUSE 0x5301 /* Pause Audio Operation */
-#define CDROMRESUME 0x5302 /* Resume paused Audio Operation */
-#define CDROMPLAYMSF 0x5303 /* Play Audio MSF (struct cdrom_msf) */
-#define CDROMPLAYTRKIND 0x5304 /* Play Audio Track/index
- (struct cdrom_ti) */
-#define CDROMREADTOCHDR 0x5305 /* Read TOC header
- (struct cdrom_tochdr) */
-#define CDROMREADTOCENTRY 0x5306 /* Read TOC entry
- (struct cdrom_tocentry) */
-#define CDROMSTOP 0x5307 /* Stop the cdrom drive */
-#define CDROMSTART 0x5308 /* Start the cdrom drive */
-#define CDROMEJECT 0x5309 /* Ejects the cdrom media */
-#define CDROMVOLCTRL 0x530a /* Control output volume
- (struct cdrom_volctrl) */
-#define CDROMSUBCHNL 0x530b /* Read subchannel data
- (struct cdrom_subchnl) */
-#define CDROMREADMODE2 0x530c /* Read CDROM mode 2 data (2336 Bytes)
- (struct cdrom_read) */
-#define CDROMREADMODE1 0x530d /* Read CDROM mode 1 data (2048 Bytes)
- (struct cdrom_read) */
-#define CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */
-#define CDROMEJECT_SW 0x530f /* enable(1)/disable(0) auto-ejecting */
-#define CDROMMULTISESSION 0x5310 /* Obtain the start-of-last-session
- address of multi session disks
- (struct cdrom_multisession) */
-#define CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code"
- if available (struct cdrom_mcn) */
-#define CDROM_GET_UPC CDROM_GET_MCN /* This one is depricated,
- but here anyway for compatibility */
-#define CDROMRESET 0x5312 /* hard-reset the drive */
-#define CDROMVOLREAD 0x5313 /* Get the drive's volume setting
- (struct cdrom_volctrl) */
-#define CDROMREADRAW 0x5314 /* read data in raw mode (2352 Bytes)
- (struct cdrom_read) */
-/*
- * These ioctls are used only used in aztcd.c and optcd.c
- */
-#define CDROMREADCOOKED 0x5315 /* read data in cooked mode */
-#define CDROMSEEK 0x5316 /* seek msf address */
-
-/*
- * This ioctl is only used by the scsi-cd driver.
- It is for playing audio in logical block addressing mode.
- */
-#define CDROMPLAYBLK 0x5317 /* (struct cdrom_blk) */
-
-/*
- * These ioctls are only used in optcd.c
- */
-#define CDROMREADALL 0x5318 /* read all 2646 bytes */
-
-/*
- * These ioctls are (now) only in ide-cd.c for controlling
- * drive spindown time. They should be implemented in the
- * Uniform driver, via generic packet commands, GPCMD_MODE_SELECT_10,
- * GPCMD_MODE_SENSE_10 and the GPMODE_POWER_PAGE...
- * -Erik
- */
-#define CDROMGETSPINDOWN 0x531d
-#define CDROMSETSPINDOWN 0x531e
-
-/*
- * These ioctls are implemented through the uniform CD-ROM driver
- * They _will_ be adopted by all CD-ROM drivers, when all the CD-ROM
- * drivers are eventually ported to the uniform CD-ROM driver interface.
- */
-#define CDROMCLOSETRAY 0x5319 /* pendant of CDROMEJECT */
-#define CDROM_SET_OPTIONS 0x5320 /* Set behavior options */
-#define CDROM_CLEAR_OPTIONS 0x5321 /* Clear behavior options */
-#define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */
-#define CDROM_SELECT_DISC 0x5323 /* Select disc (for juke-boxes) */
-#define CDROM_MEDIA_CHANGED 0x5325 /* Check is media changed */
-#define CDROM_DRIVE_STATUS 0x5326 /* Get tray position, etc. */
-#define CDROM_DISC_STATUS 0x5327 /* Get disc type, etc. */
-#define CDROM_CHANGER_NSLOTS 0x5328 /* Get number of slots */
-#define CDROM_LOCKDOOR 0x5329 /* lock or unlock door */
-#define CDROM_DEBUG 0x5330 /* Turn debug messages on/off */
-#define CDROM_GET_CAPABILITY 0x5331 /* get capabilities */
-
-/* Note that scsi/scsi_ioctl.h also uses 0x5382 - 0x5386.
- * Future CDROM ioctls should be kept below 0x537F
- */
-
-/* This ioctl is only used by sbpcd at the moment */
-#define CDROMAUDIOBUFSIZ 0x5382 /* set the audio buffer size */
- /* conflict with SCSI_IOCTL_GET_IDLUN */
-
-/* DVD-ROM Specific ioctls */
-#define DVD_READ_STRUCT 0x5390 /* Read structure */
-#define DVD_WRITE_STRUCT 0x5391 /* Write structure */
-#define DVD_AUTH 0x5392 /* Authentication */
-
-#define CDROM_SEND_PACKET 0x5393 /* send a packet to the drive */
-#define CDROM_NEXT_WRITABLE 0x5394 /* get next writable block */
-#define CDROM_LAST_WRITTEN 0x5395 /* get last block written on disc */
-
-/*******************************************************
- * CDROM IOCTL structures
- *******************************************************/
-
-/* Address in MSF format */
-struct cdrom_msf0
-{
- __u8 minute;
- __u8 second;
- __u8 frame;
-};
-
-/* Address in either MSF or logical format */
-union cdrom_addr
-{
- struct cdrom_msf0 msf;
- int lba;
-};
-
-/* This struct is used by the CDROMPLAYMSF ioctl */
-struct cdrom_msf
-{
- __u8 cdmsf_min0; /* start minute */
- __u8 cdmsf_sec0; /* start second */
- __u8 cdmsf_frame0; /* start frame */
- __u8 cdmsf_min1; /* end minute */
- __u8 cdmsf_sec1; /* end second */
- __u8 cdmsf_frame1; /* end frame */
-};
-
-/* This struct is used by the CDROMPLAYTRKIND ioctl */
-struct cdrom_ti
-{
- __u8 cdti_trk0; /* start track */
- __u8 cdti_ind0; /* start index */
- __u8 cdti_trk1; /* end track */
- __u8 cdti_ind1; /* end index */
-};
-
-/* This struct is used by the CDROMREADTOCHDR ioctl */
-struct cdrom_tochdr
-{
- __u8 cdth_trk0; /* start track */
- __u8 cdth_trk1; /* end track */
-};
-
-/* This struct is used by the CDROMVOLCTRL and CDROMVOLREAD ioctls */
-struct cdrom_volctrl
-{
- __u8 channel0;
- __u8 channel1;
- __u8 channel2;
- __u8 channel3;
-};
-
-/* This struct is used by the CDROMSUBCHNL ioctl */
-struct cdrom_subchnl
-{
- __u8 cdsc_format;
- __u8 cdsc_audiostatus;
- __u8 cdsc_adr: 4;
- __u8 cdsc_ctrl: 4;
- __u8 cdsc_trk;
- __u8 cdsc_ind;
- union cdrom_addr cdsc_absaddr;
- union cdrom_addr cdsc_reladdr;
-};
-
-
-/* This struct is used by the CDROMREADTOCENTRY ioctl */
-struct cdrom_tocentry
-{
- __u8 cdte_track;
- __u8 cdte_adr :4;
- __u8 cdte_ctrl :4;
- __u8 cdte_format;
- union cdrom_addr cdte_addr;
- __u8 cdte_datamode;
-};
-
-/* This struct is used by the CDROMREADMODE1, and CDROMREADMODE2 ioctls */
-struct cdrom_read
-{
- int cdread_lba;
- char *cdread_bufaddr;
- int cdread_buflen;
-};
-
-/* This struct is used by the CDROMREADAUDIO ioctl */
-struct cdrom_read_audio
-{
- union cdrom_addr addr; /* frame address */
- __u8 addr_format; /* CDROM_LBA or CDROM_MSF */
- int nframes; /* number of 2352-byte-frames to read at once */
- __u8 __user *buf; /* frame buffer (size: nframes*2352 bytes) */
-};
-
-/* This struct is used with the CDROMMULTISESSION ioctl */
-struct cdrom_multisession
-{
- union cdrom_addr addr; /* frame address: start-of-last-session
- (not the new "frame 16"!). Only valid
- if the "xa_flag" is true. */
- __u8 xa_flag; /* 1: "is XA disk" */
- __u8 addr_format; /* CDROM_LBA or CDROM_MSF */
-};
-
-/* This struct is used with the CDROM_GET_MCN ioctl.
- * Very few audio discs actually have Universal Product Code information,
- * which should just be the Medium Catalog Number on the box. Also note
- * that the way the codeis written on CD is _not_ uniform across all discs!
- */
-struct cdrom_mcn
-{
- __u8 medium_catalog_number[14]; /* 13 ASCII digits, null-terminated */
-};
-
-/* This is used by the CDROMPLAYBLK ioctl */
-struct cdrom_blk
-{
- unsigned from;
- unsigned short len;
-};
-
-#define CDROM_PACKET_SIZE 12
-
-#define CGC_DATA_UNKNOWN 0
-#define CGC_DATA_WRITE 1
-#define CGC_DATA_READ 2
-#define CGC_DATA_NONE 3
-
-/* for CDROM_PACKET_COMMAND ioctl */
-struct cdrom_generic_command
-{
- unsigned char cmd[CDROM_PACKET_SIZE];
- unsigned char __user *buffer;
- unsigned int buflen;
- int stat;
- struct request_sense __user *sense;
- unsigned char data_direction;
- int quiet;
- int timeout;
- void __user *reserved[1]; /* unused, actually */
-};
-
-/*
- * A CD-ROM physical sector size is 2048, 2052, 2056, 2324, 2332, 2336,
- * 2340, or 2352 bytes long.
-
-* Sector types of the standard CD-ROM data formats:
- *
- * format sector type user data size (bytes)
- * -----------------------------------------------------------------------------
- * 1 (Red Book) CD-DA 2352 (CD_FRAMESIZE_RAW)
- * 2 (Yellow Book) Mode1 Form1 2048 (CD_FRAMESIZE)
- * 3 (Yellow Book) Mode1 Form2 2336 (CD_FRAMESIZE_RAW0)
- * 4 (Green Book) Mode2 Form1 2048 (CD_FRAMESIZE)
- * 5 (Green Book) Mode2 Form2 2328 (2324+4 spare bytes)
- *
- *
- * The layout of the standard CD-ROM data formats:
- * -----------------------------------------------------------------------------
- * - audio (red): | audio_sample_bytes |
- * | 2352 |
- *
- * - data (yellow, mode1): | sync - head - data - EDC - zero - ECC |
- * | 12 - 4 - 2048 - 4 - 8 - 276 |
- *
- * - data (yellow, mode2): | sync - head - data |
- * | 12 - 4 - 2336 |
- *
- * - XA data (green, mode2 form1): | sync - head - sub - data - EDC - ECC |
- * | 12 - 4 - 8 - 2048 - 4 - 276 |
- *
- * - XA data (green, mode2 form2): | sync - head - sub - data - Spare |
- * | 12 - 4 - 8 - 2324 - 4 |
- *
- */
-
-/* Some generally useful CD-ROM information -- mostly based on the above */
-#define CD_MINS 74 /* max. minutes per CD, not really a limit */
-#define CD_SECS 60 /* seconds per minute */
-#define CD_FRAMES 75 /* frames per second */
-#define CD_SYNC_SIZE 12 /* 12 sync bytes per raw data frame */
-#define CD_MSF_OFFSET 150 /* MSF numbering offset of first frame */
-#define CD_CHUNK_SIZE 24 /* lowest-level "data bytes piece" */
-#define CD_NUM_OF_CHUNKS 98 /* chunks per frame */
-#define CD_FRAMESIZE_SUB 96 /* subchannel data "frame" size */
-#define CD_HEAD_SIZE 4 /* header (address) bytes per raw data frame */
-#define CD_SUBHEAD_SIZE 8 /* subheader bytes per raw XA data frame */
-#define CD_EDC_SIZE 4 /* bytes EDC per most raw data frame types */
-#define CD_ZERO_SIZE 8 /* bytes zero per yellow book mode 1 frame */
-#define CD_ECC_SIZE 276 /* bytes ECC per most raw data frame types */
-#define CD_FRAMESIZE 2048 /* bytes per frame, "cooked" mode */
-#define CD_FRAMESIZE_RAW 2352 /* bytes per frame, "raw" mode */
-#define CD_FRAMESIZE_RAWER 2646 /* The maximum possible returned bytes */
-/* most drives don't deliver everything: */
-#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) /*2340*/
-#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) /*2336*/
-
-#define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE) /* "before data" part of raw XA frame */
-#define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE) /* "after data" part of raw XA frame */
-#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD) /* sync bytes + header of XA frame */
-
-/* CD-ROM address types (cdrom_tocentry.cdte_format) */
-#define CDROM_LBA 0x01 /* "logical block": first frame is #0 */
-#define CDROM_MSF 0x02 /* "minute-second-frame": binary, not bcd here! */
-
-/* bit to tell whether track is data or audio (cdrom_tocentry.cdte_ctrl) */
-#define CDROM_DATA_TRACK 0x04
-
-/* The leadout track is always 0xAA, regardless of # of tracks on disc */
-#define CDROM_LEADOUT 0xAA
-
-/* audio states (from SCSI-2, but seen with other drives, too) */
-#define CDROM_AUDIO_INVALID 0x00 /* audio status not supported */
-#define CDROM_AUDIO_PLAY 0x11 /* audio play operation in progress */
-#define CDROM_AUDIO_PAUSED 0x12 /* audio play operation paused */
-#define CDROM_AUDIO_COMPLETED 0x13 /* audio play successfully completed */
-#define CDROM_AUDIO_ERROR 0x14 /* audio play stopped due to error */
-#define CDROM_AUDIO_NO_STATUS 0x15 /* no current audio status to return */
-
-/* capability flags used with the uniform CD-ROM driver */
-#define CDC_CLOSE_TRAY 0x1 /* caddy systems _can't_ close */
-#define CDC_OPEN_TRAY 0x2 /* but _can_ eject. */
-#define CDC_LOCK 0x4 /* disable manual eject */
-#define CDC_SELECT_SPEED 0x8 /* programmable speed */
-#define CDC_SELECT_DISC 0x10 /* select disc from juke-box */
-#define CDC_MULTI_SESSION 0x20 /* read sessions>1 */
-#define CDC_MCN 0x40 /* Medium Catalog Number */
-#define CDC_MEDIA_CHANGED 0x80 /* media changed */
-#define CDC_PLAY_AUDIO 0x100 /* audio functions */
-#define CDC_RESET 0x200 /* hard reset device */
-#define CDC_DRIVE_STATUS 0x800 /* driver implements drive status */
-#define CDC_GENERIC_PACKET 0x1000 /* driver implements generic packets */
-#define CDC_CD_R 0x2000 /* drive is a CD-R */
-#define CDC_CD_RW 0x4000 /* drive is a CD-RW */
-#define CDC_DVD 0x8000 /* drive is a DVD */
-#define CDC_DVD_R 0x10000 /* drive can write DVD-R */
-#define CDC_DVD_RAM 0x20000 /* drive can write DVD-RAM */
-#define CDC_MO_DRIVE 0x40000 /* drive is an MO device */
-#define CDC_MRW 0x80000 /* drive can read MRW */
-#define CDC_MRW_W 0x100000 /* drive can write MRW */
-#define CDC_RAM 0x200000 /* ok to open for WRITE */
-
-/* drive status possibilities returned by CDROM_DRIVE_STATUS ioctl */
-#define CDS_NO_INFO 0 /* if not implemented */
-#define CDS_NO_DISC 1
-#define CDS_TRAY_OPEN 2
-#define CDS_DRIVE_NOT_READY 3
-#define CDS_DISC_OK 4
-
-/* return values for the CDROM_DISC_STATUS ioctl */
-/* can also return CDS_NO_[INFO|DISC], from above */
-#define CDS_AUDIO 100
-#define CDS_DATA_1 101
-#define CDS_DATA_2 102
-#define CDS_XA_2_1 103
-#define CDS_XA_2_2 104
-#define CDS_MIXED 105
-
-/* User-configurable behavior options for the uniform CD-ROM driver */
-#define CDO_AUTO_CLOSE 0x1 /* close tray on first open() */
-#define CDO_AUTO_EJECT 0x2 /* open tray on last release() */
-#define CDO_USE_FFLAGS 0x4 /* use O_NONBLOCK information on open */
-#define CDO_LOCK 0x8 /* lock tray on open files */
-#define CDO_CHECK_TYPE 0x10 /* check type on open for data */
-
-/* Special codes used when specifying changer slots. */
-#define CDSL_NONE ((int) (~0U>>1)-1)
-#define CDSL_CURRENT ((int) (~0U>>1))
-
-/* For partition based multisession access. IDE can handle 64 partitions
- * per drive - SCSI CD-ROM's use minors to differentiate between the
- * various drives, so we can't do multisessions the same way there.
- * Use the -o session=x option to mount on them.
- */
-#define CD_PART_MAX 64
-#define CD_PART_MASK (CD_PART_MAX - 1)
-
-/*********************************************************************
- * Generic Packet commands, MMC commands, and such
- *********************************************************************/
-
- /* The generic packet command opcodes for CD/DVD Logical Units,
- * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
-#define GPCMD_BLANK 0xa1
-#define GPCMD_CLOSE_TRACK 0x5b
-#define GPCMD_FLUSH_CACHE 0x35
-#define GPCMD_FORMAT_UNIT 0x04
-#define GPCMD_GET_CONFIGURATION 0x46
-#define GPCMD_GET_EVENT_STATUS_NOTIFICATION 0x4a
-#define GPCMD_GET_PERFORMANCE 0xac
-#define GPCMD_INQUIRY 0x12
-#define GPCMD_LOAD_UNLOAD 0xa6
-#define GPCMD_MECHANISM_STATUS 0xbd
-#define GPCMD_MODE_SELECT_10 0x55
-#define GPCMD_MODE_SENSE_10 0x5a
-#define GPCMD_PAUSE_RESUME 0x4b
-#define GPCMD_PLAY_AUDIO_10 0x45
-#define GPCMD_PLAY_AUDIO_MSF 0x47
-#define GPCMD_PLAY_AUDIO_TI 0x48
-#define GPCMD_PLAY_CD 0xbc
-#define GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e
-#define GPCMD_READ_10 0x28
-#define GPCMD_READ_12 0xa8
-#define GPCMD_READ_BUFFER_CAPACITY 0x5c
-#define GPCMD_READ_CDVD_CAPACITY 0x25
-#define GPCMD_READ_CD 0xbe
-#define GPCMD_READ_CD_MSF 0xb9
-#define GPCMD_READ_DISC_INFO 0x51
-#define GPCMD_READ_DVD_STRUCTURE 0xad
-#define GPCMD_READ_FORMAT_CAPACITIES 0x23
-#define GPCMD_READ_HEADER 0x44
-#define GPCMD_READ_TRACK_RZONE_INFO 0x52
-#define GPCMD_READ_SUBCHANNEL 0x42
-#define GPCMD_READ_TOC_PMA_ATIP 0x43
-#define GPCMD_REPAIR_RZONE_TRACK 0x58
-#define GPCMD_REPORT_KEY 0xa4
-#define GPCMD_REQUEST_SENSE 0x03
-#define GPCMD_RESERVE_RZONE_TRACK 0x53
-#define GPCMD_SEND_CUE_SHEET 0x5d
-#define GPCMD_SCAN 0xba
-#define GPCMD_SEEK 0x2b
-#define GPCMD_SEND_DVD_STRUCTURE 0xbf
-#define GPCMD_SEND_EVENT 0xa2
-#define GPCMD_SEND_KEY 0xa3
-#define GPCMD_SEND_OPC 0x54
-#define GPCMD_SET_READ_AHEAD 0xa7
-#define GPCMD_SET_STREAMING 0xb6
-#define GPCMD_START_STOP_UNIT 0x1b
-#define GPCMD_STOP_PLAY_SCAN 0x4e
-#define GPCMD_TEST_UNIT_READY 0x00
-#define GPCMD_VERIFY_10 0x2f
-#define GPCMD_WRITE_10 0x2a
-#define GPCMD_WRITE_AND_VERIFY_10 0x2e
-/* This is listed as optional in ATAPI 2.6, but is (curiously)
- * missing from Mt. Fuji, Table 57. It _is_ mentioned in Mt. Fuji
- * Table 377 as an MMC command for SCSi devices though... Most ATAPI
- * drives support it. */
-#define GPCMD_SET_SPEED 0xbb
-/* This seems to be a SCSI specific CD-ROM opcode
- * to play data at track/index */
-#define GPCMD_PLAYAUDIO_TI 0x48
-/*
- * From MS Media Status Notification Support Specification. For
- * older drives only.
- */
-#define GPCMD_GET_MEDIA_STATUS 0xda
-
-/* Mode page codes for mode sense/set */
-#define GPMODE_VENDOR_PAGE 0x00
-#define GPMODE_R_W_ERROR_PAGE 0x01
-#define GPMODE_WRITE_PARMS_PAGE 0x05
-#define GPMODE_WCACHING_PAGE 0x08
-#define GPMODE_AUDIO_CTL_PAGE 0x0e
-#define GPMODE_POWER_PAGE 0x1a
-#define GPMODE_FAULT_FAIL_PAGE 0x1c
-#define GPMODE_TO_PROTECT_PAGE 0x1d
-#define GPMODE_CAPABILITIES_PAGE 0x2a
-#define GPMODE_ALL_PAGES 0x3f
-/* Not in Mt. Fuji, but in ATAPI 2.6 -- depricated now in favor
- * of MODE_SENSE_POWER_PAGE */
-#define GPMODE_CDROM_PAGE 0x0d
-
-
-
-/* DVD struct types */
-#define DVD_STRUCT_PHYSICAL 0x00
-#define DVD_STRUCT_COPYRIGHT 0x01
-#define DVD_STRUCT_DISCKEY 0x02
-#define DVD_STRUCT_BCA 0x03
-#define DVD_STRUCT_MANUFACT 0x04
-
-struct dvd_layer {
- __u8 book_version : 4;
- __u8 book_type : 4;
- __u8 min_rate : 4;
- __u8 disc_size : 4;
- __u8 layer_type : 4;
- __u8 track_path : 1;
- __u8 nlayers : 2;
- __u8 track_density : 4;
- __u8 linear_density : 4;
- __u8 bca : 1;
- __u32 start_sector;
- __u32 end_sector;
- __u32 end_sector_l0;
-};
-
-#define DVD_LAYERS 4
-
-struct dvd_physical {
- __u8 type;
- __u8 layer_num;
- struct dvd_layer layer[DVD_LAYERS];
-};
-
-struct dvd_copyright {
- __u8 type;
-
- __u8 layer_num;
- __u8 cpst;
- __u8 rmi;
-};
-
-struct dvd_disckey {
- __u8 type;
-
- unsigned agid : 2;
- __u8 value[2048];
-};
-
-struct dvd_bca {
- __u8 type;
-
- int len;
- __u8 value[188];
-};
-
-struct dvd_manufact {
- __u8 type;
-
- __u8 layer_num;
- int len;
- __u8 value[2048];
-};
-
-typedef union {
- __u8 type;
-
- struct dvd_physical physical;
- struct dvd_copyright copyright;
- struct dvd_disckey disckey;
- struct dvd_bca bca;
- struct dvd_manufact manufact;
-} dvd_struct;
-
-/*
- * DVD authentication ioctl
- */
-
-/* Authentication states */
-#define DVD_LU_SEND_AGID 0
-#define DVD_HOST_SEND_CHALLENGE 1
-#define DVD_LU_SEND_KEY1 2
-#define DVD_LU_SEND_CHALLENGE 3
-#define DVD_HOST_SEND_KEY2 4
-
-/* Termination states */
-#define DVD_AUTH_ESTABLISHED 5
-#define DVD_AUTH_FAILURE 6
-
-/* Other functions */
-#define DVD_LU_SEND_TITLE_KEY 7
-#define DVD_LU_SEND_ASF 8
-#define DVD_INVALIDATE_AGID 9
-#define DVD_LU_SEND_RPC_STATE 10
-#define DVD_HOST_SEND_RPC_STATE 11
-
-/* State data */
-typedef __u8 dvd_key[5]; /* 40-bit value, MSB is first elem. */
-typedef __u8 dvd_challenge[10]; /* 80-bit value, MSB is first elem. */
-
-struct dvd_lu_send_agid {
- __u8 type;
- unsigned agid : 2;
-};
-
-struct dvd_host_send_challenge {
- __u8 type;
- unsigned agid : 2;
-
- dvd_challenge chal;
-};
-
-struct dvd_send_key {
- __u8 type;
- unsigned agid : 2;
-
- dvd_key key;
-};
-
-struct dvd_lu_send_challenge {
- __u8 type;
- unsigned agid : 2;
-
- dvd_challenge chal;
-};
-
-#define DVD_CPM_NO_COPYRIGHT 0
-#define DVD_CPM_COPYRIGHTED 1
-
-#define DVD_CP_SEC_NONE 0
-#define DVD_CP_SEC_EXIST 1
-
-#define DVD_CGMS_UNRESTRICTED 0
-#define DVD_CGMS_SINGLE 2
-#define DVD_CGMS_RESTRICTED 3
-
-struct dvd_lu_send_title_key {
- __u8 type;
- unsigned agid : 2;
-
- dvd_key title_key;
- int lba;
- unsigned cpm : 1;
- unsigned cp_sec : 1;
- unsigned cgms : 2;
-};
-
-struct dvd_lu_send_asf {
- __u8 type;
- unsigned agid : 2;
-
- unsigned asf : 1;
-};
-
-struct dvd_host_send_rpcstate {
- __u8 type;
- __u8 pdrc;
-};
-
-struct dvd_lu_send_rpcstate {
- __u8 type : 2;
- __u8 vra : 3;
- __u8 ucca : 3;
- __u8 region_mask;
- __u8 rpc_scheme;
-};
-
-typedef union {
- __u8 type;
-
- struct dvd_lu_send_agid lsa;
- struct dvd_host_send_challenge hsc;
- struct dvd_send_key lsk;
- struct dvd_lu_send_challenge lsc;
- struct dvd_send_key hsk;
- struct dvd_lu_send_title_key lstk;
- struct dvd_lu_send_asf lsasf;
- struct dvd_host_send_rpcstate hrpcs;
- struct dvd_lu_send_rpcstate lrpcs;
-} dvd_authinfo;
-
-struct request_sense {
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 valid : 1;
- __u8 error_code : 7;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 error_code : 7;
- __u8 valid : 1;
-#endif
- __u8 segment_number;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved1 : 2;
- __u8 ili : 1;
- __u8 reserved2 : 1;
- __u8 sense_key : 4;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 sense_key : 4;
- __u8 reserved2 : 1;
- __u8 ili : 1;
- __u8 reserved1 : 2;
-#endif
- __u8 information[4];
- __u8 add_sense_len;
- __u8 command_info[4];
- __u8 asc;
- __u8 ascq;
- __u8 fruc;
- __u8 sks[3];
- __u8 asb[46];
-};
-
-/*
- * feature profile
- */
-#define CDF_RWRT 0x0020 /* "Random Writable" */
-#define CDF_HWDM 0x0024 /* "Hardware Defect Management" */
-#define CDF_MRW 0x0028
-
-/*
- * media status bits
- */
-#define CDM_MRW_NOTMRW 0
-#define CDM_MRW_BGFORMAT_INACTIVE 1
-#define CDM_MRW_BGFORMAT_ACTIVE 2
-#define CDM_MRW_BGFORMAT_COMPLETE 3
-
-/*
- * mrw address spaces
- */
-#define MRW_LBA_DMA 0
-#define MRW_LBA_GAA 1
-
-/*
- * mrw mode pages (first is deprecated) -- probed at init time and
- * cdi->mrw_mode_page is set
- */
-#define MRW_MODE_PC_PRE1 0x2c
-#define MRW_MODE_PC 0x03
-
-struct mrw_feature_desc {
- __u16 feature_code;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved1 : 2;
- __u8 feature_version : 4;
- __u8 persistent : 1;
- __u8 curr : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 curr : 1;
- __u8 persistent : 1;
- __u8 feature_version : 4;
- __u8 reserved1 : 2;
-#endif
- __u8 add_len;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved2 : 7;
- __u8 write : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 write : 1;
- __u8 reserved2 : 7;
-#endif
- __u8 reserved3;
- __u8 reserved4;
- __u8 reserved5;
-};
-
-/* cf. mmc4r02g.pdf 5.3.10 Random Writable Feature (0020h) pg 197 of 635 */
-struct rwrt_feature_desc {
- __u16 feature_code;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved1 : 2;
- __u8 feature_version : 4;
- __u8 persistent : 1;
- __u8 curr : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 curr : 1;
- __u8 persistent : 1;
- __u8 feature_version : 4;
- __u8 reserved1 : 2;
-#endif
- __u8 add_len;
- __u32 last_lba;
- __u32 block_size;
- __u16 blocking;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved2 : 7;
- __u8 page_present : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 page_present : 1;
- __u8 reserved2 : 7;
-#endif
- __u8 reserved3;
-};
-
-typedef struct {
- __u16 disc_information_length;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved1 : 3;
- __u8 erasable : 1;
- __u8 border_status : 2;
- __u8 disc_status : 2;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 disc_status : 2;
- __u8 border_status : 2;
- __u8 erasable : 1;
- __u8 reserved1 : 3;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
- __u8 n_first_track;
- __u8 n_sessions_lsb;
- __u8 first_track_lsb;
- __u8 last_track_lsb;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 did_v : 1;
- __u8 dbc_v : 1;
- __u8 uru : 1;
- __u8 reserved2 : 2;
- __u8 dbit : 1;
- __u8 mrw_status : 2;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 mrw_status : 2;
- __u8 dbit : 1;
- __u8 reserved2 : 2;
- __u8 uru : 1;
- __u8 dbc_v : 1;
- __u8 did_v : 1;
-#endif
- __u8 disc_type;
- __u8 n_sessions_msb;
- __u8 first_track_msb;
- __u8 last_track_msb;
- __u32 disc_id;
- __u32 lead_in;
- __u32 lead_out;
- __u8 disc_bar_code[8];
- __u8 reserved3;
- __u8 n_opc;
-} disc_information;
-
-typedef struct {
- __u16 track_information_length;
- __u8 track_lsb;
- __u8 session_lsb;
- __u8 reserved1;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved2 : 2;
- __u8 damage : 1;
- __u8 copy : 1;
- __u8 track_mode : 4;
- __u8 rt : 1;
- __u8 blank : 1;
- __u8 packet : 1;
- __u8 fp : 1;
- __u8 data_mode : 4;
- __u8 reserved3 : 6;
- __u8 lra_v : 1;
- __u8 nwa_v : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 track_mode : 4;
- __u8 copy : 1;
- __u8 damage : 1;
- __u8 reserved2 : 2;
- __u8 data_mode : 4;
- __u8 fp : 1;
- __u8 packet : 1;
- __u8 blank : 1;
- __u8 rt : 1;
- __u8 nwa_v : 1;
- __u8 lra_v : 1;
- __u8 reserved3 : 6;
-#endif
- __u32 track_start;
- __u32 next_writable;
- __u32 free_blocks;
- __u32 fixed_packet_size;
- __u32 track_size;
- __u32 last_rec_address;
-} track_information;
-
-struct feature_header {
- __u32 data_len;
- __u8 reserved1;
- __u8 reserved2;
- __u16 curr_profile;
-};
-
-struct mode_page_header {
- __u16 mode_data_length;
- __u8 medium_type;
- __u8 reserved1;
- __u8 reserved2;
- __u8 reserved3;
- __u16 desc_length;
-};
-
-#ifdef __KERNEL__
-#include <linux/fs.h> /* not really needed, later.. */
-#include <linux/device.h>
-
-struct packet_command
-{
- unsigned char cmd[CDROM_PACKET_SIZE];
- unsigned char *buffer;
- unsigned int buflen;
- int stat;
- struct request_sense *sense;
- unsigned char data_direction;
- int quiet;
- int timeout;
- void *reserved[1];
-};
-
-/*
- * _OLD will use PIO transfer on atapi devices, _BPC_* will use DMA
- */
-#define CDDA_OLD 0 /* old style */
-#define CDDA_BPC_SINGLE 1 /* single frame block pc */
-#define CDDA_BPC_FULL 2 /* multi frame block pc */
-
-/* Uniform cdrom data structures for cdrom.c */
-struct cdrom_device_info {
- struct cdrom_device_ops *ops; /* link to device_ops */
- struct cdrom_device_info *next; /* next device_info for this major */
- struct gendisk *disk; /* matching block layer disk */
- void *handle; /* driver-dependent data */
-/* specifications */
- int mask; /* mask of capability: disables them */
- int speed; /* maximum speed for reading data */
- int capacity; /* number of discs in jukebox */
-/* device-related storage */
- int options : 30; /* options flags */
- unsigned mc_flags : 2; /* media change buffer flags */
- int use_count; /* number of times device opened */
- char name[20]; /* name of the device type */
-/* per-device flags */
- __u8 sanyo_slot : 2; /* Sanyo 3 CD changer support */
- __u8 reserved : 6; /* not used yet */
- int cdda_method; /* see flags */
- __u8 last_sense;
- __u8 media_written; /* dirty flag, DVD+RW bookkeeping */
- unsigned short mmc3_profile; /* current MMC3 profile */
- int for_data;
- int (*exit)(struct cdrom_device_info *);
- int mrw_mode_page;
-};
-
-struct cdrom_device_ops {
-/* routines */
- int (*open) (struct cdrom_device_info *, int);
- void (*release) (struct cdrom_device_info *);
- int (*drive_status) (struct cdrom_device_info *, int);
- int (*media_changed) (struct cdrom_device_info *, int);
- int (*tray_move) (struct cdrom_device_info *, int);
- int (*lock_door) (struct cdrom_device_info *, int);
- int (*select_speed) (struct cdrom_device_info *, int);
- int (*select_disc) (struct cdrom_device_info *, int);
- int (*get_last_session) (struct cdrom_device_info *,
- struct cdrom_multisession *);
- int (*get_mcn) (struct cdrom_device_info *,
- struct cdrom_mcn *);
- /* hard reset device */
- int (*reset) (struct cdrom_device_info *);
- /* play stuff */
- int (*audio_ioctl) (struct cdrom_device_info *,unsigned int, void *);
-
-/* driver specifications */
- const int capability; /* capability flags */
- int n_minors; /* number of active minor devices */
- /* handle uniform packets for scsi type devices (scsi,atapi) */
- int (*generic_packet) (struct cdrom_device_info *,
- struct packet_command *);
-};
-
-/* the general block_device operations structure: */
-extern int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip,
- struct file *fp);
-extern int cdrom_release(struct cdrom_device_info *cdi, struct file *fp);
-extern int cdrom_ioctl(struct file *file, struct cdrom_device_info *cdi,
- struct inode *ip, unsigned int cmd, unsigned long arg);
-extern int cdrom_media_changed(struct cdrom_device_info *);
-
-extern int register_cdrom(struct cdrom_device_info *cdi);
-extern int unregister_cdrom(struct cdrom_device_info *cdi);
-
-typedef struct {
- int data;
- int audio;
- int cdi;
- int xa;
- long error;
-} tracktype;
-
-extern int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written);
-extern int cdrom_number_of_slots(struct cdrom_device_info *cdi);
-extern int cdrom_mode_select(struct cdrom_device_info *cdi,
- struct packet_command *cgc);
-extern int cdrom_mode_sense(struct cdrom_device_info *cdi,
- struct packet_command *cgc,
- int page_code, int page_control);
-extern void init_cdrom_command(struct packet_command *cgc,
- void *buffer, int len, int type);
-
-/* The SCSI spec says there could be 256 slots. */
-#define CDROM_MAX_SLOTS 256
-
-struct cdrom_mechstat_header {
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 fault : 1;
- __u8 changer_state : 2;
- __u8 curslot : 5;
- __u8 mech_state : 3;
- __u8 door_open : 1;
- __u8 reserved1 : 4;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 curslot : 5;
- __u8 changer_state : 2;
- __u8 fault : 1;
- __u8 reserved1 : 4;
- __u8 door_open : 1;
- __u8 mech_state : 3;
-#endif
- __u8 curlba[3];
- __u8 nslots;
- __u16 slot_tablelen;
-};
-
-struct cdrom_slot {
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 disc_present : 1;
- __u8 reserved1 : 6;
- __u8 change : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 change : 1;
- __u8 reserved1 : 6;
- __u8 disc_present : 1;
-#endif
- __u8 reserved2[3];
-};
-
-struct cdrom_changer_info {
- struct cdrom_mechstat_header hdr;
- struct cdrom_slot slots[CDROM_MAX_SLOTS];
-};
-
-typedef enum {
- mechtype_caddy = 0,
- mechtype_tray = 1,
- mechtype_popup = 2,
- mechtype_individual_changer = 4,
- mechtype_cartridge_changer = 5
-} mechtype_t;
-
-typedef struct {
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 ps : 1;
- __u8 reserved1 : 1;
- __u8 page_code : 6;
- __u8 page_length;
- __u8 reserved2 : 1;
- __u8 bufe : 1;
- __u8 ls_v : 1;
- __u8 test_write : 1;
- __u8 write_type : 4;
- __u8 multi_session : 2; /* or border, DVD */
- __u8 fp : 1;
- __u8 copy : 1;
- __u8 track_mode : 4;
- __u8 reserved3 : 4;
- __u8 data_block_type : 4;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 page_code : 6;
- __u8 reserved1 : 1;
- __u8 ps : 1;
- __u8 page_length;
- __u8 write_type : 4;
- __u8 test_write : 1;
- __u8 ls_v : 1;
- __u8 bufe : 1;
- __u8 reserved2 : 1;
- __u8 track_mode : 4;
- __u8 copy : 1;
- __u8 fp : 1;
- __u8 multi_session : 2; /* or border, DVD */
- __u8 data_block_type : 4;
- __u8 reserved3 : 4;
-#endif
- __u8 link_size;
- __u8 reserved4;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved5 : 2;
- __u8 app_code : 6;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 app_code : 6;
- __u8 reserved5 : 2;
-#endif
- __u8 session_format;
- __u8 reserved6;
- __u32 packet_size;
- __u16 audio_pause;
- __u8 mcn[16];
- __u8 isrc[16];
- __u8 subhdr0;
- __u8 subhdr1;
- __u8 subhdr2;
- __u8 subhdr3;
-} __attribute__((packed)) write_param_page;
-
-struct modesel_head
-{
- __u8 reserved1;
- __u8 medium;
- __u8 reserved2;
- __u8 block_desc_length;
- __u8 density;
- __u8 number_of_blocks_hi;
- __u8 number_of_blocks_med;
- __u8 number_of_blocks_lo;
- __u8 reserved3;
- __u8 block_length_hi;
- __u8 block_length_med;
- __u8 block_length_lo;
-};
-
-typedef struct {
- __u16 report_key_length;
- __u8 reserved1;
- __u8 reserved2;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 type_code : 2;
- __u8 vra : 3;
- __u8 ucca : 3;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 ucca : 3;
- __u8 vra : 3;
- __u8 type_code : 2;
-#endif
- __u8 region_mask;
- __u8 rpc_scheme;
- __u8 reserved3;
-} rpc_state_t;
-
-struct event_header {
- __u16 data_len;
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 nea : 1;
- __u8 reserved1 : 4;
- __u8 notification_class : 3;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 notification_class : 3;
- __u8 reserved1 : 4;
- __u8 nea : 1;
-#endif
- __u8 supp_event_class;
-};
-
-struct media_event_desc {
-#if defined(__BIG_ENDIAN_BITFIELD)
- __u8 reserved1 : 4;
- __u8 media_event_code : 4;
- __u8 reserved2 : 6;
- __u8 media_present : 1;
- __u8 door_open : 1;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 media_event_code : 4;
- __u8 reserved1 : 4;
- __u8 door_open : 1;
- __u8 media_present : 1;
- __u8 reserved2 : 6;
-#endif
- __u8 start_slot;
- __u8 end_slot;
-};
-
-extern int cdrom_get_media_event(struct cdrom_device_info *cdi, struct media_event_desc *med);
-
-#endif /* End of kernel only stuff */
-
-#endif /* _LINUX_CDROM_H */
diff --git a/original/linux/circ_buf.h b/original/linux/circ_buf.h
deleted file mode 100644
index a2ed059..0000000
--- a/original/linux/circ_buf.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _LINUX_CIRC_BUF_H
-#define _LINUX_CIRC_BUF_H 1
-
-struct circ_buf {
- char *buf;
- int head;
- int tail;
-};
-
-/* Return count in buffer. */
-#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))
-
-/* Return space available, 0..size-1. We always leave one free char
- as a completely full buffer has head == tail, which is the same as
- empty. */
-#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))
-
-/* Return count up to the end of the buffer. Carefully avoid
- accessing head and tail more than once, so they can change
- underneath us without returning inconsistent results. */
-#define CIRC_CNT_TO_END(head,tail,size) \
- ({int end = (size) - (tail); \
- int n = ((head) + end) & ((size)-1); \
- n < end ? n : end;})
-
-/* Return space available up to the end of the buffer. */
-#define CIRC_SPACE_TO_END(head,tail,size) \
- ({int end = (size) - 1 - (head); \
- int n = (end + (tail)) & ((size)-1); \
- n <= end ? n : end+1;})
-
-#endif /* _LINUX_CIRC_BUF_H */
diff --git a/original/linux/clk.h b/original/linux/clk.h
deleted file mode 100644
index 5ca8c6f..0000000
--- a/original/linux/clk.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * linux/include/linux/clk.h
- *
- * Copyright (C) 2004 ARM Limited.
- * Written by Deep Blue Solutions Limited.
- *
- * 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.
- */
-#ifndef __LINUX_CLK_H
-#define __LINUX_CLK_H
-
-struct device;
-
-/*
- * The base API.
- */
-
-
-/*
- * struct clk - an machine class defined object / cookie.
- */
-struct clk;
-
-/**
- * clk_get - lookup and obtain a reference to a clock producer.
- * @dev: device for clock "consumer"
- * @id: clock comsumer ID
- *
- * Returns a struct clk corresponding to the clock producer, or
- * valid IS_ERR() condition containing errno. The implementation
- * uses @dev and @id to determine the clock consumer, and thereby
- * the clock producer. (IOW, @id may be identical strings, but
- * clk_get may return different clock producers depending on @dev.)
- *
- * Drivers must assume that the clock source is not enabled.
- */
-struct clk *clk_get(struct device *dev, const char *id);
-
-/**
- * clk_enable - inform the system when the clock source should be running.
- * @clk: clock source
- *
- * If the clock can not be enabled/disabled, this should return success.
- *
- * Returns success (0) or negative errno.
- */
-int clk_enable(struct clk *clk);
-
-/**
- * clk_disable - inform the system when the clock source is no longer required.
- * @clk: clock source
- *
- * Inform the system that a clock source is no longer required by
- * a driver and may be shut down.
- *
- * Implementation detail: if the clock source is shared between
- * multiple drivers, clk_enable() calls must be balanced by the
- * same number of clk_disable() calls for the clock source to be
- * disabled.
- */
-void clk_disable(struct clk *clk);
-
-/**
- * clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
- * This is only valid once the clock source has been enabled.
- * @clk: clock source
- */
-unsigned long clk_get_rate(struct clk *clk);
-
-/**
- * clk_put - "free" the clock source
- * @clk: clock source
- *
- * Note: drivers must ensure that all clk_enable calls made on this
- * clock source are balanced by clk_disable calls prior to calling
- * this function.
- */
-void clk_put(struct clk *clk);
-
-
-/*
- * The remaining APIs are optional for machine class support.
- */
-
-
-/**
- * clk_round_rate - adjust a rate to the exact rate a clock can provide
- * @clk: clock source
- * @rate: desired clock rate in Hz
- *
- * Returns rounded clock rate in Hz, or negative errno.
- */
-long clk_round_rate(struct clk *clk, unsigned long rate);
-
-/**
- * clk_set_rate - set the clock rate for a clock source
- * @clk: clock source
- * @rate: desired clock rate in Hz
- *
- * Returns success (0) or negative errno.
- */
-int clk_set_rate(struct clk *clk, unsigned long rate);
-
-/**
- * clk_set_parent - set the parent clock source for this clock
- * @clk: clock source
- * @parent: parent clock source
- *
- * Returns success (0) or negative errno.
- */
-int clk_set_parent(struct clk *clk, struct clk *parent);
-
-/**
- * clk_get_parent - get the parent clock source for this clock
- * @clk: clock source
- *
- * Returns struct clk corresponding to parent clock source, or
- * valid IS_ERR() condition containing errno.
- */
-struct clk *clk_get_parent(struct clk *clk);
-
-#endif
diff --git a/original/linux/coda.h b/original/linux/coda.h
deleted file mode 100644
index b5cf078..0000000
--- a/original/linux/coda.h
+++ /dev/null
@@ -1,787 +0,0 @@
-/*
- You may distribute this file under either of the two licenses that
- follow at your discretion.
-*/
-
-/* BLURB lgpl
-
- Coda File System
- Release 5
-
- Copyright (c) 1987-1999 Carnegie Mellon University
- Additional copyrights listed below
-
-This code is distributed "AS IS" without warranty of any kind under
-the terms of the GNU Library General Public Licence Version 2, as
-shown in the file LICENSE, or under the license shown below. The
-technical and financial contributors to Coda are listed in the file
-CREDITS.
-
- Additional copyrights
-*/
-
-/*
-
- Coda: an Experimental Distributed File System
- Release 4.0
-
- Copyright (c) 1987-1999 Carnegie Mellon University
- All Rights Reserved
-
-Permission to use, copy, modify and distribute this software and its
-documentation is hereby granted, provided that both the copyright
-notice and this permission notice appear in all copies of the
-software, derivative works or modified versions, and any portions
-thereof, and that both notices appear in supporting documentation, and
-that credit is given to Carnegie Mellon University in all documents
-and publicity pertaining to direct or indirect use of this code or its
-derivatives.
-
-CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS KNOWN TO HAVE BUGS,
-SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON ALLOWS
-FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON
-DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
-RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF
-ANY DERIVATIVE WORK.
-
-Carnegie Mellon encourages users of this software to return any
-improvements or extensions that they make, and to grant Carnegie
-Mellon the rights to redistribute these changes without encumbrance.
-*/
-
-/*
- *
- * Based on cfs.h from Mach, but revamped for increased simplicity.
- * Linux modifications by
- * Peter Braam, Aug 1996
- */
-
-#ifndef _CODA_HEADER_
-#define _CODA_HEADER_
-
-
-/* Catch new _KERNEL defn for NetBSD and DJGPP/__CYGWIN32__ */
-#if defined(__NetBSD__) || \
- ((defined(DJGPP) || defined(__CYGWIN32__)) && !defined(KERNEL))
-#include <sys/types.h>
-#endif
-
-#ifndef CODA_MAXSYMLINKS
-#define CODA_MAXSYMLINKS 10
-#endif
-
-#if defined(DJGPP) || defined(__CYGWIN32__)
-#ifdef KERNEL
-typedef unsigned long u_long;
-typedef unsigned int u_int;
-typedef unsigned short u_short;
-typedef u_long ino_t;
-typedef u_long dev_t;
-typedef void * caddr_t;
-#ifdef DOS
-typedef unsigned __int64 u_quad_t;
-#else
-typedef unsigned long long u_quad_t;
-#endif
-
-#define inline
-
-struct timespec {
- long ts_sec;
- long ts_nsec;
-};
-#else /* DJGPP but not KERNEL */
-#include <sys/time.h>
-typedef unsigned long long u_quad_t;
-#endif /* !KERNEL */
-#endif /* !DJGPP */
-
-
-#if defined(__linux__)
-#include <linux/time.h>
-#define cdev_t u_quad_t
-#ifndef __KERNEL__
-#if !defined(_UQUAD_T_) && (!defined(__GLIBC__) || __GLIBC__ < 2)
-#define _UQUAD_T_ 1
-typedef unsigned long long u_quad_t;
-#endif
-#else /*__KERNEL__ */
-typedef unsigned long long u_quad_t;
-#endif /* __KERNEL__ */
-#else
-#define cdev_t dev_t
-#endif
-
-#ifdef __CYGWIN32__
-struct timespec {
- time_t tv_sec; /* seconds */
- long tv_nsec; /* nanoseconds */
-};
-#endif
-
-#ifndef __BIT_TYPES_DEFINED__
-#define __BIT_TYPES_DEFINED__
-typedef signed char int8_t;
-typedef unsigned char u_int8_t;
-typedef short int16_t;
-typedef unsigned short u_int16_t;
-typedef int int32_t;
-typedef unsigned int u_int32_t;
-#endif
-
-
-/*
- * Cfs constants
- */
-#define CODA_MAXNAMLEN 255
-#define CODA_MAXPATHLEN 1024
-#define CODA_MAXSYMLINK 10
-
-/* these are Coda's version of O_RDONLY etc combinations
- * to deal with VFS open modes
- */
-#define C_O_READ 0x001
-#define C_O_WRITE 0x002
-#define C_O_TRUNC 0x010
-#define C_O_EXCL 0x100
-#define C_O_CREAT 0x200
-
-/* these are to find mode bits in Venus */
-#define C_M_READ 00400
-#define C_M_WRITE 00200
-
-/* for access Venus will use */
-#define C_A_C_OK 8 /* Test for writing upon create. */
-#define C_A_R_OK 4 /* Test for read permission. */
-#define C_A_W_OK 2 /* Test for write permission. */
-#define C_A_X_OK 1 /* Test for execute permission. */
-#define C_A_F_OK 0 /* Test for existence. */
-
-
-
-#ifndef _VENUS_DIRENT_T_
-#define _VENUS_DIRENT_T_ 1
-struct venus_dirent {
- u_int32_t d_fileno; /* file number of entry */
- u_int16_t d_reclen; /* length of this record */
- u_int8_t d_type; /* file type, see below */
- u_int8_t d_namlen; /* length of string in d_name */
- char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */
-};
-#undef DIRSIZ
-#define DIRSIZ(dp) ((sizeof (struct venus_dirent) - (CODA_MAXNAMLEN+1)) + \
- (((dp)->d_namlen+1 + 3) &~ 3))
-
-/*
- * File types
- */
-#define CDT_UNKNOWN 0
-#define CDT_FIFO 1
-#define CDT_CHR 2
-#define CDT_DIR 4
-#define CDT_BLK 6
-#define CDT_REG 8
-#define CDT_LNK 10
-#define CDT_SOCK 12
-#define CDT_WHT 14
-
-/*
- * Convert between stat structure types and directory types.
- */
-#define IFTOCDT(mode) (((mode) & 0170000) >> 12)
-#define CDTTOIF(dirtype) ((dirtype) << 12)
-
-#endif
-
-#ifndef _VUID_T_
-#define _VUID_T_
-typedef u_int32_t vuid_t;
-typedef u_int32_t vgid_t;
-#endif /*_VUID_T_ */
-
-#ifdef CONFIG_CODA_FS_OLD_API
-struct CodaFid {
- u_int32_t opaque[3];
-};
-
-static __inline__ ino_t coda_f2i(struct CodaFid *fid)
-{
- if ( ! fid )
- return 0;
- if (fid->opaque[1] == 0xfffffffe || fid->opaque[1] == 0xffffffff)
- return ((fid->opaque[0] << 20) | (fid->opaque[2] & 0xfffff));
- else
- return (fid->opaque[2] + (fid->opaque[1]<<10) + (fid->opaque[0]<<20));
-}
-
-struct coda_cred {
- vuid_t cr_uid, cr_euid, cr_suid, cr_fsuid; /* Real, efftve, set, fs uid*/
- vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */
-};
-
-#else /* not defined(CONFIG_CODA_FS_OLD_API) */
-
-struct CodaFid {
- u_int32_t opaque[4];
-};
-
-#define coda_f2i(fid)\
- (fid ? (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]) : 0)
-
-#endif
-
-#ifndef _VENUS_VATTR_T_
-#define _VENUS_VATTR_T_
-/*
- * Vnode types. VNON means no type.
- */
-enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD };
-
-struct coda_vattr {
- long va_type; /* vnode type (for create) */
- u_short va_mode; /* files access mode and type */
- short va_nlink; /* number of references to file */
- vuid_t va_uid; /* owner user id */
- vgid_t va_gid; /* owner group id */
- long va_fileid; /* file id */
- u_quad_t va_size; /* file size in bytes */
- long va_blocksize; /* blocksize preferred for i/o */
- struct timespec va_atime; /* time of last access */
- struct timespec va_mtime; /* time of last modification */
- struct timespec va_ctime; /* time file changed */
- u_long va_gen; /* generation number of file */
- u_long va_flags; /* flags defined for file */
- cdev_t va_rdev; /* device special file represents */
- u_quad_t va_bytes; /* bytes of disk space held by file */
- u_quad_t va_filerev; /* file modification number */
-};
-
-#endif
-
-/* structure used by CODA_STATFS for getting cache information from venus */
-struct coda_statfs {
- int32_t f_blocks;
- int32_t f_bfree;
- int32_t f_bavail;
- int32_t f_files;
- int32_t f_ffree;
-};
-
-/*
- * Kernel <--> Venus communications.
- */
-
-#define CODA_ROOT 2
-#define CODA_OPEN_BY_FD 3
-#define CODA_OPEN 4
-#define CODA_CLOSE 5
-#define CODA_IOCTL 6
-#define CODA_GETATTR 7
-#define CODA_SETATTR 8
-#define CODA_ACCESS 9
-#define CODA_LOOKUP 10
-#define CODA_CREATE 11
-#define CODA_REMOVE 12
-#define CODA_LINK 13
-#define CODA_RENAME 14
-#define CODA_MKDIR 15
-#define CODA_RMDIR 16
-#define CODA_SYMLINK 18
-#define CODA_READLINK 19
-#define CODA_FSYNC 20
-#define CODA_VGET 22
-#define CODA_SIGNAL 23
-#define CODA_REPLACE 24 /* DOWNCALL */
-#define CODA_FLUSH 25 /* DOWNCALL */
-#define CODA_PURGEUSER 26 /* DOWNCALL */
-#define CODA_ZAPFILE 27 /* DOWNCALL */
-#define CODA_ZAPDIR 28 /* DOWNCALL */
-#define CODA_PURGEFID 30 /* DOWNCALL */
-#define CODA_OPEN_BY_PATH 31
-#define CODA_RESOLVE 32
-#define CODA_REINTEGRATE 33
-#define CODA_STATFS 34
-#define CODA_STORE 35
-#define CODA_RELEASE 36
-#define CODA_NCALLS 37
-
-#define DOWNCALL(opcode) (opcode >= CODA_REPLACE && opcode <= CODA_PURGEFID)
-
-#define VC_MAXDATASIZE 8192
-#define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\
- VC_MAXDATASIZE
-
-#define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t)
-
-#if 0
-#define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */
-#define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */
-#endif
-#ifdef CONFIG_CODA_FS_OLD_API
-#define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */
-#else
-#define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */
-#endif
-
-/*
- * Venus <-> Coda RPC arguments
- */
-struct coda_in_hdr {
- u_int32_t opcode;
- u_int32_t unique; /* Keep multiple outstanding msgs distinct */
-#ifdef CONFIG_CODA_FS_OLD_API
- u_int16_t pid; /* Common to all */
- u_int16_t pgid; /* Common to all */
- u_int16_t sid; /* Common to all */
- struct coda_cred cred; /* Common to all */
-#else
- pid_t pid;
- pid_t pgid;
- vuid_t uid;
-#endif
-};
-
-/* Really important that opcode and unique are 1st two fields! */
-struct coda_out_hdr {
- u_int32_t opcode;
- u_int32_t unique;
- u_int32_t result;
-};
-
-/* coda_root: NO_IN */
-struct coda_root_out {
- struct coda_out_hdr oh;
- struct CodaFid VFid;
-};
-
-struct coda_root_in {
- struct coda_in_hdr in;
-};
-
-/* coda_open: */
-struct coda_open_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_open_out {
- struct coda_out_hdr oh;
- cdev_t dev;
- ino_t inode;
-};
-
-
-/* coda_store: */
-struct coda_store_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_store_out {
- struct coda_out_hdr out;
-};
-
-/* coda_release: */
-struct coda_release_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_release_out {
- struct coda_out_hdr out;
-};
-
-/* coda_close: */
-struct coda_close_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_close_out {
- struct coda_out_hdr out;
-};
-
-/* coda_ioctl: */
-struct coda_ioctl_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int cmd;
- int len;
- int rwflag;
- char *data; /* Place holder for data. */
-};
-
-struct coda_ioctl_out {
- struct coda_out_hdr oh;
- int len;
- caddr_t data; /* Place holder for data. */
-};
-
-
-/* coda_getattr: */
-struct coda_getattr_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
-};
-
-struct coda_getattr_out {
- struct coda_out_hdr oh;
- struct coda_vattr attr;
-};
-
-
-/* coda_setattr: NO_OUT */
-struct coda_setattr_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- struct coda_vattr attr;
-};
-
-struct coda_setattr_out {
- struct coda_out_hdr out;
-};
-
-/* coda_access: NO_OUT */
-struct coda_access_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_access_out {
- struct coda_out_hdr out;
-};
-
-
-/* lookup flags */
-#define CLU_CASE_SENSITIVE 0x01
-#define CLU_CASE_INSENSITIVE 0x02
-
-/* coda_lookup: */
-struct coda_lookup_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int name; /* Place holder for data. */
- int flags;
-};
-
-struct coda_lookup_out {
- struct coda_out_hdr oh;
- struct CodaFid VFid;
- int vtype;
-};
-
-
-/* coda_create: */
-struct coda_create_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- struct coda_vattr attr;
- int excl;
- int mode;
- int name; /* Place holder for data. */
-};
-
-struct coda_create_out {
- struct coda_out_hdr oh;
- struct CodaFid VFid;
- struct coda_vattr attr;
-};
-
-
-/* coda_remove: NO_OUT */
-struct coda_remove_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int name; /* Place holder for data. */
-};
-
-struct coda_remove_out {
- struct coda_out_hdr out;
-};
-
-/* coda_link: NO_OUT */
-struct coda_link_in {
- struct coda_in_hdr ih;
- struct CodaFid sourceFid; /* cnode to link *to* */
- struct CodaFid destFid; /* Directory in which to place link */
- int tname; /* Place holder for data. */
-};
-
-struct coda_link_out {
- struct coda_out_hdr out;
-};
-
-
-/* coda_rename: NO_OUT */
-struct coda_rename_in {
- struct coda_in_hdr ih;
- struct CodaFid sourceFid;
- int srcname;
- struct CodaFid destFid;
- int destname;
-};
-
-struct coda_rename_out {
- struct coda_out_hdr out;
-};
-
-/* coda_mkdir: */
-struct coda_mkdir_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- struct coda_vattr attr;
- int name; /* Place holder for data. */
-};
-
-struct coda_mkdir_out {
- struct coda_out_hdr oh;
- struct CodaFid VFid;
- struct coda_vattr attr;
-};
-
-
-/* coda_rmdir: NO_OUT */
-struct coda_rmdir_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int name; /* Place holder for data. */
-};
-
-struct coda_rmdir_out {
- struct coda_out_hdr out;
-};
-
-/* coda_symlink: NO_OUT */
-struct coda_symlink_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid; /* Directory to put symlink in */
- int srcname;
- struct coda_vattr attr;
- int tname;
-};
-
-struct coda_symlink_out {
- struct coda_out_hdr out;
-};
-
-/* coda_readlink: */
-struct coda_readlink_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
-};
-
-struct coda_readlink_out {
- struct coda_out_hdr oh;
- int count;
- caddr_t data; /* Place holder for data. */
-};
-
-
-/* coda_fsync: NO_OUT */
-struct coda_fsync_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
-};
-
-struct coda_fsync_out {
- struct coda_out_hdr out;
-};
-
-/* coda_vget: */
-struct coda_vget_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
-};
-
-struct coda_vget_out {
- struct coda_out_hdr oh;
- struct CodaFid VFid;
- int vtype;
-};
-
-
-/* CODA_SIGNAL is out-of-band, doesn't need data. */
-/* CODA_INVALIDATE is a venus->kernel call */
-/* CODA_FLUSH is a venus->kernel call */
-
-/* coda_purgeuser: */
-/* CODA_PURGEUSER is a venus->kernel call */
-struct coda_purgeuser_out {
- struct coda_out_hdr oh;
-#ifdef CONFIG_CODA_FS_OLD_API
- struct coda_cred cred;
-#else
- vuid_t uid;
-#endif
-};
-
-/* coda_zapfile: */
-/* CODA_ZAPFILE is a venus->kernel call */
-struct coda_zapfile_out {
- struct coda_out_hdr oh;
- struct CodaFid CodaFid;
-};
-
-/* coda_zapdir: */
-/* CODA_ZAPDIR is a venus->kernel call */
-struct coda_zapdir_out {
- struct coda_out_hdr oh;
- struct CodaFid CodaFid;
-};
-
-/* coda_purgefid: */
-/* CODA_PURGEFID is a venus->kernel call */
-struct coda_purgefid_out {
- struct coda_out_hdr oh;
- struct CodaFid CodaFid;
-};
-
-/* coda_replace: */
-/* CODA_REPLACE is a venus->kernel call */
-struct coda_replace_out { /* coda_replace is a venus->kernel call */
- struct coda_out_hdr oh;
- struct CodaFid NewFid;
- struct CodaFid OldFid;
-};
-
-/* coda_open_by_fd: */
-struct coda_open_by_fd_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_open_by_fd_out {
- struct coda_out_hdr oh;
- int fd;
-
-#ifdef __KERNEL__
- struct file *fh; /* not passed from userspace but used in-kernel only */
-#endif
-};
-
-/* coda_open_by_path: */
-struct coda_open_by_path_in {
- struct coda_in_hdr ih;
- struct CodaFid VFid;
- int flags;
-};
-
-struct coda_open_by_path_out {
- struct coda_out_hdr oh;
- int path;
-};
-
-/* coda_statfs: NO_IN */
-struct coda_statfs_in {
- struct coda_in_hdr in;
-};
-
-struct coda_statfs_out {
- struct coda_out_hdr oh;
- struct coda_statfs stat;
-};
-
-/*
- * Occasionally, we don't cache the fid returned by CODA_LOOKUP.
- * For instance, if the fid is inconsistent.
- * This case is handled by setting the top bit of the type result parameter.
- */
-#define CODA_NOCACHE 0x80000000
-
-union inputArgs {
- struct coda_in_hdr ih; /* NB: every struct below begins with an ih */
- struct coda_open_in coda_open;
- struct coda_store_in coda_store;
- struct coda_release_in coda_release;
- struct coda_close_in coda_close;
- struct coda_ioctl_in coda_ioctl;
- struct coda_getattr_in coda_getattr;
- struct coda_setattr_in coda_setattr;
- struct coda_access_in coda_access;
- struct coda_lookup_in coda_lookup;
- struct coda_create_in coda_create;
- struct coda_remove_in coda_remove;
- struct coda_link_in coda_link;
- struct coda_rename_in coda_rename;
- struct coda_mkdir_in coda_mkdir;
- struct coda_rmdir_in coda_rmdir;
- struct coda_symlink_in coda_symlink;
- struct coda_readlink_in coda_readlink;
- struct coda_fsync_in coda_fsync;
- struct coda_vget_in coda_vget;
- struct coda_open_by_fd_in coda_open_by_fd;
- struct coda_open_by_path_in coda_open_by_path;
- struct coda_statfs_in coda_statfs;
-};
-
-union outputArgs {
- struct coda_out_hdr oh; /* NB: every struct below begins with an oh */
- struct coda_root_out coda_root;
- struct coda_open_out coda_open;
- struct coda_ioctl_out coda_ioctl;
- struct coda_getattr_out coda_getattr;
- struct coda_lookup_out coda_lookup;
- struct coda_create_out coda_create;
- struct coda_mkdir_out coda_mkdir;
- struct coda_readlink_out coda_readlink;
- struct coda_vget_out coda_vget;
- struct coda_purgeuser_out coda_purgeuser;
- struct coda_zapfile_out coda_zapfile;
- struct coda_zapdir_out coda_zapdir;
- struct coda_purgefid_out coda_purgefid;
- struct coda_replace_out coda_replace;
- struct coda_open_by_fd_out coda_open_by_fd;
- struct coda_open_by_path_out coda_open_by_path;
- struct coda_statfs_out coda_statfs;
-};
-
-union coda_downcalls {
- /* CODA_INVALIDATE is a venus->kernel call */
- /* CODA_FLUSH is a venus->kernel call */
- struct coda_purgeuser_out purgeuser;
- struct coda_zapfile_out zapfile;
- struct coda_zapdir_out zapdir;
- struct coda_purgefid_out purgefid;
- struct coda_replace_out replace;
-};
-
-
-/*
- * Used for identifying usage of "Control" and pioctls
- */
-
-#define PIOCPARM_MASK 0x0000ffff
-struct ViceIoctl {
- void __user *in; /* Data to be transferred in */
- void __user *out; /* Data to be transferred out */
- u_short in_size; /* Size of input buffer <= 2K */
- u_short out_size; /* Maximum size of output buffer, <= 2K */
-};
-
-struct PioctlData {
- const char __user *path;
- int follow;
- struct ViceIoctl vi;
-};
-
-#define CODA_CONTROL ".CONTROL"
-#define CODA_CONTROLLEN 8
-#define CTL_INO -1
-
-/* Data passed to mount */
-
-#define CODA_MOUNT_VERSION 1
-
-struct coda_mount_data {
- int version;
- int fd; /* Opened device */
-};
-
-#endif
-
diff --git a/original/linux/coda_fs_i.h b/original/linux/coda_fs_i.h
deleted file mode 100644
index 424fe9c..0000000
--- a/original/linux/coda_fs_i.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * coda_fs_i.h
- *
- * Copyright (C) 1998 Carnegie Mellon University
- *
- */
-
-#ifndef _LINUX_CODA_FS_I
-#define _LINUX_CODA_FS_I
-
-#ifdef __KERNEL__
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/coda.h>
-
-/*
- * coda fs inode data
- */
-struct coda_inode_info {
- struct CodaFid c_fid; /* Coda identifier */
- u_short c_flags; /* flags (see below) */
- struct list_head c_cilist; /* list of all coda inodes */
- unsigned int c_mapcount; /* nr of times this inode is mapped */
- unsigned int c_cached_epoch; /* epoch for cached permissions */
- vuid_t c_uid; /* fsuid for cached permissions */
- unsigned int c_cached_perm; /* cached access permissions */
- struct inode vfs_inode;
-};
-
-/*
- * coda fs file private data
- */
-#define CODA_MAGIC 0xC0DAC0DA
-struct coda_file_info {
- int cfi_magic; /* magic number */
- struct file *cfi_container; /* container file for this cnode */
- unsigned int cfi_mapcount; /* nr of times this file is mapped */
-};
-
-#define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data))
-
-/* flags */
-#define C_VATTR 0x1 /* Validity of vattr in inode */
-#define C_FLUSH 0x2 /* used after a flush */
-#define C_DYING 0x4 /* from venus (which died) */
-#define C_PURGE 0x8
-
-int coda_cnode_make(struct inode **, struct CodaFid *, struct super_block *);
-struct inode *coda_iget(struct super_block *sb, struct CodaFid *fid, struct coda_vattr *attr);
-int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
-struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb);
-void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *);
-
-#endif
-#endif
diff --git a/original/linux/compat.h b/original/linux/compat.h
deleted file mode 100644
index 9760753..0000000
--- a/original/linux/compat.h
+++ /dev/null
@@ -1,232 +0,0 @@
-#ifndef _LINUX_COMPAT_H
-#define _LINUX_COMPAT_H
-/*
- * These are the type definitions for the architecture specific
- * syscall compatibility layer.
- */
-
-#ifdef CONFIG_COMPAT
-
-#include <linux/stat.h>
-#include <linux/param.h> /* for HZ */
-#include <linux/sem.h>
-
-#include <asm/compat.h>
-#include <asm/siginfo.h>
-
-#define compat_jiffies_to_clock_t(x) \
- (((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
-
-typedef __compat_uid32_t compat_uid_t;
-typedef __compat_gid32_t compat_gid_t;
-
-struct rusage;
-
-struct compat_itimerspec {
- struct compat_timespec it_interval;
- struct compat_timespec it_value;
-};
-
-struct compat_utimbuf {
- compat_time_t actime;
- compat_time_t modtime;
-};
-
-struct compat_itimerval {
- struct compat_timeval it_interval;
- struct compat_timeval it_value;
-};
-
-struct compat_tms {
- compat_clock_t tms_utime;
- compat_clock_t tms_stime;
- compat_clock_t tms_cutime;
- compat_clock_t tms_cstime;
-};
-
-struct compat_timex {
- compat_uint_t modes;
- compat_long_t offset;
- compat_long_t freq;
- compat_long_t maxerror;
- compat_long_t esterror;
- compat_int_t status;
- compat_long_t constant;
- compat_long_t precision;
- compat_long_t tolerance;
- struct compat_timeval time;
- compat_long_t tick;
- compat_long_t ppsfreq;
- compat_long_t jitter;
- compat_int_t shift;
- compat_long_t stabil;
- compat_long_t jitcnt;
- compat_long_t calcnt;
- compat_long_t errcnt;
- compat_long_t stbcnt;
-
- compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
- compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
- compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
-};
-
-#define _COMPAT_NSIG_WORDS (_COMPAT_NSIG / _COMPAT_NSIG_BPW)
-
-typedef struct {
- compat_sigset_word sig[_COMPAT_NSIG_WORDS];
-} compat_sigset_t;
-
-extern int cp_compat_stat(struct kstat *, struct compat_stat __user *);
-extern int get_compat_timespec(struct timespec *, const struct compat_timespec __user *);
-extern int put_compat_timespec(const struct timespec *, struct compat_timespec __user *);
-
-struct compat_iovec {
- compat_uptr_t iov_base;
- compat_size_t iov_len;
-};
-
-struct compat_rlimit {
- compat_ulong_t rlim_cur;
- compat_ulong_t rlim_max;
-};
-
-struct compat_rusage {
- struct compat_timeval ru_utime;
- struct compat_timeval ru_stime;
- compat_long_t ru_maxrss;
- compat_long_t ru_ixrss;
- compat_long_t ru_idrss;
- compat_long_t ru_isrss;
- compat_long_t ru_minflt;
- compat_long_t ru_majflt;
- compat_long_t ru_nswap;
- compat_long_t ru_inblock;
- compat_long_t ru_oublock;
- compat_long_t ru_msgsnd;
- compat_long_t ru_msgrcv;
- compat_long_t ru_nsignals;
- compat_long_t ru_nvcsw;
- compat_long_t ru_nivcsw;
-};
-
-extern int put_compat_rusage(const struct rusage *, struct compat_rusage __user *);
-
-struct compat_siginfo;
-
-extern asmlinkage long compat_sys_waitid(int, compat_pid_t,
- struct compat_siginfo __user *, int,
- struct compat_rusage __user *);
-
-struct compat_dirent {
- u32 d_ino;
- compat_off_t d_off;
- u16 d_reclen;
- char d_name[256];
-};
-
-typedef union compat_sigval {
- compat_int_t sival_int;
- compat_uptr_t sival_ptr;
-} compat_sigval_t;
-
-#define COMPAT_SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
-
-typedef struct compat_sigevent {
- compat_sigval_t sigev_value;
- compat_int_t sigev_signo;
- compat_int_t sigev_notify;
- union {
- compat_int_t _pad[COMPAT_SIGEV_PAD_SIZE];
- compat_int_t _tid;
-
- struct {
- compat_uptr_t _function;
- compat_uptr_t _attribute;
- } _sigev_thread;
- } _sigev_un;
-} compat_sigevent_t;
-
-struct compat_robust_list {
- compat_uptr_t next;
-};
-
-struct compat_robust_list_head {
- struct compat_robust_list list;
- compat_long_t futex_offset;
- compat_uptr_t list_op_pending;
-};
-
-extern void compat_exit_robust_list(struct task_struct *curr);
-
-asmlinkage long
-compat_sys_set_robust_list(struct compat_robust_list_head __user *head,
- compat_size_t len);
-asmlinkage long
-compat_sys_get_robust_list(int pid, compat_uptr_t *head_ptr,
- compat_size_t __user *len_ptr);
-
-long compat_sys_semctl(int first, int second, int third, void __user *uptr);
-long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
-long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
- int version, void __user *uptr);
-long compat_sys_msgctl(int first, int second, void __user *uptr);
-long compat_sys_shmat(int first, int second, compat_uptr_t third, int version,
- void __user *uptr);
-long compat_sys_shmctl(int first, int second, void __user *uptr);
-long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
- unsigned nsems, const struct compat_timespec __user *timeout);
-asmlinkage long compat_sys_keyctl(u32 option,
- u32 arg2, u32 arg3, u32 arg4, u32 arg5);
-
-asmlinkage ssize_t compat_sys_readv(unsigned long fd,
- const struct compat_iovec __user *vec, unsigned long vlen);
-asmlinkage ssize_t compat_sys_writev(unsigned long fd,
- const struct compat_iovec __user *vec, unsigned long vlen);
-
-int compat_do_execve(char * filename, compat_uptr_t __user *argv,
- compat_uptr_t __user *envp, struct pt_regs * regs);
-
-asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
- compat_ulong_t __user *outp, compat_ulong_t __user *exp,
- struct compat_timeval __user *tvp);
-
-#define BITS_PER_COMPAT_LONG (8*sizeof(compat_long_t))
-
-#define BITS_TO_COMPAT_LONGS(bits) \
- (((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG)
-
-long compat_get_bitmap(unsigned long *mask, compat_ulong_t __user *umask,
- unsigned long bitmap_size);
-long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
- unsigned long bitmap_size);
-int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from);
-int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
-int get_compat_sigevent(struct sigevent *event,
- const struct compat_sigevent __user *u_event);
-
-static inline int compat_timeval_compare(struct compat_timeval *lhs,
- struct compat_timeval *rhs)
-{
- if (lhs->tv_sec < rhs->tv_sec)
- return -1;
- if (lhs->tv_sec > rhs->tv_sec)
- return 1;
- return lhs->tv_usec - rhs->tv_usec;
-}
-
-static inline int compat_timespec_compare(struct compat_timespec *lhs,
- struct compat_timespec *rhs)
-{
- if (lhs->tv_sec < rhs->tv_sec)
- return -1;
- if (lhs->tv_sec > rhs->tv_sec)
- return 1;
- return lhs->tv_nsec - rhs->tv_nsec;
-}
-
-asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
-
-extern int compat_printk(const char *fmt, ...);
-
-#endif /* CONFIG_COMPAT */
-#endif /* _LINUX_COMPAT_H */
diff --git a/original/linux/compiler-gcc.h b/original/linux/compiler-gcc.h
deleted file mode 100644
index 6e1c44a..0000000
--- a/original/linux/compiler-gcc.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Never include this file directly. Include <linux/compiler.h> instead. */
-
-/*
- * Common definitions for all gcc versions go here.
- */
-
-
-/* Optimization barrier */
-/* The "volatile" is due to gcc bugs */
-#define barrier() __asm__ __volatile__("": : :"memory")
-
-/* This macro obfuscates arithmetic on a variable address so that gcc
- shouldn't recognize the original var, and make assumptions about it */
-/*
- * Versions of the ppc64 compiler before 4.1 had a bug where use of
- * RELOC_HIDE could trash r30. The bug can be worked around by changing
- * the inline assembly constraint from =g to =r, in this particular
- * case either is valid.
- */
-#define RELOC_HIDE(ptr, off) \
- ({ unsigned long __ptr; \
- __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \
- (typeof(ptr)) (__ptr + (off)); })
-
-
-#define inline inline __attribute__((always_inline))
-#define __inline__ __inline__ __attribute__((always_inline))
-#define __inline __inline __attribute__((always_inline))
-#define __deprecated __attribute__((deprecated))
-#define noinline __attribute__((noinline))
-#define __attribute_pure__ __attribute__((pure))
-#define __attribute_const__ __attribute__((__const__))
diff --git a/original/linux/compiler.h b/original/linux/compiler.h
deleted file mode 100644
index 9b4f110..0000000
--- a/original/linux/compiler.h
+++ /dev/null
@@ -1,159 +0,0 @@
-#ifndef __LINUX_COMPILER_H
-#define __LINUX_COMPILER_H
-
-#ifndef __ASSEMBLY__
-
-#ifdef __CHECKER__
-# define __user __attribute__((noderef, address_space(1)))
-# define __kernel /* default address space */
-# define __safe __attribute__((safe))
-# define __force __attribute__((force))
-# define __nocast __attribute__((nocast))
-# define __iomem __attribute__((noderef, address_space(2)))
-# define __acquires(x) __attribute__((context(0,1)))
-# define __releases(x) __attribute__((context(1,0)))
-# define __acquire(x) __context__(1)
-# define __release(x) __context__(-1)
-# define __cond_lock(x) ((x) ? ({ __context__(1); 1; }) : 0)
-extern void __chk_user_ptr(void __user *);
-extern void __chk_io_ptr(void __iomem *);
-#else
-# define __user
-# define __kernel
-# define __safe
-# define __force
-# define __nocast
-# define __iomem
-# define __chk_user_ptr(x) (void)0
-# define __chk_io_ptr(x) (void)0
-# define __builtin_warning(x, y...) (1)
-# define __acquires(x)
-# define __releases(x)
-# define __acquire(x) (void)0
-# define __release(x) (void)0
-# define __cond_lock(x) (x)
-#endif
-
-#ifdef __KERNEL__
-
-#if __GNUC__ > 4
-#error no compiler-gcc.h file for this gcc version
-#elif __GNUC__ == 4
-# include <linux/compiler-gcc4.h>
-#elif __GNUC__ == 3
-# include <linux/compiler-gcc3.h>
-#else
-# error Sorry, your compiler is too old/not recognized.
-#endif
-
-/* Intel compiler defines __GNUC__. So we will overwrite implementations
- * coming from above header files here
- */
-#ifdef __INTEL_COMPILER
-# include <linux/compiler-intel.h>
-#endif
-
-/*
- * Generic compiler-dependent macros required for kernel
- * build go below this comment. Actual compiler/compiler version
- * specific implementations come from the above header files
- */
-
-#define likely(x) __builtin_expect(!!(x), 1)
-#define unlikely(x) __builtin_expect(!!(x), 0)
-
-/* Optimization barrier */
-#ifndef barrier
-# define barrier() __memory_barrier()
-#endif
-
-#ifndef RELOC_HIDE
-# define RELOC_HIDE(ptr, off) \
- ({ unsigned long __ptr; \
- __ptr = (unsigned long) (ptr); \
- (typeof(ptr)) (__ptr + (off)); })
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASSEMBLY__ */
-
-#ifdef __KERNEL__
-/*
- * Allow us to mark functions as 'deprecated' and have gcc emit a nice
- * warning for each use, in hopes of speeding the functions removal.
- * Usage is:
- * int __deprecated foo(void)
- */
-#ifndef __deprecated
-# define __deprecated /* unimplemented */
-#endif
-
-#ifdef MODULE
-#define __deprecated_for_modules __deprecated
-#else
-#define __deprecated_for_modules
-#endif
-
-#ifndef __must_check
-#define __must_check
-#endif
-
-/*
- * Allow us to avoid 'defined but not used' warnings on functions and data,
- * as well as force them to be emitted to the assembly file.
- *
- * As of gcc 3.3, static functions that are not marked with attribute((used))
- * may be elided from the assembly file. As of gcc 3.3, static data not so
- * marked will not be elided, but this may change in a future gcc version.
- *
- * In prior versions of gcc, such functions and data would be emitted, but
- * would be warned about except with attribute((unused)).
- */
-#ifndef __attribute_used__
-# define __attribute_used__ /* unimplemented */
-#endif
-
-/*
- * From the GCC manual:
- *
- * Many functions have no effects except the return value and their
- * return value depends only on the parameters and/or global
- * variables. Such a function can be subject to common subexpression
- * elimination and loop optimization just as an arithmetic operator
- * would be.
- * [...]
- */
-#ifndef __attribute_pure__
-# define __attribute_pure__ /* unimplemented */
-#endif
-
-#ifndef noinline
-#define noinline
-#endif
-
-#ifndef __always_inline
-#define __always_inline inline
-#endif
-
-#endif /* __KERNEL__ */
-
-/*
- * From the GCC manual:
- *
- * Many functions do not examine any values except their arguments,
- * and have no effects except the return value. Basically this is
- * just slightly more strict class than the `pure' attribute above,
- * since function is not allowed to read global memory.
- *
- * Note that a function that has pointer arguments and examines the
- * data pointed to must _not_ be declared `const'. Likewise, a
- * function that calls a non-`const' function usually must not be
- * `const'. It does not make sense for a `const' function to return
- * `void'.
- */
-#ifndef __attribute_const__
-# define __attribute_const__ /* unimplemented */
-#endif
-
-#endif /* __LINUX_COMPILER_H */
diff --git a/original/linux/completion.h b/original/linux/completion.h
deleted file mode 100644
index 268c5a4..0000000
--- a/original/linux/completion.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifndef __LINUX_COMPLETION_H
-#define __LINUX_COMPLETION_H
-
-/*
- * (C) Copyright 2001 Linus Torvalds
- *
- * Atomic wait-for-completion handler data structures.
- * See kernel/sched.c for details.
- */
-
-#include <linux/wait.h>
-
-struct completion {
- unsigned int done;
- wait_queue_head_t wait;
-};
-
-#define COMPLETION_INITIALIZER(work) \
- { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
-
-#define COMPLETION_INITIALIZER_ONSTACK(work) \
- ({ init_completion(&work); work; })
-
-#define DECLARE_COMPLETION(work) \
- struct completion work = COMPLETION_INITIALIZER(work)
-
-/*
- * Lockdep needs to run a non-constant initializer for on-stack
- * completions - so we use the _ONSTACK() variant for those that
- * are on the kernel stack:
- */
-#ifdef CONFIG_LOCKDEP
-# define DECLARE_COMPLETION_ONSTACK(work) \
- struct completion work = COMPLETION_INITIALIZER_ONSTACK(work)
-#else
-# define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
-#endif
-
-static inline void init_completion(struct completion *x)
-{
- x->done = 0;
- init_waitqueue_head(&x->wait);
-}
-
-extern void FASTCALL(wait_for_completion(struct completion *));
-extern int FASTCALL(wait_for_completion_interruptible(struct completion *x));
-extern unsigned long FASTCALL(wait_for_completion_timeout(struct completion *x,
- unsigned long timeout));
-extern unsigned long FASTCALL(wait_for_completion_interruptible_timeout(
- struct completion *x, unsigned long timeout));
-
-extern void FASTCALL(complete(struct completion *));
-extern void FASTCALL(complete_all(struct completion *));
-
-#define INIT_COMPLETION(x) ((x).done = 0)
-
-#endif
diff --git a/original/linux/config.h b/original/linux/config.h
deleted file mode 100644
index a91f5e5..0000000
--- a/original/linux/config.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _LINUX_CONFIG_H
-#define _LINUX_CONFIG_H
-/* This file is no longer in use and kept only for backward compatibility.
- * autoconf.h is now included via -imacros on the commandline
- */
-#include <linux/autoconf.h>
-
-#endif
diff --git a/original/linux/console_struct.h b/original/linux/console_struct.h
deleted file mode 100644
index 25423f7..0000000
--- a/original/linux/console_struct.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * console_struct.h
- *
- * Data structure describing single virtual console except for data
- * used by vt.c.
- *
- * Fields marked with [#] must be set by the low-level driver.
- * Fields marked with [!] can be changed by the low-level driver
- * to achieve effects such as fast scrolling by changing the origin.
- */
-
-#include <linux/wait.h>
-#include <linux/vt.h>
-
-struct vt_struct;
-
-#define NPAR 16
-
-struct vc_data {
- unsigned short vc_num; /* Console number */
- unsigned int vc_cols; /* [#] Console size */
- unsigned int vc_rows;
- unsigned int vc_size_row; /* Bytes per row */
- unsigned int vc_scan_lines; /* # of scan lines */
- unsigned long vc_origin; /* [!] Start of real screen */
- unsigned long vc_scr_end; /* [!] End of real screen */
- unsigned long vc_visible_origin; /* [!] Top of visible window */
- unsigned int vc_top, vc_bottom; /* Scrolling region */
- const struct consw *vc_sw;
- unsigned short *vc_screenbuf; /* In-memory character/attribute buffer */
- unsigned int vc_screenbuf_size;
- unsigned char vc_mode; /* KD_TEXT, ... */
- /* attributes for all characters on screen */
- unsigned char vc_attr; /* Current attributes */
- unsigned char vc_def_color; /* Default colors */
- unsigned char vc_color; /* Foreground & background */
- unsigned char vc_s_color; /* Saved foreground & background */
- unsigned char vc_ulcolor; /* Color for underline mode */
- unsigned char vc_halfcolor; /* Color for half intensity mode */
- /* cursor */
- unsigned int vc_cursor_type;
- unsigned short vc_complement_mask; /* [#] Xor mask for mouse pointer */
- unsigned short vc_s_complement_mask; /* Saved mouse pointer mask */
- unsigned int vc_x, vc_y; /* Cursor position */
- unsigned int vc_saved_x, vc_saved_y;
- unsigned long vc_pos; /* Cursor address */
- /* fonts */
- unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */
- struct console_font vc_font; /* Current VC font set */
- unsigned short vc_video_erase_char; /* Background erase character */
- /* VT terminal data */
- unsigned int vc_state; /* Escape sequence parser state */
- unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */
- struct tty_struct *vc_tty; /* TTY we are attached to */
- /* data for manual vt switching */
- struct vt_mode vt_mode;
- int vt_pid;
- int vt_newvt;
- wait_queue_head_t paste_wait;
- /* mode flags */
- unsigned int vc_charset : 1; /* Character set G0 / G1 */
- unsigned int vc_s_charset : 1; /* Saved character set */
- unsigned int vc_disp_ctrl : 1; /* Display chars < 32? */
- unsigned int vc_toggle_meta : 1; /* Toggle high bit? */
- unsigned int vc_decscnm : 1; /* Screen Mode */
- unsigned int vc_decom : 1; /* Origin Mode */
- unsigned int vc_decawm : 1; /* Autowrap Mode */
- unsigned int vc_deccm : 1; /* Cursor Visible */
- unsigned int vc_decim : 1; /* Insert Mode */
- unsigned int vc_deccolm : 1; /* 80/132 Column Mode */
- /* attribute flags */
- unsigned int vc_intensity : 2; /* 0=half-bright, 1=normal, 2=bold */
- unsigned int vc_underline : 1;
- unsigned int vc_blink : 1;
- unsigned int vc_reverse : 1;
- unsigned int vc_s_intensity : 2; /* saved rendition */
- unsigned int vc_s_underline : 1;
- unsigned int vc_s_blink : 1;
- unsigned int vc_s_reverse : 1;
- /* misc */
- unsigned int vc_ques : 1;
- unsigned int vc_need_wrap : 1;
- unsigned int vc_can_do_color : 1;
- unsigned int vc_report_mouse : 2;
- unsigned int vc_kmalloced : 1;
- unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */
- unsigned char vc_utf_count;
- int vc_utf_char;
- unsigned int vc_tab_stop[8]; /* Tab stops. 256 columns. */
- unsigned char vc_palette[16*3]; /* Colour palette for VGA+ */
- unsigned short * vc_translate;
- unsigned char vc_G0_charset;
- unsigned char vc_G1_charset;
- unsigned char vc_saved_G0;
- unsigned char vc_saved_G1;
- unsigned int vc_bell_pitch; /* Console bell pitch */
- unsigned int vc_bell_duration; /* Console bell duration */
- struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
- unsigned long vc_uni_pagedir;
- unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
- /* additional information is in vt_kern.h */
-};
-
-struct vc {
- struct vc_data *d;
-
- /* might add scrmem, vt_struct, kbd at some time,
- to have everything in one place - the disadvantage
- would be that vc_cons etc can no longer be static */
-};
-
-extern struct vc vc_cons [MAX_NR_CONSOLES];
-
-#define CUR_DEF 0
-#define CUR_NONE 1
-#define CUR_UNDERLINE 2
-#define CUR_LOWER_THIRD 3
-#define CUR_LOWER_HALF 4
-#define CUR_TWO_THIRDS 5
-#define CUR_BLOCK 6
-#define CUR_HWMASK 0x0f
-#define CUR_SWMASK 0xfff0
-
-#define CUR_DEFAULT CUR_UNDERLINE
-
-#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
diff --git a/original/linux/const.h b/original/linux/const.h
deleted file mode 100644
index c22c707..0000000
--- a/original/linux/const.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* const.h: Macros for dealing with constants. */
-
-#ifndef _LINUX_CONST_H
-#define _LINUX_CONST_H
-
-/* Some constant macros are used in both assembler and
- * C code. Therefore we cannot annotate them always with
- * 'UL' and other type specifiers unilaterally. We
- * use the following macros to deal with this.
- *
- * Similarly, _AT() will cast an expression with a type in C, but
- * leave it unchanged in asm.
- */
-
-#ifdef __ASSEMBLY__
-#define _AC(X,Y) X
-#define _AT(T,X) X
-#else
-#define __AC(X,Y) (X##Y)
-#define _AC(X,Y) __AC(X,Y)
-#define _AT(T,X) ((T)(X))
-#endif
-
-#endif /* !(_LINUX_CONST_H) */
diff --git a/original/linux/cpcap_audio.h b/original/linux/cpcap_audio.h
deleted file mode 100644
index 7ec8aca..0000000
--- a/original/linux/cpcap_audio.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* include/linux/cpcap_audio.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Iliyan Malchev <malchev@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _CPCAP_AUDIO_H
-#define _CPCAP_AUDIO_H
-
-#include <linux/ioctl.h>
-
-#define CPCAP_AUDIO_MAGIC 'c'
-
-#define CPCAP_AUDIO_OUT_SPEAKER 0
-#define CPCAP_AUDIO_OUT_HEADSET 1
-#define CPCAP_AUDIO_OUT_HEADSET_AND_SPEAKER 2
-#define CPCAP_AUDIO_OUT_STANDBY 3
-#define CPCAP_AUDIO_OUT_ANLG_DOCK_HEADSET 4
-#define CPCAP_AUDIO_OUT_MAX 4
-
-struct cpcap_audio_stream {
- unsigned id; /* e.g., CPCAP_AUDIO_OUT_SPEAKER or CPCAP_AUDIO_IN_MIC1 */
- int on; /* enable/disable for output, unmute/mute for input */
-};
-
-#define CPCAP_AUDIO_OUT_SET_OUTPUT _IOW(CPCAP_AUDIO_MAGIC, 0, \
- const struct cpcap_audio_stream *)
-
-#define CPCAP_AUDIO_OUT_VOL_MIN 0
-#define CPCAP_AUDIO_OUT_VOL_MAX 15
-
-#define CPCAP_AUDIO_OUT_SET_VOLUME _IOW(CPCAP_AUDIO_MAGIC, 1, unsigned int)
-
-#define CPCAP_AUDIO_OUT_GET_OUTPUT \
- _IOR(CPCAP_AUDIO_MAGIC, 2, struct cpcap_audio_stream *)
-#define CPCAP_AUDIO_OUT_GET_VOLUME \
- _IOR(CPCAP_AUDIO_MAGIC, 3, unsigned int *)
-
-#define CPCAP_AUDIO_IN_MIC1 0
-#define CPCAP_AUDIO_IN_MIC2 1
-#define CPCAP_AUDIO_IN_STANDBY 2
-#define CPCAP_AUDIO_IN_MAX 2
-
-#define CPCAP_AUDIO_IN_SET_INPUT _IOW(CPCAP_AUDIO_MAGIC, 4, \
- const struct cpcap_audio_stream *)
-
-#define CPCAP_AUDIO_IN_GET_INPUT _IOR(CPCAP_AUDIO_MAGIC, 5, \
- struct cpcap_audio_stream *)
-
-#define CPCAP_AUDIO_IN_VOL_MIN 0
-#define CPCAP_AUDIO_IN_VOL_MAX 31
-
-#define CPCAP_AUDIO_IN_SET_VOLUME _IOW(CPCAP_AUDIO_MAGIC, 6, unsigned int)
-
-#define CPCAP_AUDIO_IN_GET_VOLUME _IOR(CPCAP_AUDIO_MAGIC, 7, unsigned int *)
-
-#define CPCAP_AUDIO_OUT_GET_RATE _IOR(CPCAP_AUDIO_MAGIC, 8, unsigned int *)
-#define CPCAP_AUDIO_OUT_SET_RATE _IOW(CPCAP_AUDIO_MAGIC, 9, unsigned int)
-#define CPCAP_AUDIO_IN_GET_RATE _IOR(CPCAP_AUDIO_MAGIC, 10, unsigned int *)
-#define CPCAP_AUDIO_IN_SET_RATE _IOW(CPCAP_AUDIO_MAGIC, 11, unsigned int)
-
-#define CPCAP_AUDIO_SET_BLUETOOTH_BYPASS _IOW(CPCAP_AUDIO_MAGIC, 12, unsigned int)
-
-#endif/*_CPCAP_AUDIO_H*/
diff --git a/original/linux/cpu.h b/original/linux/cpu.h
deleted file mode 100644
index 8fb344a..0000000
--- a/original/linux/cpu.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * include/linux/cpu.h - generic cpu definition
- *
- * This is mainly for topological representation. We define the
- * basic 'struct cpu' here, which can be embedded in per-arch
- * definitions of processors.
- *
- * Basic handling of the devices is done in drivers/base/cpu.c
- * and system devices are handled in drivers/base/sys.c.
- *
- * CPUs are exported via sysfs in the class/cpu/devices/
- * directory.
- *
- * Per-cpu interfaces can be implemented using a struct device_interface.
- * See the following for how to do this:
- * - drivers/base/intf.c
- * - Documentation/driver-model/interface.txt
- */
-#ifndef _LINUX_CPU_H_
-#define _LINUX_CPU_H_
-
-#include <linux/sysdev.h>
-#include <linux/node.h>
-#include <linux/compiler.h>
-#include <linux/cpumask.h>
-#include <asm/semaphore.h>
-
-struct cpu {
- int node_id; /* The node which contains the CPU */
- int no_control; /* Should the sysfs control file be created? */
- struct sys_device sysdev;
-};
-
-extern int register_cpu(struct cpu *cpu, int num);
-extern struct sys_device *get_cpu_sysdev(unsigned cpu);
-#ifdef CONFIG_HOTPLUG_CPU
-extern void unregister_cpu(struct cpu *cpu);
-#endif
-struct notifier_block;
-
-#ifdef CONFIG_SMP
-/* Need to know about CPUs going up/down? */
-extern int register_cpu_notifier(struct notifier_block *nb);
-#ifdef CONFIG_HOTPLUG_CPU
-extern void unregister_cpu_notifier(struct notifier_block *nb);
-#else
-static inline void unregister_cpu_notifier(struct notifier_block *nb)
-{
-}
-#endif
-
-int cpu_up(unsigned int cpu);
-
-#else
-
-static inline int register_cpu_notifier(struct notifier_block *nb)
-{
- return 0;
-}
-static inline void unregister_cpu_notifier(struct notifier_block *nb)
-{
-}
-
-#endif /* CONFIG_SMP */
-extern struct sysdev_class cpu_sysdev_class;
-
-#ifdef CONFIG_HOTPLUG_CPU
-/* Stop CPUs going up and down. */
-extern void lock_cpu_hotplug(void);
-extern void unlock_cpu_hotplug(void);
-#define hotcpu_notifier(fn, pri) { \
- static struct notifier_block fn##_nb = \
- { .notifier_call = fn, .priority = pri }; \
- register_cpu_notifier(&fn##_nb); \
-}
-#define register_hotcpu_notifier(nb) register_cpu_notifier(nb)
-#define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb)
-int cpu_down(unsigned int cpu);
-#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
-#else
-#define lock_cpu_hotplug() do { } while (0)
-#define unlock_cpu_hotplug() do { } while (0)
-#define lock_cpu_hotplug_interruptible() 0
-#define hotcpu_notifier(fn, pri) do { } while (0)
-#define register_hotcpu_notifier(nb) do { } while (0)
-#define unregister_hotcpu_notifier(nb) do { } while (0)
-
-/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
-static inline int cpu_is_offline(int cpu) { return 0; }
-#endif
-
-#endif /* _LINUX_CPU_H_ */
diff --git a/original/linux/cpumask.h b/original/linux/cpumask.h
deleted file mode 100644
index b268a3c..0000000
--- a/original/linux/cpumask.h
+++ /dev/null
@@ -1,413 +0,0 @@
-#ifndef __LINUX_CPUMASK_H
-#define __LINUX_CPUMASK_H
-
-/*
- * Cpumasks provide a bitmap suitable for representing the
- * set of CPU's in a system, one bit position per CPU number.
- *
- * See detailed comments in the file linux/bitmap.h describing the
- * data type on which these cpumasks are based.
- *
- * For details of cpumask_scnprintf() and cpumask_parse(),
- * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c.
- * For details of cpulist_scnprintf() and cpulist_parse(), see
- * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c.
- * For details of cpu_remap(), see bitmap_bitremap in lib/bitmap.c
- * For details of cpus_remap(), see bitmap_remap in lib/bitmap.c.
- *
- * The available cpumask operations are:
- *
- * void cpu_set(cpu, mask) turn on bit 'cpu' in mask
- * void cpu_clear(cpu, mask) turn off bit 'cpu' in mask
- * void cpus_setall(mask) set all bits
- * void cpus_clear(mask) clear all bits
- * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask
- * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask
- *
- * void cpus_and(dst, src1, src2) dst = src1 & src2 [intersection]
- * void cpus_or(dst, src1, src2) dst = src1 | src2 [union]
- * void cpus_xor(dst, src1, src2) dst = src1 ^ src2
- * void cpus_andnot(dst, src1, src2) dst = src1 & ~src2
- * void cpus_complement(dst, src) dst = ~src
- *
- * int cpus_equal(mask1, mask2) Does mask1 == mask2?
- * int cpus_intersects(mask1, mask2) Do mask1 and mask2 intersect?
- * int cpus_subset(mask1, mask2) Is mask1 a subset of mask2?
- * int cpus_empty(mask) Is mask empty (no bits sets)?
- * int cpus_full(mask) Is mask full (all bits sets)?
- * int cpus_weight(mask) Hamming weigh - number of set bits
- *
- * void cpus_shift_right(dst, src, n) Shift right
- * void cpus_shift_left(dst, src, n) Shift left
- *
- * int first_cpu(mask) Number lowest set bit, or NR_CPUS
- * int next_cpu(cpu, mask) Next cpu past 'cpu', or NR_CPUS
- *
- * cpumask_t cpumask_of_cpu(cpu) Return cpumask with bit 'cpu' set
- * CPU_MASK_ALL Initializer - all bits set
- * CPU_MASK_NONE Initializer - no bits set
- * unsigned long *cpus_addr(mask) Array of unsigned long's in mask
- *
- * int cpumask_scnprintf(buf, len, mask) Format cpumask for printing
- * int cpumask_parse(ubuf, ulen, mask) Parse ascii string as cpumask
- * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing
- * int cpulist_parse(buf, map) Parse ascii string as cpulist
- * int cpu_remap(oldbit, old, new) newbit = map(old, new)(oldbit)
- * int cpus_remap(dst, src, old, new) *dst = map(old, new)(src)
- *
- * for_each_cpu_mask(cpu, mask) for-loop cpu over mask
- *
- * int num_online_cpus() Number of online CPUs
- * int num_possible_cpus() Number of all possible CPUs
- * int num_present_cpus() Number of present CPUs
- *
- * int cpu_online(cpu) Is some cpu online?
- * int cpu_possible(cpu) Is some cpu possible?
- * int cpu_present(cpu) Is some cpu present (can schedule)?
- *
- * int any_online_cpu(mask) First online cpu in mask
- *
- * for_each_possible_cpu(cpu) for-loop cpu over cpu_possible_map
- * for_each_online_cpu(cpu) for-loop cpu over cpu_online_map
- * for_each_present_cpu(cpu) for-loop cpu over cpu_present_map
- *
- * Subtlety:
- * 1) The 'type-checked' form of cpu_isset() causes gcc (3.3.2, anyway)
- * to generate slightly worse code. Note for example the additional
- * 40 lines of assembly code compiling the "for each possible cpu"
- * loops buried in the disk_stat_read() macros calls when compiling
- * drivers/block/genhd.c (arch i386, CONFIG_SMP=y). So use a simple
- * one-line #define for cpu_isset(), instead of wrapping an inline
- * inside a macro, the way we do the other calls.
- */
-
-#include <linux/kernel.h>
-#include <linux/threads.h>
-#include <linux/bitmap.h>
-
-typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t;
-extern cpumask_t _unused_cpumask_arg_;
-
-#define cpu_set(cpu, dst) __cpu_set((cpu), &(dst))
-static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
-{
- set_bit(cpu, dstp->bits);
-}
-
-#define cpu_clear(cpu, dst) __cpu_clear((cpu), &(dst))
-static inline void __cpu_clear(int cpu, volatile cpumask_t *dstp)
-{
- clear_bit(cpu, dstp->bits);
-}
-
-#define cpus_setall(dst) __cpus_setall(&(dst), NR_CPUS)
-static inline void __cpus_setall(cpumask_t *dstp, int nbits)
-{
- bitmap_fill(dstp->bits, nbits);
-}
-
-#define cpus_clear(dst) __cpus_clear(&(dst), NR_CPUS)
-static inline void __cpus_clear(cpumask_t *dstp, int nbits)
-{
- bitmap_zero(dstp->bits, nbits);
-}
-
-/* No static inline type checking - see Subtlety (1) above. */
-#define cpu_isset(cpu, cpumask) test_bit((cpu), (cpumask).bits)
-
-#define cpu_test_and_set(cpu, cpumask) __cpu_test_and_set((cpu), &(cpumask))
-static inline int __cpu_test_and_set(int cpu, cpumask_t *addr)
-{
- return test_and_set_bit(cpu, addr->bits);
-}
-
-#define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS)
-static inline void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS)
-static inline void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_xor(dst, src1, src2) __cpus_xor(&(dst), &(src1), &(src2), NR_CPUS)
-static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_andnot(dst, src1, src2) \
- __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS)
-static inline void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS)
-static inline void __cpus_complement(cpumask_t *dstp,
- const cpumask_t *srcp, int nbits)
-{
- bitmap_complement(dstp->bits, srcp->bits, nbits);
-}
-
-#define cpus_equal(src1, src2) __cpus_equal(&(src1), &(src2), NR_CPUS)
-static inline int __cpus_equal(const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- return bitmap_equal(src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_intersects(src1, src2) __cpus_intersects(&(src1), &(src2), NR_CPUS)
-static inline int __cpus_intersects(const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- return bitmap_intersects(src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_subset(src1, src2) __cpus_subset(&(src1), &(src2), NR_CPUS)
-static inline int __cpus_subset(const cpumask_t *src1p,
- const cpumask_t *src2p, int nbits)
-{
- return bitmap_subset(src1p->bits, src2p->bits, nbits);
-}
-
-#define cpus_empty(src) __cpus_empty(&(src), NR_CPUS)
-static inline int __cpus_empty(const cpumask_t *srcp, int nbits)
-{
- return bitmap_empty(srcp->bits, nbits);
-}
-
-#define cpus_full(cpumask) __cpus_full(&(cpumask), NR_CPUS)
-static inline int __cpus_full(const cpumask_t *srcp, int nbits)
-{
- return bitmap_full(srcp->bits, nbits);
-}
-
-#define cpus_weight(cpumask) __cpus_weight(&(cpumask), NR_CPUS)
-static inline int __cpus_weight(const cpumask_t *srcp, int nbits)
-{
- return bitmap_weight(srcp->bits, nbits);
-}
-
-#define cpus_shift_right(dst, src, n) \
- __cpus_shift_right(&(dst), &(src), (n), NR_CPUS)
-static inline void __cpus_shift_right(cpumask_t *dstp,
- const cpumask_t *srcp, int n, int nbits)
-{
- bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
-}
-
-#define cpus_shift_left(dst, src, n) \
- __cpus_shift_left(&(dst), &(src), (n), NR_CPUS)
-static inline void __cpus_shift_left(cpumask_t *dstp,
- const cpumask_t *srcp, int n, int nbits)
-{
- bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
-}
-
-#ifdef CONFIG_SMP
-int __first_cpu(const cpumask_t *srcp);
-#define first_cpu(src) __first_cpu(&(src))
-int __next_cpu(int n, const cpumask_t *srcp);
-#define next_cpu(n, src) __next_cpu((n), &(src))
-#else
-#define first_cpu(src) 0
-#define next_cpu(n, src) 1
-#endif
-
-#define cpumask_of_cpu(cpu) \
-({ \
- typeof(_unused_cpumask_arg_) m; \
- if (sizeof(m) == sizeof(unsigned long)) { \
- m.bits[0] = 1UL<<(cpu); \
- } else { \
- cpus_clear(m); \
- cpu_set((cpu), m); \
- } \
- m; \
-})
-
-#define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS)
-
-#if NR_CPUS <= BITS_PER_LONG
-
-#define CPU_MASK_ALL \
-(cpumask_t) { { \
- [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
-} }
-
-#else
-
-#define CPU_MASK_ALL \
-(cpumask_t) { { \
- [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
- [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
-} }
-
-#endif
-
-#define CPU_MASK_NONE \
-(cpumask_t) { { \
- [0 ... BITS_TO_LONGS(NR_CPUS)-1] = 0UL \
-} }
-
-#define CPU_MASK_CPU0 \
-(cpumask_t) { { \
- [0] = 1UL \
-} }
-
-#define cpus_addr(src) ((src).bits)
-
-#define cpumask_scnprintf(buf, len, src) \
- __cpumask_scnprintf((buf), (len), &(src), NR_CPUS)
-static inline int __cpumask_scnprintf(char *buf, int len,
- const cpumask_t *srcp, int nbits)
-{
- return bitmap_scnprintf(buf, len, srcp->bits, nbits);
-}
-
-#define cpumask_parse(ubuf, ulen, dst) \
- __cpumask_parse((ubuf), (ulen), &(dst), NR_CPUS)
-static inline int __cpumask_parse(const char __user *buf, int len,
- cpumask_t *dstp, int nbits)
-{
- return bitmap_parse(buf, len, dstp->bits, nbits);
-}
-
-#define cpulist_scnprintf(buf, len, src) \
- __cpulist_scnprintf((buf), (len), &(src), NR_CPUS)
-static inline int __cpulist_scnprintf(char *buf, int len,
- const cpumask_t *srcp, int nbits)
-{
- return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
-}
-
-#define cpulist_parse(buf, dst) __cpulist_parse((buf), &(dst), NR_CPUS)
-static inline int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
-{
- return bitmap_parselist(buf, dstp->bits, nbits);
-}
-
-#define cpu_remap(oldbit, old, new) \
- __cpu_remap((oldbit), &(old), &(new), NR_CPUS)
-static inline int __cpu_remap(int oldbit,
- const cpumask_t *oldp, const cpumask_t *newp, int nbits)
-{
- return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
-}
-
-#define cpus_remap(dst, src, old, new) \
- __cpus_remap(&(dst), &(src), &(old), &(new), NR_CPUS)
-static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
- const cpumask_t *oldp, const cpumask_t *newp, int nbits)
-{
- bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
-}
-
-#if NR_CPUS > 1
-#define for_each_cpu_mask(cpu, mask) \
- for ((cpu) = first_cpu(mask); \
- (cpu) < NR_CPUS; \
- (cpu) = next_cpu((cpu), (mask)))
-#else /* NR_CPUS == 1 */
-#define for_each_cpu_mask(cpu, mask) \
- for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
-#endif /* NR_CPUS */
-
-/*
- * The following particular system cpumasks and operations manage
- * possible, present and online cpus. Each of them is a fixed size
- * bitmap of size NR_CPUS.
- *
- * #ifdef CONFIG_HOTPLUG_CPU
- * cpu_possible_map - has bit 'cpu' set iff cpu is populatable
- * cpu_present_map - has bit 'cpu' set iff cpu is populated
- * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler
- * #else
- * cpu_possible_map - has bit 'cpu' set iff cpu is populated
- * cpu_present_map - copy of cpu_possible_map
- * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler
- * #endif
- *
- * In either case, NR_CPUS is fixed at compile time, as the static
- * size of these bitmaps. The cpu_possible_map is fixed at boot
- * time, as the set of CPU id's that it is possible might ever
- * be plugged in at anytime during the life of that system boot.
- * The cpu_present_map is dynamic(*), representing which CPUs
- * are currently plugged in. And cpu_online_map is the dynamic
- * subset of cpu_present_map, indicating those CPUs available
- * for scheduling.
- *
- * If HOTPLUG is enabled, then cpu_possible_map is forced to have
- * all NR_CPUS bits set, otherwise it is just the set of CPUs that
- * ACPI reports present at boot.
- *
- * If HOTPLUG is enabled, then cpu_present_map varies dynamically,
- * depending on what ACPI reports as currently plugged in, otherwise
- * cpu_present_map is just a copy of cpu_possible_map.
- *
- * (*) Well, cpu_present_map is dynamic in the hotplug case. If not
- * hotplug, it's a copy of cpu_possible_map, hence fixed at boot.
- *
- * Subtleties:
- * 1) UP arch's (NR_CPUS == 1, CONFIG_SMP not defined) hardcode
- * assumption that their single CPU is online. The UP
- * cpu_{online,possible,present}_maps are placebos. Changing them
- * will have no useful affect on the following num_*_cpus()
- * and cpu_*() macros in the UP case. This ugliness is a UP
- * optimization - don't waste any instructions or memory references
- * asking if you're online or how many CPUs there are if there is
- * only one CPU.
- * 2) Most SMP arch's #define some of these maps to be some
- * other map specific to that arch. Therefore, the following
- * must be #define macros, not inlines. To see why, examine
- * the assembly code produced by the following. Note that
- * set1() writes phys_x_map, but set2() writes x_map:
- * int x_map, phys_x_map;
- * #define set1(a) x_map = a
- * inline void set2(int a) { x_map = a; }
- * #define x_map phys_x_map
- * main(){ set1(3); set2(5); }
- */
-
-extern cpumask_t cpu_possible_map;
-extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_present_map;
-
-#if NR_CPUS > 1
-#define num_online_cpus() cpus_weight(cpu_online_map)
-#define num_possible_cpus() cpus_weight(cpu_possible_map)
-#define num_present_cpus() cpus_weight(cpu_present_map)
-#define cpu_online(cpu) cpu_isset((cpu), cpu_online_map)
-#define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map)
-#define cpu_present(cpu) cpu_isset((cpu), cpu_present_map)
-#else
-#define num_online_cpus() 1
-#define num_possible_cpus() 1
-#define num_present_cpus() 1
-#define cpu_online(cpu) ((cpu) == 0)
-#define cpu_possible(cpu) ((cpu) == 0)
-#define cpu_present(cpu) ((cpu) == 0)
-#endif
-
-#ifdef CONFIG_SMP
-int highest_possible_processor_id(void);
-#define any_online_cpu(mask) __any_online_cpu(&(mask))
-int __any_online_cpu(const cpumask_t *mask);
-#else
-#define highest_possible_processor_id() 0
-#define any_online_cpu(mask) 0
-#endif
-
-#define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
-#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
-#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
-
-#endif /* __LINUX_CPUMASK_H */
diff --git a/original/linux/ctype.h b/original/linux/ctype.h
deleted file mode 100644
index afa3639..0000000
--- a/original/linux/ctype.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef _LINUX_CTYPE_H
-#define _LINUX_CTYPE_H
-
-/*
- * NOTE! This ctype does not handle EOF like the standard C
- * library is required to.
- */
-
-#define _U 0x01 /* upper */
-#define _L 0x02 /* lower */
-#define _D 0x04 /* digit */
-#define _C 0x08 /* cntrl */
-#define _P 0x10 /* punct */
-#define _S 0x20 /* white space (space/lf/tab) */
-#define _X 0x40 /* hex digit */
-#define _SP 0x80 /* hard space (0x20) */
-
-extern unsigned char _ctype[];
-
-#define __ismask(x) (_ctype[(int)(unsigned char)(x)])
-
-#define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0)
-#define isalpha(c) ((__ismask(c)&(_U|_L)) != 0)
-#define iscntrl(c) ((__ismask(c)&(_C)) != 0)
-#define isdigit(c) ((__ismask(c)&(_D)) != 0)
-#define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0)
-#define islower(c) ((__ismask(c)&(_L)) != 0)
-#define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
-#define ispunct(c) ((__ismask(c)&(_P)) != 0)
-#define isspace(c) ((__ismask(c)&(_S)) != 0)
-#define isupper(c) ((__ismask(c)&(_U)) != 0)
-#define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0)
-
-#define isascii(c) (((unsigned char)(c))<=0x7f)
-#define toascii(c) (((unsigned char)(c))&0x7f)
-
-static inline unsigned char __tolower(unsigned char c)
-{
- if (isupper(c))
- c -= 'A'-'a';
- return c;
-}
-
-static inline unsigned char __toupper(unsigned char c)
-{
- if (islower(c))
- c -= 'a'-'A';
- return c;
-}
-
-#define tolower(c) __tolower(c)
-#define toupper(c) __toupper(c)
-
-#endif
diff --git a/original/linux/dccp.h b/original/linux/dccp.h
deleted file mode 100644
index 676333b..0000000
--- a/original/linux/dccp.h
+++ /dev/null
@@ -1,503 +0,0 @@
-#ifndef _LINUX_DCCP_H
-#define _LINUX_DCCP_H
-
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-/**
- * struct dccp_hdr - generic part of DCCP packet header
- *
- * @dccph_sport - Relevant port on the endpoint that sent this packet
- * @dccph_dport - Relevant port on the other endpoint
- * @dccph_doff - Data Offset from the start of the DCCP header, in 32-bit words
- * @dccph_ccval - Used by the HC-Sender CCID
- * @dccph_cscov - Parts of the packet that are covered by the Checksum field
- * @dccph_checksum - Internet checksum, depends on dccph_cscov
- * @dccph_x - 0 = 24 bit sequence number, 1 = 48
- * @dccph_type - packet type, see DCCP_PKT_ prefixed macros
- * @dccph_seq - sequence number high or low order 24 bits, depends on dccph_x
- */
-struct dccp_hdr {
- __be16 dccph_sport,
- dccph_dport;
- __u8 dccph_doff;
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 dccph_cscov:4,
- dccph_ccval:4;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u8 dccph_ccval:4,
- dccph_cscov:4;
-#else
-#error "Adjust your <asm/byteorder.h> defines"
-#endif
- __u16 dccph_checksum;
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 dccph_x:1,
- dccph_type:4,
- dccph_reserved:3;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u8 dccph_reserved:3,
- dccph_type:4,
- dccph_x:1;
-#else
-#error "Adjust your <asm/byteorder.h> defines"
-#endif
- __u8 dccph_seq2;
- __be16 dccph_seq;
-};
-
-/**
- * struct dccp_hdr_ext - the low bits of a 48 bit seq packet
- *
- * @dccph_seq_low - low 24 bits of a 48 bit seq packet
- */
-struct dccp_hdr_ext {
- __be32 dccph_seq_low;
-};
-
-/**
- * struct dccp_hdr_request - Conection initiation request header
- *
- * @dccph_req_service - Service to which the client app wants to connect
- * @dccph_req_options - list of options (must be a multiple of 32 bits
- */
-struct dccp_hdr_request {
- __be32 dccph_req_service;
-};
-/**
- * struct dccp_hdr_ack_bits - acknowledgment bits common to most packets
- *
- * @dccph_resp_ack_nr_high - 48 bit ack number high order bits, contains GSR
- * @dccph_resp_ack_nr_low - 48 bit ack number low order bits, contains GSR
- */
-struct dccp_hdr_ack_bits {
- __be16 dccph_reserved1;
- __be16 dccph_ack_nr_high;
- __be32 dccph_ack_nr_low;
-};
-/**
- * struct dccp_hdr_response - Conection initiation response header
- *
- * @dccph_resp_ack_nr_high - 48 bit ack number high order bits, contains GSR
- * @dccph_resp_ack_nr_low - 48 bit ack number low order bits, contains GSR
- * @dccph_resp_service - Echoes the Service Code on a received DCCP-Request
- * @dccph_resp_options - list of options (must be a multiple of 32 bits
- */
-struct dccp_hdr_response {
- struct dccp_hdr_ack_bits dccph_resp_ack;
- __be32 dccph_resp_service;
-};
-
-/**
- * struct dccp_hdr_reset - Unconditionally shut down a connection
- *
- * @dccph_reset_service - Echoes the Service Code on a received DCCP-Request
- * @dccph_reset_options - list of options (must be a multiple of 32 bits
- */
-struct dccp_hdr_reset {
- struct dccp_hdr_ack_bits dccph_reset_ack;
- __u8 dccph_reset_code,
- dccph_reset_data[3];
-};
-
-enum dccp_pkt_type {
- DCCP_PKT_REQUEST = 0,
- DCCP_PKT_RESPONSE,
- DCCP_PKT_DATA,
- DCCP_PKT_ACK,
- DCCP_PKT_DATAACK,
- DCCP_PKT_CLOSEREQ,
- DCCP_PKT_CLOSE,
- DCCP_PKT_RESET,
- DCCP_PKT_SYNC,
- DCCP_PKT_SYNCACK,
- DCCP_PKT_INVALID,
-};
-
-#define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID
-
-static inline unsigned int dccp_packet_hdr_len(const __u8 type)
-{
- if (type == DCCP_PKT_DATA)
- return 0;
- if (type == DCCP_PKT_DATAACK ||
- type == DCCP_PKT_ACK ||
- type == DCCP_PKT_SYNC ||
- type == DCCP_PKT_SYNCACK ||
- type == DCCP_PKT_CLOSE ||
- type == DCCP_PKT_CLOSEREQ)
- return sizeof(struct dccp_hdr_ack_bits);
- if (type == DCCP_PKT_REQUEST)
- return sizeof(struct dccp_hdr_request);
- if (type == DCCP_PKT_RESPONSE)
- return sizeof(struct dccp_hdr_response);
- return sizeof(struct dccp_hdr_reset);
-}
-enum dccp_reset_codes {
- DCCP_RESET_CODE_UNSPECIFIED = 0,
- DCCP_RESET_CODE_CLOSED,
- DCCP_RESET_CODE_ABORTED,
- DCCP_RESET_CODE_NO_CONNECTION,
- DCCP_RESET_CODE_PACKET_ERROR,
- DCCP_RESET_CODE_OPTION_ERROR,
- DCCP_RESET_CODE_MANDATORY_ERROR,
- DCCP_RESET_CODE_CONNECTION_REFUSED,
- DCCP_RESET_CODE_BAD_SERVICE_CODE,
- DCCP_RESET_CODE_TOO_BUSY,
- DCCP_RESET_CODE_BAD_INIT_COOKIE,
- DCCP_RESET_CODE_AGGRESSION_PENALTY,
-};
-
-/* DCCP options */
-enum {
- DCCPO_PADDING = 0,
- DCCPO_MANDATORY = 1,
- DCCPO_MIN_RESERVED = 3,
- DCCPO_MAX_RESERVED = 31,
- DCCPO_CHANGE_L = 32,
- DCCPO_CONFIRM_L = 33,
- DCCPO_CHANGE_R = 34,
- DCCPO_CONFIRM_R = 35,
- DCCPO_NDP_COUNT = 37,
- DCCPO_ACK_VECTOR_0 = 38,
- DCCPO_ACK_VECTOR_1 = 39,
- DCCPO_TIMESTAMP = 41,
- DCCPO_TIMESTAMP_ECHO = 42,
- DCCPO_ELAPSED_TIME = 43,
- DCCPO_MAX = 45,
- DCCPO_MIN_CCID_SPECIFIC = 128,
- DCCPO_MAX_CCID_SPECIFIC = 255,
-};
-
-/* DCCP features */
-enum {
- DCCPF_RESERVED = 0,
- DCCPF_CCID = 1,
- DCCPF_SEQUENCE_WINDOW = 3,
- DCCPF_ACK_RATIO = 5,
- DCCPF_SEND_ACK_VECTOR = 6,
- DCCPF_SEND_NDP_COUNT = 7,
- /* 10-127 reserved */
- DCCPF_MIN_CCID_SPECIFIC = 128,
- DCCPF_MAX_CCID_SPECIFIC = 255,
-};
-
-/* this structure is argument to DCCP_SOCKOPT_CHANGE_X */
-struct dccp_so_feat {
- __u8 dccpsf_feat;
- __u8 *dccpsf_val;
- __u8 dccpsf_len;
-};
-
-/* DCCP socket options */
-#define DCCP_SOCKOPT_PACKET_SIZE 1
-#define DCCP_SOCKOPT_SERVICE 2
-#define DCCP_SOCKOPT_CHANGE_L 3
-#define DCCP_SOCKOPT_CHANGE_R 4
-#define DCCP_SOCKOPT_CCID_RX_INFO 128
-#define DCCP_SOCKOPT_CCID_TX_INFO 192
-
-#define DCCP_SERVICE_LIST_MAX_LEN 32
-
-#ifdef __KERNEL__
-
-#include <linux/in.h>
-#include <linux/list.h>
-#include <linux/uio.h>
-#include <linux/workqueue.h>
-
-#include <net/inet_connection_sock.h>
-#include <net/inet_sock.h>
-#include <net/inet_timewait_sock.h>
-#include <net/tcp_states.h>
-
-enum dccp_state {
- DCCP_OPEN = TCP_ESTABLISHED,
- DCCP_REQUESTING = TCP_SYN_SENT,
- DCCP_PARTOPEN = TCP_FIN_WAIT1, /* FIXME:
- This mapping is horrible, but TCP has
- no matching state for DCCP_PARTOPEN,
- as TCP_SYN_RECV is already used by
- DCCP_RESPOND, why don't stop using TCP
- mapping of states? OK, now we don't use
- sk_stream_sendmsg anymore, so doesn't
- seem to exist any reason for us to
- do the TCP mapping here */
- DCCP_LISTEN = TCP_LISTEN,
- DCCP_RESPOND = TCP_SYN_RECV,
- DCCP_CLOSING = TCP_CLOSING,
- DCCP_TIME_WAIT = TCP_TIME_WAIT,
- DCCP_CLOSED = TCP_CLOSE,
- DCCP_MAX_STATES = TCP_MAX_STATES,
-};
-
-#define DCCP_STATE_MASK 0xf
-#define DCCP_ACTION_FIN (1<<7)
-
-enum {
- DCCPF_OPEN = TCPF_ESTABLISHED,
- DCCPF_REQUESTING = TCPF_SYN_SENT,
- DCCPF_PARTOPEN = TCPF_FIN_WAIT1,
- DCCPF_LISTEN = TCPF_LISTEN,
- DCCPF_RESPOND = TCPF_SYN_RECV,
- DCCPF_CLOSING = TCPF_CLOSING,
- DCCPF_TIME_WAIT = TCPF_TIME_WAIT,
- DCCPF_CLOSED = TCPF_CLOSE,
-};
-
-static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb)
-{
- return (struct dccp_hdr *)skb->h.raw;
-}
-
-static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb)
-{
- return (struct dccp_hdr_ext *)(skb->h.raw + sizeof(struct dccp_hdr));
-}
-
-static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh)
-{
- return sizeof(*dh) + (dh->dccph_x ? sizeof(struct dccp_hdr_ext) : 0);
-}
-
-static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb)
-{
- const struct dccp_hdr *dh = dccp_hdr(skb);
- return __dccp_basic_hdr_len(dh);
-}
-
-static inline __u64 dccp_hdr_seq(const struct sk_buff *skb)
-{
- const struct dccp_hdr *dh = dccp_hdr(skb);
- __u64 seq_nr = ntohs(dh->dccph_seq);
-
- if (dh->dccph_x != 0)
- seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low);
- else
- seq_nr += (u32)dh->dccph_seq2 << 16;
-
- return seq_nr;
-}
-
-static inline struct dccp_hdr_request *dccp_hdr_request(struct sk_buff *skb)
-{
- return (struct dccp_hdr_request *)(skb->h.raw + dccp_basic_hdr_len(skb));
-}
-
-static inline struct dccp_hdr_ack_bits *dccp_hdr_ack_bits(const struct sk_buff *skb)
-{
- return (struct dccp_hdr_ack_bits *)(skb->h.raw + dccp_basic_hdr_len(skb));
-}
-
-static inline u64 dccp_hdr_ack_seq(const struct sk_buff *skb)
-{
- const struct dccp_hdr_ack_bits *dhack = dccp_hdr_ack_bits(skb);
- return ((u64)ntohs(dhack->dccph_ack_nr_high) << 32) + ntohl(dhack->dccph_ack_nr_low);
-}
-
-static inline struct dccp_hdr_response *dccp_hdr_response(struct sk_buff *skb)
-{
- return (struct dccp_hdr_response *)(skb->h.raw + dccp_basic_hdr_len(skb));
-}
-
-static inline struct dccp_hdr_reset *dccp_hdr_reset(struct sk_buff *skb)
-{
- return (struct dccp_hdr_reset *)(skb->h.raw + dccp_basic_hdr_len(skb));
-}
-
-static inline unsigned int __dccp_hdr_len(const struct dccp_hdr *dh)
-{
- return __dccp_basic_hdr_len(dh) +
- dccp_packet_hdr_len(dh->dccph_type);
-}
-
-static inline unsigned int dccp_hdr_len(const struct sk_buff *skb)
-{
- return __dccp_hdr_len(dccp_hdr(skb));
-}
-
-
-/* initial values for each feature */
-#define DCCPF_INITIAL_SEQUENCE_WINDOW 100
-#define DCCPF_INITIAL_ACK_RATIO 2
-#define DCCPF_INITIAL_CCID 2
-#define DCCPF_INITIAL_SEND_ACK_VECTOR 1
-/* FIXME: for now we're default to 1 but it should really be 0 */
-#define DCCPF_INITIAL_SEND_NDP_COUNT 1
-
-#define DCCP_NDP_LIMIT 0xFFFFFF
-
-/**
- * struct dccp_minisock - Minimal DCCP connection representation
- *
- * Will be used to pass the state from dccp_request_sock to dccp_sock.
- *
- * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2)
- * @dccpms_ccid - Congestion Control Id (CCID) (section 10)
- * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5)
- * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2)
- */
-struct dccp_minisock {
- __u64 dccpms_sequence_window;
- __u8 dccpms_rx_ccid;
- __u8 dccpms_tx_ccid;
- __u8 dccpms_send_ack_vector;
- __u8 dccpms_send_ndp_count;
- __u8 dccpms_ack_ratio;
- struct list_head dccpms_pending;
- struct list_head dccpms_conf;
-};
-
-struct dccp_opt_conf {
- __u8 *dccpoc_val;
- __u8 dccpoc_len;
-};
-
-struct dccp_opt_pend {
- struct list_head dccpop_node;
- __u8 dccpop_type;
- __u8 dccpop_feat;
- __u8 *dccpop_val;
- __u8 dccpop_len;
- int dccpop_conf;
- struct dccp_opt_conf *dccpop_sc;
-};
-
-extern void __dccp_minisock_init(struct dccp_minisock *dmsk);
-extern void dccp_minisock_init(struct dccp_minisock *dmsk);
-
-extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb);
-
-struct dccp_request_sock {
- struct inet_request_sock dreq_inet_rsk;
- __u64 dreq_iss;
- __u64 dreq_isr;
- __be32 dreq_service;
-};
-
-static inline struct dccp_request_sock *dccp_rsk(const struct request_sock *req)
-{
- return (struct dccp_request_sock *)req;
-}
-
-extern struct inet_timewait_death_row dccp_death_row;
-
-struct dccp_options_received {
- u32 dccpor_ndp; /* only 24 bits */
- u32 dccpor_timestamp;
- u32 dccpor_timestamp_echo;
- u32 dccpor_elapsed_time;
-};
-
-struct ccid;
-
-enum dccp_role {
- DCCP_ROLE_UNDEFINED,
- DCCP_ROLE_LISTEN,
- DCCP_ROLE_CLIENT,
- DCCP_ROLE_SERVER,
-};
-
-struct dccp_service_list {
- __u32 dccpsl_nr;
- __be32 dccpsl_list[0];
-};
-
-#define DCCP_SERVICE_INVALID_VALUE htonl((__u32)-1)
-
-static inline int dccp_list_has_service(const struct dccp_service_list *sl,
- const __be32 service)
-{
- if (likely(sl != NULL)) {
- u32 i = sl->dccpsl_nr;
- while (i--)
- if (sl->dccpsl_list[i] == service)
- return 1;
- }
- return 0;
-}
-
-struct dccp_ackvec;
-
-/**
- * struct dccp_sock - DCCP socket state
- *
- * @dccps_swl - sequence number window low
- * @dccps_swh - sequence number window high
- * @dccps_awl - acknowledgement number window low
- * @dccps_awh - acknowledgement number window high
- * @dccps_iss - initial sequence number sent
- * @dccps_isr - initial sequence number received
- * @dccps_osr - first OPEN sequence number received
- * @dccps_gss - greatest sequence number sent
- * @dccps_gsr - greatest valid sequence number received
- * @dccps_gar - greatest valid ack number received on a non-Sync; initialized to %dccps_iss
- * @dccps_timestamp_time - time of latest TIMESTAMP option
- * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
- * @dccps_packet_size - Set thru setsockopt
- * @dccps_role - Role of this sock, one of %dccp_role
- * @dccps_ndp_count - number of Non Data Packets since last data packet
- * @dccps_hc_rx_ackvec - rx half connection ack vector
- */
-struct dccp_sock {
- /* inet_connection_sock has to be the first member of dccp_sock */
- struct inet_connection_sock dccps_inet_connection;
- __u64 dccps_swl;
- __u64 dccps_swh;
- __u64 dccps_awl;
- __u64 dccps_awh;
- __u64 dccps_iss;
- __u64 dccps_isr;
- __u64 dccps_osr;
- __u64 dccps_gss;
- __u64 dccps_gsr;
- __u64 dccps_gar;
- __be32 dccps_service;
- struct dccp_service_list *dccps_service_list;
- struct timeval dccps_timestamp_time;
- __u32 dccps_timestamp_echo;
- __u32 dccps_packet_size;
- __u16 dccps_l_ack_ratio;
- __u16 dccps_r_ack_ratio;
- unsigned long dccps_ndp_count;
- __u32 dccps_mss_cache;
- struct dccp_minisock dccps_minisock;
- struct dccp_ackvec *dccps_hc_rx_ackvec;
- struct ccid *dccps_hc_rx_ccid;
- struct ccid *dccps_hc_tx_ccid;
- struct dccp_options_received dccps_options_received;
- struct timeval dccps_epoch;
- enum dccp_role dccps_role:2;
- __u8 dccps_hc_rx_insert_options:1;
- __u8 dccps_hc_tx_insert_options:1;
-};
-
-static inline struct dccp_sock *dccp_sk(const struct sock *sk)
-{
- return (struct dccp_sock *)sk;
-}
-
-static inline struct dccp_minisock *dccp_msk(const struct sock *sk)
-{
- return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock;
-}
-
-static inline int dccp_service_not_initialized(const struct sock *sk)
-{
- return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE;
-}
-
-static inline const char *dccp_role(const struct sock *sk)
-{
- switch (dccp_sk(sk)->dccps_role) {
- case DCCP_ROLE_UNDEFINED: return "undefined";
- case DCCP_ROLE_LISTEN: return "listen";
- case DCCP_ROLE_SERVER: return "server";
- case DCCP_ROLE_CLIENT: return "client";
- }
- return NULL;
-}
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_DCCP_H */
diff --git a/original/linux/debug_locks.h b/original/linux/debug_locks.h
deleted file mode 100644
index 88dafa2..0000000
--- a/original/linux/debug_locks.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef __LINUX_DEBUG_LOCKING_H
-#define __LINUX_DEBUG_LOCKING_H
-
-struct task_struct;
-
-extern int debug_locks;
-extern int debug_locks_silent;
-
-/*
- * Generic 'turn off all lock debugging' function:
- */
-extern int debug_locks_off(void);
-
-/*
- * In the debug case we carry the caller's instruction pointer into
- * other functions, but we dont want the function argument overhead
- * in the nondebug case - hence these macros:
- */
-#define _RET_IP_ (unsigned long)__builtin_return_address(0)
-#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
-
-#define DEBUG_LOCKS_WARN_ON(c) \
-({ \
- int __ret = 0; \
- \
- if (unlikely(c)) { \
- if (debug_locks_off()) \
- WARN_ON(1); \
- __ret = 1; \
- } \
- __ret; \
-})
-
-#ifdef CONFIG_SMP
-# define SMP_DEBUG_LOCKS_WARN_ON(c) DEBUG_LOCKS_WARN_ON(c)
-#else
-# define SMP_DEBUG_LOCKS_WARN_ON(c) do { } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_LOCKING_API_SELFTESTS
- extern void locking_selftest(void);
-#else
-# define locking_selftest() do { } while (0)
-#endif
-
-#ifdef CONFIG_LOCKDEP
-extern void debug_show_all_locks(void);
-extern void debug_show_held_locks(struct task_struct *task);
-extern void debug_check_no_locks_freed(const void *from, unsigned long len);
-extern void debug_check_no_locks_held(struct task_struct *task);
-#else
-static inline void debug_show_all_locks(void)
-{
-}
-
-static inline void debug_show_held_locks(struct task_struct *task)
-{
-}
-
-static inline void
-debug_check_no_locks_freed(const void *from, unsigned long len)
-{
-}
-
-static inline void
-debug_check_no_locks_held(struct task_struct *task)
-{
-}
-#endif
-
-#endif
diff --git a/original/linux/delay.h b/original/linux/delay.h
deleted file mode 100644
index 17ddb55..0000000
--- a/original/linux/delay.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _LINUX_DELAY_H
-#define _LINUX_DELAY_H
-
-/*
- * Copyright (C) 1993 Linus Torvalds
- *
- * Delay routines, using a pre-computed "loops_per_jiffy" value.
- */
-
-extern unsigned long loops_per_jiffy;
-
-#include <asm/delay.h>
-
-/*
- * Using udelay() for intervals greater than a few milliseconds can
- * risk overflow for high loops_per_jiffy (high bogomips) machines. The
- * mdelay() provides a wrapper to prevent this. For delays greater
- * than MAX_UDELAY_MS milliseconds, the wrapper is used. Architecture
- * specific values can be defined in asm-???/delay.h as an override.
- * The 2nd mdelay() definition ensures GCC will optimize away the
- * while loop for the common cases where n <= MAX_UDELAY_MS -- Paul G.
- */
-
-#ifndef MAX_UDELAY_MS
-#define MAX_UDELAY_MS 5
-#endif
-
-#ifndef mdelay
-#define mdelay(n) (\
- (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
- ({unsigned long __ms=(n); while (__ms--) udelay(1000);}))
-#endif
-
-#ifndef ndelay
-#define ndelay(x) udelay(((x)+999)/1000)
-#endif
-
-void calibrate_delay(void);
-void msleep(unsigned int msecs);
-unsigned long msleep_interruptible(unsigned int msecs);
-
-static inline void ssleep(unsigned int seconds)
-{
- msleep(seconds * 1000);
-}
-
-#endif /* defined(_LINUX_DELAY_H) */
diff --git a/original/linux/device.h b/original/linux/device.h
deleted file mode 100644
index 1e5f30d..0000000
--- a/original/linux/device.h
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * device.h - generic, centralized driver model
- *
- * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
- *
- * This file is released under the GPLv2
- *
- * See Documentation/driver-model/ for more information.
- */
-
-#ifndef _DEVICE_H_
-#define _DEVICE_H_
-
-#include <linux/ioport.h>
-#include <linux/kobject.h>
-#include <linux/klist.h>
-#include <linux/list.h>
-#include <linux/types.h>
-#include <linux/module.h>
-#include <linux/pm.h>
-#include <asm/semaphore.h>
-#include <asm/atomic.h>
-
-#define DEVICE_NAME_SIZE 50
-#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */
-#define DEVICE_ID_SIZE 32
-#define BUS_ID_SIZE KOBJ_NAME_LEN
-
-
-struct device;
-struct device_driver;
-struct class;
-struct class_device;
-
-struct bus_type {
- const char * name;
-
- struct subsystem subsys;
- struct kset drivers;
- struct kset devices;
- struct klist klist_devices;
- struct klist klist_drivers;
-
- struct bus_attribute * bus_attrs;
- struct device_attribute * dev_attrs;
- struct driver_attribute * drv_attrs;
-
- int (*match)(struct device * dev, struct device_driver * drv);
- int (*uevent)(struct device *dev, char **envp,
- int num_envp, char *buffer, int buffer_size);
- int (*probe)(struct device * dev);
- int (*remove)(struct device * dev);
- void (*shutdown)(struct device * dev);
- int (*suspend)(struct device * dev, pm_message_t state);
- int (*resume)(struct device * dev);
-};
-
-extern int bus_register(struct bus_type * bus);
-extern void bus_unregister(struct bus_type * bus);
-
-extern void bus_rescan_devices(struct bus_type * bus);
-
-/* iterator helpers for buses */
-
-int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
- int (*fn)(struct device *, void *));
-struct device * bus_find_device(struct bus_type *bus, struct device *start,
- void *data, int (*match)(struct device *, void *));
-
-int bus_for_each_drv(struct bus_type * bus, struct device_driver * start,
- void * data, int (*fn)(struct device_driver *, void *));
-
-
-/* driverfs interface for exporting bus attributes */
-
-struct bus_attribute {
- struct attribute attr;
- ssize_t (*show)(struct bus_type *, char * buf);
- ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
-};
-
-#define BUS_ATTR(_name,_mode,_show,_store) \
-struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store)
-
-extern int bus_create_file(struct bus_type *, struct bus_attribute *);
-extern void bus_remove_file(struct bus_type *, struct bus_attribute *);
-
-struct device_driver {
- const char * name;
- struct bus_type * bus;
-
- struct completion unloaded;
- struct kobject kobj;
- struct klist klist_devices;
- struct klist_node knode_bus;
-
- struct module * owner;
-
- int (*probe) (struct device * dev);
- int (*remove) (struct device * dev);
- void (*shutdown) (struct device * dev);
- int (*suspend) (struct device * dev, pm_message_t state);
- int (*resume) (struct device * dev);
-};
-
-
-extern int driver_register(struct device_driver * drv);
-extern void driver_unregister(struct device_driver * drv);
-
-extern struct device_driver * get_driver(struct device_driver * drv);
-extern void put_driver(struct device_driver * drv);
-extern struct device_driver *driver_find(const char *name, struct bus_type *bus);
-
-
-/* driverfs interface for exporting driver attributes */
-
-struct driver_attribute {
- struct attribute attr;
- ssize_t (*show)(struct device_driver *, char * buf);
- ssize_t (*store)(struct device_driver *, const char * buf, size_t count);
-};
-
-#define DRIVER_ATTR(_name,_mode,_show,_store) \
-struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store)
-
-extern int driver_create_file(struct device_driver *, struct driver_attribute *);
-extern void driver_remove_file(struct device_driver *, struct driver_attribute *);
-
-extern int driver_for_each_device(struct device_driver * drv, struct device * start,
- void * data, int (*fn)(struct device *, void *));
-struct device * driver_find_device(struct device_driver *drv,
- struct device *start, void *data,
- int (*match)(struct device *, void *));
-
-
-/*
- * device classes
- */
-struct class {
- const char * name;
- struct module * owner;
-
- struct subsystem subsys;
- struct list_head children;
- struct list_head devices;
- struct list_head interfaces;
- struct semaphore sem; /* locks both the children and interfaces lists */
-
- struct class_attribute * class_attrs;
- struct class_device_attribute * class_dev_attrs;
-
- int (*uevent)(struct class_device *dev, char **envp,
- int num_envp, char *buffer, int buffer_size);
-
- void (*release)(struct class_device *dev);
- void (*class_release)(struct class *class);
-};
-
-extern int class_register(struct class *);
-extern void class_unregister(struct class *);
-
-
-struct class_attribute {
- struct attribute attr;
- ssize_t (*show)(struct class *, char * buf);
- ssize_t (*store)(struct class *, const char * buf, size_t count);
-};
-
-#define CLASS_ATTR(_name,_mode,_show,_store) \
-struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store)
-
-extern int class_create_file(struct class *, const struct class_attribute *);
-extern void class_remove_file(struct class *, const struct class_attribute *);
-
-struct class_device_attribute {
- struct attribute attr;
- ssize_t (*show)(struct class_device *, char * buf);
- ssize_t (*store)(struct class_device *, const char * buf, size_t count);
-};
-
-#define CLASS_DEVICE_ATTR(_name,_mode,_show,_store) \
-struct class_device_attribute class_device_attr_##_name = \
- __ATTR(_name,_mode,_show,_store)
-
-extern int class_device_create_file(struct class_device *,
- const struct class_device_attribute *);
-
-/**
- * struct class_device - class devices
- * @class: pointer to the parent class for this class device. This is required.
- * @devt: for internal use by the driver core only.
- * @node: for internal use by the driver core only.
- * @kobj: for internal use by the driver core only.
- * @devt_attr: for internal use by the driver core only.
- * @groups: optional additional groups to be created
- * @dev: if set, a symlink to the struct device is created in the sysfs
- * directory for this struct class device.
- * @class_data: pointer to whatever you want to store here for this struct
- * class_device. Use class_get_devdata() and class_set_devdata() to get and
- * set this pointer.
- * @parent: pointer to a struct class_device that is the parent of this struct
- * class_device. If NULL, this class_device will show up at the root of the
- * struct class in sysfs (which is probably what you want to have happen.)
- * @release: pointer to a release function for this struct class_device. If
- * set, this will be called instead of the class specific release function.
- * Only use this if you want to override the default release function, like
- * when you are nesting class_device structures.
- * @uevent: pointer to a uevent function for this struct class_device. If
- * set, this will be called instead of the class specific uevent function.
- * Only use this if you want to override the default uevent function, like
- * when you are nesting class_device structures.
- */
-struct class_device {
- struct list_head node;
-
- struct kobject kobj;
- struct class * class; /* required */
- dev_t devt; /* dev_t, creates the sysfs "dev" */
- struct class_device_attribute *devt_attr;
- struct class_device_attribute uevent_attr;
- struct device * dev; /* not necessary, but nice to have */
- void * class_data; /* class-specific data */
- struct class_device *parent; /* parent of this child device, if there is one */
- struct attribute_group ** groups; /* optional groups */
-
- void (*release)(struct class_device *dev);
- int (*uevent)(struct class_device *dev, char **envp,
- int num_envp, char *buffer, int buffer_size);
- char class_id[BUS_ID_SIZE]; /* unique to this class */
-};
-
-static inline void *
-class_get_devdata (struct class_device *dev)
-{
- return dev->class_data;
-}
-
-static inline void
-class_set_devdata (struct class_device *dev, void *data)
-{
- dev->class_data = data;
-}
-
-
-extern int class_device_register(struct class_device *);
-extern void class_device_unregister(struct class_device *);
-extern void class_device_initialize(struct class_device *);
-extern int class_device_add(struct class_device *);
-extern void class_device_del(struct class_device *);
-
-extern int class_device_rename(struct class_device *, char *);
-
-extern struct class_device * class_device_get(struct class_device *);
-extern void class_device_put(struct class_device *);
-
-extern void class_device_remove_file(struct class_device *,
- const struct class_device_attribute *);
-extern int class_device_create_bin_file(struct class_device *,
- struct bin_attribute *);
-extern void class_device_remove_bin_file(struct class_device *,
- struct bin_attribute *);
-
-struct class_interface {
- struct list_head node;
- struct class *class;
-
- int (*add) (struct class_device *, struct class_interface *);
- void (*remove) (struct class_device *, struct class_interface *);
-};
-
-extern int class_interface_register(struct class_interface *);
-extern void class_interface_unregister(struct class_interface *);
-
-extern struct class *class_create(struct module *owner, char *name);
-extern void class_destroy(struct class *cls);
-extern struct class_device *class_device_create(struct class *cls,
- struct class_device *parent,
- dev_t devt,
- struct device *device,
- char *fmt, ...)
- __attribute__((format(printf,5,6)));
-extern void class_device_destroy(struct class *cls, dev_t devt);
-
-
-/* interface for exporting device attributes */
-struct device_attribute {
- struct attribute attr;
- ssize_t (*show)(struct device *dev, struct device_attribute *attr,
- char *buf);
- ssize_t (*store)(struct device *dev, struct device_attribute *attr,
- const char *buf, size_t count);
-};
-
-#define DEVICE_ATTR(_name,_mode,_show,_store) \
-struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store)
-
-extern int device_create_file(struct device *device, struct device_attribute * entry);
-extern void device_remove_file(struct device * dev, struct device_attribute * attr);
-struct device {
- struct klist klist_children;
- struct klist_node knode_parent; /* node in sibling list */
- struct klist_node knode_driver;
- struct klist_node knode_bus;
- struct device * parent;
-
- struct kobject kobj;
- char bus_id[BUS_ID_SIZE]; /* position on parent bus */
- struct device_attribute uevent_attr;
- struct device_attribute *devt_attr;
-
- struct semaphore sem; /* semaphore to synchronize calls to
- * its driver.
- */
-
- struct bus_type * bus; /* type of bus device is on */
- struct device_driver *driver; /* which driver has allocated this
- device */
- void *driver_data; /* data private to the driver */
- void *platform_data; /* Platform specific data, device
- core doesn't touch it */
- void *firmware_data; /* Firmware specific data (e.g. ACPI,
- BIOS data),reserved for device core*/
- struct dev_pm_info power;
-
- u64 *dma_mask; /* dma mask (if dma'able device) */
- u64 coherent_dma_mask;/* Like dma_mask, but for
- alloc_coherent mappings as
- not all hardware supports
- 64 bit addresses for consistent
- allocations such descriptors. */
-
- struct list_head dma_pools; /* dma pools (if dma'ble) */
-
- struct dma_coherent_mem *dma_mem; /* internal for coherent mem
- override */
-
- /* class_device migration path */
- struct list_head node;
- struct class *class; /* optional*/
- dev_t devt; /* dev_t, creates the sysfs "dev" */
-
- void (*release)(struct device * dev);
-};
-
-static inline void *
-dev_get_drvdata (struct device *dev)
-{
- return dev->driver_data;
-}
-
-static inline void
-dev_set_drvdata (struct device *dev, void *data)
-{
- dev->driver_data = data;
-}
-
-static inline int device_is_registered(struct device *dev)
-{
- return klist_node_attached(&dev->knode_bus);
-}
-
-/*
- * High level routines for use by the bus drivers
- */
-extern int device_register(struct device * dev);
-extern void device_unregister(struct device * dev);
-extern void device_initialize(struct device * dev);
-extern int device_add(struct device * dev);
-extern void device_del(struct device * dev);
-extern int device_for_each_child(struct device *, void *,
- int (*fn)(struct device *, void *));
-
-/*
- * Manual binding of a device to driver. See drivers/base/bus.c
- * for information on use.
- */
-extern void device_bind_driver(struct device * dev);
-extern void device_release_driver(struct device * dev);
-extern int device_attach(struct device * dev);
-extern void driver_attach(struct device_driver * drv);
-extern void device_reprobe(struct device *dev);
-
-/*
- * Easy functions for dynamically creating devices on the fly
- */
-extern struct device *device_create(struct class *cls, struct device *parent,
- dev_t devt, char *fmt, ...)
- __attribute__((format(printf,4,5)));
-extern void device_destroy(struct class *cls, dev_t devt);
-
-/*
- * Platform "fixup" functions - allow the platform to have their say
- * about devices and actions that the general device layer doesn't
- * know about.
- */
-/* Notify platform of device discovery */
-extern int (*platform_notify)(struct device * dev);
-
-extern int (*platform_notify_remove)(struct device * dev);
-
-
-/**
- * get_device - atomically increment the reference count for the device.
- *
- */
-extern struct device * get_device(struct device * dev);
-extern void put_device(struct device * dev);
-
-
-/* drivers/base/power/shutdown.c */
-extern void device_shutdown(void);
-
-
-/* drivers/base/firmware.c */
-extern int firmware_register(struct subsystem *);
-extern void firmware_unregister(struct subsystem *);
-
-/* debugging and troubleshooting/diagnostic helpers. */
-extern const char *dev_driver_string(struct device *dev);
-#define dev_printk(level, dev, format, arg...) \
- printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
-
-#ifdef DEBUG
-#define dev_dbg(dev, format, arg...) \
- dev_printk(KERN_DEBUG , dev , format , ## arg)
-#else
-#define dev_dbg(dev, format, arg...) do { (void)(dev); } while (0)
-#endif
-
-#define dev_err(dev, format, arg...) \
- dev_printk(KERN_ERR , dev , format , ## arg)
-#define dev_info(dev, format, arg...) \
- dev_printk(KERN_INFO , dev , format , ## arg)
-#define dev_warn(dev, format, arg...) \
- dev_printk(KERN_WARNING , dev , format , ## arg)
-#define dev_notice(dev, format, arg...) \
- dev_printk(KERN_NOTICE , dev , format , ## arg)
-
-/* Create alias, so I can be autoloaded. */
-#define MODULE_ALIAS_CHARDEV(major,minor) \
- MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
-#define MODULE_ALIAS_CHARDEV_MAJOR(major) \
- MODULE_ALIAS("char-major-" __stringify(major) "-*")
-#endif /* _DEVICE_H_ */
diff --git a/original/linux/dirent.h b/original/linux/dirent.h
deleted file mode 100644
index 5d6023b..0000000
--- a/original/linux/dirent.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _LINUX_DIRENT_H
-#define _LINUX_DIRENT_H
-
-struct dirent {
- long d_ino;
- __kernel_off_t d_off;
- unsigned short d_reclen;
- char d_name[256]; /* We must not include limits.h! */
-};
-
-struct dirent64 {
- __u64 d_ino;
- __s64 d_off;
- unsigned short d_reclen;
- unsigned char d_type;
- char d_name[256];
-};
-
-#ifdef __KERNEL__
-
-struct linux_dirent64 {
- u64 d_ino;
- s64 d_off;
- unsigned short d_reclen;
- unsigned char d_type;
- char d_name[0];
-};
-
-#endif /* __KERNEL__ */
-
-
-#endif
diff --git a/original/linux/dm-ioctl.h b/original/linux/dm-ioctl.h
deleted file mode 100644
index 28c2940..0000000
--- a/original/linux/dm-ioctl.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- * Copyright (C) 2001 - 2003 Sistina Software (UK) Limited.
- * Copyright (C) 2004 - 2005 Red Hat, Inc. All rights reserved.
- *
- * This file is released under the LGPL.
- */
-
-#ifndef _LINUX_DM_IOCTL_V4_H
-#define _LINUX_DM_IOCTL_V4_H
-
-#include <linux/types.h>
-
-#define DM_DIR "mapper" /* Slashes not supported */
-#define DM_MAX_TYPE_NAME 16
-#define DM_NAME_LEN 128
-#define DM_UUID_LEN 129
-
-/*
- * A traditional ioctl interface for the device mapper.
- *
- * Each device can have two tables associated with it, an
- * 'active' table which is the one currently used by io passing
- * through the device, and an 'inactive' one which is a table
- * that is being prepared as a replacement for the 'active' one.
- *
- * DM_VERSION:
- * Just get the version information for the ioctl interface.
- *
- * DM_REMOVE_ALL:
- * Remove all dm devices, destroy all tables. Only really used
- * for debug.
- *
- * DM_LIST_DEVICES:
- * Get a list of all the dm device names.
- *
- * DM_DEV_CREATE:
- * Create a new device, neither the 'active' or 'inactive' table
- * slots will be filled. The device will be in suspended state
- * after creation, however any io to the device will get errored
- * since it will be out-of-bounds.
- *
- * DM_DEV_REMOVE:
- * Remove a device, destroy any tables.
- *
- * DM_DEV_RENAME:
- * Rename a device.
- *
- * DM_SUSPEND:
- * This performs both suspend and resume, depending which flag is
- * passed in.
- * Suspend: This command will not return until all pending io to
- * the device has completed. Further io will be deferred until
- * the device is resumed.
- * Resume: It is no longer an error to issue this command on an
- * unsuspended device. If a table is present in the 'inactive'
- * slot, it will be moved to the active slot, then the old table
- * from the active slot will be _destroyed_. Finally the device
- * is resumed.
- *
- * DM_DEV_STATUS:
- * Retrieves the status for the table in the 'active' slot.
- *
- * DM_DEV_WAIT:
- * Wait for a significant event to occur to the device. This
- * could either be caused by an event triggered by one of the
- * targets of the table in the 'active' slot, or a table change.
- *
- * DM_TABLE_LOAD:
- * Load a table into the 'inactive' slot for the device. The
- * device does _not_ need to be suspended prior to this command.
- *
- * DM_TABLE_CLEAR:
- * Destroy any table in the 'inactive' slot (ie. abort).
- *
- * DM_TABLE_DEPS:
- * Return a set of device dependencies for the 'active' table.
- *
- * DM_TABLE_STATUS:
- * Return the targets status for the 'active' table.
- *
- * DM_TARGET_MSG:
- * Pass a message string to the target at a specific offset of a device.
- *
- * DM_DEV_SET_GEOMETRY:
- * Set the geometry of a device by passing in a string in this format:
- *
- * "cylinders heads sectors_per_track start_sector"
- *
- * Beware that CHS geometry is nearly obsolete and only provided
- * for compatibility with dm devices that can be booted by a PC
- * BIOS. See struct hd_geometry for range limits. Also note that
- * the geometry is erased if the device size changes.
- */
-
-/*
- * All ioctl arguments consist of a single chunk of memory, with
- * this structure at the start. If a uuid is specified any
- * lookup (eg. for a DM_INFO) will be done on that, *not* the
- * name.
- */
-struct dm_ioctl {
- /*
- * The version number is made up of three parts:
- * major - no backward or forward compatibility,
- * minor - only backwards compatible,
- * patch - both backwards and forwards compatible.
- *
- * All clients of the ioctl interface should fill in the
- * version number of the interface that they were
- * compiled with.
- *
- * All recognised ioctl commands (ie. those that don't
- * return -ENOTTY) fill out this field, even if the
- * command failed.
- */
- uint32_t version[3]; /* in/out */
- uint32_t data_size; /* total size of data passed in
- * including this struct */
-
- uint32_t data_start; /* offset to start of data
- * relative to start of this struct */
-
- uint32_t target_count; /* in/out */
- int32_t open_count; /* out */
- uint32_t flags; /* in/out */
- uint32_t event_nr; /* in/out */
- uint32_t padding;
-
- uint64_t dev; /* in/out */
-
- char name[DM_NAME_LEN]; /* device name */
- char uuid[DM_UUID_LEN]; /* unique identifier for
- * the block device */
- char data[7]; /* padding or data */
-};
-
-/*
- * Used to specify tables. These structures appear after the
- * dm_ioctl.
- */
-struct dm_target_spec {
- uint64_t sector_start;
- uint64_t length;
- int32_t status; /* used when reading from kernel only */
-
- /*
- * Location of the next dm_target_spec.
- * - When specifying targets on a DM_TABLE_LOAD command, this value is
- * the number of bytes from the start of the "current" dm_target_spec
- * to the start of the "next" dm_target_spec.
- * - When retrieving targets on a DM_TABLE_STATUS command, this value
- * is the number of bytes from the start of the first dm_target_spec
- * (that follows the dm_ioctl struct) to the start of the "next"
- * dm_target_spec.
- */
- uint32_t next;
-
- char target_type[DM_MAX_TYPE_NAME];
-
- /*
- * Parameter string starts immediately after this object.
- * Be careful to add padding after string to ensure correct
- * alignment of subsequent dm_target_spec.
- */
-};
-
-/*
- * Used to retrieve the target dependencies.
- */
-struct dm_target_deps {
- uint32_t count; /* Array size */
- uint32_t padding; /* unused */
- uint64_t dev[0]; /* out */
-};
-
-/*
- * Used to get a list of all dm devices.
- */
-struct dm_name_list {
- uint64_t dev;
- uint32_t next; /* offset to the next record from
- the _start_ of this */
- char name[0];
-};
-
-/*
- * Used to retrieve the target versions
- */
-struct dm_target_versions {
- uint32_t next;
- uint32_t version[3];
-
- char name[0];
-};
-
-/*
- * Used to pass message to a target
- */
-struct dm_target_msg {
- uint64_t sector; /* Device sector */
-
- char message[0];
-};
-
-/*
- * If you change this make sure you make the corresponding change
- * to dm-ioctl.c:lookup_ioctl()
- */
-enum {
- /* Top level cmds */
- DM_VERSION_CMD = 0,
- DM_REMOVE_ALL_CMD,
- DM_LIST_DEVICES_CMD,
-
- /* device level cmds */
- DM_DEV_CREATE_CMD,
- DM_DEV_REMOVE_CMD,
- DM_DEV_RENAME_CMD,
- DM_DEV_SUSPEND_CMD,
- DM_DEV_STATUS_CMD,
- DM_DEV_WAIT_CMD,
-
- /* Table level cmds */
- DM_TABLE_LOAD_CMD,
- DM_TABLE_CLEAR_CMD,
- DM_TABLE_DEPS_CMD,
- DM_TABLE_STATUS_CMD,
-
- /* Added later */
- DM_LIST_VERSIONS_CMD,
- DM_TARGET_MSG_CMD,
- DM_DEV_SET_GEOMETRY_CMD
-};
-
-#define DM_IOCTL 0xfd
-
-#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
-#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
-#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
-
-#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
-#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
-#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
-#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
-#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
-#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
-
-#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
-#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
-#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
-#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
-
-#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
-
-#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
-#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
-
-#define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 14
-#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2008-04-23)"
-
-/* Status bits */
-#define DM_READONLY_FLAG (1 << 0) /* In/Out */
-#define DM_SUSPEND_FLAG (1 << 1) /* In/Out */
-#define DM_PERSISTENT_DEV_FLAG (1 << 3) /* In */
-
-/*
- * Flag passed into ioctl STATUS command to get table information
- * rather than current status.
- */
-#define DM_STATUS_TABLE_FLAG (1 << 4) /* In */
-
-/*
- * Flags that indicate whether a table is present in either of
- * the two table slots that a device has.
- */
-#define DM_ACTIVE_PRESENT_FLAG (1 << 5) /* Out */
-#define DM_INACTIVE_PRESENT_FLAG (1 << 6) /* Out */
-
-/*
- * Indicates that the buffer passed in wasn't big enough for the
- * results.
- */
-#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
-
-/*
- * This flag is now ignored.
- */
-#define DM_SKIP_BDGET_FLAG (1 << 9) /* In */
-
-/*
- * Set this to avoid attempting to freeze any filesystem when suspending.
- */
-#define DM_SKIP_LOCKFS_FLAG (1 << 10) /* In */
-
-/*
- * Set this to suspend without flushing queued ios.
- */
-#define DM_NOFLUSH_FLAG (1 << 11) /* In */
-
-#endif /* _LINUX_DM_IOCTL_H */
diff --git a/original/linux/dma-mapping.h b/original/linux/dma-mapping.h
deleted file mode 100644
index 635690c..0000000
--- a/original/linux/dma-mapping.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef _ASM_LINUX_DMA_MAPPING_H
-#define _ASM_LINUX_DMA_MAPPING_H
-
-#include <linux/device.h>
-#include <linux/err.h>
-
-/* These definitions mirror those in pci.h, so they can be used
- * interchangeably with their PCI_ counterparts */
-enum dma_data_direction {
- DMA_BIDIRECTIONAL = 0,
- DMA_TO_DEVICE = 1,
- DMA_FROM_DEVICE = 2,
- DMA_NONE = 3,
-};
-
-#define DMA_64BIT_MASK 0xffffffffffffffffULL
-#define DMA_48BIT_MASK 0x0000ffffffffffffULL
-#define DMA_40BIT_MASK 0x000000ffffffffffULL
-#define DMA_39BIT_MASK 0x0000007fffffffffULL
-#define DMA_32BIT_MASK 0x00000000ffffffffULL
-#define DMA_31BIT_MASK 0x000000007fffffffULL
-#define DMA_30BIT_MASK 0x000000003fffffffULL
-#define DMA_29BIT_MASK 0x000000001fffffffULL
-#define DMA_28BIT_MASK 0x000000000fffffffULL
-#define DMA_24BIT_MASK 0x0000000000ffffffULL
-
-#include <asm/dma-mapping.h>
-
-/* Backwards compat, remove in 2.7.x */
-#define dma_sync_single dma_sync_single_for_cpu
-#define dma_sync_sg dma_sync_sg_for_cpu
-
-extern u64 dma_get_required_mask(struct device *dev);
-
-/* flags for the coherent memory api */
-#define DMA_MEMORY_MAP 0x01
-#define DMA_MEMORY_IO 0x02
-#define DMA_MEMORY_INCLUDES_CHILDREN 0x04
-#define DMA_MEMORY_EXCLUSIVE 0x08
-
-#ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
-static inline int
-dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
- dma_addr_t device_addr, size_t size, int flags)
-{
- return 0;
-}
-
-static inline void
-dma_release_declared_memory(struct device *dev)
-{
-}
-
-static inline void *
-dma_mark_declared_memory_occupied(struct device *dev,
- dma_addr_t device_addr, size_t size)
-{
- return ERR_PTR(-EBUSY);
-}
-#endif
-
-#endif
-
-
diff --git a/original/linux/dmaengine.h b/original/linux/dmaengine.h
deleted file mode 100644
index c94d8f1..0000000
--- a/original/linux/dmaengine.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Copyright(c) 2004 - 2006 Intel Corporation. All rights reserved.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * The full GNU General Public License is included in this distribution in the
- * file called COPYING.
- */
-#ifndef DMAENGINE_H
-#define DMAENGINE_H
-
-#ifdef CONFIG_DMA_ENGINE
-
-#include <linux/device.h>
-#include <linux/uio.h>
-#include <linux/kref.h>
-#include <linux/completion.h>
-#include <linux/rcupdate.h>
-
-/**
- * enum dma_event - resource PNP/power managment events
- * @DMA_RESOURCE_SUSPEND: DMA device going into low power state
- * @DMA_RESOURCE_RESUME: DMA device returning to full power
- * @DMA_RESOURCE_ADDED: DMA device added to the system
- * @DMA_RESOURCE_REMOVED: DMA device removed from the system
- */
-enum dma_event {
- DMA_RESOURCE_SUSPEND,
- DMA_RESOURCE_RESUME,
- DMA_RESOURCE_ADDED,
- DMA_RESOURCE_REMOVED,
-};
-
-/**
- * typedef dma_cookie_t - an opaque DMA cookie
- *
- * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code
- */
-typedef s32 dma_cookie_t;
-
-#define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0)
-
-/**
- * enum dma_status - DMA transaction status
- * @DMA_SUCCESS: transaction completed successfully
- * @DMA_IN_PROGRESS: transaction not yet processed
- * @DMA_ERROR: transaction failed
- */
-enum dma_status {
- DMA_SUCCESS,
- DMA_IN_PROGRESS,
- DMA_ERROR,
-};
-
-/**
- * struct dma_chan_percpu - the per-CPU part of struct dma_chan
- * @refcount: local_t used for open-coded "bigref" counting
- * @memcpy_count: transaction counter
- * @bytes_transferred: byte counter
- */
-
-struct dma_chan_percpu {
- local_t refcount;
- /* stats */
- unsigned long memcpy_count;
- unsigned long bytes_transferred;
-};
-
-/**
- * struct dma_chan - devices supply DMA channels, clients use them
- * @client: ptr to the client user of this chan, will be %NULL when unused
- * @device: ptr to the dma device who supplies this channel, always !%NULL
- * @cookie: last cookie value returned to client
- * @chan_id: channel ID for sysfs
- * @class_dev: class device for sysfs
- * @refcount: kref, used in "bigref" slow-mode
- * @slow_ref: indicates that the DMA channel is free
- * @rcu: the DMA channel's RCU head
- * @client_node: used to add this to the client chan list
- * @device_node: used to add this to the device chan list
- * @local: per-cpu pointer to a struct dma_chan_percpu
- */
-struct dma_chan {
- struct dma_client *client;
- struct dma_device *device;
- dma_cookie_t cookie;
-
- /* sysfs */
- int chan_id;
- struct class_device class_dev;
-
- struct kref refcount;
- int slow_ref;
- struct rcu_head rcu;
-
- struct list_head client_node;
- struct list_head device_node;
- struct dma_chan_percpu *local;
-};
-
-void dma_chan_cleanup(struct kref *kref);
-
-static inline void dma_chan_get(struct dma_chan *chan)
-{
- if (unlikely(chan->slow_ref))
- kref_get(&chan->refcount);
- else {
- local_inc(&(per_cpu_ptr(chan->local, get_cpu())->refcount));
- put_cpu();
- }
-}
-
-static inline void dma_chan_put(struct dma_chan *chan)
-{
- if (unlikely(chan->slow_ref))
- kref_put(&chan->refcount, dma_chan_cleanup);
- else {
- local_dec(&(per_cpu_ptr(chan->local, get_cpu())->refcount));
- put_cpu();
- }
-}
-
-/*
- * typedef dma_event_callback - function pointer to a DMA event callback
- */
-typedef void (*dma_event_callback) (struct dma_client *client,
- struct dma_chan *chan, enum dma_event event);
-
-/**
- * struct dma_client - info on the entity making use of DMA services
- * @event_callback: func ptr to call when something happens
- * @chan_count: number of chans allocated
- * @chans_desired: number of chans requested. Can be +/- chan_count
- * @lock: protects access to the channels list
- * @channels: the list of DMA channels allocated
- * @global_node: list_head for global dma_client_list
- */
-struct dma_client {
- dma_event_callback event_callback;
- unsigned int chan_count;
- unsigned int chans_desired;
-
- spinlock_t lock;
- struct list_head channels;
- struct list_head global_node;
-};
-
-/**
- * struct dma_device - info on the entity supplying DMA services
- * @chancnt: how many DMA channels are supported
- * @channels: the list of struct dma_chan
- * @global_node: list_head for global dma_device_list
- * @refcount: reference count
- * @done: IO completion struct
- * @dev_id: unique device ID
- * @device_alloc_chan_resources: allocate resources and return the
- * number of allocated descriptors
- * @device_free_chan_resources: release DMA channel's resources
- * @device_memcpy_buf_to_buf: memcpy buf pointer to buf pointer
- * @device_memcpy_buf_to_pg: memcpy buf pointer to struct page
- * @device_memcpy_pg_to_pg: memcpy struct page/offset to struct page/offset
- * @device_memcpy_complete: poll the status of an IOAT DMA transaction
- * @device_memcpy_issue_pending: push appended descriptors to hardware
- */
-struct dma_device {
-
- unsigned int chancnt;
- struct list_head channels;
- struct list_head global_node;
-
- struct kref refcount;
- struct completion done;
-
- int dev_id;
-
- int (*device_alloc_chan_resources)(struct dma_chan *chan);
- void (*device_free_chan_resources)(struct dma_chan *chan);
- dma_cookie_t (*device_memcpy_buf_to_buf)(struct dma_chan *chan,
- void *dest, void *src, size_t len);
- dma_cookie_t (*device_memcpy_buf_to_pg)(struct dma_chan *chan,
- struct page *page, unsigned int offset, void *kdata,
- size_t len);
- dma_cookie_t (*device_memcpy_pg_to_pg)(struct dma_chan *chan,
- struct page *dest_pg, unsigned int dest_off,
- struct page *src_pg, unsigned int src_off, size_t len);
- enum dma_status (*device_memcpy_complete)(struct dma_chan *chan,
- dma_cookie_t cookie, dma_cookie_t *last,
- dma_cookie_t *used);
- void (*device_memcpy_issue_pending)(struct dma_chan *chan);
-};
-
-/* --- public DMA engine API --- */
-
-struct dma_client *dma_async_client_register(dma_event_callback event_callback);
-void dma_async_client_unregister(struct dma_client *client);
-void dma_async_client_chan_request(struct dma_client *client,
- unsigned int number);
-
-/**
- * dma_async_memcpy_buf_to_buf - offloaded copy between virtual addresses
- * @chan: DMA channel to offload copy to
- * @dest: destination address (virtual)
- * @src: source address (virtual)
- * @len: length
- *
- * Both @dest and @src must be mappable to a bus address according to the
- * DMA mapping API rules for streaming mappings.
- * Both @dest and @src must stay memory resident (kernel memory or locked
- * user space pages).
- */
-static inline dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
- void *dest, void *src, size_t len)
-{
- int cpu = get_cpu();
- per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
- per_cpu_ptr(chan->local, cpu)->memcpy_count++;
- put_cpu();
-
- return chan->device->device_memcpy_buf_to_buf(chan, dest, src, len);
-}
-
-/**
- * dma_async_memcpy_buf_to_pg - offloaded copy from address to page
- * @chan: DMA channel to offload copy to
- * @page: destination page
- * @offset: offset in page to copy to
- * @kdata: source address (virtual)
- * @len: length
- *
- * Both @page/@offset and @kdata must be mappable to a bus address according
- * to the DMA mapping API rules for streaming mappings.
- * Both @page/@offset and @kdata must stay memory resident (kernel memory or
- * locked user space pages)
- */
-static inline dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
- struct page *page, unsigned int offset, void *kdata, size_t len)
-{
- int cpu = get_cpu();
- per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
- per_cpu_ptr(chan->local, cpu)->memcpy_count++;
- put_cpu();
-
- return chan->device->device_memcpy_buf_to_pg(chan, page, offset,
- kdata, len);
-}
-
-/**
- * dma_async_memcpy_pg_to_pg - offloaded copy from page to page
- * @chan: DMA channel to offload copy to
- * @dest_pg: destination page
- * @dest_off: offset in page to copy to
- * @src_pg: source page
- * @src_off: offset in page to copy from
- * @len: length
- *
- * Both @dest_page/@dest_off and @src_page/@src_off must be mappable to a bus
- * address according to the DMA mapping API rules for streaming mappings.
- * Both @dest_page/@dest_off and @src_page/@src_off must stay memory resident
- * (kernel memory or locked user space pages).
- */
-static inline dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan,
- struct page *dest_pg, unsigned int dest_off, struct page *src_pg,
- unsigned int src_off, size_t len)
-{
- int cpu = get_cpu();
- per_cpu_ptr(chan->local, cpu)->bytes_transferred += len;
- per_cpu_ptr(chan->local, cpu)->memcpy_count++;
- put_cpu();
-
- return chan->device->device_memcpy_pg_to_pg(chan, dest_pg, dest_off,
- src_pg, src_off, len);
-}
-
-/**
- * dma_async_memcpy_issue_pending - flush pending copies to HW
- * @chan: target DMA channel
- *
- * This allows drivers to push copies to HW in batches,
- * reducing MMIO writes where possible.
- */
-static inline void dma_async_memcpy_issue_pending(struct dma_chan *chan)
-{
- return chan->device->device_memcpy_issue_pending(chan);
-}
-
-/**
- * dma_async_memcpy_complete - poll for transaction completion
- * @chan: DMA channel
- * @cookie: transaction identifier to check status of
- * @last: returns last completed cookie, can be NULL
- * @used: returns last issued cookie, can be NULL
- *
- * If @last and @used are passed in, upon return they reflect the driver
- * internal state and can be used with dma_async_is_complete() to check
- * the status of multiple cookies without re-checking hardware state.
- */
-static inline enum dma_status dma_async_memcpy_complete(struct dma_chan *chan,
- dma_cookie_t cookie, dma_cookie_t *last, dma_cookie_t *used)
-{
- return chan->device->device_memcpy_complete(chan, cookie, last, used);
-}
-
-/**
- * dma_async_is_complete - test a cookie against chan state
- * @cookie: transaction identifier to test status of
- * @last_complete: last know completed transaction
- * @last_used: last cookie value handed out
- *
- * dma_async_is_complete() is used in dma_async_memcpy_complete()
- * the test logic is seperated for lightweight testing of multiple cookies
- */
-static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
- dma_cookie_t last_complete, dma_cookie_t last_used)
-{
- if (last_complete <= last_used) {
- if ((cookie <= last_complete) || (cookie > last_used))
- return DMA_SUCCESS;
- } else {
- if ((cookie <= last_complete) && (cookie > last_used))
- return DMA_SUCCESS;
- }
- return DMA_IN_PROGRESS;
-}
-
-
-/* --- DMA device --- */
-
-int dma_async_device_register(struct dma_device *device);
-void dma_async_device_unregister(struct dma_device *device);
-
-/* --- Helper iov-locking functions --- */
-
-struct dma_page_list {
- char *base_address;
- int nr_pages;
- struct page **pages;
-};
-
-struct dma_pinned_list {
- int nr_iovecs;
- struct dma_page_list page_list[0];
-};
-
-struct dma_pinned_list *dma_pin_iovec_pages(struct iovec *iov, size_t len);
-void dma_unpin_iovec_pages(struct dma_pinned_list* pinned_list);
-
-dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov,
- struct dma_pinned_list *pinned_list, unsigned char *kdata, size_t len);
-dma_cookie_t dma_memcpy_pg_to_iovec(struct dma_chan *chan, struct iovec *iov,
- struct dma_pinned_list *pinned_list, struct page *page,
- unsigned int offset, size_t len);
-
-#endif /* CONFIG_DMA_ENGINE */
-#endif /* DMAENGINE_H */
diff --git a/original/linux/efs_dir.h b/original/linux/efs_dir.h
deleted file mode 100644
index a09ec01..0000000
--- a/original/linux/efs_dir.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * efs_dir.h
- *
- * Copyright (c) 1999 Al Smith
- */
-
-#ifndef __EFS_DIR_H__
-#define __EFS_DIR_H__
-
-#define EFS_DIRBSIZE_BITS EFS_BLOCKSIZE_BITS
-#define EFS_DIRBSIZE (1 << EFS_DIRBSIZE_BITS)
-
-struct efs_dentry {
- __be32 inode;
- unsigned char namelen;
- char name[3];
-};
-
-#define EFS_DENTSIZE (sizeof(struct efs_dentry) - 3 + 1)
-#define EFS_MAXNAMELEN ((1 << (sizeof(char) * 8)) - 1)
-
-#define EFS_DIRBLK_HEADERSIZE 4
-#define EFS_DIRBLK_MAGIC 0xbeef /* moo */
-
-struct efs_dir {
- __be16 magic;
- unsigned char firstused;
- unsigned char slots;
-
- unsigned char space[EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE];
-};
-
-#define EFS_MAXENTS \
- ((EFS_DIRBSIZE - EFS_DIRBLK_HEADERSIZE) / \
- (EFS_DENTSIZE + sizeof(char)))
-
-#define EFS_SLOTAT(dir, slot) EFS_REALOFF((dir)->space[slot])
-
-#define EFS_REALOFF(offset) ((offset << 1))
-
-#endif /* __EFS_DIR_H__ */
-
diff --git a/original/linux/efs_fs_i.h b/original/linux/efs_fs_i.h
deleted file mode 100644
index 617c474..0000000
--- a/original/linux/efs_fs_i.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * efs_fs_i.h
- *
- * Copyright (c) 1999 Al Smith
- *
- * Portions derived from IRIX header files (c) 1988 Silicon Graphics
- */
-
-#ifndef __EFS_FS_I_H__
-#define __EFS_FS_I_H__
-
-typedef int32_t efs_block_t;
-typedef uint32_t efs_ino_t;
-
-#define EFS_DIRECTEXTENTS 12
-
-/*
- * layout of an extent, in memory and on disk. 8 bytes exactly.
- */
-typedef union extent_u {
- unsigned char raw[8];
- struct extent_s {
- unsigned int ex_magic:8; /* magic # (zero) */
- unsigned int ex_bn:24; /* basic block */
- unsigned int ex_length:8; /* numblocks in this extent */
- unsigned int ex_offset:24; /* logical offset into file */
- } cooked;
-} efs_extent;
-
-typedef struct edevs {
- __be16 odev;
- __be32 ndev;
-} efs_devs;
-
-/*
- * extent based filesystem inode as it appears on disk. The efs inode
- * is exactly 128 bytes long.
- */
-struct efs_dinode {
- __be16 di_mode; /* mode and type of file */
- __be16 di_nlink; /* number of links to file */
- __be16 di_uid; /* owner's user id */
- __be16 di_gid; /* owner's group id */
- __be32 di_size; /* number of bytes in file */
- __be32 di_atime; /* time last accessed */
- __be32 di_mtime; /* time last modified */
- __be32 di_ctime; /* time created */
- __be32 di_gen; /* generation number */
- __be16 di_numextents; /* # of extents */
- u_char di_version; /* version of inode */
- u_char di_spare; /* spare - used by AFS */
- union di_addr {
- efs_extent di_extents[EFS_DIRECTEXTENTS];
- efs_devs di_dev; /* device for IFCHR/IFBLK */
- } di_u;
-};
-
-/* efs inode storage in memory */
-struct efs_inode_info {
- int numextents;
- int lastextent;
-
- efs_extent extents[EFS_DIRECTEXTENTS];
- struct inode vfs_inode;
-};
-
-#endif /* __EFS_FS_I_H__ */
-
diff --git a/original/linux/efs_fs_sb.h b/original/linux/efs_fs_sb.h
deleted file mode 100644
index c76088b..0000000
--- a/original/linux/efs_fs_sb.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * efs_fs_sb.h
- *
- * Copyright (c) 1999 Al Smith
- *
- * Portions derived from IRIX header files (c) 1988 Silicon Graphics
- */
-
-#ifndef __EFS_FS_SB_H__
-#define __EFS_FS_SB_H__
-
-/* statfs() magic number for EFS */
-#define EFS_SUPER_MAGIC 0x414A53
-
-/* EFS superblock magic numbers */
-#define EFS_MAGIC 0x072959
-#define EFS_NEWMAGIC 0x07295a
-
-#define IS_EFS_MAGIC(x) ((x == EFS_MAGIC) || (x == EFS_NEWMAGIC))
-
-#define EFS_SUPER 1
-#define EFS_ROOTINODE 2
-
-/* efs superblock on disk */
-struct efs_super {
- __be32 fs_size; /* size of filesystem, in sectors */
- __be32 fs_firstcg; /* bb offset to first cg */
- __be32 fs_cgfsize; /* size of cylinder group in bb's */
- __be16 fs_cgisize; /* bb's of inodes per cylinder group */
- __be16 fs_sectors; /* sectors per track */
- __be16 fs_heads; /* heads per cylinder */
- __be16 fs_ncg; /* # of cylinder groups in filesystem */
- __be16 fs_dirty; /* fs needs to be fsck'd */
- __be32 fs_time; /* last super-block update */
- __be32 fs_magic; /* magic number */
- char fs_fname[6]; /* file system name */
- char fs_fpack[6]; /* file system pack name */
- __be32 fs_bmsize; /* size of bitmap in bytes */
- __be32 fs_tfree; /* total free data blocks */
- __be32 fs_tinode; /* total free inodes */
- __be32 fs_bmblock; /* bitmap location. */
- __be32 fs_replsb; /* Location of replicated superblock. */
- __be32 fs_lastialloc; /* last allocated inode */
- char fs_spare[20]; /* space for expansion - MUST BE ZERO */
- __be32 fs_checksum; /* checksum of volume portion of fs */
-};
-
-/* efs superblock information in memory */
-struct efs_sb_info {
- __u32 fs_magic; /* superblock magic number */
- __u32 fs_start; /* first block of filesystem */
- __u32 first_block; /* first data block in filesystem */
- __u32 total_blocks; /* total number of blocks in filesystem */
- __u32 group_size; /* # of blocks a group consists of */
- __u32 data_free; /* # of free data blocks */
- __u32 inode_free; /* # of free inodes */
- __u16 inode_blocks; /* # of blocks used for inodes in every grp */
- __u16 total_groups; /* # of groups */
-};
-
-#endif /* __EFS_FS_SB_H__ */
-
diff --git a/original/linux/elevator.h b/original/linux/elevator.h
deleted file mode 100644
index 1713ace..0000000
--- a/original/linux/elevator.h
+++ /dev/null
@@ -1,153 +0,0 @@
-#ifndef _LINUX_ELEVATOR_H
-#define _LINUX_ELEVATOR_H
-
-typedef int (elevator_merge_fn) (request_queue_t *, struct request **,
- struct bio *);
-
-typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *);
-
-typedef void (elevator_merged_fn) (request_queue_t *, struct request *);
-
-typedef int (elevator_dispatch_fn) (request_queue_t *, int);
-
-typedef void (elevator_add_req_fn) (request_queue_t *, struct request *);
-typedef int (elevator_queue_empty_fn) (request_queue_t *);
-typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
-typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
-typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *);
-
-typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t);
-typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
-typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
-typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
-
-typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
-typedef void (elevator_exit_fn) (elevator_t *);
-
-struct elevator_ops
-{
- elevator_merge_fn *elevator_merge_fn;
- elevator_merged_fn *elevator_merged_fn;
- elevator_merge_req_fn *elevator_merge_req_fn;
-
- elevator_dispatch_fn *elevator_dispatch_fn;
- elevator_add_req_fn *elevator_add_req_fn;
- elevator_activate_req_fn *elevator_activate_req_fn;
- elevator_deactivate_req_fn *elevator_deactivate_req_fn;
-
- elevator_queue_empty_fn *elevator_queue_empty_fn;
- elevator_completed_req_fn *elevator_completed_req_fn;
-
- elevator_request_list_fn *elevator_former_req_fn;
- elevator_request_list_fn *elevator_latter_req_fn;
-
- elevator_set_req_fn *elevator_set_req_fn;
- elevator_put_req_fn *elevator_put_req_fn;
-
- elevator_may_queue_fn *elevator_may_queue_fn;
-
- elevator_init_fn *elevator_init_fn;
- elevator_exit_fn *elevator_exit_fn;
- void (*trim)(struct io_context *);
-};
-
-#define ELV_NAME_MAX (16)
-
-struct elv_fs_entry {
- struct attribute attr;
- ssize_t (*show)(elevator_t *, char *);
- ssize_t (*store)(elevator_t *, const char *, size_t);
-};
-
-/*
- * identifies an elevator type, such as AS or deadline
- */
-struct elevator_type
-{
- struct list_head list;
- struct elevator_ops ops;
- struct elevator_type *elevator_type;
- struct elv_fs_entry *elevator_attrs;
- char elevator_name[ELV_NAME_MAX];
- struct module *elevator_owner;
-};
-
-/*
- * each queue has an elevator_queue associated with it
- */
-struct elevator_queue
-{
- struct elevator_ops *ops;
- void *elevator_data;
- struct kobject kobj;
- struct elevator_type *elevator_type;
- struct mutex sysfs_lock;
-};
-
-/*
- * block elevator interface
- */
-extern void elv_dispatch_sort(request_queue_t *, struct request *);
-extern void elv_add_request(request_queue_t *, struct request *, int, int);
-extern void __elv_add_request(request_queue_t *, struct request *, int, int);
-extern void elv_insert(request_queue_t *, struct request *, int);
-extern int elv_merge(request_queue_t *, struct request **, struct bio *);
-extern void elv_merge_requests(request_queue_t *, struct request *,
- struct request *);
-extern void elv_merged_request(request_queue_t *, struct request *);
-extern void elv_dequeue_request(request_queue_t *, struct request *);
-extern void elv_requeue_request(request_queue_t *, struct request *);
-extern int elv_queue_empty(request_queue_t *);
-extern struct request *elv_next_request(struct request_queue *q);
-extern struct request *elv_former_request(request_queue_t *, struct request *);
-extern struct request *elv_latter_request(request_queue_t *, struct request *);
-extern int elv_register_queue(request_queue_t *q);
-extern void elv_unregister_queue(request_queue_t *q);
-extern int elv_may_queue(request_queue_t *, int, struct bio *);
-extern void elv_completed_request(request_queue_t *, struct request *);
-extern int elv_set_request(request_queue_t *, struct request *, struct bio *, gfp_t);
-extern void elv_put_request(request_queue_t *, struct request *);
-
-/*
- * io scheduler registration
- */
-extern int elv_register(struct elevator_type *);
-extern void elv_unregister(struct elevator_type *);
-
-/*
- * io scheduler sysfs switching
- */
-extern ssize_t elv_iosched_show(request_queue_t *, char *);
-extern ssize_t elv_iosched_store(request_queue_t *, const char *, size_t);
-
-extern int elevator_init(request_queue_t *, char *);
-extern void elevator_exit(elevator_t *);
-extern int elv_rq_merge_ok(struct request *, struct bio *);
-
-/*
- * Return values from elevator merger
- */
-#define ELEVATOR_NO_MERGE 0
-#define ELEVATOR_FRONT_MERGE 1
-#define ELEVATOR_BACK_MERGE 2
-
-/*
- * Insertion selection
- */
-#define ELEVATOR_INSERT_FRONT 1
-#define ELEVATOR_INSERT_BACK 2
-#define ELEVATOR_INSERT_SORT 3
-#define ELEVATOR_INSERT_REQUEUE 4
-
-/*
- * return values from elevator_may_queue_fn
- */
-enum {
- ELV_MQUEUE_MAY,
- ELV_MQUEUE_NO,
- ELV_MQUEUE_MUST,
-};
-
-#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
-
-#endif
diff --git a/original/linux/elf-em.h b/original/linux/elf-em.h
deleted file mode 100644
index 6a5796c..0000000
--- a/original/linux/elf-em.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef _LINUX_ELF_EM_H
-#define _LINUX_ELF_EM_H
-
-/* These constants define the various ELF target machines */
-#define EM_NONE 0
-#define EM_M32 1
-#define EM_SPARC 2
-#define EM_386 3
-#define EM_68K 4
-#define EM_88K 5
-#define EM_486 6 /* Perhaps disused */
-#define EM_860 7
-#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
- /* Next two are historical and binaries and
- modules of these types will be rejected by
- Linux. */
-#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */
-#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
-
-#define EM_PARISC 15 /* HPPA */
-#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* PowerPC64 */
-#define EM_SH 42 /* SuperH */
-#define EM_SPARCV9 43 /* SPARC v9 64-bit */
-#define EM_IA_64 50 /* HP/Intel IA-64 */
-#define EM_X86_64 62 /* AMD x86-64 */
-#define EM_S390 22 /* IBM S/390 */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
-#define EM_V850 87 /* NEC v850 */
-#define EM_M32R 88 /* Renesas M32R */
-#define EM_H8_300 46 /* Renesas H8/300,300H,H8S */
-#define EM_FRV 0x5441 /* Fujitsu FR-V */
-
-/*
- * This is an interim value that we will use until the committee comes
- * up with a final number.
- */
-#define EM_ALPHA 0x9026
-
-/* Bogus old v850 magic number, used by old tools. */
-#define EM_CYGNUS_V850 0x9080
-/* Bogus old m32r magic number, used by old tools. */
-#define EM_CYGNUS_M32R 0x9041
-/* This is the old interim value for S/390 architecture */
-#define EM_S390_OLD 0xA390
-
-
-#endif /* _LINUX_ELF_EM_H */
diff --git a/original/linux/err.h b/original/linux/err.h
deleted file mode 100644
index f2edce2..0000000
--- a/original/linux/err.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _LINUX_ERR_H
-#define _LINUX_ERR_H
-
-#include <linux/compiler.h>
-
-#include <asm/errno.h>
-
-/*
- * Kernel pointers have redundant information, so we can use a
- * scheme where we can return either an error code or a dentry
- * pointer with the same return value.
- *
- * This should be a per-architecture thing, to allow different
- * error and pointer decisions.
- */
-#define MAX_ERRNO 4095
-
-#ifndef __ASSEMBLY__
-
-#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
-
-static inline void * __must_check ERR_PTR(long error)
-{
- return (void *) error;
-}
-
-static inline long __must_check PTR_ERR(const void *ptr)
-{
- return (long) ptr;
-}
-
-static inline long __must_check IS_ERR(const void *ptr)
-{
- return IS_ERR_VALUE((unsigned long)ptr);
-}
-
-static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
-{
- return !ptr || IS_ERR_VALUE((unsigned long)ptr);
-}
-
-/**
- * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
- * @ptr: The pointer to cast.
- *
- * Explicitly cast an error-valued pointer to another pointer type in such a
- * way as to make it clear that's what's going on.
- */
-static inline void * __must_check ERR_CAST(const void *ptr)
-{
- /* cast away the const */
- return (void *) ptr;
-}
-
-static inline int __must_check PTR_RET(const void *ptr)
-{
- if (IS_ERR(ptr))
- return PTR_ERR(ptr);
- else
- return 0;
-}
-
-#endif
-
-#endif /* _LINUX_ERR_H */
diff --git a/original/linux/errno.h b/original/linux/errno.h
deleted file mode 100644
index d90b80f..0000000
--- a/original/linux/errno.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _LINUX_ERRNO_H
-#define _LINUX_ERRNO_H
-
-#include <asm/errno.h>
-
-#ifdef __KERNEL__
-
-/* Should never be seen by user programs */
-#define ERESTARTSYS 512
-#define ERESTARTNOINTR 513
-#define ERESTARTNOHAND 514 /* restart if no handler.. */
-#define ENOIOCTLCMD 515 /* No ioctl command */
-#define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */
-
-/* Defined for the NFSv3 protocol */
-#define EBADHANDLE 521 /* Illegal NFS file handle */
-#define ENOTSYNC 522 /* Update synchronization mismatch */
-#define EBADCOOKIE 523 /* Cookie is stale */
-#define ENOTSUPP 524 /* Operation is not supported */
-#define ETOOSMALL 525 /* Buffer or request is too small */
-#define ESERVERFAULT 526 /* An untranslatable error occurred */
-#define EBADTYPE 527 /* Type not supported by server */
-#define EJUKEBOX 528 /* Request initiated, but will not complete before timeout */
-#define EIOCBQUEUED 529 /* iocb queued, will get completion event */
-#define EIOCBRETRY 530 /* iocb queued, will trigger a retry */
-
-#endif
-
-#endif
diff --git a/original/linux/errqueue.h b/original/linux/errqueue.h
deleted file mode 100644
index 408118a..0000000
--- a/original/linux/errqueue.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef _LINUX_ERRQUEUE_H
-#define _LINUX_ERRQUEUE_H 1
-
-struct sock_extended_err
-{
- __u32 ee_errno;
- __u8 ee_origin;
- __u8 ee_type;
- __u8 ee_code;
- __u8 ee_pad;
- __u32 ee_info;
- __u32 ee_data;
-};
-
-#define SO_EE_ORIGIN_NONE 0
-#define SO_EE_ORIGIN_LOCAL 1
-#define SO_EE_ORIGIN_ICMP 2
-#define SO_EE_ORIGIN_ICMP6 3
-
-#define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1))
-
-#ifdef __KERNEL__
-
-#include <net/ip.h>
-#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-#include <linux/ipv6.h>
-#endif
-
-#define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb))
-
-struct sock_exterr_skb
-{
- union {
- struct inet_skb_parm h4;
-#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
- struct inet6_skb_parm h6;
-#endif
- } header;
- struct sock_extended_err ee;
- u16 addr_offset;
- u16 port;
-};
-
-#endif
-
-#endif
diff --git a/original/linux/etherdevice.h b/original/linux/etherdevice.h
deleted file mode 100644
index 745c988..0000000
--- a/original/linux/etherdevice.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. NET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions for the Ethernet handlers.
- *
- * Version: @(#)eth.h 1.0.4 05/13/93
- *
- * Authors: Ross Biro
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * Relocated to include/linux where it belongs by Alan Cox
- * <gw4pts@gw4pts.ampr.org>
- *
- * 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.
- *
- * WARNING: This move may well be temporary. This file will get merged with others RSN.
- *
- */
-#ifndef _LINUX_ETHERDEVICE_H
-#define _LINUX_ETHERDEVICE_H
-
-#include <linux/if_ether.h>
-#include <linux/netdevice.h>
-#include <linux/random.h>
-
-#ifdef __KERNEL__
-extern int eth_header(struct sk_buff *skb, struct net_device *dev,
- unsigned short type, void *daddr,
- void *saddr, unsigned len);
-extern int eth_rebuild_header(struct sk_buff *skb);
-extern __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev);
-extern void eth_header_cache_update(struct hh_cache *hh, struct net_device *dev,
- unsigned char * haddr);
-extern int eth_header_cache(struct neighbour *neigh,
- struct hh_cache *hh);
-
-extern struct net_device *alloc_etherdev(int sizeof_priv);
-static inline void eth_copy_and_sum (struct sk_buff *dest,
- const unsigned char *src,
- int len, int base)
-{
- memcpy (dest->data, src, len);
-}
-
-/**
- * is_zero_ether_addr - Determine if give Ethernet address is all zeros.
- * @addr: Pointer to a six-byte array containing the Ethernet address
- *
- * Return true if the address is all zeroes.
- */
-static inline int is_zero_ether_addr(const u8 *addr)
-{
- return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
-}
-
-/**
- * is_multicast_ether_addr - Determine if the Ethernet address is a multicast.
- * @addr: Pointer to a six-byte array containing the Ethernet address
- *
- * Return true if the address is a multicast address.
- * By definition the broadcast address is also a multicast address.
- */
-static inline int is_multicast_ether_addr(const u8 *addr)
-{
- return (0x01 & addr[0]);
-}
-
-/**
- * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast
- * @addr: Pointer to a six-byte array containing the Ethernet address
- *
- * Return true if the address is the broadcast address.
- */
-static inline int is_broadcast_ether_addr(const u8 *addr)
-{
- return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff;
-}
-
-/**
- * is_valid_ether_addr - Determine if the given Ethernet address is valid
- * @addr: Pointer to a six-byte array containing the Ethernet address
- *
- * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not
- * a multicast address, and is not FF:FF:FF:FF:FF:FF.
- *
- * Return true if the address is valid.
- */
-static inline int is_valid_ether_addr(const u8 *addr)
-{
- /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to
- * explicitly check for it here. */
- return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
-}
-
-/**
- * random_ether_addr - Generate software assigned random Ethernet address
- * @addr: Pointer to a six-byte array containing the Ethernet address
- *
- * Generate a random Ethernet address (MAC) that is not multicast
- * and has the local assigned bit set.
- */
-static inline void random_ether_addr(u8 *addr)
-{
- get_random_bytes (addr, ETH_ALEN);
- addr [0] &= 0xfe; /* clear multicast bit */
- addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
-}
-
-/**
- * compare_ether_addr - Compare two Ethernet addresses
- * @addr1: Pointer to a six-byte array containing the Ethernet address
- * @addr2: Pointer other six-byte array containing the Ethernet address
- *
- * Compare two ethernet addresses, returns 0 if equal
- */
-static inline unsigned compare_ether_addr(const u8 *addr1, const u8 *addr2)
-{
- const u16 *a = (const u16 *) addr1;
- const u16 *b = (const u16 *) addr2;
-
- BUILD_BUG_ON(ETH_ALEN != 6);
- return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
-}
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_ETHERDEVICE_H */
diff --git a/original/linux/ethtool.h b/original/linux/ethtool.h
deleted file mode 100644
index 27c67a5..0000000
--- a/original/linux/ethtool.h
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * ethtool.h: Defines for Linux ethtool.
- *
- * Copyright (C) 1998 David S. Miller (davem@redhat.com)
- * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
- * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
- * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
- * christopher.leech@intel.com,
- * scott.feldman@intel.com)
- */
-
-#ifndef _LINUX_ETHTOOL_H
-#define _LINUX_ETHTOOL_H
-
-#include <linux/types.h>
-
-/* This should work for both 32 and 64 bit userland. */
-struct ethtool_cmd {
- __u32 cmd;
- __u32 supported; /* Features this interface supports */
- __u32 advertising; /* Features this interface advertises */
- __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */
- __u8 duplex; /* Duplex, half or full */
- __u8 port; /* Which connector port */
- __u8 phy_address;
- __u8 transceiver; /* Which transceiver to use */
- __u8 autoneg; /* Enable or disable autonegotiation */
- __u32 maxtxpkt; /* Tx pkts before generating tx int */
- __u32 maxrxpkt; /* Rx pkts before generating rx int */
- __u16 speed_hi;
- __u16 reserved2;
- __u32 reserved[3];
-};
-
-static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
- __u32 speed)
-{
-
- ep->speed = (__u16)speed;
- ep->speed_hi = (__u16)(speed >> 16);
-}
-
-static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
-{
- return (ep->speed_hi << 16) | ep->speed;
-}
-
-#define ETHTOOL_BUSINFO_LEN 32
-/* these strings are set to whatever the driver author decides... */
-struct ethtool_drvinfo {
- __u32 cmd;
- char driver[32]; /* driver short name, "tulip", "eepro100" */
- char version[32]; /* driver version string */
- char fw_version[32]; /* firmware version string, if applicable */
- char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
- /* For PCI devices, use pci_name(pci_dev). */
- char reserved1[32];
- char reserved2[12];
- __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
- __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
- __u32 testinfo_len;
- __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */
- __u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */
-};
-
-#define SOPASS_MAX 6
-/* wake-on-lan settings */
-struct ethtool_wolinfo {
- __u32 cmd;
- __u32 supported;
- __u32 wolopts;
- __u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */
-};
-
-/* for passing single values */
-struct ethtool_value {
- __u32 cmd;
- __u32 data;
-};
-
-/* for passing big chunks of data */
-struct ethtool_regs {
- __u32 cmd;
- __u32 version; /* driver-specific, indicates different chips/revs */
- __u32 len; /* bytes */
- __u8 data[0];
-};
-
-/* for passing EEPROM chunks */
-struct ethtool_eeprom {
- __u32 cmd;
- __u32 magic;
- __u32 offset; /* in bytes */
- __u32 len; /* in bytes */
- __u8 data[0];
-};
-
-/* for configuring coalescing parameters of chip */
-struct ethtool_coalesce {
- __u32 cmd; /* ETHTOOL_{G,S}COALESCE */
-
- /* How many usecs to delay an RX interrupt after
- * a packet arrives. If 0, only rx_max_coalesced_frames
- * is used.
- */
- __u32 rx_coalesce_usecs;
-
- /* How many packets to delay an RX interrupt after
- * a packet arrives. If 0, only rx_coalesce_usecs is
- * used. It is illegal to set both usecs and max frames
- * to zero as this would cause RX interrupts to never be
- * generated.
- */
- __u32 rx_max_coalesced_frames;
-
- /* Same as above two parameters, except that these values
- * apply while an IRQ is being serviced by the host. Not
- * all cards support this feature and the values are ignored
- * in that case.
- */
- __u32 rx_coalesce_usecs_irq;
- __u32 rx_max_coalesced_frames_irq;
-
- /* How many usecs to delay a TX interrupt after
- * a packet is sent. If 0, only tx_max_coalesced_frames
- * is used.
- */
- __u32 tx_coalesce_usecs;
-
- /* How many packets to delay a TX interrupt after
- * a packet is sent. If 0, only tx_coalesce_usecs is
- * used. It is illegal to set both usecs and max frames
- * to zero as this would cause TX interrupts to never be
- * generated.
- */
- __u32 tx_max_coalesced_frames;
-
- /* Same as above two parameters, except that these values
- * apply while an IRQ is being serviced by the host. Not
- * all cards support this feature and the values are ignored
- * in that case.
- */
- __u32 tx_coalesce_usecs_irq;
- __u32 tx_max_coalesced_frames_irq;
-
- /* How many usecs to delay in-memory statistics
- * block updates. Some drivers do not have an in-memory
- * statistic block, and in such cases this value is ignored.
- * This value must not be zero.
- */
- __u32 stats_block_coalesce_usecs;
-
- /* Adaptive RX/TX coalescing is an algorithm implemented by
- * some drivers to improve latency under low packet rates and
- * improve throughput under high packet rates. Some drivers
- * only implement one of RX or TX adaptive coalescing. Anything
- * not implemented by the driver causes these values to be
- * silently ignored.
- */
- __u32 use_adaptive_rx_coalesce;
- __u32 use_adaptive_tx_coalesce;
-
- /* When the packet rate (measured in packets per second)
- * is below pkt_rate_low, the {rx,tx}_*_low parameters are
- * used.
- */
- __u32 pkt_rate_low;
- __u32 rx_coalesce_usecs_low;
- __u32 rx_max_coalesced_frames_low;
- __u32 tx_coalesce_usecs_low;
- __u32 tx_max_coalesced_frames_low;
-
- /* When the packet rate is below pkt_rate_high but above
- * pkt_rate_low (both measured in packets per second) the
- * normal {rx,tx}_* coalescing parameters are used.
- */
-
- /* When the packet rate is (measured in packets per second)
- * is above pkt_rate_high, the {rx,tx}_*_high parameters are
- * used.
- */
- __u32 pkt_rate_high;
- __u32 rx_coalesce_usecs_high;
- __u32 rx_max_coalesced_frames_high;
- __u32 tx_coalesce_usecs_high;
- __u32 tx_max_coalesced_frames_high;
-
- /* How often to do adaptive coalescing packet rate sampling,
- * measured in seconds. Must not be zero.
- */
- __u32 rate_sample_interval;
-};
-
-/* for configuring RX/TX ring parameters */
-struct ethtool_ringparam {
- __u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */
-
- /* Read only attributes. These indicate the maximum number
- * of pending RX/TX ring entries the driver will allow the
- * user to set.
- */
- __u32 rx_max_pending;
- __u32 rx_mini_max_pending;
- __u32 rx_jumbo_max_pending;
- __u32 tx_max_pending;
-
- /* Values changeable by the user. The valid values are
- * in the range 1 to the "*_max_pending" counterpart above.
- */
- __u32 rx_pending;
- __u32 rx_mini_pending;
- __u32 rx_jumbo_pending;
- __u32 tx_pending;
-};
-
-/* for configuring link flow control parameters */
-struct ethtool_pauseparam {
- __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */
-
- /* If the link is being auto-negotiated (via ethtool_cmd.autoneg
- * being true) the user may set 'autonet' here non-zero to have the
- * pause parameters be auto-negotiated too. In such a case, the
- * {rx,tx}_pause values below determine what capabilities are
- * advertised.
- *
- * If 'autoneg' is zero or the link is not being auto-negotiated,
- * then {rx,tx}_pause force the driver to use/not-use pause
- * flow control.
- */
- __u32 autoneg;
- __u32 rx_pause;
- __u32 tx_pause;
-};
-
-#define ETH_GSTRING_LEN 32
-enum ethtool_stringset {
- ETH_SS_TEST = 0,
- ETH_SS_STATS,
- ETH_SS_PRIV_FLAGS,
-};
-
-/* for passing string sets for data tagging */
-struct ethtool_gstrings {
- __u32 cmd; /* ETHTOOL_GSTRINGS */
- __u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/
- __u32 len; /* number of strings in the string set */
- __u8 data[0];
-};
-
-enum ethtool_test_flags {
- ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */
- ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */
-};
-
-/* for requesting NIC test and getting results*/
-struct ethtool_test {
- __u32 cmd; /* ETHTOOL_TEST */
- __u32 flags; /* ETH_TEST_FL_xxx */
- __u32 reserved;
- __u32 len; /* result length, in number of u64 elements */
- __u64 data[0];
-};
-
-/* for dumping NIC-specific statistics */
-struct ethtool_stats {
- __u32 cmd; /* ETHTOOL_GSTATS */
- __u32 n_stats; /* number of u64's being returned */
- __u64 data[0];
-};
-
-struct ethtool_perm_addr {
- __u32 cmd; /* ETHTOOL_GPERMADDR */
- __u32 size;
- __u8 data[0];
-};
-
-/* boolean flags controlling per-interface behavior characteristics.
- * When reading, the flag indicates whether or not a certain behavior
- * is enabled/present. When writing, the flag indicates whether
- * or not the driver should turn on (set) or off (clear) a behavior.
- *
- * Some behaviors may read-only (unconditionally absent or present).
- * If such is the case, return EINVAL in the set-flags operation if the
- * flag differs from the read-only value.
- */
-enum ethtool_flags {
- ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
-};
-
-struct ethtool_rxnfc {
- __u32 cmd;
- __u32 flow_type;
- __u64 data;
-};
-
-#ifdef __KERNEL__
-
-struct net_device;
-
-/* Some generic methods drivers may use in their ethtool_ops */
-u32 ethtool_op_get_link(struct net_device *dev);
-u32 ethtool_op_get_tx_csum(struct net_device *dev);
-int ethtool_op_set_tx_csum(struct net_device *dev, u32 data);
-int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data);
-int ethtool_op_set_tx_ipv6_csum(struct net_device *dev, u32 data);
-u32 ethtool_op_get_sg(struct net_device *dev);
-int ethtool_op_set_sg(struct net_device *dev, u32 data);
-u32 ethtool_op_get_tso(struct net_device *dev);
-int ethtool_op_set_tso(struct net_device *dev, u32 data);
-u32 ethtool_op_get_ufo(struct net_device *dev);
-int ethtool_op_set_ufo(struct net_device *dev, u32 data);
-u32 ethtool_op_get_flags(struct net_device *dev);
-int ethtool_op_set_flags(struct net_device *dev, u32 data);
-
-/**
- * &ethtool_ops - Alter and report network device settings
- * get_settings: Get device-specific settings
- * set_settings: Set device-specific settings
- * get_drvinfo: Report driver information
- * get_regs: Get device registers
- * get_wol: Report whether Wake-on-Lan is enabled
- * set_wol: Turn Wake-on-Lan on or off
- * get_msglevel: Report driver message level
- * set_msglevel: Set driver message level
- * nway_reset: Restart autonegotiation
- * get_link: Get link status
- * get_eeprom: Read data from the device EEPROM
- * set_eeprom: Write data to the device EEPROM
- * get_coalesce: Get interrupt coalescing parameters
- * set_coalesce: Set interrupt coalescing parameters
- * get_ringparam: Report ring sizes
- * set_ringparam: Set ring sizes
- * get_pauseparam: Report pause parameters
- * set_pauseparam: Set pause parameters
- * get_rx_csum: Report whether receive checksums are turned on or off
- * set_rx_csum: Turn receive checksum on or off
- * get_tx_csum: Report whether transmit checksums are turned on or off
- * set_tx_csum: Turn transmit checksums on or off
- * get_sg: Report whether scatter-gather is enabled
- * set_sg: Turn scatter-gather on or off
- * get_tso: Report whether TCP segmentation offload is enabled
- * set_tso: Turn TCP segmentation offload on or off
- * get_ufo: Report whether UDP fragmentation offload is enabled
- * set_ufo: Turn UDP fragmentation offload on or off
- * self_test: Run specified self-tests
- * get_strings: Return a set of strings that describe the requested objects
- * phys_id: Identify the device
- * get_stats: Return statistics about the device
- * get_flags: get 32-bit flags bitmap
- * set_flags: set 32-bit flags bitmap
- *
- * Description:
- *
- * get_settings:
- * @get_settings is passed an &ethtool_cmd to fill in. It returns
- * an negative errno or zero.
- *
- * set_settings:
- * @set_settings is passed an &ethtool_cmd and should attempt to set
- * all the settings this device supports. It may return an error value
- * if something goes wrong (otherwise 0).
- *
- * get_eeprom:
- * Should fill in the magic field. Don't need to check len for zero
- * or wraparound. Fill in the data argument with the eeprom values
- * from offset to offset + len. Update len to the amount read.
- * Returns an error or zero.
- *
- * set_eeprom:
- * Should validate the magic field. Don't need to check len for zero
- * or wraparound. Update len to the amount written. Returns an error
- * or zero.
- */
-struct ethtool_ops {
- int (*get_settings)(struct net_device *, struct ethtool_cmd *);
- int (*set_settings)(struct net_device *, struct ethtool_cmd *);
- void (*get_drvinfo)(struct net_device *, struct ethtool_drvinfo *);
- int (*get_regs_len)(struct net_device *);
- void (*get_regs)(struct net_device *, struct ethtool_regs *, void *);
- void (*get_wol)(struct net_device *, struct ethtool_wolinfo *);
- int (*set_wol)(struct net_device *, struct ethtool_wolinfo *);
- u32 (*get_msglevel)(struct net_device *);
- void (*set_msglevel)(struct net_device *, u32);
- int (*nway_reset)(struct net_device *);
- u32 (*get_link)(struct net_device *);
- int (*get_eeprom_len)(struct net_device *);
- int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
- int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
- int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
- int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
- void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *);
- int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *);
- void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
- int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*);
- u32 (*get_rx_csum)(struct net_device *);
- int (*set_rx_csum)(struct net_device *, u32);
- u32 (*get_tx_csum)(struct net_device *);
- int (*set_tx_csum)(struct net_device *, u32);
- u32 (*get_sg)(struct net_device *);
- int (*set_sg)(struct net_device *, u32);
- u32 (*get_tso)(struct net_device *);
- int (*set_tso)(struct net_device *, u32);
- void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
- void (*get_strings)(struct net_device *, u32 stringset, u8 *);
- int (*phys_id)(struct net_device *, u32);
- void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *);
- int (*begin)(struct net_device *);
- void (*complete)(struct net_device *);
- u32 (*get_ufo)(struct net_device *);
- int (*set_ufo)(struct net_device *, u32);
- u32 (*get_flags)(struct net_device *);
- int (*set_flags)(struct net_device *, u32);
- u32 (*get_priv_flags)(struct net_device *);
- int (*set_priv_flags)(struct net_device *, u32);
- int (*get_sset_count)(struct net_device *, int);
-
- /* the following hooks are obsolete */
- int (*self_test_count)(struct net_device *);/* use get_sset_count */
- int (*get_stats_count)(struct net_device *);/* use get_sset_count */
- int (*get_rxhash)(struct net_device *, struct ethtool_rxnfc *);
- int (*set_rxhash)(struct net_device *, struct ethtool_rxnfc *);
-};
-#endif /* __KERNEL__ */
-
-/* CMDs currently supported */
-#define ETHTOOL_GSET 0x00000001 /* Get settings. */
-#define ETHTOOL_SSET 0x00000002 /* Set settings. */
-#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
-#define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */
-#define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */
-#define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */
-#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */
-#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */
-#define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */
-#define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */
-#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
-#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
-#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */
-#define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */
-#define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */
-#define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */
-#define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */
-#define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */
-#define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */
-#define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */
-#define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */
-#define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */
-#define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable
- * (ethtool_value) */
-#define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable
- * (ethtool_value). */
-#define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */
-#define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */
-#define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */
-#define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */
-#define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */
-#define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */
-#define ETHTOOL_GPERMADDR 0x00000020 /* Get permanent hardware address */
-#define ETHTOOL_GUFO 0x00000021 /* Get UFO enable (ethtool_value) */
-#define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */
-#define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */
-#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
-#define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */
-#define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */
-#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
-#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
-
-#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
-#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
-#define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */
-#define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */
-
-/* compatibility with older code */
-#define SPARC_ETH_GSET ETHTOOL_GSET
-#define SPARC_ETH_SSET ETHTOOL_SSET
-
-/* Indicates what features are supported by the interface. */
-#define SUPPORTED_10baseT_Half (1 << 0)
-#define SUPPORTED_10baseT_Full (1 << 1)
-#define SUPPORTED_100baseT_Half (1 << 2)
-#define SUPPORTED_100baseT_Full (1 << 3)
-#define SUPPORTED_1000baseT_Half (1 << 4)
-#define SUPPORTED_1000baseT_Full (1 << 5)
-#define SUPPORTED_Autoneg (1 << 6)
-#define SUPPORTED_TP (1 << 7)
-#define SUPPORTED_AUI (1 << 8)
-#define SUPPORTED_MII (1 << 9)
-#define SUPPORTED_FIBRE (1 << 10)
-#define SUPPORTED_BNC (1 << 11)
-#define SUPPORTED_10000baseT_Full (1 << 12)
-#define SUPPORTED_Pause (1 << 13)
-#define SUPPORTED_Asym_Pause (1 << 14)
-#define SUPPORTED_2500baseX_Full (1 << 15)
-
-/* Indicates what features are advertised by the interface. */
-#define ADVERTISED_10baseT_Half (1 << 0)
-#define ADVERTISED_10baseT_Full (1 << 1)
-#define ADVERTISED_100baseT_Half (1 << 2)
-#define ADVERTISED_100baseT_Full (1 << 3)
-#define ADVERTISED_1000baseT_Half (1 << 4)
-#define ADVERTISED_1000baseT_Full (1 << 5)
-#define ADVERTISED_Autoneg (1 << 6)
-#define ADVERTISED_TP (1 << 7)
-#define ADVERTISED_AUI (1 << 8)
-#define ADVERTISED_MII (1 << 9)
-#define ADVERTISED_FIBRE (1 << 10)
-#define ADVERTISED_BNC (1 << 11)
-#define ADVERTISED_10000baseT_Full (1 << 12)
-#define ADVERTISED_Pause (1 << 13)
-#define ADVERTISED_Asym_Pause (1 << 14)
-#define ADVERTISED_2500baseX_Full (1 << 15)
-
-/* The following are all involved in forcing a particular link
- * mode for the device for setting things. When getting the
- * devices settings, these indicate the current mode and whether
- * it was foced up into this mode or autonegotiated.
- */
-
-/* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */
-#define SPEED_10 10
-#define SPEED_100 100
-#define SPEED_1000 1000
-#define SPEED_2500 2500
-#define SPEED_10000 10000
-
-/* Duplex, half or full. */
-#define DUPLEX_HALF 0x00
-#define DUPLEX_FULL 0x01
-
-/* Which connector port. */
-#define PORT_TP 0x00
-#define PORT_AUI 0x01
-#define PORT_MII 0x02
-#define PORT_FIBRE 0x03
-#define PORT_BNC 0x04
-
-/* Which transceiver to use. */
-#define XCVR_INTERNAL 0x00
-#define XCVR_EXTERNAL 0x01
-#define XCVR_DUMMY1 0x02
-#define XCVR_DUMMY2 0x03
-#define XCVR_DUMMY3 0x04
-
-/* Enable or disable autonegotiation. If this is set to enable,
- * the forced link modes above are completely ignored.
- */
-#define AUTONEG_DISABLE 0x00
-#define AUTONEG_ENABLE 0x01
-
-/* Wake-On-Lan options. */
-#define WAKE_PHY (1 << 0)
-#define WAKE_UCAST (1 << 1)
-#define WAKE_MCAST (1 << 2)
-#define WAKE_BCAST (1 << 3)
-#define WAKE_ARP (1 << 4)
-#define WAKE_MAGIC (1 << 5)
-#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
-
-/* L3-L4 network traffic flow types */
-#define TCP_V4_FLOW 0x01
-#define UDP_V4_FLOW 0x02
-#define SCTP_V4_FLOW 0x03
-#define AH_ESP_V4_FLOW 0x04
-#define TCP_V6_FLOW 0x05
-#define UDP_V6_FLOW 0x06
-#define SCTP_V6_FLOW 0x07
-#define AH_ESP_V6_FLOW 0x08
-
-/* L3-L4 network traffic flow hash options */
-#define RXH_DEV_PORT (1 << 0)
-#define RXH_L2DA (1 << 1)
-#define RXH_VLAN (1 << 2)
-#define RXH_L3_PROTO (1 << 3)
-#define RXH_IP_SRC (1 << 4)
-#define RXH_IP_DST (1 << 5)
-#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
-#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
-#define RXH_DISCARD (1 << 31)
-
-
-#endif /* _LINUX_ETHTOOL_H */
diff --git a/original/linux/ext2_fs.h b/original/linux/ext2_fs.h
deleted file mode 100644
index facf34e..0000000
--- a/original/linux/ext2_fs.h
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * linux/include/linux/ext2_fs.h
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * from
- *
- * linux/include/linux/minix_fs.h
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-#ifndef _LINUX_EXT2_FS_H
-#define _LINUX_EXT2_FS_H
-
-#include <linux/types.h>
-
-/*
- * The second extended filesystem constants/structures
- */
-
-/*
- * Define EXT2FS_DEBUG to produce debug messages
- */
-#undef EXT2FS_DEBUG
-
-/*
- * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
- */
-#define EXT2_PREALLOCATE
-#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
-
-/*
- * The second extended file system version
- */
-#define EXT2FS_DATE "95/08/09"
-#define EXT2FS_VERSION "0.5b"
-
-/*
- * Debug code
- */
-#ifdef EXT2FS_DEBUG
-# define ext2_debug(f, a...) { \
- printk ("EXT2-fs DEBUG (%s, %d): %s:", \
- __FILE__, __LINE__, __FUNCTION__); \
- printk (f, ## a); \
- }
-#else
-# define ext2_debug(f, a...) /**/
-#endif
-
-/*
- * Special inode numbers
- */
-#define EXT2_BAD_INO 1 /* Bad blocks inode */
-#define EXT2_ROOT_INO 2 /* Root inode */
-#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
-#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
-
-/* First non-reserved inode for old ext2 filesystems */
-#define EXT2_GOOD_OLD_FIRST_INO 11
-
-/*
- * The second extended file system magic number
- */
-#define EXT2_SUPER_MAGIC 0xEF53
-
-#ifdef __KERNEL__
-#include <linux/ext2_fs_sb.h>
-static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
-{
- return sb->s_fs_info;
-}
-#else
-/* Assume that user mode programs are passing in an ext2fs superblock, not
- * a kernel struct super_block. This will allow us to call the feature-test
- * macros from user land. */
-#define EXT2_SB(sb) (sb)
-#endif
-
-/*
- * Maximal count of links to a file
- */
-#define EXT2_LINK_MAX 32000
-
-/*
- * Macro-instructions used to manage several block sizes
- */
-#define EXT2_MIN_BLOCK_SIZE 1024
-#define EXT2_MAX_BLOCK_SIZE 4096
-#define EXT2_MIN_BLOCK_LOG_SIZE 10
-#ifdef __KERNEL__
-# define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
-#else
-# define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
-#endif
-#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
-#ifdef __KERNEL__
-# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
-#else
-# define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
-#endif
-#ifdef __KERNEL__
-#define EXT2_ADDR_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_addr_per_block_bits)
-#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->s_inode_size)
-#define EXT2_FIRST_INO(s) (EXT2_SB(s)->s_first_ino)
-#else
-#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
- EXT2_GOOD_OLD_INODE_SIZE : \
- (s)->s_inode_size)
-#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
- EXT2_GOOD_OLD_FIRST_INO : \
- (s)->s_first_ino)
-#endif
-
-/*
- * Macro-instructions used to manage fragments
- */
-#define EXT2_MIN_FRAG_SIZE 1024
-#define EXT2_MAX_FRAG_SIZE 4096
-#define EXT2_MIN_FRAG_LOG_SIZE 10
-#ifdef __KERNEL__
-# define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->s_frag_size)
-# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->s_frags_per_block)
-#else
-# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
-# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
-#endif
-
-/*
- * Structure of a blocks group descriptor
- */
-struct ext2_group_desc
-{
- __le32 bg_block_bitmap; /* Blocks bitmap block */
- __le32 bg_inode_bitmap; /* Inodes bitmap block */
- __le32 bg_inode_table; /* Inodes table block */
- __le16 bg_free_blocks_count; /* Free blocks count */
- __le16 bg_free_inodes_count; /* Free inodes count */
- __le16 bg_used_dirs_count; /* Directories count */
- __le16 bg_pad;
- __le32 bg_reserved[3];
-};
-
-/*
- * Macro-instructions used to manage group descriptors
- */
-#ifdef __KERNEL__
-# define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s) (EXT2_SB(s)->s_desc_per_block)
-# define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group)
-# define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits)
-#else
-# define EXT2_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
-# define EXT2_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
-#endif
-
-/*
- * Constants relative to the data blocks
- */
-#define EXT2_NDIR_BLOCKS 12
-#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
-#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
-#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
-#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
-
-/*
- * Inode flags
- */
-#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
-#define EXT2_UNRM_FL 0x00000002 /* Undelete */
-#define EXT2_COMPR_FL 0x00000004 /* Compress file */
-#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
-#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
-#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
-#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
-#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
-/* Reserved for compression usage... */
-#define EXT2_DIRTY_FL 0x00000100
-#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
-#define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */
-#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
-#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
-#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */
-#define EXT2_IMAGIC_FL 0x00002000 /* AFS directory */
-#define EXT2_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */
-#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */
-#define EXT2_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
-#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
-#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-
-#define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
-#define EXT2_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */
-
-/*
- * ioctl commands
- */
-#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
-#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
-#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
-#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
-
-/*
- * Structure of an inode on the disk
- */
-struct ext2_inode {
- __le16 i_mode; /* File mode */
- __le16 i_uid; /* Low 16 bits of Owner Uid */
- __le32 i_size; /* Size in bytes */
- __le32 i_atime; /* Access time */
- __le32 i_ctime; /* Creation time */
- __le32 i_mtime; /* Modification time */
- __le32 i_dtime; /* Deletion Time */
- __le16 i_gid; /* Low 16 bits of Group Id */
- __le16 i_links_count; /* Links count */
- __le32 i_blocks; /* Blocks count */
- __le32 i_flags; /* File flags */
- union {
- struct {
- __le32 l_i_reserved1;
- } linux1;
- struct {
- __le32 h_i_translator;
- } hurd1;
- struct {
- __le32 m_i_reserved1;
- } masix1;
- } osd1; /* OS dependent 1 */
- __le32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
- __le32 i_generation; /* File version (for NFS) */
- __le32 i_file_acl; /* File ACL */
- __le32 i_dir_acl; /* Directory ACL */
- __le32 i_faddr; /* Fragment address */
- union {
- struct {
- __u8 l_i_frag; /* Fragment number */
- __u8 l_i_fsize; /* Fragment size */
- __u16 i_pad1;
- __le16 l_i_uid_high; /* these 2 fields */
- __le16 l_i_gid_high; /* were reserved2[0] */
- __u32 l_i_reserved2;
- } linux2;
- struct {
- __u8 h_i_frag; /* Fragment number */
- __u8 h_i_fsize; /* Fragment size */
- __le16 h_i_mode_high;
- __le16 h_i_uid_high;
- __le16 h_i_gid_high;
- __le32 h_i_author;
- } hurd2;
- struct {
- __u8 m_i_frag; /* Fragment number */
- __u8 m_i_fsize; /* Fragment size */
- __u16 m_pad1;
- __u32 m_i_reserved2[2];
- } masix2;
- } osd2; /* OS dependent 2 */
-};
-
-#define i_size_high i_dir_acl
-
-#if defined(__KERNEL__) || defined(__linux__)
-#define i_reserved1 osd1.linux1.l_i_reserved1
-#define i_frag osd2.linux2.l_i_frag
-#define i_fsize osd2.linux2.l_i_fsize
-#define i_uid_low i_uid
-#define i_gid_low i_gid
-#define i_uid_high osd2.linux2.l_i_uid_high
-#define i_gid_high osd2.linux2.l_i_gid_high
-#define i_reserved2 osd2.linux2.l_i_reserved2
-#endif
-
-#ifdef __hurd__
-#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
-#define i_uid_high osd2.hurd2.h_i_uid_high
-#define i_gid_high osd2.hurd2.h_i_gid_high
-#define i_author osd2.hurd2.h_i_author
-#endif
-
-#ifdef __masix__
-#define i_reserved1 osd1.masix1.m_i_reserved1
-#define i_frag osd2.masix2.m_i_frag
-#define i_fsize osd2.masix2.m_i_fsize
-#define i_reserved2 osd2.masix2.m_i_reserved2
-#endif
-
-/*
- * File system states
- */
-#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
-#define EXT2_ERROR_FS 0x0002 /* Errors detected */
-
-/*
- * Mount flags
- */
-#define EXT2_MOUNT_CHECK 0x000001 /* Do mount-time checks */
-#define EXT2_MOUNT_OLDALLOC 0x000002 /* Don't use the new Orlov allocator */
-#define EXT2_MOUNT_GRPID 0x000004 /* Create files with directory's group */
-#define EXT2_MOUNT_DEBUG 0x000008 /* Some debugging messages */
-#define EXT2_MOUNT_ERRORS_CONT 0x000010 /* Continue on errors */
-#define EXT2_MOUNT_ERRORS_RO 0x000020 /* Remount fs ro on errors */
-#define EXT2_MOUNT_ERRORS_PANIC 0x000040 /* Panic on errors */
-#define EXT2_MOUNT_MINIX_DF 0x000080 /* Mimics the Minix statfs */
-#define EXT2_MOUNT_NOBH 0x000100 /* No buffer_heads */
-#define EXT2_MOUNT_NO_UID32 0x000200 /* Disable 32-bit UIDs */
-#define EXT2_MOUNT_XATTR_USER 0x004000 /* Extended user attributes */
-#define EXT2_MOUNT_POSIX_ACL 0x008000 /* POSIX Access Control Lists */
-#define EXT2_MOUNT_XIP 0x010000 /* Execute in place */
-#define EXT2_MOUNT_USRQUOTA 0x020000 /* user quota */
-#define EXT2_MOUNT_GRPQUOTA 0x040000 /* group quota */
-
-
-#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
-#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
-#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \
- EXT2_MOUNT_##opt)
-/*
- * Maximal mount counts between two filesystem checks
- */
-#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
-#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
-
-/*
- * Behaviour when detecting errors
- */
-#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
-#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
-#define EXT2_ERRORS_PANIC 3 /* Panic */
-#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
-
-/*
- * Structure of the super block
- */
-struct ext2_super_block {
- __le32 s_inodes_count; /* Inodes count */
- __le32 s_blocks_count; /* Blocks count */
- __le32 s_r_blocks_count; /* Reserved blocks count */
- __le32 s_free_blocks_count; /* Free blocks count */
- __le32 s_free_inodes_count; /* Free inodes count */
- __le32 s_first_data_block; /* First Data Block */
- __le32 s_log_block_size; /* Block size */
- __le32 s_log_frag_size; /* Fragment size */
- __le32 s_blocks_per_group; /* # Blocks per group */
- __le32 s_frags_per_group; /* # Fragments per group */
- __le32 s_inodes_per_group; /* # Inodes per group */
- __le32 s_mtime; /* Mount time */
- __le32 s_wtime; /* Write time */
- __le16 s_mnt_count; /* Mount count */
- __le16 s_max_mnt_count; /* Maximal mount count */
- __le16 s_magic; /* Magic signature */
- __le16 s_state; /* File system state */
- __le16 s_errors; /* Behaviour when detecting errors */
- __le16 s_minor_rev_level; /* minor revision level */
- __le32 s_lastcheck; /* time of last check */
- __le32 s_checkinterval; /* max. time between checks */
- __le32 s_creator_os; /* OS */
- __le32 s_rev_level; /* Revision level */
- __le16 s_def_resuid; /* Default uid for reserved blocks */
- __le16 s_def_resgid; /* Default gid for reserved blocks */
- /*
- * These fields are for EXT2_DYNAMIC_REV superblocks only.
- *
- * Note: the difference between the compatible feature set and
- * the incompatible feature set is that if there is a bit set
- * in the incompatible feature set that the kernel doesn't
- * know about, it should refuse to mount the filesystem.
- *
- * e2fsck's requirements are more strict; if it doesn't know
- * about a feature in either the compatible or incompatible
- * feature set, it must abort and not try to meddle with
- * things it doesn't understand...
- */
- __le32 s_first_ino; /* First non-reserved inode */
- __le16 s_inode_size; /* size of inode structure */
- __le16 s_block_group_nr; /* block group # of this superblock */
- __le32 s_feature_compat; /* compatible feature set */
- __le32 s_feature_incompat; /* incompatible feature set */
- __le32 s_feature_ro_compat; /* readonly-compatible feature set */
- __u8 s_uuid[16]; /* 128-bit uuid for volume */
- char s_volume_name[16]; /* volume name */
- char s_last_mounted[64]; /* directory where last mounted */
- __le32 s_algorithm_usage_bitmap; /* For compression */
- /*
- * Performance hints. Directory preallocation should only
- * happen if the EXT2_COMPAT_PREALLOC flag is on.
- */
- __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
- __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
- __u16 s_padding1;
- /*
- * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
- */
- __u8 s_journal_uuid[16]; /* uuid of journal superblock */
- __u32 s_journal_inum; /* inode number of journal file */
- __u32 s_journal_dev; /* device number of journal file */
- __u32 s_last_orphan; /* start of list of inodes to delete */
- __u32 s_hash_seed[4]; /* HTREE hash seed */
- __u8 s_def_hash_version; /* Default hash version to use */
- __u8 s_reserved_char_pad;
- __u16 s_reserved_word_pad;
- __le32 s_default_mount_opts;
- __le32 s_first_meta_bg; /* First metablock block group */
- __u32 s_reserved[190]; /* Padding to the end of the block */
-};
-
-/*
- * Codes for operating systems
- */
-#define EXT2_OS_LINUX 0
-#define EXT2_OS_HURD 1
-#define EXT2_OS_MASIX 2
-#define EXT2_OS_FREEBSD 3
-#define EXT2_OS_LITES 4
-
-/*
- * Revision levels
- */
-#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
-#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
-
-#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
-#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
-
-#define EXT2_GOOD_OLD_INODE_SIZE 128
-
-/*
- * Feature set definitions
- */
-
-#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
-#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
-#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
- ( EXT2_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
-#define EXT2_SET_COMPAT_FEATURE(sb,mask) \
- EXT2_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
-#define EXT2_SET_RO_COMPAT_FEATURE(sb,mask) \
- EXT2_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
-#define EXT2_SET_INCOMPAT_FEATURE(sb,mask) \
- EXT2_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
-#define EXT2_CLEAR_COMPAT_FEATURE(sb,mask) \
- EXT2_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
-#define EXT2_CLEAR_RO_COMPAT_FEATURE(sb,mask) \
- EXT2_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
-#define EXT2_CLEAR_INCOMPAT_FEATURE(sb,mask) \
- EXT2_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
-
-#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
-#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
-#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
-#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
-#define EXT2_FEATURE_COMPAT_RESIZE_INO 0x0010
-#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
-#define EXT2_FEATURE_COMPAT_ANY 0xffffffff
-
-#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
-#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
-#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
-#define EXT2_FEATURE_RO_COMPAT_ANY 0xffffffff
-
-#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
-#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
-#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004
-#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008
-#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
-#define EXT2_FEATURE_INCOMPAT_ANY 0xffffffff
-
-#define EXT2_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
-#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \
- EXT2_FEATURE_INCOMPAT_META_BG)
-#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
- EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
-#define EXT2_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT2_FEATURE_RO_COMPAT_SUPP
-#define EXT2_FEATURE_INCOMPAT_UNSUPPORTED ~EXT2_FEATURE_INCOMPAT_SUPP
-
-/*
- * Default values for user and/or group using reserved blocks
- */
-#define EXT2_DEF_RESUID 0
-#define EXT2_DEF_RESGID 0
-
-/*
- * Default mount options
- */
-#define EXT2_DEFM_DEBUG 0x0001
-#define EXT2_DEFM_BSDGROUPS 0x0002
-#define EXT2_DEFM_XATTR_USER 0x0004
-#define EXT2_DEFM_ACL 0x0008
-#define EXT2_DEFM_UID16 0x0010
- /* Not used by ext2, but reserved for use by ext3 */
-#define EXT3_DEFM_JMODE 0x0060
-#define EXT3_DEFM_JMODE_DATA 0x0020
-#define EXT3_DEFM_JMODE_ORDERED 0x0040
-#define EXT3_DEFM_JMODE_WBACK 0x0060
-
-/*
- * Structure of a directory entry
- */
-#define EXT2_NAME_LEN 255
-
-struct ext2_dir_entry {
- __le32 inode; /* Inode number */
- __le16 rec_len; /* Directory entry length */
- __le16 name_len; /* Name length */
- char name[EXT2_NAME_LEN]; /* File name */
-};
-
-/*
- * The new version of the directory entry. Since EXT2 structures are
- * stored in intel byte order, and the name_len field could never be
- * bigger than 255 chars, it's safe to reclaim the extra byte for the
- * file_type field.
- */
-struct ext2_dir_entry_2 {
- __le32 inode; /* Inode number */
- __le16 rec_len; /* Directory entry length */
- __u8 name_len; /* Name length */
- __u8 file_type;
- char name[EXT2_NAME_LEN]; /* File name */
-};
-
-/*
- * Ext2 directory file types. Only the low 3 bits are used. The
- * other bits are reserved for now.
- */
-enum {
- EXT2_FT_UNKNOWN,
- EXT2_FT_REG_FILE,
- EXT2_FT_DIR,
- EXT2_FT_CHRDEV,
- EXT2_FT_BLKDEV,
- EXT2_FT_FIFO,
- EXT2_FT_SOCK,
- EXT2_FT_SYMLINK,
- EXT2_FT_MAX
-};
-
-/*
- * EXT2_DIR_PAD defines the directory entries boundaries
- *
- * NOTE: It must be a multiple of 4
- */
-#define EXT2_DIR_PAD 4
-#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
-#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
- ~EXT2_DIR_ROUND)
-
-#endif /* _LINUX_EXT2_FS_H */
diff --git a/original/linux/ext3_fs.h b/original/linux/ext3_fs.h
deleted file mode 100644
index 9f9cce7..0000000
--- a/original/linux/ext3_fs.h
+++ /dev/null
@@ -1,871 +0,0 @@
-/*
- * linux/include/linux/ext3_fs.h
- *
- * Copyright (C) 1992, 1993, 1994, 1995
- * Remy Card (card@masi.ibp.fr)
- * Laboratoire MASI - Institut Blaise Pascal
- * Universite Pierre et Marie Curie (Paris VI)
- *
- * from
- *
- * linux/include/linux/minix_fs.h
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- */
-
-#ifndef _LINUX_EXT3_FS_H
-#define _LINUX_EXT3_FS_H
-
-#include <linux/types.h>
-
-/*
- * The second extended filesystem constants/structures
- */
-
-/*
- * Define EXT3FS_DEBUG to produce debug messages
- */
-#undef EXT3FS_DEBUG
-
-/*
- * Define EXT3_RESERVATION to reserve data blocks for expanding files
- */
-#define EXT3_DEFAULT_RESERVE_BLOCKS 8
-/*max window size: 1024(direct blocks) + 3([t,d]indirect blocks) */
-#define EXT3_MAX_RESERVE_BLOCKS 1027
-#define EXT3_RESERVE_WINDOW_NOT_ALLOCATED 0
-/*
- * Always enable hashed directories
- */
-#define CONFIG_EXT3_INDEX
-
-/*
- * Debug code
- */
-#ifdef EXT3FS_DEBUG
-#define ext3_debug(f, a...) \
- do { \
- printk (KERN_DEBUG "EXT3-fs DEBUG (%s, %d): %s:", \
- __FILE__, __LINE__, __FUNCTION__); \
- printk (KERN_DEBUG f, ## a); \
- } while (0)
-#else
-#define ext3_debug(f, a...) do {} while (0)
-#endif
-
-/*
- * Special inodes numbers
- */
-#define EXT3_BAD_INO 1 /* Bad blocks inode */
-#define EXT3_ROOT_INO 2 /* Root inode */
-#define EXT3_BOOT_LOADER_INO 5 /* Boot loader inode */
-#define EXT3_UNDEL_DIR_INO 6 /* Undelete directory inode */
-#define EXT3_RESIZE_INO 7 /* Reserved group descriptors inode */
-#define EXT3_JOURNAL_INO 8 /* Journal inode */
-
-/* First non-reserved inode for old ext3 filesystems */
-#define EXT3_GOOD_OLD_FIRST_INO 11
-
-/*
- * The second extended file system magic number
- */
-#define EXT3_SUPER_MAGIC 0xEF53
-
-/*
- * Maximal count of links to a file
- */
-#define EXT3_LINK_MAX 32000
-
-/*
- * Macro-instructions used to manage several block sizes
- */
-#define EXT3_MIN_BLOCK_SIZE 1024
-#define EXT3_MAX_BLOCK_SIZE 4096
-#define EXT3_MIN_BLOCK_LOG_SIZE 10
-#ifdef __KERNEL__
-# define EXT3_BLOCK_SIZE(s) ((s)->s_blocksize)
-#else
-# define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
-#endif
-#define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
-#ifdef __KERNEL__
-# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
-#else
-# define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
-#endif
-#ifdef __KERNEL__
-#define EXT3_ADDR_PER_BLOCK_BITS(s) (EXT3_SB(s)->s_addr_per_block_bits)
-#define EXT3_INODE_SIZE(s) (EXT3_SB(s)->s_inode_size)
-#define EXT3_FIRST_INO(s) (EXT3_SB(s)->s_first_ino)
-#else
-#define EXT3_INODE_SIZE(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \
- EXT3_GOOD_OLD_INODE_SIZE : \
- (s)->s_inode_size)
-#define EXT3_FIRST_INO(s) (((s)->s_rev_level == EXT3_GOOD_OLD_REV) ? \
- EXT3_GOOD_OLD_FIRST_INO : \
- (s)->s_first_ino)
-#endif
-
-/*
- * Macro-instructions used to manage fragments
- */
-#define EXT3_MIN_FRAG_SIZE 1024
-#define EXT3_MAX_FRAG_SIZE 4096
-#define EXT3_MIN_FRAG_LOG_SIZE 10
-#ifdef __KERNEL__
-# define EXT3_FRAG_SIZE(s) (EXT3_SB(s)->s_frag_size)
-# define EXT3_FRAGS_PER_BLOCK(s) (EXT3_SB(s)->s_frags_per_block)
-#else
-# define EXT3_FRAG_SIZE(s) (EXT3_MIN_FRAG_SIZE << (s)->s_log_frag_size)
-# define EXT3_FRAGS_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / EXT3_FRAG_SIZE(s))
-#endif
-
-/*
- * Structure of a blocks group descriptor
- */
-struct ext3_group_desc
-{
- __le32 bg_block_bitmap; /* Blocks bitmap block */
- __le32 bg_inode_bitmap; /* Inodes bitmap block */
- __le32 bg_inode_table; /* Inodes table block */
- __le16 bg_free_blocks_count; /* Free blocks count */
- __le16 bg_free_inodes_count; /* Free inodes count */
- __le16 bg_used_dirs_count; /* Directories count */
- __u16 bg_pad;
- __le32 bg_reserved[3];
-};
-
-/*
- * Macro-instructions used to manage group descriptors
- */
-#ifdef __KERNEL__
-# define EXT3_BLOCKS_PER_GROUP(s) (EXT3_SB(s)->s_blocks_per_group)
-# define EXT3_DESC_PER_BLOCK(s) (EXT3_SB(s)->s_desc_per_block)
-# define EXT3_INODES_PER_GROUP(s) (EXT3_SB(s)->s_inodes_per_group)
-# define EXT3_DESC_PER_BLOCK_BITS(s) (EXT3_SB(s)->s_desc_per_block_bits)
-#else
-# define EXT3_BLOCKS_PER_GROUP(s) ((s)->s_blocks_per_group)
-# define EXT3_DESC_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_group_desc))
-# define EXT3_INODES_PER_GROUP(s) ((s)->s_inodes_per_group)
-#endif
-
-/*
- * Constants relative to the data blocks
- */
-#define EXT3_NDIR_BLOCKS 12
-#define EXT3_IND_BLOCK EXT3_NDIR_BLOCKS
-#define EXT3_DIND_BLOCK (EXT3_IND_BLOCK + 1)
-#define EXT3_TIND_BLOCK (EXT3_DIND_BLOCK + 1)
-#define EXT3_N_BLOCKS (EXT3_TIND_BLOCK + 1)
-
-/*
- * Inode flags
- */
-#define EXT3_SECRM_FL 0x00000001 /* Secure deletion */
-#define EXT3_UNRM_FL 0x00000002 /* Undelete */
-#define EXT3_COMPR_FL 0x00000004 /* Compress file */
-#define EXT3_SYNC_FL 0x00000008 /* Synchronous updates */
-#define EXT3_IMMUTABLE_FL 0x00000010 /* Immutable file */
-#define EXT3_APPEND_FL 0x00000020 /* writes to file may only append */
-#define EXT3_NODUMP_FL 0x00000040 /* do not dump file */
-#define EXT3_NOATIME_FL 0x00000080 /* do not update atime */
-/* Reserved for compression usage... */
-#define EXT3_DIRTY_FL 0x00000100
-#define EXT3_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
-#define EXT3_NOCOMPR_FL 0x00000400 /* Don't compress */
-#define EXT3_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
-#define EXT3_INDEX_FL 0x00001000 /* hash-indexed directory */
-#define EXT3_IMAGIC_FL 0x00002000 /* AFS directory */
-#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
-#define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */
-#define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
-#define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
-#define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */
-
-#define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
-#define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */
-
-/*
- * Inode dynamic state flags
- */
-#define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */
-#define EXT3_STATE_NEW 0x00000002 /* inode is newly created */
-#define EXT3_STATE_XATTR 0x00000004 /* has in-inode xattrs */
-
-/* Used to pass group descriptor data when online resize is done */
-struct ext3_new_group_input {
- __u32 group; /* Group number for this data */
- __u32 block_bitmap; /* Absolute block number of block bitmap */
- __u32 inode_bitmap; /* Absolute block number of inode bitmap */
- __u32 inode_table; /* Absolute block number of inode table start */
- __u32 blocks_count; /* Total number of blocks in this group */
- __u16 reserved_blocks; /* Number of reserved blocks in this group */
- __u16 unused;
-};
-
-/* The struct ext3_new_group_input in kernel space, with free_blocks_count */
-struct ext3_new_group_data {
- __u32 group;
- __u32 block_bitmap;
- __u32 inode_bitmap;
- __u32 inode_table;
- __u32 blocks_count;
- __u16 reserved_blocks;
- __u16 unused;
- __u32 free_blocks_count;
-};
-
-
-/*
- * ioctl commands
- */
-#define EXT3_IOC_GETFLAGS _IOR('f', 1, long)
-#define EXT3_IOC_SETFLAGS _IOW('f', 2, long)
-#define EXT3_IOC_GETVERSION _IOR('f', 3, long)
-#define EXT3_IOC_SETVERSION _IOW('f', 4, long)
-#define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long)
-#define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input)
-#define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long)
-#define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long)
-#ifdef CONFIG_JBD_DEBUG
-#define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long)
-#endif
-#define EXT3_IOC_GETRSVSZ _IOR('f', 5, long)
-#define EXT3_IOC_SETRSVSZ _IOW('f', 6, long)
-
-/*
- * Mount options
- */
-struct ext3_mount_options {
- unsigned long s_mount_opt;
- uid_t s_resuid;
- gid_t s_resgid;
- unsigned long s_commit_interval;
-#ifdef CONFIG_QUOTA
- int s_jquota_fmt;
- char *s_qf_names[MAXQUOTAS];
-#endif
-};
-
-/*
- * Structure of an inode on the disk
- */
-struct ext3_inode {
- __le16 i_mode; /* File mode */
- __le16 i_uid; /* Low 16 bits of Owner Uid */
- __le32 i_size; /* Size in bytes */
- __le32 i_atime; /* Access time */
- __le32 i_ctime; /* Creation time */
- __le32 i_mtime; /* Modification time */
- __le32 i_dtime; /* Deletion Time */
- __le16 i_gid; /* Low 16 bits of Group Id */
- __le16 i_links_count; /* Links count */
- __le32 i_blocks; /* Blocks count */
- __le32 i_flags; /* File flags */
- union {
- struct {
- __u32 l_i_reserved1;
- } linux1;
- struct {
- __u32 h_i_translator;
- } hurd1;
- struct {
- __u32 m_i_reserved1;
- } masix1;
- } osd1; /* OS dependent 1 */
- __le32 i_block[EXT3_N_BLOCKS];/* Pointers to blocks */
- __le32 i_generation; /* File version (for NFS) */
- __le32 i_file_acl; /* File ACL */
- __le32 i_dir_acl; /* Directory ACL */
- __le32 i_faddr; /* Fragment address */
- union {
- struct {
- __u8 l_i_frag; /* Fragment number */
- __u8 l_i_fsize; /* Fragment size */
- __u16 i_pad1;
- __le16 l_i_uid_high; /* these 2 fields */
- __le16 l_i_gid_high; /* were reserved2[0] */
- __u32 l_i_reserved2;
- } linux2;
- struct {
- __u8 h_i_frag; /* Fragment number */
- __u8 h_i_fsize; /* Fragment size */
- __u16 h_i_mode_high;
- __u16 h_i_uid_high;
- __u16 h_i_gid_high;
- __u32 h_i_author;
- } hurd2;
- struct {
- __u8 m_i_frag; /* Fragment number */
- __u8 m_i_fsize; /* Fragment size */
- __u16 m_pad1;
- __u32 m_i_reserved2[2];
- } masix2;
- } osd2; /* OS dependent 2 */
- __le16 i_extra_isize;
- __le16 i_pad1;
-};
-
-#define i_size_high i_dir_acl
-
-#if defined(__KERNEL__) || defined(__linux__)
-#define i_reserved1 osd1.linux1.l_i_reserved1
-#define i_frag osd2.linux2.l_i_frag
-#define i_fsize osd2.linux2.l_i_fsize
-#define i_uid_low i_uid
-#define i_gid_low i_gid
-#define i_uid_high osd2.linux2.l_i_uid_high
-#define i_gid_high osd2.linux2.l_i_gid_high
-#define i_reserved2 osd2.linux2.l_i_reserved2
-
-#elif defined(__GNU__)
-
-#define i_translator osd1.hurd1.h_i_translator
-#define i_frag osd2.hurd2.h_i_frag;
-#define i_fsize osd2.hurd2.h_i_fsize;
-#define i_uid_high osd2.hurd2.h_i_uid_high
-#define i_gid_high osd2.hurd2.h_i_gid_high
-#define i_author osd2.hurd2.h_i_author
-
-#elif defined(__masix__)
-
-#define i_reserved1 osd1.masix1.m_i_reserved1
-#define i_frag osd2.masix2.m_i_frag
-#define i_fsize osd2.masix2.m_i_fsize
-#define i_reserved2 osd2.masix2.m_i_reserved2
-
-#endif /* defined(__KERNEL__) || defined(__linux__) */
-
-/*
- * File system states
- */
-#define EXT3_VALID_FS 0x0001 /* Unmounted cleanly */
-#define EXT3_ERROR_FS 0x0002 /* Errors detected */
-#define EXT3_ORPHAN_FS 0x0004 /* Orphans being recovered */
-
-/*
- * Mount flags
- */
-#define EXT3_MOUNT_CHECK 0x00001 /* Do mount-time checks */
-#define EXT3_MOUNT_OLDALLOC 0x00002 /* Don't use the new Orlov allocator */
-#define EXT3_MOUNT_GRPID 0x00004 /* Create files with directory's group */
-#define EXT3_MOUNT_DEBUG 0x00008 /* Some debugging messages */
-#define EXT3_MOUNT_ERRORS_CONT 0x00010 /* Continue on errors */
-#define EXT3_MOUNT_ERRORS_RO 0x00020 /* Remount fs ro on errors */
-#define EXT3_MOUNT_ERRORS_PANIC 0x00040 /* Panic on errors */
-#define EXT3_MOUNT_MINIX_DF 0x00080 /* Mimics the Minix statfs */
-#define EXT3_MOUNT_NOLOAD 0x00100 /* Don't use existing journal*/
-#define EXT3_MOUNT_ABORT 0x00200 /* Fatal error detected */
-#define EXT3_MOUNT_DATA_FLAGS 0x00C00 /* Mode for data writes: */
-#define EXT3_MOUNT_JOURNAL_DATA 0x00400 /* Write data to journal */
-#define EXT3_MOUNT_ORDERED_DATA 0x00800 /* Flush data before commit */
-#define EXT3_MOUNT_WRITEBACK_DATA 0x00C00 /* No data ordering */
-#define EXT3_MOUNT_UPDATE_JOURNAL 0x01000 /* Update the journal format */
-#define EXT3_MOUNT_NO_UID32 0x02000 /* Disable 32-bit UIDs */
-#define EXT3_MOUNT_XATTR_USER 0x04000 /* Extended user attributes */
-#define EXT3_MOUNT_POSIX_ACL 0x08000 /* POSIX Access Control Lists */
-#define EXT3_MOUNT_RESERVATION 0x10000 /* Preallocation */
-#define EXT3_MOUNT_BARRIER 0x20000 /* Use block barriers */
-#define EXT3_MOUNT_NOBH 0x40000 /* No bufferheads */
-#define EXT3_MOUNT_QUOTA 0x80000 /* Some quota option set */
-#define EXT3_MOUNT_USRQUOTA 0x100000 /* "old" user quota */
-#define EXT3_MOUNT_GRPQUOTA 0x200000 /* "old" group quota */
-
-/* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
-#ifndef _LINUX_EXT2_FS_H
-#define clear_opt(o, opt) o &= ~EXT3_MOUNT_##opt
-#define set_opt(o, opt) o |= EXT3_MOUNT_##opt
-#define test_opt(sb, opt) (EXT3_SB(sb)->s_mount_opt & \
- EXT3_MOUNT_##opt)
-#else
-#define EXT2_MOUNT_NOLOAD EXT3_MOUNT_NOLOAD
-#define EXT2_MOUNT_ABORT EXT3_MOUNT_ABORT
-#define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS
-#endif
-
-#define ext3_set_bit ext2_set_bit
-#define ext3_set_bit_atomic ext2_set_bit_atomic
-#define ext3_clear_bit ext2_clear_bit
-#define ext3_clear_bit_atomic ext2_clear_bit_atomic
-#define ext3_test_bit ext2_test_bit
-#define ext3_find_first_zero_bit ext2_find_first_zero_bit
-#define ext3_find_next_zero_bit ext2_find_next_zero_bit
-
-/*
- * Maximal mount counts between two filesystem checks
- */
-#define EXT3_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
-#define EXT3_DFL_CHECKINTERVAL 0 /* Don't use interval check */
-
-/*
- * Behaviour when detecting errors
- */
-#define EXT3_ERRORS_CONTINUE 1 /* Continue execution */
-#define EXT3_ERRORS_RO 2 /* Remount fs read-only */
-#define EXT3_ERRORS_PANIC 3 /* Panic */
-#define EXT3_ERRORS_DEFAULT EXT3_ERRORS_CONTINUE
-
-/*
- * Structure of the super block
- */
-struct ext3_super_block {
-/*00*/ __le32 s_inodes_count; /* Inodes count */
- __le32 s_blocks_count; /* Blocks count */
- __le32 s_r_blocks_count; /* Reserved blocks count */
- __le32 s_free_blocks_count; /* Free blocks count */
-/*10*/ __le32 s_free_inodes_count; /* Free inodes count */
- __le32 s_first_data_block; /* First Data Block */
- __le32 s_log_block_size; /* Block size */
- __le32 s_log_frag_size; /* Fragment size */
-/*20*/ __le32 s_blocks_per_group; /* # Blocks per group */
- __le32 s_frags_per_group; /* # Fragments per group */
- __le32 s_inodes_per_group; /* # Inodes per group */
- __le32 s_mtime; /* Mount time */
-/*30*/ __le32 s_wtime; /* Write time */
- __le16 s_mnt_count; /* Mount count */
- __le16 s_max_mnt_count; /* Maximal mount count */
- __le16 s_magic; /* Magic signature */
- __le16 s_state; /* File system state */
- __le16 s_errors; /* Behaviour when detecting errors */
- __le16 s_minor_rev_level; /* minor revision level */
-/*40*/ __le32 s_lastcheck; /* time of last check */
- __le32 s_checkinterval; /* max. time between checks */
- __le32 s_creator_os; /* OS */
- __le32 s_rev_level; /* Revision level */
-/*50*/ __le16 s_def_resuid; /* Default uid for reserved blocks */
- __le16 s_def_resgid; /* Default gid for reserved blocks */
- /*
- * These fields are for EXT3_DYNAMIC_REV superblocks only.
- *
- * Note: the difference between the compatible feature set and
- * the incompatible feature set is that if there is a bit set
- * in the incompatible feature set that the kernel doesn't
- * know about, it should refuse to mount the filesystem.
- *
- * e2fsck's requirements are more strict; if it doesn't know
- * about a feature in either the compatible or incompatible
- * feature set, it must abort and not try to meddle with
- * things it doesn't understand...
- */
- __le32 s_first_ino; /* First non-reserved inode */
- __le16 s_inode_size; /* size of inode structure */
- __le16 s_block_group_nr; /* block group # of this superblock */
- __le32 s_feature_compat; /* compatible feature set */
-/*60*/ __le32 s_feature_incompat; /* incompatible feature set */
- __le32 s_feature_ro_compat; /* readonly-compatible feature set */
-/*68*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */
-/*78*/ char s_volume_name[16]; /* volume name */
-/*88*/ char s_last_mounted[64]; /* directory where last mounted */
-/*C8*/ __le32 s_algorithm_usage_bitmap; /* For compression */
- /*
- * Performance hints. Directory preallocation should only
- * happen if the EXT3_FEATURE_COMPAT_DIR_PREALLOC flag is on.
- */
- __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
- __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
- __u16 s_reserved_gdt_blocks; /* Per group desc for online growth */
- /*
- * Journaling support valid if EXT3_FEATURE_COMPAT_HAS_JOURNAL set.
- */
-/*D0*/ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
-/*E0*/ __le32 s_journal_inum; /* inode number of journal file */
- __le32 s_journal_dev; /* device number of journal file */
- __le32 s_last_orphan; /* start of list of inodes to delete */
- __le32 s_hash_seed[4]; /* HTREE hash seed */
- __u8 s_def_hash_version; /* Default hash version to use */
- __u8 s_reserved_char_pad;
- __u16 s_reserved_word_pad;
- __le32 s_default_mount_opts;
- __le32 s_first_meta_bg; /* First metablock block group */
- __u32 s_reserved[190]; /* Padding to the end of the block */
-};
-
-#ifdef __KERNEL__
-#include <linux/ext3_fs_i.h>
-#include <linux/ext3_fs_sb.h>
-static inline struct ext3_sb_info * EXT3_SB(struct super_block *sb)
-{
- return sb->s_fs_info;
-}
-static inline struct ext3_inode_info *EXT3_I(struct inode *inode)
-{
- return container_of(inode, struct ext3_inode_info, vfs_inode);
-}
-
-static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino)
-{
- return ino == EXT3_ROOT_INO ||
- ino == EXT3_JOURNAL_INO ||
- ino == EXT3_RESIZE_INO ||
- (ino >= EXT3_FIRST_INO(sb) &&
- ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count));
-}
-#else
-/* Assume that user mode programs are passing in an ext3fs superblock, not
- * a kernel struct super_block. This will allow us to call the feature-test
- * macros from user land. */
-#define EXT3_SB(sb) (sb)
-#endif
-
-#define NEXT_ORPHAN(inode) EXT3_I(inode)->i_dtime
-
-/*
- * Codes for operating systems
- */
-#define EXT3_OS_LINUX 0
-#define EXT3_OS_HURD 1
-#define EXT3_OS_MASIX 2
-#define EXT3_OS_FREEBSD 3
-#define EXT3_OS_LITES 4
-
-/*
- * Revision levels
- */
-#define EXT3_GOOD_OLD_REV 0 /* The good old (original) format */
-#define EXT3_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
-
-#define EXT3_CURRENT_REV EXT3_GOOD_OLD_REV
-#define EXT3_MAX_SUPP_REV EXT3_DYNAMIC_REV
-
-#define EXT3_GOOD_OLD_INODE_SIZE 128
-
-/*
- * Feature set definitions
- */
-
-#define EXT3_HAS_COMPAT_FEATURE(sb,mask) \
- ( EXT3_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
-#define EXT3_HAS_RO_COMPAT_FEATURE(sb,mask) \
- ( EXT3_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
-#define EXT3_HAS_INCOMPAT_FEATURE(sb,mask) \
- ( EXT3_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
-#define EXT3_SET_COMPAT_FEATURE(sb,mask) \
- EXT3_SB(sb)->s_es->s_feature_compat |= cpu_to_le32(mask)
-#define EXT3_SET_RO_COMPAT_FEATURE(sb,mask) \
- EXT3_SB(sb)->s_es->s_feature_ro_compat |= cpu_to_le32(mask)
-#define EXT3_SET_INCOMPAT_FEATURE(sb,mask) \
- EXT3_SB(sb)->s_es->s_feature_incompat |= cpu_to_le32(mask)
-#define EXT3_CLEAR_COMPAT_FEATURE(sb,mask) \
- EXT3_SB(sb)->s_es->s_feature_compat &= ~cpu_to_le32(mask)
-#define EXT3_CLEAR_RO_COMPAT_FEATURE(sb,mask) \
- EXT3_SB(sb)->s_es->s_feature_ro_compat &= ~cpu_to_le32(mask)
-#define EXT3_CLEAR_INCOMPAT_FEATURE(sb,mask) \
- EXT3_SB(sb)->s_es->s_feature_incompat &= ~cpu_to_le32(mask)
-
-#define EXT3_FEATURE_COMPAT_DIR_PREALLOC 0x0001
-#define EXT3_FEATURE_COMPAT_IMAGIC_INODES 0x0002
-#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
-#define EXT3_FEATURE_COMPAT_EXT_ATTR 0x0008
-#define EXT3_FEATURE_COMPAT_RESIZE_INODE 0x0010
-#define EXT3_FEATURE_COMPAT_DIR_INDEX 0x0020
-
-#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
-#define EXT3_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
-#define EXT3_FEATURE_RO_COMPAT_BTREE_DIR 0x0004
-
-#define EXT3_FEATURE_INCOMPAT_COMPRESSION 0x0001
-#define EXT3_FEATURE_INCOMPAT_FILETYPE 0x0002
-#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
-#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */
-#define EXT3_FEATURE_INCOMPAT_META_BG 0x0010
-
-#define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR
-#define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \
- EXT3_FEATURE_INCOMPAT_RECOVER| \
- EXT3_FEATURE_INCOMPAT_META_BG)
-#define EXT3_FEATURE_RO_COMPAT_SUPP (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-
-/*
- * Default values for user and/or group using reserved blocks
- */
-#define EXT3_DEF_RESUID 0
-#define EXT3_DEF_RESGID 0
-
-/*
- * Default mount options
- */
-#define EXT3_DEFM_DEBUG 0x0001
-#define EXT3_DEFM_BSDGROUPS 0x0002
-#define EXT3_DEFM_XATTR_USER 0x0004
-#define EXT3_DEFM_ACL 0x0008
-#define EXT3_DEFM_UID16 0x0010
-#define EXT3_DEFM_JMODE 0x0060
-#define EXT3_DEFM_JMODE_DATA 0x0020
-#define EXT3_DEFM_JMODE_ORDERED 0x0040
-#define EXT3_DEFM_JMODE_WBACK 0x0060
-
-/*
- * Structure of a directory entry
- */
-#define EXT3_NAME_LEN 255
-
-struct ext3_dir_entry {
- __le32 inode; /* Inode number */
- __le16 rec_len; /* Directory entry length */
- __le16 name_len; /* Name length */
- char name[EXT3_NAME_LEN]; /* File name */
-};
-
-/*
- * The new version of the directory entry. Since EXT3 structures are
- * stored in intel byte order, and the name_len field could never be
- * bigger than 255 chars, it's safe to reclaim the extra byte for the
- * file_type field.
- */
-struct ext3_dir_entry_2 {
- __le32 inode; /* Inode number */
- __le16 rec_len; /* Directory entry length */
- __u8 name_len; /* Name length */
- __u8 file_type;
- char name[EXT3_NAME_LEN]; /* File name */
-};
-
-/*
- * Ext3 directory file types. Only the low 3 bits are used. The
- * other bits are reserved for now.
- */
-#define EXT3_FT_UNKNOWN 0
-#define EXT3_FT_REG_FILE 1
-#define EXT3_FT_DIR 2
-#define EXT3_FT_CHRDEV 3
-#define EXT3_FT_BLKDEV 4
-#define EXT3_FT_FIFO 5
-#define EXT3_FT_SOCK 6
-#define EXT3_FT_SYMLINK 7
-
-#define EXT3_FT_MAX 8
-
-/*
- * EXT3_DIR_PAD defines the directory entries boundaries
- *
- * NOTE: It must be a multiple of 4
- */
-#define EXT3_DIR_PAD 4
-#define EXT3_DIR_ROUND (EXT3_DIR_PAD - 1)
-#define EXT3_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT3_DIR_ROUND) & \
- ~EXT3_DIR_ROUND)
-/*
- * Hash Tree Directory indexing
- * (c) Daniel Phillips, 2001
- */
-
-#ifdef CONFIG_EXT3_INDEX
- #define is_dx(dir) (EXT3_HAS_COMPAT_FEATURE(dir->i_sb, \
- EXT3_FEATURE_COMPAT_DIR_INDEX) && \
- (EXT3_I(dir)->i_flags & EXT3_INDEX_FL))
-#define EXT3_DIR_LINK_MAX(dir) (!is_dx(dir) && (dir)->i_nlink >= EXT3_LINK_MAX)
-#define EXT3_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2 || (dir)->i_nlink == 1)
-#else
- #define is_dx(dir) 0
-#define EXT3_DIR_LINK_MAX(dir) ((dir)->i_nlink >= EXT3_LINK_MAX)
-#define EXT3_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2)
-#endif
-
-/* Legal values for the dx_root hash_version field: */
-
-#define DX_HASH_LEGACY 0
-#define DX_HASH_HALF_MD4 1
-#define DX_HASH_TEA 2
-
-#ifdef __KERNEL__
-
-/* hash info structure used by the directory hash */
-struct dx_hash_info
-{
- u32 hash;
- u32 minor_hash;
- int hash_version;
- u32 *seed;
-};
-
-#define EXT3_HTREE_EOF 0x7fffffff
-
-/*
- * Control parameters used by ext3_htree_next_block
- */
-#define HASH_NB_ALWAYS 1
-
-
-/*
- * Describe an inode's exact location on disk and in memory
- */
-struct ext3_iloc
-{
- struct buffer_head *bh;
- unsigned long offset;
- unsigned long block_group;
-};
-
-static inline struct ext3_inode *ext3_raw_inode(struct ext3_iloc *iloc)
-{
- return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset);
-}
-
-/*
- * This structure is stuffed into the struct file's private_data field
- * for directories. It is where we put information so that we can do
- * readdir operations in hash tree order.
- */
-struct dir_private_info {
- struct rb_root root;
- struct rb_node *curr_node;
- struct fname *extra_fname;
- loff_t last_pos;
- __u32 curr_hash;
- __u32 curr_minor_hash;
- __u32 next_hash;
-};
-
-/* calculate the first block number of the group */
-static inline ext3_fsblk_t
-ext3_group_first_block_no(struct super_block *sb, unsigned long group_no)
-{
- return group_no * (ext3_fsblk_t)EXT3_BLOCKS_PER_GROUP(sb) +
- le32_to_cpu(EXT3_SB(sb)->s_es->s_first_data_block);
-}
-
-/*
- * Special error return code only used by dx_probe() and its callers.
- */
-#define ERR_BAD_DX_DIR -75000
-
-/*
- * Function prototypes
- */
-
-/*
- * Ok, these declarations are also in <linux/kernel.h> but none of the
- * ext3 source programs needs to include it so they are duplicated here.
- */
-# define NORET_TYPE /**/
-# define ATTRIB_NORET __attribute__((noreturn))
-# define NORET_AND noreturn,
-
-/* balloc.c */
-extern int ext3_bg_has_super(struct super_block *sb, int group);
-extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
-extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode,
- ext3_fsblk_t goal, int *errp);
-extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode,
- ext3_fsblk_t goal, unsigned long *count, int *errp);
-extern void ext3_free_blocks (handle_t *handle, struct inode *inode,
- ext3_fsblk_t block, unsigned long count);
-extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb,
- ext3_fsblk_t block, unsigned long count,
- unsigned long *pdquot_freed_blocks);
-extern ext3_fsblk_t ext3_count_free_blocks (struct super_block *);
-extern void ext3_check_blocks_bitmap (struct super_block *);
-extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
- unsigned int block_group,
- struct buffer_head ** bh);
-extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);
-extern void ext3_init_block_alloc_info(struct inode *);
-extern void ext3_rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv);
-
-/* dir.c */
-extern int ext3_check_dir_entry(const char *, struct inode *,
- struct ext3_dir_entry_2 *,
- struct buffer_head *, unsigned long);
-extern int ext3_htree_store_dirent(struct file *dir_file, __u32 hash,
- __u32 minor_hash,
- struct ext3_dir_entry_2 *dirent);
-extern void ext3_htree_free_dir_info(struct dir_private_info *p);
-
-/* fsync.c */
-extern int ext3_sync_file (struct file *, struct dentry *, int);
-
-/* hash.c */
-extern int ext3fs_dirhash(const char *name, int len, struct
- dx_hash_info *hinfo);
-
-/* ialloc.c */
-extern struct inode * ext3_new_inode (handle_t *, struct inode *, int);
-extern void ext3_free_inode (handle_t *, struct inode *);
-extern struct inode * ext3_orphan_get (struct super_block *, unsigned long);
-extern unsigned long ext3_count_free_inodes (struct super_block *);
-extern unsigned long ext3_count_dirs (struct super_block *);
-extern void ext3_check_inodes_bitmap (struct super_block *);
-extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
-
-
-/* inode.c */
-int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode,
- struct buffer_head *bh, ext3_fsblk_t blocknr);
-struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
-struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-int ext3_get_blocks_handle(handle_t *handle, struct inode *inode,
- sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result,
- int create, int extend_disksize);
-
-extern void ext3_read_inode (struct inode *);
-extern int ext3_write_inode (struct inode *, int);
-extern int ext3_setattr (struct dentry *, struct iattr *);
-extern void ext3_delete_inode (struct inode *);
-extern int ext3_sync_inode (handle_t *, struct inode *);
-extern void ext3_discard_reservation (struct inode *);
-extern void ext3_dirty_inode(struct inode *);
-extern int ext3_change_inode_journal_flag(struct inode *, int);
-extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *);
-extern void ext3_truncate (struct inode *);
-extern void ext3_set_inode_flags(struct inode *);
-extern void ext3_set_aops(struct inode *inode);
-
-/* ioctl.c */
-extern int ext3_ioctl (struct inode *, struct file *, unsigned int,
- unsigned long);
-
-/* namei.c */
-extern int ext3_orphan_add(handle_t *, struct inode *);
-extern int ext3_orphan_del(handle_t *, struct inode *);
-extern int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash,
- __u32 start_minor_hash, __u32 *next_hash);
-
-/* resize.c */
-extern int ext3_group_add(struct super_block *sb,
- struct ext3_new_group_data *input);
-extern int ext3_group_extend(struct super_block *sb,
- struct ext3_super_block *es,
- ext3_fsblk_t n_blocks_count);
-
-/* super.c */
-extern void ext3_error (struct super_block *, const char *, const char *, ...)
- __attribute__ ((format (printf, 3, 4)));
-extern void __ext3_std_error (struct super_block *, const char *, int);
-extern void ext3_abort (struct super_block *, const char *, const char *, ...)
- __attribute__ ((format (printf, 3, 4)));
-extern void ext3_warning (struct super_block *, const char *, const char *, ...)
- __attribute__ ((format (printf, 3, 4)));
-extern void ext3_update_dynamic_rev (struct super_block *sb);
-
-#define ext3_std_error(sb, errno) \
-do { \
- if ((errno)) \
- __ext3_std_error((sb), __FUNCTION__, (errno)); \
-} while (0)
-
-/*
- * Inodes and files operations
- */
-
-/* dir.c */
-extern const struct file_operations ext3_dir_operations;
-
-/* file.c */
-extern struct inode_operations ext3_file_inode_operations;
-extern const struct file_operations ext3_file_operations;
-
-/* namei.c */
-extern struct inode_operations ext3_dir_inode_operations;
-extern struct inode_operations ext3_special_inode_operations;
-
-/* symlink.c */
-extern struct inode_operations ext3_symlink_inode_operations;
-extern struct inode_operations ext3_fast_symlink_inode_operations;
-
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_EXT3_FS_H */
diff --git a/original/linux/fadvise.h b/original/linux/fadvise.h
deleted file mode 100644
index e8e7471..0000000
--- a/original/linux/fadvise.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef FADVISE_H_INCLUDED
-#define FADVISE_H_INCLUDED
-
-#define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-#define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-#define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-#define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-
-/*
- * The advise values for POSIX_FADV_DONTNEED and POSIX_ADV_NOREUSE
- * for s390-64 differ from the values for the rest of the world.
- */
-#if defined(__s390x__)
-#define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */
-#define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */
-#else
-#define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-#define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-#endif /* FADVISE_H_INCLUDED */
diff --git a/original/linux/fb.h b/original/linux/fb.h
deleted file mode 100755
index 3c10ffe..0000000
--- a/original/linux/fb.h
+++ /dev/null
@@ -1,1187 +0,0 @@
-#ifndef _LINUX_FB_H
-#define _LINUX_FB_H
-
-#include <linux/types.h>
-#include <linux/i2c.h>
-#ifdef __KERNEL__
-#include <linux/kgdb.h>
-#endif /* __KERNEL__ */
-
-/* Definitions of frame buffers */
-
-#define FB_MAX 32 /* sufficient for now */
-
-/* ioctls
- 0x46 is 'F' */
-#define FBIOGET_VSCREENINFO 0x4600
-#define FBIOPUT_VSCREENINFO 0x4601
-#define FBIOGET_FSCREENINFO 0x4602
-#define FBIOGETCMAP 0x4604
-#define FBIOPUTCMAP 0x4605
-#define FBIOPAN_DISPLAY 0x4606
-#ifdef __KERNEL__
-#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor_user)
-#else
-#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor)
-#endif
-/* 0x4607-0x460B are defined below */
-/* #define FBIOGET_MONITORSPEC 0x460C */
-/* #define FBIOPUT_MONITORSPEC 0x460D */
-/* #define FBIOSWITCH_MONIBIT 0x460E */
-#define FBIOGET_CON2FBMAP 0x460F
-#define FBIOPUT_CON2FBMAP 0x4610
-#define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */
-#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
-#define FBIO_ALLOC 0x4613
-#define FBIO_FREE 0x4614
-#define FBIOGET_GLYPH 0x4615
-#define FBIOGET_HWCINFO 0x4616
-#define FBIOPUT_MODEINFO 0x4617
-#define FBIOGET_DISPINFO 0x4618
-#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
-
-#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
-#define FB_TYPE_PLANES 1 /* Non interleaved planes */
-#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
-#define FB_TYPE_TEXT 3 /* Text/attributes */
-#define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */
-#define FB_TYPE_FOURCC 5 /* Type identified by a V4L2 FOURCC */
-
-#define FB_AUX_TEXT_MDA 0 /* Monochrome text */
-#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
-#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
-#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
-#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
-#define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */
-#define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */
-#define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */
-#define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */
-#define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */
-#define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */
-#define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */
-
-#define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */
-#define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */
-#define FB_AUX_VGA_PLANES_CFB8 2 /* CFB8 in planes (VGA) */
-
-#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
-#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
-#define FB_VISUAL_TRUECOLOR 2 /* True color */
-#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
-#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
-#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
-#define FB_VISUAL_FOURCC 6 /* Visual identified by a V4L2 FOURCC */
-
-#define FB_ACCEL_NONE 0 /* no hardware accelerator */
-#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */
-#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */
-#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */
-#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */
-#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */
-#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */
-#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */
-#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */
-#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */
-#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */
-#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */
-#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */
-#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */
-#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */
-#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */
-#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */
-#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */
-#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */
-#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */
-#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */
-#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */
-#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */
-#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */
-#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */
-#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */
-#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */
-#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */
-#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */
-#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
-#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
-#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
-#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
-#define FB_ACCEL_IGS_CYBER2000 33 /* CyberPro 2000 */
-#define FB_ACCEL_IGS_CYBER2010 34 /* CyberPro 2010 */
-#define FB_ACCEL_IGS_CYBER5000 35 /* CyberPro 5000 */
-#define FB_ACCEL_SIS_GLAMOUR 36 /* SiS 300/630/540 */
-#define FB_ACCEL_3DLABS_PERMEDIA3 37 /* 3Dlabs Permedia 3 */
-#define FB_ACCEL_ATI_RADEON 38 /* ATI Radeon family */
-#define FB_ACCEL_I810 39 /* Intel 810/815 */
-#define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 650, 740 */
-#define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre") */
-#define FB_ACCEL_I830 42 /* Intel 830M/845G/85x/865G */
-#define FB_ACCEL_NV_10 43 /* nVidia Arch 10 */
-#define FB_ACCEL_NV_20 44 /* nVidia Arch 20 */
-#define FB_ACCEL_NV_30 45 /* nVidia Arch 30 */
-#define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */
-#define FB_ACCEL_XGI_VOLARI_V 47 /* XGI Volari V3XT, V5, V8 */
-#define FB_ACCEL_XGI_VOLARI_Z 48 /* XGI Volari Z7 */
-#define FB_ACCEL_OMAP1610 49 /* TI OMAP16xx */
-#define FB_ACCEL_TRIDENT_TGUI 50 /* Trident TGUI */
-#define FB_ACCEL_TRIDENT_3DIMAGE 51 /* Trident 3DImage */
-#define FB_ACCEL_TRIDENT_BLADE3D 52 /* Trident Blade3D */
-#define FB_ACCEL_TRIDENT_BLADEXP 53 /* Trident BladeXP */
-#define FB_ACCEL_CIRRUS_ALPINE 53 /* Cirrus Logic 543x/544x/5480 */
-#define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */
-#define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */
-#define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */
-#define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */
-#define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */
-#define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */
-#define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */
-#define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */
-#define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */
-#define FB_ACCEL_PXA3XX 99 /* PXA3xx */
-
-#define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */
-#define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */
-#define FB_ACCEL_SAVAGE3D_MV 0x82 /* S3 Savage3D-MV */
-#define FB_ACCEL_SAVAGE2000 0x83 /* S3 Savage2000 */
-#define FB_ACCEL_SAVAGE_MX_MV 0x84 /* S3 Savage/MX-MV */
-#define FB_ACCEL_SAVAGE_MX 0x85 /* S3 Savage/MX */
-#define FB_ACCEL_SAVAGE_IX_MV 0x86 /* S3 Savage/IX-MV */
-#define FB_ACCEL_SAVAGE_IX 0x87 /* S3 Savage/IX */
-#define FB_ACCEL_PROSAVAGE_PM 0x88 /* S3 ProSavage PM133 */
-#define FB_ACCEL_PROSAVAGE_KM 0x89 /* S3 ProSavage KM133 */
-#define FB_ACCEL_S3TWISTER_P 0x8a /* S3 Twister */
-#define FB_ACCEL_S3TWISTER_K 0x8b /* S3 TwisterK */
-#define FB_ACCEL_SUPERSAVAGE 0x8c /* S3 Supersavage */
-#define FB_ACCEL_PROSAVAGE_DDR 0x8d /* S3 ProSavage DDR */
-#define FB_ACCEL_PROSAVAGE_DDRK 0x8e /* S3 ProSavage DDR-K */
-
-#define FB_ACCEL_PUV3_UNIGFX 0xa0 /* PKUnity-v3 Unigfx */
-
-#define FB_CAP_FOURCC 1 /* Device supports FOURCC-based formats */
-
-struct fb_fix_screeninfo {
- char id[16]; /* identification string eg "TT Builtin" */
- unsigned long smem_start; /* Start of frame buffer mem */
- /* (physical address) */
- __u32 smem_len; /* Length of frame buffer mem */
- __u32 type; /* see FB_TYPE_* */
- __u32 type_aux; /* Interleave for interleaved Planes */
- __u32 visual; /* see FB_VISUAL_* */
- __u16 xpanstep; /* zero if no hardware panning */
- __u16 ypanstep; /* zero if no hardware panning */
- __u16 ywrapstep; /* zero if no hardware ywrap */
- __u32 line_length; /* length of a line in bytes */
- unsigned long mmio_start; /* Start of Memory Mapped I/O */
- /* (physical address) */
- __u32 mmio_len; /* Length of Memory Mapped I/O */
- __u32 accel; /* Indicate to driver which */
- /* specific chip/card we have */
- __u16 capabilities; /* see FB_CAP_* */
- __u16 reserved[2]; /* Reserved for future compatibility */
-};
-
-/* Interpretation of offset for color fields: All offsets are from the right,
- * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you
- * can use the offset as right argument to <<). A pixel afterwards is a bit
- * stream and is written to video memory as that unmodified.
- *
- * For pseudocolor: offset and length should be the same for all color
- * components. Offset specifies the position of the least significant bit
- * of the pallette index in a pixel value. Length indicates the number
- * of available palette entries (i.e. # of entries = 1 << length).
- */
-struct fb_bitfield {
- __u32 offset; /* beginning of bitfield */
- __u32 length; /* length of bitfield */
- __u32 msb_right; /* != 0 : Most significant bit is */
- /* right */
-};
-
-#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */
-#define FB_NONSTD_REV_PIX_IN_B 2 /* order of pixels in each byte is reversed */
-
-#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/
-#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */
-#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */
-#define FB_ACTIVATE_MASK 15
- /* values */
-#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */
-#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */
-#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
-#define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/
-#define FB_ACTIVATE_INV_MODE 256 /* invalidate videomode */
-
-#define FB_ACCELF_TEXT 1 /* (OBSOLETE) see fb_info.flags and vc_mode */
-
-#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
-#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
-#define FB_SYNC_EXT 4 /* external sync */
-#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
-#define FB_SYNC_BROADCAST 16 /* broadcast video timings */
- /* vtotal = 144d/288n/576i => PAL */
- /* vtotal = 121d/242n/484i => NTSC */
-#define FB_SYNC_ON_GREEN 32 /* sync on green */
-
-#define FB_VMODE_NONINTERLACED 0 /* non interlaced */
-#define FB_VMODE_INTERLACED 1 /* interlaced */
-#define FB_VMODE_DOUBLE 2 /* double scan */
-#define FB_VMODE_ODD_FLD_FIRST 4 /* interlaced: top line first */
-#define FB_VMODE_MASK 255
-
-#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
-#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
-#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
-
-#define FB_FLAG_RATIO_4_3 64
-#define FB_FLAG_RATIO_16_9 128
-#define FB_FLAG_PIXEL_REPEAT 256
-#define FB_FLAG_PREFERRED 512
-#define FB_FLAG_HW_CAPABLE 1024
-
-/*
- * Display rotation support
- */
-#define FB_ROTATE_UR 0
-#define FB_ROTATE_CW 1
-#define FB_ROTATE_UD 2
-#define FB_ROTATE_CCW 3
-
-#define PICOS2KHZ(a) (1000000000UL/(a))
-#define KHZ2PICOS(a) (1000000000UL/(a))
-
-struct fb_var_screeninfo {
- __u32 xres; /* visible resolution */
- __u32 yres;
- __u32 xres_virtual; /* virtual resolution */
- __u32 yres_virtual;
- __u32 xoffset; /* offset from virtual to visible */
- __u32 yoffset; /* resolution */
-
- __u32 bits_per_pixel; /* guess what */
- __u32 grayscale; /* 0 = color, 1 = grayscale, */
- /* >1 = FOURCC */
- struct fb_bitfield red; /* bitfield in fb mem if true color, */
- struct fb_bitfield green; /* else only length is significant */
- struct fb_bitfield blue;
- struct fb_bitfield transp; /* transparency */
-
- __u32 nonstd; /* != 0 Non standard pixel format */
-
- __u32 activate; /* see FB_ACTIVATE_* */
-
- __u32 height; /* height of picture in mm */
- __u32 width; /* width of picture in mm */
-
- __u32 accel_flags; /* (OBSOLETE) see fb_info.flags */
-
- /* Timing: All values in pixclocks, except pixclock (of course) */
- __u32 pixclock; /* pixel clock in ps (pico seconds) */
- __u32 left_margin; /* time from sync to picture */
- __u32 right_margin; /* time from picture to sync */
- __u32 upper_margin; /* time from sync to picture */
- __u32 lower_margin;
- __u32 hsync_len; /* length of horizontal sync */
- __u32 vsync_len; /* length of vertical sync */
- __u32 sync; /* see FB_SYNC_* */
- __u32 vmode; /* see FB_VMODE_* */
- __u32 rotate; /* angle we rotate counter clockwise */
- __u32 colorspace; /* colorspace for FOURCC-based modes */
- __u32 reserved[4]; /* Reserved for future compatibility */
-};
-
-struct fb_cmap {
- __u32 start; /* First entry */
- __u32 len; /* Number of entries */
- __u16 *red; /* Red values */
- __u16 *green;
- __u16 *blue;
- __u16 *transp; /* transparency, can be NULL */
-};
-
-struct fb_con2fbmap {
- __u32 console;
- __u32 framebuffer;
-};
-
-/* VESA Blanking Levels */
-#define VESA_NO_BLANKING 0
-#define VESA_VSYNC_SUSPEND 1
-#define VESA_HSYNC_SUSPEND 2
-#define VESA_POWERDOWN 3
-
-
-enum {
- /* screen: unblanked, hsync: on, vsync: on */
- FB_BLANK_UNBLANK = VESA_NO_BLANKING,
-
- /* screen: blanked, hsync: on, vsync: on */
- FB_BLANK_NORMAL = VESA_NO_BLANKING + 1,
-
- /* screen: blanked, hsync: on, vsync: off */
- FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1,
-
- /* screen: blanked, hsync: off, vsync: on */
- FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1,
-
- /* screen: blanked, hsync: off, vsync: off */
- FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1
-};
-
-#define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */
-#define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */
-#define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */
-#define FB_VBLANK_HAVE_HBLANK 0x008 /* horizontal blanks can be detected */
-#define FB_VBLANK_HAVE_COUNT 0x010 /* global retrace counter is available */
-#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */
-#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */
-#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */
-#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */
-
-struct fb_vblank {
- __u32 flags; /* FB_VBLANK flags */
- __u32 count; /* counter of retraces since boot */
- __u32 vcount; /* current scanline position */
- __u32 hcount; /* current scandot position */
- __u32 reserved[4]; /* reserved for future compatibility */
-};
-
-/* Internal HW accel */
-#define ROP_COPY 0
-#define ROP_XOR 1
-
-struct fb_copyarea {
- __u32 dx;
- __u32 dy;
- __u32 width;
- __u32 height;
- __u32 sx;
- __u32 sy;
-};
-
-struct fb_fillrect {
- __u32 dx; /* screen-relative */
- __u32 dy;
- __u32 width;
- __u32 height;
- __u32 color;
- __u32 rop;
-};
-
-struct fb_image {
- __u32 dx; /* Where to place image */
- __u32 dy;
- __u32 width; /* Size of image */
- __u32 height;
- __u32 fg_color; /* Only used when a mono bitmap */
- __u32 bg_color;
- __u8 depth; /* Depth of the image */
- const char *data; /* Pointer to image data */
- struct fb_cmap cmap; /* color map info */
-};
-
-/*
- * hardware cursor control
- */
-
-#define FB_CUR_SETIMAGE 0x01
-#define FB_CUR_SETPOS 0x02
-#define FB_CUR_SETHOT 0x04
-#define FB_CUR_SETCMAP 0x08
-#define FB_CUR_SETSHAPE 0x10
-#define FB_CUR_SETSIZE 0x20
-#define FB_CUR_SETALL 0xFF
-
-struct fbcurpos {
- __u16 x, y;
-};
-
-struct fb_cursor {
- __u16 set; /* what to set */
- __u16 enable; /* cursor on/off */
- __u16 rop; /* bitop operation */
- const char *mask; /* cursor mask bits */
- struct fbcurpos hot; /* cursor hot spot */
- struct fb_image image; /* Cursor image */
-};
-
-#ifdef CONFIG_FB_BACKLIGHT
-/* Settings for the generic backlight code */
-#define FB_BACKLIGHT_LEVELS 128
-#define FB_BACKLIGHT_MAX 0xFF
-#endif
-
-#ifdef __KERNEL__
-
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/workqueue.h>
-#include <linux/notifier.h>
-#include <linux/list.h>
-#include <linux/backlight.h>
-#include <linux/slab.h>
-#include <asm/io.h>
-
-struct vm_area_struct;
-struct fb_info;
-struct device;
-struct file;
-
-/* Definitions below are used in the parsed monitor specs */
-#define FB_DPMS_ACTIVE_OFF 1
-#define FB_DPMS_SUSPEND 2
-#define FB_DPMS_STANDBY 4
-
-#define FB_DISP_DDI 1
-#define FB_DISP_ANA_700_300 2
-#define FB_DISP_ANA_714_286 4
-#define FB_DISP_ANA_1000_400 8
-#define FB_DISP_ANA_700_000 16
-
-#define FB_DISP_MONO 32
-#define FB_DISP_RGB 64
-#define FB_DISP_MULTI 128
-#define FB_DISP_UNKNOWN 256
-
-#define FB_SIGNAL_NONE 0
-#define FB_SIGNAL_BLANK_BLANK 1
-#define FB_SIGNAL_SEPARATE 2
-#define FB_SIGNAL_COMPOSITE 4
-#define FB_SIGNAL_SYNC_ON_GREEN 8
-#define FB_SIGNAL_SERRATION_ON 16
-
-#define FB_MISC_PRIM_COLOR 1
-#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */
-struct fb_chroma {
- __u32 redx; /* in fraction of 1024 */
- __u32 greenx;
- __u32 bluex;
- __u32 whitex;
- __u32 redy;
- __u32 greeny;
- __u32 bluey;
- __u32 whitey;
-};
-
-struct fb_monspecs {
- struct fb_chroma chroma;
- struct fb_videomode *modedb; /* mode database */
- __u8 manufacturer[4]; /* Manufacturer */
- __u8 monitor[14]; /* Monitor String */
- __u8 serial_no[14]; /* Serial Number */
- __u8 ascii[14]; /* ? */
- __u32 modedb_len; /* mode database length */
- __u32 model; /* Monitor Model */
- __u32 serial; /* Serial Number - Integer */
- __u32 year; /* Year manufactured */
- __u32 week; /* Week Manufactured */
- __u32 hfmin; /* hfreq lower limit (Hz) */
- __u32 hfmax; /* hfreq upper limit (Hz) */
- __u32 dclkmin; /* pixelclock lower limit (Hz) */
- __u32 dclkmax; /* pixelclock upper limit (Hz) */
- __u16 input; /* display type - see FB_DISP_* */
- __u16 dpms; /* DPMS support - see FB_DPMS_ */
- __u16 signal; /* Signal Type - see FB_SIGNAL_* */
- __u16 vfmin; /* vfreq lower limit (Hz) */
- __u16 vfmax; /* vfreq upper limit (Hz) */
- __u16 gamma; /* Gamma - in fractions of 100 */
- __u16 gtf : 1; /* supports GTF */
- __u16 misc; /* Misc flags - see FB_MISC_* */
- __u8 version; /* EDID version... */
- __u8 revision; /* ...and revision */
- __u8 max_x; /* Maximum horizontal size (cm) */
- __u8 max_y; /* Maximum vertical size (cm) */
-};
-
-struct fb_cmap_user {
- __u32 start; /* First entry */
- __u32 len; /* Number of entries */
- __u16 __user *red; /* Red values */
- __u16 __user *green;
- __u16 __user *blue;
- __u16 __user *transp; /* transparency, can be NULL */
-};
-
-struct fb_image_user {
- __u32 dx; /* Where to place image */
- __u32 dy;
- __u32 width; /* Size of image */
- __u32 height;
- __u32 fg_color; /* Only used when a mono bitmap */
- __u32 bg_color;
- __u8 depth; /* Depth of the image */
- const char __user *data; /* Pointer to image data */
- struct fb_cmap_user cmap; /* color map info */
-};
-
-struct fb_cursor_user {
- __u16 set; /* what to set */
- __u16 enable; /* cursor on/off */
- __u16 rop; /* bitop operation */
- const char __user *mask; /* cursor mask bits */
- struct fbcurpos hot; /* cursor hot spot */
- struct fb_image_user image; /* Cursor image */
-};
-
-/*
- * Register/unregister for framebuffer events
- */
-
-/* The resolution of the passed in fb_info about to change */
-#define FB_EVENT_MODE_CHANGE 0x01
-/* The display on this fb_info is beeing suspended, no access to the
- * framebuffer is allowed any more after that call returns
- */
-#define FB_EVENT_SUSPEND 0x02
-/* The display on this fb_info was resumed, you can restore the display
- * if you own it
- */
-#define FB_EVENT_RESUME 0x03
-/* An entry from the modelist was removed */
-#define FB_EVENT_MODE_DELETE 0x04
-/* A driver registered itself */
-#define FB_EVENT_FB_REGISTERED 0x05
-/* A driver unregistered itself */
-#define FB_EVENT_FB_UNREGISTERED 0x06
-/* CONSOLE-SPECIFIC: get console to framebuffer mapping */
-#define FB_EVENT_GET_CONSOLE_MAP 0x07
-/* CONSOLE-SPECIFIC: set console to framebuffer mapping */
-#define FB_EVENT_SET_CONSOLE_MAP 0x08
-/* A hardware display blank change occurred */
-#define FB_EVENT_BLANK 0x09
-/* Private modelist is to be replaced */
-#define FB_EVENT_NEW_MODELIST 0x0A
-/* The resolution of the passed in fb_info about to change and
- all vc's should be changed */
-#define FB_EVENT_MODE_CHANGE_ALL 0x0B
-/* A software display blank change occurred */
-#define FB_EVENT_CONBLANK 0x0C
-/* Get drawing requirements */
-#define FB_EVENT_GET_REQ 0x0D
-/* Unbind from the console if possible */
-#define FB_EVENT_FB_UNBIND 0x0E
-/* CONSOLE-SPECIFIC: remap all consoles to new fb - for vga switcheroo */
-#define FB_EVENT_REMAP_ALL_CONSOLE 0x0F
-
-struct fb_event {
- struct fb_info *info;
- void *data;
-};
-
-struct fb_blit_caps {
- u32 x;
- u32 y;
- u32 len;
- u32 flags;
-};
-
-extern int fb_register_client(struct notifier_block *nb);
-extern int fb_unregister_client(struct notifier_block *nb);
-extern int fb_notifier_call_chain(unsigned long val, void *v);
-/*
- * Pixmap structure definition
- *
- * The purpose of this structure is to translate data
- * from the hardware independent format of fbdev to what
- * format the hardware needs.
- */
-
-#define FB_PIXMAP_DEFAULT 1 /* used internally by fbcon */
-#define FB_PIXMAP_SYSTEM 2 /* memory is in system RAM */
-#define FB_PIXMAP_IO 4 /* memory is iomapped */
-#define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */
-
-struct fb_pixmap {
- u8 *addr; /* pointer to memory */
- u32 size; /* size of buffer in bytes */
- u32 offset; /* current offset to buffer */
- u32 buf_align; /* byte alignment of each bitmap */
- u32 scan_align; /* alignment per scanline */
- u32 access_align; /* alignment per read/write (bits) */
- u32 flags; /* see FB_PIXMAP_* */
- u32 blit_x; /* supported bit block dimensions (1-32)*/
- u32 blit_y; /* Format: blit_x = 1 << (width - 1) */
- /* blit_y = 1 << (height - 1) */
- /* if 0, will be set to 0xffffffff (all)*/
- /* access methods */
- void (*writeio)(struct fb_info *info, void __iomem *dst, void *src, unsigned int size);
- void (*readio) (struct fb_info *info, void *dst, void __iomem *src, unsigned int size);
-};
-
-#ifdef CONFIG_FB_DEFERRED_IO
-struct fb_deferred_io {
- /* delay between mkwrite and deferred handler */
- unsigned long delay;
- struct mutex lock; /* mutex that protects the page list */
- struct list_head pagelist; /* list of touched pages */
- /* callback */
- void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
-};
-#endif
-
-/*
- * Frame buffer operations
- *
- * LOCKING NOTE: those functions must _ALL_ be called with the console
- * semaphore held, this is the only suitable locking mechanism we have
- * in 2.6. Some may be called at interrupt time at this point though.
- *
- * The exception to this is the debug related hooks. Putting the fb
- * into a debug state (e.g. flipping to the kernel console) and restoring
- * it must be done in a lock-free manner, so low level drivers should
- * keep track of the initial console (if applicable) and may need to
- * perform direct, unlocked hardware writes in these hooks.
- */
-
-struct fb_ops {
- /* open/release and usage marking */
- struct module *owner;
- int (*fb_open)(struct fb_info *info, int user);
- int (*fb_release)(struct fb_info *info, int user);
-
- /* For framebuffers with strange non linear layouts or that do not
- * work with normal memory mapped access
- */
- ssize_t (*fb_read)(struct fb_info *info, char __user *buf,
- size_t count, loff_t *ppos);
- ssize_t (*fb_write)(struct fb_info *info, const char __user *buf,
- size_t count, loff_t *ppos);
-
- /* checks var and eventually tweaks it to something supported,
- * DO NOT MODIFY PAR */
- int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info);
-
- /* set the video mode according to info->var */
- int (*fb_set_par)(struct fb_info *info);
-
- /* set color register */
- int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green,
- unsigned blue, unsigned transp, struct fb_info *info);
-
- /* set color registers in batch */
- int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
-
- /* blank display */
- int (*fb_blank)(int blank, struct fb_info *info);
-
- /* pan display */
- int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info);
-
- /* Draws a rectangle */
- void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect);
- /* Copy data from area to another */
- void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region);
- /* Draws a image to the display */
- void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image);
-
- /* Draws cursor */
- int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor);
-
- /* Rotates the display */
- void (*fb_rotate)(struct fb_info *info, int angle);
-
- /* wait for blit idle, optional */
- int (*fb_sync)(struct fb_info *info);
-
- /* perform fb specific ioctl (optional) */
- int (*fb_ioctl)(struct fb_info *info, unsigned int cmd,
- unsigned long arg);
-
- /* Handle 32bit compat ioctl (optional) */
- int (*fb_compat_ioctl)(struct fb_info *info, unsigned cmd,
- unsigned long arg);
-
- /* perform fb specific mmap */
- int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
-
- /* get capability given var */
- void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps,
- struct fb_var_screeninfo *var);
-
- /* teardown any resources to do with this framebuffer */
- void (*fb_destroy)(struct fb_info *info);
-
- /* called at KDB enter and leave time to prepare the console */
- int (*fb_debug_enter)(struct fb_info *info);
- int (*fb_debug_leave)(struct fb_info *info);
-};
-
-#ifdef CONFIG_FB_TILEBLITTING
-#define FB_TILE_CURSOR_NONE 0
-#define FB_TILE_CURSOR_UNDERLINE 1
-#define FB_TILE_CURSOR_LOWER_THIRD 2
-#define FB_TILE_CURSOR_LOWER_HALF 3
-#define FB_TILE_CURSOR_TWO_THIRDS 4
-#define FB_TILE_CURSOR_BLOCK 5
-
-struct fb_tilemap {
- __u32 width; /* width of each tile in pixels */
- __u32 height; /* height of each tile in scanlines */
- __u32 depth; /* color depth of each tile */
- __u32 length; /* number of tiles in the map */
- const __u8 *data; /* actual tile map: a bitmap array, packed
- to the nearest byte */
-};
-
-struct fb_tilerect {
- __u32 sx; /* origin in the x-axis */
- __u32 sy; /* origin in the y-axis */
- __u32 width; /* number of tiles in the x-axis */
- __u32 height; /* number of tiles in the y-axis */
- __u32 index; /* what tile to use: index to tile map */
- __u32 fg; /* foreground color */
- __u32 bg; /* background color */
- __u32 rop; /* raster operation */
-};
-
-struct fb_tilearea {
- __u32 sx; /* source origin in the x-axis */
- __u32 sy; /* source origin in the y-axis */
- __u32 dx; /* destination origin in the x-axis */
- __u32 dy; /* destination origin in the y-axis */
- __u32 width; /* number of tiles in the x-axis */
- __u32 height; /* number of tiles in the y-axis */
-};
-
-struct fb_tileblit {
- __u32 sx; /* origin in the x-axis */
- __u32 sy; /* origin in the y-axis */
- __u32 width; /* number of tiles in the x-axis */
- __u32 height; /* number of tiles in the y-axis */
- __u32 fg; /* foreground color */
- __u32 bg; /* background color */
- __u32 length; /* number of tiles to draw */
- __u32 *indices; /* array of indices to tile map */
-};
-
-struct fb_tilecursor {
- __u32 sx; /* cursor position in the x-axis */
- __u32 sy; /* cursor position in the y-axis */
- __u32 mode; /* 0 = erase, 1 = draw */
- __u32 shape; /* see FB_TILE_CURSOR_* */
- __u32 fg; /* foreground color */
- __u32 bg; /* background color */
-};
-
-struct fb_tile_ops {
- /* set tile characteristics */
- void (*fb_settile)(struct fb_info *info, struct fb_tilemap *map);
-
- /* all dimensions from hereon are in terms of tiles */
-
- /* move a rectangular region of tiles from one area to another*/
- void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area);
- /* fill a rectangular region with a tile */
- void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect);
- /* copy an array of tiles */
- void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit);
- /* cursor */
- void (*fb_tilecursor)(struct fb_info *info,
- struct fb_tilecursor *cursor);
- /* get maximum length of the tile map */
- int (*fb_get_tilemax)(struct fb_info *info);
-};
-#endif /* CONFIG_FB_TILEBLITTING */
-
-/* FBINFO_* = fb_info.flags bit flags */
-#define FBINFO_MODULE 0x0001 /* Low-level driver is a module */
-#define FBINFO_HWACCEL_DISABLED 0x0002
- /* When FBINFO_HWACCEL_DISABLED is set:
- * Hardware acceleration is turned off. Software implementations
- * of required functions (copyarea(), fillrect(), and imageblit())
- * takes over; acceleration engine should be in a quiescent state */
-
-/* hints */
-#define FBINFO_VIRTFB 0x0004 /* FB is System RAM, not device. */
-#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */
-#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */
-
-/* hardware supported ops */
-/* semantics: when a bit is set, it indicates that the operation is
- * accelerated by hardware.
- * required functions will still work even if the bit is not set.
- * optional functions may not even exist if the flag bit is not set.
- */
-#define FBINFO_HWACCEL_NONE 0x0000
-#define FBINFO_HWACCEL_COPYAREA 0x0100 /* required */
-#define FBINFO_HWACCEL_FILLRECT 0x0200 /* required */
-#define FBINFO_HWACCEL_IMAGEBLIT 0x0400 /* required */
-#define FBINFO_HWACCEL_ROTATE 0x0800 /* optional */
-#define FBINFO_HWACCEL_XPAN 0x1000 /* optional */
-#define FBINFO_HWACCEL_YPAN 0x2000 /* optional */
-#define FBINFO_HWACCEL_YWRAP 0x4000 /* optional */
-
-#define FBINFO_MISC_USEREVENT 0x10000 /* event request
- from userspace */
-#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */
-
-/* A driver may set this flag to indicate that it does want a set_par to be
- * called every time when fbcon_switch is executed. The advantage is that with
- * this flag set you can really be sure that set_par is always called before
- * any of the functions dependent on the correct hardware state or altering
- * that state, even if you are using some broken X releases. The disadvantage
- * is that it introduces unwanted delays to every console switch if set_par
- * is slow. It is a good idea to try this flag in the drivers initialization
- * code whenever there is a bug report related to switching between X and the
- * framebuffer console.
- */
-#define FBINFO_MISC_ALWAYS_SETPAR 0x40000
-
-/* where the fb is a firmware driver, and can be replaced with a proper one */
-#define FBINFO_MISC_FIRMWARE 0x80000
-/*
- * Host and GPU endianness differ.
- */
-#define FBINFO_FOREIGN_ENDIAN 0x100000
-/*
- * Big endian math. This is the same flags as above, but with different
- * meaning, it is set by the fb subsystem depending FOREIGN_ENDIAN flag
- * and host endianness. Drivers should not use this flag.
- */
-#define FBINFO_BE_MATH 0x100000
-
-/* report to the VT layer that this fb driver can accept forced console
- output like oopses */
-#define FBINFO_CAN_FORCE_OUTPUT 0x200000
-
-struct fb_info {
- atomic_t count;
- int node;
- int flags;
- struct mutex lock; /* Lock for open/release/ioctl funcs */
- struct mutex mm_lock; /* Lock for fb_mmap and smem_* fields */
- struct fb_var_screeninfo var; /* Current var */
- struct fb_fix_screeninfo fix; /* Current fix */
- struct fb_monspecs monspecs; /* Current Monitor specs */
- struct work_struct queue; /* Framebuffer event queue */
- struct fb_pixmap pixmap; /* Image hardware mapper */
- struct fb_pixmap sprite; /* Cursor hardware mapper */
- struct fb_cmap cmap; /* Current cmap */
- struct list_head modelist; /* mode list */
- struct fb_videomode *mode; /* current mode */
-
-#ifdef CONFIG_FB_BACKLIGHT
- /* assigned backlight device */
- /* set before framebuffer registration,
- remove after unregister */
- struct backlight_device *bl_dev;
-
- /* Backlight level curve */
- struct mutex bl_curve_mutex;
- u8 bl_curve[FB_BACKLIGHT_LEVELS];
-#endif
-#ifdef CONFIG_FB_DEFERRED_IO
- struct delayed_work deferred_work;
- struct fb_deferred_io *fbdefio;
-#endif
-
- struct fb_ops *fbops;
- struct device *device; /* This is the parent */
- struct device *dev; /* This is this fb device */
- int class_flag; /* private sysfs flags */
-#ifdef CONFIG_FB_TILEBLITTING
- struct fb_tile_ops *tileops; /* Tile Blitting */
-#endif
- char __iomem *screen_base; /* Virtual address */
- unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */
- void *pseudo_palette; /* Fake palette of 16 colors */
-#define FBINFO_STATE_RUNNING 0
-#define FBINFO_STATE_SUSPENDED 1
- u32 state; /* Hardware state i.e suspend */
- void *fbcon_par; /* fbcon use-only private area */
- /* From here on everything is device dependent */
- void *par;
- /* we need the PCI or similar aperture base/size not
- smem_start/size as smem_start may just be an object
- allocated inside the aperture so may not actually overlap */
- struct apertures_struct {
- unsigned int count;
- struct aperture {
- resource_size_t base;
- resource_size_t size;
- } ranges[0];
- } *apertures;
-};
-
-static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
- struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
- + max_num * sizeof(struct aperture), GFP_KERNEL);
- if (!a)
- return NULL;
- a->count = max_num;
- return a;
-}
-
-#ifdef MODULE
-#define FBINFO_DEFAULT FBINFO_MODULE
-#else
-#define FBINFO_DEFAULT 0
-#endif
-
-// This will go away
-#define FBINFO_FLAG_MODULE FBINFO_MODULE
-#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT
-
-/* This will go away
- * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags
- * when it wants to turn the acceleration engine on. This is
- * really a separate operation, and should be modified via sysfs.
- * But for now, we leave it broken with the following define
- */
-#define STUPID_ACCELF_TEXT_SHIT
-
-// This will go away
-#if defined(__sparc__)
-
-/* We map all of our framebuffers such that big-endian accesses
- * are what we want, so the following is sufficient.
- */
-
-// This will go away
-#define fb_readb sbus_readb
-#define fb_readw sbus_readw
-#define fb_readl sbus_readl
-#define fb_readq sbus_readq
-#define fb_writeb sbus_writeb
-#define fb_writew sbus_writew
-#define fb_writel sbus_writel
-#define fb_writeq sbus_writeq
-#define fb_memset sbus_memset_io
-#define fb_memcpy_fromfb sbus_memcpy_fromio
-#define fb_memcpy_tofb sbus_memcpy_toio
-
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) || defined(__avr32__) || defined(__bfin__)
-
-#define fb_readb __raw_readb
-#define fb_readw __raw_readw
-#define fb_readl __raw_readl
-#define fb_readq __raw_readq
-#define fb_writeb __raw_writeb
-#define fb_writew __raw_writew
-#define fb_writel __raw_writel
-#define fb_writeq __raw_writeq
-#define fb_memset memset_io
-#define fb_memcpy_fromfb memcpy_fromio
-#define fb_memcpy_tofb memcpy_toio
-
-#else
-
-#define fb_readb(addr) (*(volatile u8 *) (addr))
-#define fb_readw(addr) (*(volatile u16 *) (addr))
-#define fb_readl(addr) (*(volatile u32 *) (addr))
-#define fb_readq(addr) (*(volatile u64 *) (addr))
-#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b))
-#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b))
-#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b))
-#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b))
-#define fb_memset memset
-#define fb_memcpy_fromfb memcpy
-#define fb_memcpy_tofb memcpy
-
-#endif
-
-#define FB_LEFT_POS(p, bpp) (fb_be_math(p) ? (32 - (bpp)) : 0)
-#define FB_SHIFT_HIGH(p, val, bits) (fb_be_math(p) ? (val) >> (bits) : \
- (val) << (bits))
-#define FB_SHIFT_LOW(p, val, bits) (fb_be_math(p) ? (val) << (bits) : \
- (val) >> (bits))
-
- /*
- * `Generic' versions of the frame buffer device operations
- */
-
-extern int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var);
-extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var);
-extern int fb_blank(struct fb_info *info, int blank);
-extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
-extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
-extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image);
-/*
- * Drawing operations where framebuffer is in system RAM
- */
-extern void sys_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
-extern void sys_copyarea(struct fb_info *info, const struct fb_copyarea *area);
-extern void sys_imageblit(struct fb_info *info, const struct fb_image *image);
-extern ssize_t fb_sys_read(struct fb_info *info, char __user *buf,
- size_t count, loff_t *ppos);
-extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
- size_t count, loff_t *ppos);
-
-/* drivers/video/fbmem.c */
-extern int register_framebuffer(struct fb_info *fb_info);
-extern int unregister_framebuffer(struct fb_info *fb_info);
-extern int unlink_framebuffer(struct fb_info *fb_info);
-extern void remove_conflicting_framebuffers(struct apertures_struct *a,
- const char *name, bool primary);
-extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
-extern int fb_show_logo(struct fb_info *fb_info, int rotate);
-extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);
-extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx,
- u32 height, u32 shift_high, u32 shift_low, u32 mod);
-extern void fb_pad_aligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height);
-extern void fb_set_suspend(struct fb_info *info, int state);
-extern int fb_get_color_depth(struct fb_var_screeninfo *var,
- struct fb_fix_screeninfo *fix);
-extern int fb_get_options(char *name, char **option);
-extern int fb_new_modelist(struct fb_info *info);
-
-extern struct fb_info *registered_fb[FB_MAX];
-extern int num_registered_fb;
-extern struct class *fb_class;
-
-extern int lock_fb_info(struct fb_info *info);
-
-static inline void unlock_fb_info(struct fb_info *info)
-{
- mutex_unlock(&info->lock);
-}
-
-static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
- u8 *src, u32 s_pitch, u32 height)
-{
- int i, j;
-
- d_pitch -= s_pitch;
-
- for (i = height; i--; ) {
- /* s_pitch is a few bytes at the most, memcpy is suboptimal */
- for (j = 0; j < s_pitch; j++)
- *dst++ = *src++;
- dst += d_pitch;
- }
-}
-
-/* drivers/video/fb_defio.c */
-extern void fb_deferred_io_init(struct fb_info *info);
-extern void fb_deferred_io_open(struct fb_info *info,
- struct inode *inode,
- struct file *file);
-extern void fb_deferred_io_cleanup(struct fb_info *info);
-extern int fb_deferred_io_fsync(struct file *file, loff_t start,
- loff_t end, int datasync);
-
-static inline bool fb_be_math(struct fb_info *info)
-{
-#ifdef CONFIG_FB_FOREIGN_ENDIAN
-#if defined(CONFIG_FB_BOTH_ENDIAN)
- return info->flags & FBINFO_BE_MATH;
-#elif defined(CONFIG_FB_BIG_ENDIAN)
- return true;
-#elif defined(CONFIG_FB_LITTLE_ENDIAN)
- return false;
-#endif /* CONFIG_FB_BOTH_ENDIAN */
-#else
-#ifdef __BIG_ENDIAN
- return true;
-#else
- return false;
-#endif /* __BIG_ENDIAN */
-#endif /* CONFIG_FB_FOREIGN_ENDIAN */
-}
-
-/* drivers/video/fbsysfs.c */
-extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
-extern void framebuffer_release(struct fb_info *info);
-extern int fb_init_device(struct fb_info *fb_info);
-extern void fb_cleanup_device(struct fb_info *head);
-extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
-
-/* drivers/video/fbmon.c */
-#define FB_MAXTIMINGS 0
-#define FB_VSYNCTIMINGS 1
-#define FB_HSYNCTIMINGS 2
-#define FB_DCLKTIMINGS 3
-#define FB_IGNOREMON 0x100
-
-#define FB_MODE_IS_UNKNOWN 0
-#define FB_MODE_IS_DETAILED 1
-#define FB_MODE_IS_STANDARD 2
-#define FB_MODE_IS_VESA 4
-#define FB_MODE_IS_CALCULATED 8
-#define FB_MODE_IS_FIRST 16
-#define FB_MODE_IS_FROM_VAR 32
-
-extern int fbmon_dpms(const struct fb_info *fb_info);
-extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
- struct fb_info *info);
-extern int fb_validate_mode(const struct fb_var_screeninfo *var,
- struct fb_info *info);
-extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
-extern const unsigned char *fb_firmware_edid(struct device *device);
-extern void fb_edid_to_monspecs(unsigned char *edid,
- struct fb_monspecs *specs);
-extern void fb_edid_add_monspecs(unsigned char *edid,
- struct fb_monspecs *specs);
-extern void fb_destroy_modedb(struct fb_videomode *modedb);
-extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
-extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
-
-/* drivers/video/modedb.c */
-#define VESA_MODEDB_SIZE 34
-extern void fb_var_to_videomode(struct fb_videomode *mode,
- const struct fb_var_screeninfo *var);
-extern void fb_videomode_to_var(struct fb_var_screeninfo *var,
- const struct fb_videomode *mode);
-extern int fb_mode_is_equal(const struct fb_videomode *mode1,
- const struct fb_videomode *mode2);
-extern int fb_add_videomode(const struct fb_videomode *mode,
- struct list_head *head);
-extern void fb_delete_videomode(const struct fb_videomode *mode,
- struct list_head *head);
-extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
- struct list_head *head);
-extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
- struct list_head *head);
-extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
- struct list_head *head);
-extern void fb_destroy_modelist(struct list_head *head);
-extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
- struct list_head *head);
-extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
- struct list_head *head);
-
-/* drivers/video/fbcmap.c */
-extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
-extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags);
-extern void fb_dealloc_cmap(struct fb_cmap *cmap);
-extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to);
-extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to);
-extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info);
-extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info);
-extern const struct fb_cmap *fb_default_cmap(int len);
-extern void fb_invert_cmaps(void);
-
-struct fb_videomode {
- const char *name; /* optional */
- u32 refresh; /* optional */
- u32 xres;
- u32 yres;
- u32 pixclock;
- u32 left_margin;
- u32 right_margin;
- u32 upper_margin;
- u32 lower_margin;
- u32 hsync_len;
- u32 vsync_len;
- u32 sync;
- u32 vmode;
- u32 flag;
-};
-
-extern const char *fb_mode_option;
-extern const struct fb_videomode vesa_modes[];
-extern const struct fb_videomode cea_modes[64];
-
-struct fb_modelist {
- struct list_head list;
- struct fb_videomode mode;
-};
-
-extern int fb_find_mode(struct fb_var_screeninfo *var,
- struct fb_info *info, const char *mode_option,
- const struct fb_videomode *db,
- unsigned int dbsize,
- const struct fb_videomode *default_mode,
- unsigned int default_bpp);
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_FB_H */
diff --git a/original/linux/fcntl.h b/original/linux/fcntl.h
deleted file mode 100644
index 996f561..0000000
--- a/original/linux/fcntl.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef _LINUX_FCNTL_H
-#define _LINUX_FCNTL_H
-
-#include <asm/fcntl.h>
-
-#define F_SETLEASE (F_LINUX_SPECIFIC_BASE+0)
-#define F_GETLEASE (F_LINUX_SPECIFIC_BASE+1)
-
-/*
- * Request nofications on a directory.
- * See below for events that may be notified.
- */
-#define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2)
-
-/*
- * Types of directory notifications that may be requested.
- */
-#define DN_ACCESS 0x00000001 /* File accessed */
-#define DN_MODIFY 0x00000002 /* File modified */
-#define DN_CREATE 0x00000004 /* File created */
-#define DN_DELETE 0x00000008 /* File removed */
-#define DN_RENAME 0x00000010 /* File renamed */
-#define DN_ATTRIB 0x00000020 /* File changed attibutes */
-#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
-
-#define AT_FDCWD -100 /* Special value used to indicate
- openat should use the current
- working directory. */
-#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
-#define AT_REMOVEDIR 0x200 /* Remove directory instead of
- unlinking file. */
-#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
-
-#ifdef __KERNEL__
-
-#ifndef force_o_largefile
-#define force_o_largefile() (BITS_PER_LONG != 32)
-#endif
-
-#if BITS_PER_LONG == 32
-#define IS_GETLK32(cmd) ((cmd) == F_GETLK)
-#define IS_SETLK32(cmd) ((cmd) == F_SETLK)
-#define IS_SETLKW32(cmd) ((cmd) == F_SETLKW)
-#define IS_GETLK64(cmd) ((cmd) == F_GETLK64)
-#define IS_SETLK64(cmd) ((cmd) == F_SETLK64)
-#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW64)
-#else
-#define IS_GETLK32(cmd) (0)
-#define IS_SETLK32(cmd) (0)
-#define IS_SETLKW32(cmd) (0)
-#define IS_GETLK64(cmd) ((cmd) == F_GETLK)
-#define IS_SETLK64(cmd) ((cmd) == F_SETLK)
-#define IS_SETLKW64(cmd) ((cmd) == F_SETLKW)
-#endif /* BITS_PER_LONG == 32 */
-
-#define IS_GETLK(cmd) (IS_GETLK32(cmd) || IS_GETLK64(cmd))
-#define IS_SETLK(cmd) (IS_SETLK32(cmd) || IS_SETLK64(cmd))
-#define IS_SETLKW(cmd) (IS_SETLKW32(cmd) || IS_SETLKW64(cmd))
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/fd.h b/original/linux/fd.h
deleted file mode 100644
index b6bd41d..0000000
--- a/original/linux/fd.h
+++ /dev/null
@@ -1,374 +0,0 @@
-#ifndef _LINUX_FD_H
-#define _LINUX_FD_H
-
-#include <linux/ioctl.h>
-#include <linux/compiler.h>
-
-/* New file layout: Now the ioctl definitions immediately follow the
- * definitions of the structures that they use */
-
-/*
- * Geometry
- */
-struct floppy_struct {
- unsigned int size, /* nr of sectors total */
- sect, /* sectors per track */
- head, /* nr of heads */
- track, /* nr of tracks */
- stretch; /* !=0 means double track steps */
-#define FD_STRETCH 1
-#define FD_SWAPSIDES 2
-#define FD_ZEROBASED 4
-
- unsigned char gap, /* gap1 size */
-
- rate, /* data rate. |= 0x40 for perpendicular */
-#define FD_2M 0x4
-#define FD_SIZECODEMASK 0x38
-#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
-#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \
- 512 : 128 << FD_SIZECODE(floppy) )
-#define FD_PERP 0x40
-
- spec1, /* stepping rate, head unload time */
- fmt_gap; /* gap2 size */
- const char * name; /* used only for predefined formats */
-};
-
-
-/* commands needing write access have 0x40 set */
-/* commands needing super user access have 0x80 set */
-
-#define FDCLRPRM _IO(2, 0x41)
-/* clear user-defined parameters */
-
-#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
-#define FDSETMEDIAPRM FDSETPRM
-/* set user-defined parameters for current media */
-
-#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
-#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
-#define FDDEFMEDIAPRM FDDEFPRM
-#define FDGETMEDIAPRM FDGETPRM
-/* set/get disk parameters */
-
-
-#define FDMSGON _IO(2,0x45)
-#define FDMSGOFF _IO(2,0x46)
-/* issue/don't issue kernel messages on media type change */
-
-
-/*
- * Formatting (obsolete)
- */
-#define FD_FILL_BYTE 0xF6 /* format fill byte. */
-
-struct format_descr {
- unsigned int device,head,track;
-};
-
-#define FDFMTBEG _IO(2,0x47)
-/* begin formatting a disk */
-#define FDFMTTRK _IOW(2,0x48, struct format_descr)
-/* format the specified track */
-#define FDFMTEND _IO(2,0x49)
-/* end formatting a disk */
-
-
-/*
- * Error thresholds
- */
-struct floppy_max_errors {
- unsigned int
- abort, /* number of errors to be reached before aborting */
- read_track, /* maximal number of errors permitted to read an
- * entire track at once */
- reset, /* maximal number of errors before a reset is tried */
- recal, /* maximal number of errors before a recalibrate is
- * tried */
-
- /*
- * Threshold for reporting FDC errors to the console.
- * Setting this to zero may flood your screen when using
- * ultra cheap floppies ;-)
- */
- reporting;
-
-};
-
-#define FDSETEMSGTRESH _IO(2,0x4a)
-/* set fdc error reporting threshold */
-
-#define FDFLUSH _IO(2,0x4b)
-/* flush buffers for media; either for verifying media, or for
- * handling a media change without closing the file descriptor */
-
-#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors)
-#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors)
-/* set/get abortion and read_track threshold. See also floppy_drive_params
- * structure */
-
-
-typedef char floppy_drive_name[16];
-#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name)
-/* get drive type: 5 1/4 or 3 1/2 */
-
-
-/*
- * Drive parameters (user modifiable)
- */
-struct floppy_drive_params {
- signed char cmos; /* CMOS type */
-
- /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms
- * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA).
- */
- unsigned long max_dtr; /* Step rate, usec */
- unsigned long hlt; /* Head load/settle time, msec */
- unsigned long hut; /* Head unload time (remnant of
- * 8" drives) */
- unsigned long srt; /* Step rate, usec */
-
- unsigned long spinup; /* time needed for spinup (expressed
- * in jiffies) */
- unsigned long spindown; /* timeout needed for spindown */
- unsigned char spindown_offset; /* decides in which position the disk
- * will stop */
- unsigned char select_delay; /* delay to wait after select */
- unsigned char rps; /* rotations per second */
- unsigned char tracks; /* maximum number of tracks */
- unsigned long timeout; /* timeout for interrupt requests */
-
- unsigned char interleave_sect; /* if there are more sectors, use
- * interleave */
-
- struct floppy_max_errors max_errors;
-
- char flags; /* various flags, including ftd_msg */
-/*
- * Announce successful media type detection and media information loss after
- * disk changes.
- * Also used to enable/disable printing of overrun warnings.
- */
-
-#define FTD_MSG 0x10
-#define FD_BROKEN_DCL 0x20
-#define FD_DEBUG 0x02
-#define FD_SILENT_DCL_CLEAR 0x4
-#define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware
- considerations */
-
- char read_track; /* use readtrack during probing? */
-
-/*
- * Auto-detection. Each drive type has eight formats which are
- * used in succession to try to read the disk. If the FDC cannot lock onto
- * the disk, the next format is tried. This uses the variable 'probing'.
- */
- short autodetect[8]; /* autodetected formats */
-
- int checkfreq; /* how often should the drive be checked for disk
- * changes */
- int native_format; /* native format of this drive */
-};
-
-enum {
- FD_NEED_TWADDLE_BIT, /* more magic */
- FD_VERIFY_BIT, /* inquire for write protection */
- FD_DISK_NEWCHANGE_BIT, /* change detected, and no action undertaken yet
- * to clear media change status */
- FD_UNUSED_BIT,
- FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */
- FD_DISK_WRITABLE_BIT /* disk is writable */
-};
-
-#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
-#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params)
-/* set/get drive parameters */
-
-
-/*
- * Current drive state (not directly modifiable by user, readonly)
- */
-struct floppy_drive_struct {
- unsigned long flags;
-/* values for these flags */
-#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT)
-#define FD_VERIFY (1 << FD_VERIFY_BIT)
-#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT)
-#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT)
-#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT)
-
- unsigned long spinup_date;
- unsigned long select_date;
- unsigned long first_read_date;
- short probed_format;
- short track; /* current track */
- short maxblock; /* id of highest block read */
- short maxtrack; /* id of highest half track read */
- int generation; /* how many diskchanges? */
-
-/*
- * (User-provided) media information is _not_ discarded after a media change
- * if the corresponding keep_data flag is non-zero. Positive values are
- * decremented after each probe.
- */
- int keep_data;
-
- /* Prevent "aliased" accesses. */
- int fd_ref;
- int fd_device;
- unsigned long last_checked; /* when was the drive last checked for a disk
- * change? */
-
- char *dmabuf;
- int bufblocks;
-};
-
-#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct)
-#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct)
-/* get drive state: GET returns the cached state, POLL polls for new state */
-
-
-/*
- * reset FDC
- */
-enum reset_mode {
- FD_RESET_IF_NEEDED, /* reset only if the reset flags is set */
- FD_RESET_IF_RAWCMD, /* obsolete */
- FD_RESET_ALWAYS /* reset always */
-};
-#define FDRESET _IO(2, 0x54)
-
-
-/*
- * FDC state
- */
-struct floppy_fdc_state {
- int spec1; /* spec1 value last used */
- int spec2; /* spec2 value last used */
- int dtr;
- unsigned char version; /* FDC version code */
- unsigned char dor;
- unsigned long address; /* io address */
- unsigned int rawcmd:2;
- unsigned int reset:1;
- unsigned int need_configure:1;
- unsigned int perp_mode:2;
- unsigned int has_fifo:1;
- unsigned int driver_version; /* version code for floppy driver */
-#define FD_DRIVER_VERSION 0x100
-/* user programs using the floppy API should use floppy_fdc_state to
- * get the version number of the floppy driver that they are running
- * on. If this version number is bigger than the one compiled into the
- * user program (the FD_DRIVER_VERSION define), it should be prepared
- * to bigger structures
- */
-
- unsigned char track[4];
- /* Position of the heads of the 4 units attached to this FDC,
- * as stored on the FDC. In the future, the position as stored
- * on the FDC might not agree with the actual physical
- * position of these drive heads. By allowing such
- * disagreement, it will be possible to reset the FDC without
- * incurring the expensive cost of repositioning all heads.
- * Right now, these positions are hard wired to 0. */
-
-};
-
-#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state)
-
-
-/*
- * Asynchronous Write error tracking
- */
-struct floppy_write_errors {
- /* Write error logging.
- *
- * These fields can be cleared with the FDWERRORCLR ioctl.
- * Only writes that were attempted but failed due to a physical media
- * error are logged. write(2) calls that fail and return an error code
- * to the user process are not counted.
- */
-
- unsigned int write_errors; /* number of physical write errors
- * encountered */
-
- /* position of first and last write errors */
- unsigned long first_error_sector;
- int first_error_generation;
- unsigned long last_error_sector;
- int last_error_generation;
-
- unsigned int badness; /* highest retry count for a read or write
- * operation */
-};
-
-#define FDWERRORCLR _IO(2, 0x56)
-/* clear write error and badness information */
-#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors)
-/* get write error and badness information */
-
-
-/*
- * Raw commands
- */
-/* new interface flag: now we can do them in batches */
-#define FDHAVEBATCHEDRAWCMD
-
-struct floppy_raw_cmd {
- unsigned int flags;
-#define FD_RAW_READ 1
-#define FD_RAW_WRITE 2
-#define FD_RAW_NO_MOTOR 4
-#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */
-#define FD_RAW_INTR 8 /* wait for an interrupt */
-#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */
-#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command
- * completion */
-#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */
-#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */
-
-/* more "in" flags */
-#define FD_RAW_MORE 0x100 /* more records follow */
-#define FD_RAW_STOP_IF_FAILURE 0x200 /* stop if we encounter a failure */
-#define FD_RAW_STOP_IF_SUCCESS 0x400 /* stop if command successful */
-#define FD_RAW_SOFTFAILURE 0x800 /* consider the return value for failure
- * detection too */
-
-/* more "out" flags */
-#define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */
-#define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */
-
- void __user *data;
- char *kernel_data; /* location of data buffer in the kernel */
- struct floppy_raw_cmd *next; /* used for chaining of raw cmd's
- * within the kernel */
- long length; /* in: length of dma transfer. out: remaining bytes */
- long phys_length; /* physical length, if different from dma length */
- int buffer_length; /* length of allocated buffer */
-
- unsigned char rate;
- unsigned char cmd_count;
- unsigned char cmd[16];
- unsigned char reply_count;
- unsigned char reply[16];
- int track;
- int resultcode;
-
- int reserved1;
- int reserved2;
-};
-
-#define FDRAWCMD _IO(2, 0x58)
-/* send a raw command to the fdc. Structure size not included, because of
- * batches */
-
-#define FDTWADDLE _IO(2, 0x59)
-/* flicker motor-on bit before reading a sector. Experimental */
-
-
-#define FDEJECT _IO(2, 0x5a)
-/* eject the disk */
-
-#endif
diff --git a/original/linux/file.h b/original/linux/file.h
deleted file mode 100644
index 9f7c251..0000000
--- a/original/linux/file.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Wrapper functions for accessing the file_struct fd array.
- */
-
-#ifndef __LINUX_FILE_H
-#define __LINUX_FILE_H
-
-#include <asm/atomic.h>
-#include <linux/posix_types.h>
-#include <linux/compiler.h>
-#include <linux/spinlock.h>
-#include <linux/rcupdate.h>
-#include <linux/types.h>
-
-/*
- * The default fd array needs to be at least BITS_PER_LONG,
- * as this is the granularity returned by copy_fdset().
- */
-#define NR_OPEN_DEFAULT BITS_PER_LONG
-
-/*
- * The embedded_fd_set is a small fd_set,
- * suitable for most tasks (which open <= BITS_PER_LONG files)
- */
-struct embedded_fd_set {
- unsigned long fds_bits[1];
-};
-
-/*
- * More than this number of fds: we use a separately allocated fd_set
- */
-#define EMBEDDED_FD_SET_SIZE (BITS_PER_BYTE * sizeof(struct embedded_fd_set))
-
-struct fdtable {
- unsigned int max_fds;
- int max_fdset;
- struct file ** fd; /* current fd array */
- fd_set *close_on_exec;
- fd_set *open_fds;
- struct rcu_head rcu;
- struct files_struct *free_files;
- struct fdtable *next;
-};
-
-/*
- * Open file table structure
- */
-struct files_struct {
- /*
- * read mostly part
- */
- atomic_t count;
- struct fdtable *fdt;
- struct fdtable fdtab;
- /*
- * written part on a separate cache line in SMP
- */
- spinlock_t file_lock ____cacheline_aligned_in_smp;
- int next_fd;
- struct embedded_fd_set close_on_exec_init;
- struct embedded_fd_set open_fds_init;
- struct file * fd_array[NR_OPEN_DEFAULT];
-};
-
-#define files_fdtable(files) (rcu_dereference((files)->fdt))
-
-extern void FASTCALL(__fput(struct file *));
-extern void FASTCALL(fput(struct file *));
-
-static inline void fput_light(struct file *file, int fput_needed)
-{
- if (unlikely(fput_needed))
- fput(file);
-}
-
-extern struct file * FASTCALL(fget(unsigned int fd));
-extern struct file * FASTCALL(fget_light(unsigned int fd, int *fput_needed));
-extern void FASTCALL(set_close_on_exec(unsigned int fd, int flag));
-extern void put_filp(struct file *);
-extern int get_unused_fd(void);
-extern void FASTCALL(put_unused_fd(unsigned int fd));
-struct kmem_cache;
-
-extern struct file ** alloc_fd_array(int);
-extern void free_fd_array(struct file **, int);
-
-extern fd_set *alloc_fdset(int);
-extern void free_fdset(fd_set *, int);
-
-extern int expand_files(struct files_struct *, int nr);
-extern void free_fdtable(struct fdtable *fdt);
-extern void __init files_defer_init(void);
-
-static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
-{
- struct file * file = NULL;
- struct fdtable *fdt = files_fdtable(files);
-
- if (fd < fdt->max_fds)
- file = rcu_dereference(fdt->fd[fd]);
- return file;
-}
-
-/*
- * Check whether the specified fd has an open file.
- */
-#define fcheck(fd) fcheck_files(current->files, fd)
-
-extern void FASTCALL(fd_install(unsigned int fd, struct file * file));
-
-struct task_struct;
-
-struct files_struct *get_files_struct(struct task_struct *);
-void FASTCALL(put_files_struct(struct files_struct *fs));
-
-#endif /* __LINUX_FILE_H */
diff --git a/original/linux/filter.h b/original/linux/filter.h
deleted file mode 100644
index 82b0135..0000000
--- a/original/linux/filter.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Linux Socket Filter Data Structures
- */
-
-#ifndef __LINUX_FILTER_H__
-#define __LINUX_FILTER_H__
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-#include <linux/atomic.h>
-#include <linux/compat.h>
-#endif
-
-/*
- * Current version of the filter code architecture.
- */
-#define BPF_MAJOR_VERSION 1
-#define BPF_MINOR_VERSION 1
-
-/*
- * Try and keep these values and structures similar to BSD, especially
- * the BPF code definitions which need to match so you can share filters
- */
-
-struct sock_filter { /* Filter block */
- __u16 code; /* Actual filter code */
- __u8 jt; /* Jump true */
- __u8 jf; /* Jump false */
- __u32 k; /* Generic multiuse field */
-};
-
-struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
- unsigned short len; /* Number of filter blocks */
- struct sock_filter __user *filter;
-};
-
-/*
- * Instruction classes
- */
-
-#define BPF_CLASS(code) ((code) & 0x07)
-#define BPF_LD 0x00
-#define BPF_LDX 0x01
-#define BPF_ST 0x02
-#define BPF_STX 0x03
-#define BPF_ALU 0x04
-#define BPF_JMP 0x05
-#define BPF_RET 0x06
-#define BPF_MISC 0x07
-
-/* ld/ldx fields */
-#define BPF_SIZE(code) ((code) & 0x18)
-#define BPF_W 0x00
-#define BPF_H 0x08
-#define BPF_B 0x10
-#define BPF_MODE(code) ((code) & 0xe0)
-#define BPF_IMM 0x00
-#define BPF_ABS 0x20
-#define BPF_IND 0x40
-#define BPF_MEM 0x60
-#define BPF_LEN 0x80
-#define BPF_MSH 0xa0
-
-/* alu/jmp fields */
-#define BPF_OP(code) ((code) & 0xf0)
-#define BPF_ADD 0x00
-#define BPF_SUB 0x10
-#define BPF_MUL 0x20
-#define BPF_DIV 0x30
-#define BPF_OR 0x40
-#define BPF_AND 0x50
-#define BPF_LSH 0x60
-#define BPF_RSH 0x70
-#define BPF_NEG 0x80
-#define BPF_JA 0x00
-#define BPF_JEQ 0x10
-#define BPF_JGT 0x20
-#define BPF_JGE 0x30
-#define BPF_JSET 0x40
-#define BPF_SRC(code) ((code) & 0x08)
-#define BPF_K 0x00
-#define BPF_X 0x08
-
-/* ret - BPF_K and BPF_X also apply */
-#define BPF_RVAL(code) ((code) & 0x18)
-#define BPF_A 0x10
-
-/* misc */
-#define BPF_MISCOP(code) ((code) & 0xf8)
-#define BPF_TAX 0x00
-#define BPF_TXA 0x80
-
-#ifndef BPF_MAXINSNS
-#define BPF_MAXINSNS 4096
-#endif
-
-/*
- * Macros for filter block array initializers.
- */
-#ifndef BPF_STMT
-#define BPF_STMT(code, k) { (unsigned short)(code), 0, 0, k }
-#endif
-#ifndef BPF_JUMP
-#define BPF_JUMP(code, k, jt, jf) { (unsigned short)(code), jt, jf, k }
-#endif
-
-/*
- * Number of scratch memory words for: BPF_ST and BPF_STX
- */
-#define BPF_MEMWORDS 16
-
-/* RATIONALE. Negative offsets are invalid in BPF.
- We use them to reference ancillary data.
- Unlike introduction new instructions, it does not break
- existing compilers/optimizers.
- */
-#define SKF_AD_OFF (-0x1000)
-#define SKF_AD_PROTOCOL 0
-#define SKF_AD_PKTTYPE 4
-#define SKF_AD_IFINDEX 8
-#define SKF_AD_NLATTR 12
-#define SKF_AD_NLATTR_NEST 16
-#define SKF_AD_MARK 20
-#define SKF_AD_QUEUE 24
-#define SKF_AD_HATYPE 28
-#define SKF_AD_RXHASH 32
-#define SKF_AD_CPU 36
-#define SKF_AD_ALU_XOR_X 40
-#define SKF_AD_MAX 44
-#define SKF_NET_OFF (-0x100000)
-#define SKF_LL_OFF (-0x200000)
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_COMPAT
-/*
- * A struct sock_filter is architecture independent.
- */
-struct compat_sock_fprog {
- u16 len;
- compat_uptr_t filter; /* struct sock_filter * */
-};
-#endif
-
-struct sk_buff;
-struct sock;
-
-struct sk_filter
-{
- atomic_t refcnt;
- unsigned int len; /* Number of filter blocks */
- unsigned int (*bpf_func)(const struct sk_buff *skb,
- const struct sock_filter *filter);
- struct rcu_head rcu;
- struct sock_filter insns[0];
-};
-
-static inline unsigned int sk_filter_len(const struct sk_filter *fp)
-{
- return fp->len * sizeof(struct sock_filter) + sizeof(*fp);
-}
-
-extern int sk_filter(struct sock *sk, struct sk_buff *skb);
-extern unsigned int sk_run_filter(const struct sk_buff *skb,
- const struct sock_filter *filter);
-extern int sk_unattached_filter_create(struct sk_filter **pfp,
- struct sock_fprog *fprog);
-extern void sk_unattached_filter_destroy(struct sk_filter *fp);
-extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
-extern int sk_detach_filter(struct sock *sk);
-extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
-
-#ifdef CONFIG_BPF_JIT
-extern void bpf_jit_compile(struct sk_filter *fp);
-extern void bpf_jit_free(struct sk_filter *fp);
-#define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns)
-#else
-static inline void bpf_jit_compile(struct sk_filter *fp)
-{
-}
-static inline void bpf_jit_free(struct sk_filter *fp)
-{
-}
-#define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns)
-#endif
-
-enum {
- BPF_S_RET_K = 1,
- BPF_S_RET_A,
- BPF_S_ALU_ADD_K,
- BPF_S_ALU_ADD_X,
- BPF_S_ALU_SUB_K,
- BPF_S_ALU_SUB_X,
- BPF_S_ALU_MUL_K,
- BPF_S_ALU_MUL_X,
- BPF_S_ALU_DIV_X,
- BPF_S_ALU_AND_K,
- BPF_S_ALU_AND_X,
- BPF_S_ALU_OR_K,
- BPF_S_ALU_OR_X,
- BPF_S_ALU_LSH_K,
- BPF_S_ALU_LSH_X,
- BPF_S_ALU_RSH_K,
- BPF_S_ALU_RSH_X,
- BPF_S_ALU_NEG,
- BPF_S_LD_W_ABS,
- BPF_S_LD_H_ABS,
- BPF_S_LD_B_ABS,
- BPF_S_LD_W_LEN,
- BPF_S_LD_W_IND,
- BPF_S_LD_H_IND,
- BPF_S_LD_B_IND,
- BPF_S_LD_IMM,
- BPF_S_LDX_W_LEN,
- BPF_S_LDX_B_MSH,
- BPF_S_LDX_IMM,
- BPF_S_MISC_TAX,
- BPF_S_MISC_TXA,
- BPF_S_ALU_DIV_K,
- BPF_S_LD_MEM,
- BPF_S_LDX_MEM,
- BPF_S_ST,
- BPF_S_STX,
- BPF_S_JMP_JA,
- BPF_S_JMP_JEQ_K,
- BPF_S_JMP_JEQ_X,
- BPF_S_JMP_JGE_K,
- BPF_S_JMP_JGE_X,
- BPF_S_JMP_JGT_K,
- BPF_S_JMP_JGT_X,
- BPF_S_JMP_JSET_K,
- BPF_S_JMP_JSET_X,
- /* Ancillary data */
- BPF_S_ANC_PROTOCOL,
- BPF_S_ANC_PKTTYPE,
- BPF_S_ANC_IFINDEX,
- BPF_S_ANC_NLATTR,
- BPF_S_ANC_NLATTR_NEST,
- BPF_S_ANC_MARK,
- BPF_S_ANC_QUEUE,
- BPF_S_ANC_HATYPE,
- BPF_S_ANC_RXHASH,
- BPF_S_ANC_CPU,
- BPF_S_ANC_ALU_XOR_X,
- BPF_S_ANC_SECCOMP_LD_W,
-};
-
-#endif /* __KERNEL__ */
-
-#endif /* __LINUX_FILTER_H__ */
diff --git a/original/linux/fs.h b/original/linux/fs.h
deleted file mode 100644
index 25c40b9..0000000
--- a/original/linux/fs.h
+++ /dev/null
@@ -1,2676 +0,0 @@
-#ifndef _LINUX_FS_H
-#define _LINUX_FS_H
-
-/*
- * This file has definitions for some important file table
- * structures etc.
- */
-
-#include <linux/limits.h>
-#include <linux/ioctl.h>
-#include <linux/blk_types.h>
-#include <linux/types.h>
-
-/*
- * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
- * the file limit at runtime and only root can increase the per-process
- * nr_file rlimit, so it's safe to set up a ridiculously high absolute
- * upper limit on files-per-process.
- *
- * Some programs (notably those using select()) may have to be
- * recompiled to take full advantage of the new limits..
- */
-
-/* Fixed constants first: */
-#undef NR_OPEN
-#define INR_OPEN_CUR 1024 /* Initial setting for nfile rlimits */
-#define INR_OPEN_MAX 4096 /* Hard limit for nfile rlimits */
-
-#define BLOCK_SIZE_BITS 10
-#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
-
-#define SEEK_SET 0 /* seek relative to beginning of file */
-#define SEEK_CUR 1 /* seek relative to current file position */
-#define SEEK_END 2 /* seek relative to end of file */
-#define SEEK_DATA 3 /* seek to the next data */
-#define SEEK_HOLE 4 /* seek to the next hole */
-#define SEEK_MAX SEEK_HOLE
-
-struct fstrim_range {
- __u64 start;
- __u64 len;
- __u64 minlen;
-};
-
-/* And dynamically-tunable limits and defaults: */
-struct files_stat_struct {
- unsigned long nr_files; /* read only */
- unsigned long nr_free_files; /* read only */
- unsigned long max_files; /* tunable */
-};
-
-struct inodes_stat_t {
- int nr_inodes;
- int nr_unused;
- int dummy[5]; /* padding for sysctl ABI compatibility */
-};
-
-
-#define NR_FILE 8192 /* this can well be larger on a larger system */
-
-#define MAY_EXEC 0x00000001
-#define MAY_WRITE 0x00000002
-#define MAY_READ 0x00000004
-#define MAY_APPEND 0x00000008
-#define MAY_ACCESS 0x00000010
-#define MAY_OPEN 0x00000020
-#define MAY_CHDIR 0x00000040
-/* called from RCU mode, don't block */
-#define MAY_NOT_BLOCK 0x00000080
-
-/*
- * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
- * to O_WRONLY and O_RDWR via the strange trick in __dentry_open()
- */
-
-/* file is open for reading */
-#define FMODE_READ ((__force fmode_t)0x1)
-/* file is open for writing */
-#define FMODE_WRITE ((__force fmode_t)0x2)
-/* file is seekable */
-#define FMODE_LSEEK ((__force fmode_t)0x4)
-/* file can be accessed using pread */
-#define FMODE_PREAD ((__force fmode_t)0x8)
-/* file can be accessed using pwrite */
-#define FMODE_PWRITE ((__force fmode_t)0x10)
-/* File is opened for execution with sys_execve / sys_uselib */
-#define FMODE_EXEC ((__force fmode_t)0x20)
-/* File is opened with O_NDELAY (only set for block devices) */
-#define FMODE_NDELAY ((__force fmode_t)0x40)
-/* File is opened with O_EXCL (only set for block devices) */
-#define FMODE_EXCL ((__force fmode_t)0x80)
-/* File is opened using open(.., 3, ..) and is writeable only for ioctls
- (specialy hack for floppy.c) */
-#define FMODE_WRITE_IOCTL ((__force fmode_t)0x100)
-/* 32bit hashes as llseek() offset (for directories) */
-#define FMODE_32BITHASH ((__force fmode_t)0x200)
-/* 64bit hashes as llseek() offset (for directories) */
-#define FMODE_64BITHASH ((__force fmode_t)0x400)
-
-/*
- * Don't update ctime and mtime.
- *
- * Currently a special hack for the XFS open_by_handle ioctl, but we'll
- * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
- */
-#define FMODE_NOCMTIME ((__force fmode_t)0x800)
-
-/* Expect random access pattern */
-#define FMODE_RANDOM ((__force fmode_t)0x1000)
-
-/* File is huge (eg. /dev/kmem): treat loff_t as unsigned */
-#define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000)
-
-/* File is opened with O_PATH; almost nothing can be done with it */
-#define FMODE_PATH ((__force fmode_t)0x4000)
-
-/* File was opened by fanotify and shouldn't generate fanotify events */
-#define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
-
-/*
- * The below are the various read and write types that we support. Some of
- * them include behavioral modifiers that send information down to the
- * block layer and IO scheduler. Terminology:
- *
- * The block layer uses device plugging to defer IO a little bit, in
- * the hope that we will see more IO very shortly. This increases
- * coalescing of adjacent IO and thus reduces the number of IOs we
- * have to send to the device. It also allows for better queuing,
- * if the IO isn't mergeable. If the caller is going to be waiting
- * for the IO, then he must ensure that the device is unplugged so
- * that the IO is dispatched to the driver.
- *
- * All IO is handled async in Linux. This is fine for background
- * writes, but for reads or writes that someone waits for completion
- * on, we want to notify the block layer and IO scheduler so that they
- * know about it. That allows them to make better scheduling
- * decisions. So when the below references 'sync' and 'async', it
- * is referencing this priority hint.
- *
- * With that in mind, the available types are:
- *
- * READ A normal read operation. Device will be plugged.
- * READ_SYNC A synchronous read. Device is not plugged, caller can
- * immediately wait on this read without caring about
- * unplugging.
- * READA Used for read-ahead operations. Lower priority, and the
- * block layer could (in theory) choose to ignore this
- * request if it runs into resource problems.
- * WRITE A normal async write. Device will be plugged.
- * WRITE_SYNC Synchronous write. Identical to WRITE, but passes down
- * the hint that someone will be waiting on this IO
- * shortly. The write equivalent of READ_SYNC.
- * WRITE_ODIRECT Special case write for O_DIRECT only.
- * WRITE_FLUSH Like WRITE_SYNC but with preceding cache flush.
- * WRITE_FUA Like WRITE_SYNC but data is guaranteed to be on
- * non-volatile media on completion.
- * WRITE_FLUSH_FUA Combination of WRITE_FLUSH and FUA. The IO is preceded
- * by a cache flush and data is guaranteed to be on
- * non-volatile media on completion.
- *
- */
-#define RW_MASK REQ_WRITE
-#define RWA_MASK REQ_RAHEAD
-
-#define READ 0
-#define WRITE RW_MASK
-#define READA RWA_MASK
-
-#define READ_SYNC (READ | REQ_SYNC)
-#define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE)
-#define WRITE_ODIRECT (WRITE | REQ_SYNC)
-#define WRITE_FLUSH (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH)
-#define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA)
-#define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA)
-
-#define SEL_IN 1
-#define SEL_OUT 2
-#define SEL_EX 4
-
-/* public flags for file_system_type */
-#define FS_REQUIRES_DEV 1
-#define FS_BINARY_MOUNTDATA 2
-#define FS_HAS_SUBTYPE 4
-#define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */
-#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move()
- * during rename() internally.
- */
-
-/*
- * These are the fs-independent mount-flags: up to 32 flags are supported
- */
-#define MS_RDONLY 1 /* Mount read-only */
-#define MS_NOSUID 2 /* Ignore suid and sgid bits */
-#define MS_NODEV 4 /* Disallow access to device special files */
-#define MS_NOEXEC 8 /* Disallow program execution */
-#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
-#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
-#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
-#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
-#define MS_NOATIME 1024 /* Do not update access times. */
-#define MS_NODIRATIME 2048 /* Do not update directory access times */
-#define MS_BIND 4096
-#define MS_MOVE 8192
-#define MS_REC 16384
-#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence.
- MS_VERBOSE is deprecated. */
-#define MS_SILENT 32768
-#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
-#define MS_UNBINDABLE (1<<17) /* change to unbindable */
-#define MS_PRIVATE (1<<18) /* change to private */
-#define MS_SLAVE (1<<19) /* change to slave */
-#define MS_SHARED (1<<20) /* change to shared */
-#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
-#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
-#define MS_I_VERSION (1<<23) /* Update inode I_version field */
-#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
-#define MS_NOSEC (1<<28)
-#define MS_BORN (1<<29)
-#define MS_ACTIVE (1<<30)
-#define MS_NOUSER (1<<31)
-
-/*
- * Superblock flags that can be altered by MS_REMOUNT
- */
-#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
-
-/*
- * Old magic mount flag and mask
- */
-#define MS_MGC_VAL 0xC0ED0000
-#define MS_MGC_MSK 0xffff0000
-
-/* Inode flags - they have nothing to superblock flags now */
-
-#define S_SYNC 1 /* Writes are synced at once */
-#define S_NOATIME 2 /* Do not update access times */
-#define S_APPEND 4 /* Append-only file */
-#define S_IMMUTABLE 8 /* Immutable file */
-#define S_DEAD 16 /* removed, but still open directory */
-#define S_NOQUOTA 32 /* Inode is not counted to quota */
-#define S_DIRSYNC 64 /* Directory modifications are synchronous */
-#define S_NOCMTIME 128 /* Do not update file c/mtime */
-#define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */
-#define S_PRIVATE 512 /* Inode is fs-internal */
-#define S_IMA 1024 /* Inode has an associated IMA struct */
-#define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */
-#define S_NOSEC 4096 /* no suid or xattr security attributes */
-
-/*
- * Note that nosuid etc flags are inode-specific: setting some file-system
- * flags just means all the inodes inherit those flags by default. It might be
- * possible to override it selectively if you really wanted to with some
- * ioctl() that is not currently implemented.
- *
- * Exception: MS_RDONLY is always applied to the entire file system.
- *
- * Unfortunately, it is possible to change a filesystems flags with it mounted
- * with files in use. This means that all of the inodes will not have their
- * i_flags updated. Hence, i_flags no longer inherit the superblock mount
- * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org
- */
-#define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg))
-
-#define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY)
-#define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \
- ((inode)->i_flags & S_SYNC))
-#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \
- ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
-#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
-#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
-#define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION)
-
-#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
-#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
-#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE)
-#define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL)
-
-#define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD)
-#define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME)
-#define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE)
-#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE)
-#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
-#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
-#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
-
-/* the read-only stuff doesn't really belong here, but any other place is
- probably as bad and I don't want to create yet another include file. */
-
-#define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */
-#define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */
-#define BLKRRPART _IO(0x12,95) /* re-read partition table */
-#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */
-#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */
-#define BLKRASET _IO(0x12,98) /* set read ahead for block device */
-#define BLKRAGET _IO(0x12,99) /* get current read ahead setting */
-#define BLKFRASET _IO(0x12,100)/* set filesystem (mm/filemap.c) read-ahead */
-#define BLKFRAGET _IO(0x12,101)/* get filesystem (mm/filemap.c) read-ahead */
-#define BLKSECTSET _IO(0x12,102)/* set max sectors per request (ll_rw_blk.c) */
-#define BLKSECTGET _IO(0x12,103)/* get max sectors per request (ll_rw_blk.c) */
-#define BLKSSZGET _IO(0x12,104)/* get block device sector size */
-#if 0
-#define BLKPG _IO(0x12,105)/* See blkpg.h */
-
-/* Some people are morons. Do not use sizeof! */
-
-#define BLKELVGET _IOR(0x12,106,size_t)/* elevator get */
-#define BLKELVSET _IOW(0x12,107,size_t)/* elevator set */
-/* This was here just to show that the number is taken -
- probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */
-#endif
-/* A jump here: 108-111 have been used for various private purposes. */
-#define BLKBSZGET _IOR(0x12,112,size_t)
-#define BLKBSZSET _IOW(0x12,113,size_t)
-#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */
-#define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
-#define BLKTRACESTART _IO(0x12,116)
-#define BLKTRACESTOP _IO(0x12,117)
-#define BLKTRACETEARDOWN _IO(0x12,118)
-#define BLKDISCARD _IO(0x12,119)
-#define BLKIOMIN _IO(0x12,120)
-#define BLKIOOPT _IO(0x12,121)
-#define BLKALIGNOFF _IO(0x12,122)
-#define BLKPBSZGET _IO(0x12,123)
-#define BLKDISCARDZEROES _IO(0x12,124)
-#define BLKSECDISCARD _IO(0x12,125)
-#define BLKROTATIONAL _IO(0x12,126)
-
-#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
-#define FIBMAP _IO(0x00,1) /* bmap access */
-#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */
-#define FIFREEZE _IOWR('X', 119, int) /* Freeze */
-#define FITHAW _IOWR('X', 120, int) /* Thaw */
-#define FITRIM _IOWR('X', 121, struct fstrim_range) /* Trim */
-
-#define FS_IOC_GETFLAGS _IOR('f', 1, long)
-#define FS_IOC_SETFLAGS _IOW('f', 2, long)
-#define FS_IOC_GETVERSION _IOR('v', 1, long)
-#define FS_IOC_SETVERSION _IOW('v', 2, long)
-#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
-#define FS_IOC32_GETFLAGS _IOR('f', 1, int)
-#define FS_IOC32_SETFLAGS _IOW('f', 2, int)
-#define FS_IOC32_GETVERSION _IOR('v', 1, int)
-#define FS_IOC32_SETVERSION _IOW('v', 2, int)
-
-/*
- * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
- */
-#define FS_SECRM_FL 0x00000001 /* Secure deletion */
-#define FS_UNRM_FL 0x00000002 /* Undelete */
-#define FS_COMPR_FL 0x00000004 /* Compress file */
-#define FS_SYNC_FL 0x00000008 /* Synchronous updates */
-#define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */
-#define FS_APPEND_FL 0x00000020 /* writes to file may only append */
-#define FS_NODUMP_FL 0x00000040 /* do not dump file */
-#define FS_NOATIME_FL 0x00000080 /* do not update atime */
-/* Reserved for compression usage... */
-#define FS_DIRTY_FL 0x00000100
-#define FS_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
-#define FS_NOCOMP_FL 0x00000400 /* Don't compress */
-#define FS_ECOMPR_FL 0x00000800 /* Compression error */
-/* End compression flags --- maybe not all used */
-#define FS_BTREE_FL 0x00001000 /* btree format dir */
-#define FS_INDEX_FL 0x00001000 /* hash-indexed directory */
-#define FS_IMAGIC_FL 0x00002000 /* AFS directory */
-#define FS_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */
-#define FS_NOTAIL_FL 0x00008000 /* file tail should not be merged */
-#define FS_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
-#define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
-#define FS_EXTENT_FL 0x00080000 /* Extents */
-#define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */
-#define FS_NOCOW_FL 0x00800000 /* Do not cow file */
-#define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
-
-#define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
-#define FS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */
-
-
-#define SYNC_FILE_RANGE_WAIT_BEFORE 1
-#define SYNC_FILE_RANGE_WRITE 2
-#define SYNC_FILE_RANGE_WAIT_AFTER 4
-
-#ifdef __KERNEL__
-
-#include <linux/linkage.h>
-#include <linux/wait.h>
-#include <linux/kdev_t.h>
-#include <linux/dcache.h>
-#include <linux/path.h>
-#include <linux/stat.h>
-#include <linux/cache.h>
-#include <linux/list.h>
-#include <linux/radix-tree.h>
-#include <linux/prio_tree.h>
-#include <linux/init.h>
-#include <linux/pid.h>
-#include <linux/bug.h>
-#include <linux/mutex.h>
-#include <linux/capability.h>
-#include <linux/semaphore.h>
-#include <linux/fiemap.h>
-#include <linux/rculist_bl.h>
-#include <linux/atomic.h>
-#include <linux/shrinker.h>
-#include <linux/migrate_mode.h>
-
-#include <asm/byteorder.h>
-
-struct export_operations;
-struct hd_geometry;
-struct iovec;
-struct nameidata;
-struct kiocb;
-struct kobject;
-struct pipe_inode_info;
-struct poll_table_struct;
-struct kstatfs;
-struct vm_area_struct;
-struct vfsmount;
-struct cred;
-
-extern void __init inode_init(void);
-extern void __init inode_init_early(void);
-extern void __init files_init(unsigned long);
-
-extern struct files_stat_struct files_stat;
-extern unsigned long get_max_files(void);
-extern int sysctl_nr_open;
-extern struct inodes_stat_t inodes_stat;
-extern int leases_enable, lease_break_time;
-
-struct buffer_head;
-typedef int (get_block_t)(struct inode *inode, sector_t iblock,
- struct buffer_head *bh_result, int create);
-typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
- ssize_t bytes, void *private, int ret,
- bool is_async);
-
-/*
- * Attribute flags. These should be or-ed together to figure out what
- * has been changed!
- */
-#define ATTR_MODE (1 << 0)
-#define ATTR_UID (1 << 1)
-#define ATTR_GID (1 << 2)
-#define ATTR_SIZE (1 << 3)
-#define ATTR_ATIME (1 << 4)
-#define ATTR_MTIME (1 << 5)
-#define ATTR_CTIME (1 << 6)
-#define ATTR_ATIME_SET (1 << 7)
-#define ATTR_MTIME_SET (1 << 8)
-#define ATTR_FORCE (1 << 9) /* Not a change, but a change it */
-#define ATTR_ATTR_FLAG (1 << 10)
-#define ATTR_KILL_SUID (1 << 11)
-#define ATTR_KILL_SGID (1 << 12)
-#define ATTR_FILE (1 << 13)
-#define ATTR_KILL_PRIV (1 << 14)
-#define ATTR_OPEN (1 << 15) /* Truncating from open(O_TRUNC) */
-#define ATTR_TIMES_SET (1 << 16)
-
-/*
- * This is the Inode Attributes structure, used for notify_change(). It
- * uses the above definitions as flags, to know which values have changed.
- * Also, in this manner, a Filesystem can look at only the values it cares
- * about. Basically, these are the attributes that the VFS layer can
- * request to change from the FS layer.
- *
- * Derek Atkins <warlord@MIT.EDU> 94-10-20
- */
-struct iattr {
- unsigned int ia_valid;
- umode_t ia_mode;
- uid_t ia_uid;
- gid_t ia_gid;
- loff_t ia_size;
- struct timespec ia_atime;
- struct timespec ia_mtime;
- struct timespec ia_ctime;
-
- /*
- * Not an attribute, but an auxiliary info for filesystems wanting to
- * implement an ftruncate() like method. NOTE: filesystem should
- * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL).
- */
- struct file *ia_file;
-};
-
-/*
- * Includes for diskquotas.
- */
-#include <linux/quota.h>
-
-/**
- * enum positive_aop_returns - aop return codes with specific semantics
- *
- * @AOP_WRITEPAGE_ACTIVATE: Informs the caller that page writeback has
- * completed, that the page is still locked, and
- * should be considered active. The VM uses this hint
- * to return the page to the active list -- it won't
- * be a candidate for writeback again in the near
- * future. Other callers must be careful to unlock
- * the page if they get this return. Returned by
- * writepage();
- *
- * @AOP_TRUNCATED_PAGE: The AOP method that was handed a locked page has
- * unlocked it and the page might have been truncated.
- * The caller should back up to acquiring a new page and
- * trying again. The aop will be taking reasonable
- * precautions not to livelock. If the caller held a page
- * reference, it should drop it before retrying. Returned
- * by readpage().
- *
- * address_space_operation functions return these large constants to indicate
- * special semantics to the caller. These are much larger than the bytes in a
- * page to allow for functions that return the number of bytes operated on in a
- * given page.
- */
-
-enum positive_aop_returns {
- AOP_WRITEPAGE_ACTIVATE = 0x80000,
- AOP_TRUNCATED_PAGE = 0x80001,
-};
-
-#define AOP_FLAG_UNINTERRUPTIBLE 0x0001 /* will not do a short write */
-#define AOP_FLAG_CONT_EXPAND 0x0002 /* called from cont_expand */
-#define AOP_FLAG_NOFS 0x0004 /* used by filesystem to direct
- * helper code (eg buffer layer)
- * to clear GFP_FS from alloc */
-
-/*
- * oh the beauties of C type declarations.
- */
-struct page;
-struct address_space;
-struct writeback_control;
-
-struct iov_iter {
- const struct iovec *iov;
- unsigned long nr_segs;
- size_t iov_offset;
- size_t count;
-};
-
-size_t iov_iter_copy_from_user_atomic(struct page *page,
- struct iov_iter *i, unsigned long offset, size_t bytes);
-size_t iov_iter_copy_from_user(struct page *page,
- struct iov_iter *i, unsigned long offset, size_t bytes);
-void iov_iter_advance(struct iov_iter *i, size_t bytes);
-int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes);
-size_t iov_iter_single_seg_count(struct iov_iter *i);
-
-static inline void iov_iter_init(struct iov_iter *i,
- const struct iovec *iov, unsigned long nr_segs,
- size_t count, size_t written)
-{
- i->iov = iov;
- i->nr_segs = nr_segs;
- i->iov_offset = 0;
- i->count = count + written;
-
- iov_iter_advance(i, written);
-}
-
-static inline size_t iov_iter_count(struct iov_iter *i)
-{
- return i->count;
-}
-
-/*
- * "descriptor" for what we're up to with a read.
- * This allows us to use the same read code yet
- * have multiple different users of the data that
- * we read from a file.
- *
- * The simplest case just copies the data to user
- * mode.
- */
-typedef struct {
- size_t written;
- size_t count;
- union {
- char __user *buf;
- void *data;
- } arg;
- int error;
-} read_descriptor_t;
-
-typedef int (*read_actor_t)(read_descriptor_t *, struct page *,
- unsigned long, unsigned long);
-
-struct address_space_operations {
- int (*writepage)(struct page *page, struct writeback_control *wbc);
- int (*readpage)(struct file *, struct page *);
-
- /* Write back some dirty pages from this mapping. */
- int (*writepages)(struct address_space *, struct writeback_control *);
-
- /* Set a page dirty. Return true if this dirtied it */
- int (*set_page_dirty)(struct page *page);
-
- int (*readpages)(struct file *filp, struct address_space *mapping,
- struct list_head *pages, unsigned nr_pages);
-
- int (*write_begin)(struct file *, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned flags,
- struct page **pagep, void **fsdata);
- int (*write_end)(struct file *, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned copied,
- struct page *page, void *fsdata);
-
- /* Unfortunately this kludge is needed for FIBMAP. Don't use it */
- sector_t (*bmap)(struct address_space *, sector_t);
- void (*invalidatepage) (struct page *, unsigned long);
- int (*releasepage) (struct page *, gfp_t);
- void (*freepage)(struct page *);
- ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
- loff_t offset, unsigned long nr_segs);
- int (*get_xip_mem)(struct address_space *, pgoff_t, int,
- void **, unsigned long *);
- /*
- * migrate the contents of a page to the specified target. If sync
- * is false, it must not block.
- */
- int (*migratepage) (struct address_space *,
- struct page *, struct page *, enum migrate_mode);
- int (*launder_page) (struct page *);
- int (*is_partially_uptodate) (struct page *, read_descriptor_t *,
- unsigned long);
- int (*error_remove_page)(struct address_space *, struct page *);
-};
-
-extern const struct address_space_operations empty_aops;
-
-/*
- * pagecache_write_begin/pagecache_write_end must be used by general code
- * to write into the pagecache.
- */
-int pagecache_write_begin(struct file *, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned flags,
- struct page **pagep, void **fsdata);
-
-int pagecache_write_end(struct file *, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned copied,
- struct page *page, void *fsdata);
-
-struct backing_dev_info;
-struct address_space {
- struct inode *host; /* owner: inode, block_device */
- struct radix_tree_root page_tree; /* radix tree of all pages */
- spinlock_t tree_lock; /* and lock protecting it */
- unsigned int i_mmap_writable;/* count VM_SHARED mappings */
- struct prio_tree_root i_mmap; /* tree of private and shared mappings */
- struct list_head i_mmap_nonlinear;/*list VM_NONLINEAR mappings */
- struct mutex i_mmap_mutex; /* protect tree, count, list */
- /* Protected by tree_lock together with the radix tree */
- unsigned long nrpages; /* number of total pages */
- pgoff_t writeback_index;/* writeback starts here */
- const struct address_space_operations *a_ops; /* methods */
- unsigned long flags; /* error bits/gfp mask */
- struct backing_dev_info *backing_dev_info; /* device readahead, etc */
- spinlock_t private_lock; /* for use by the address_space */
- struct list_head private_list; /* ditto */
- struct address_space *assoc_mapping; /* ditto */
-} __attribute__((aligned(sizeof(long))));
- /*
- * On most architectures that alignment is already the case; but
- * must be enforced here for CRIS, to let the least significant bit
- * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON.
- */
-struct request_queue;
-
-struct block_device {
- dev_t bd_dev; /* not a kdev_t - it's a search key */
- int bd_openers;
- struct inode * bd_inode; /* will die */
- struct super_block * bd_super;
- struct mutex bd_mutex; /* open/close mutex */
- struct list_head bd_inodes;
- void * bd_claiming;
- void * bd_holder;
- int bd_holders;
- bool bd_write_holder;
-#ifdef CONFIG_SYSFS
- struct list_head bd_holder_disks;
-#endif
- struct block_device * bd_contains;
- unsigned bd_block_size;
- struct hd_struct * bd_part;
- /* number of times partitions within this device have been opened. */
- unsigned bd_part_count;
- int bd_invalidated;
- struct gendisk * bd_disk;
- struct request_queue * bd_queue;
- struct list_head bd_list;
- /*
- * Private data. You must have bd_claim'ed the block_device
- * to use this. NOTE: bd_claim allows an owner to claim
- * the same device multiple times, the owner must take special
- * care to not mess up bd_private for that case.
- */
- unsigned long bd_private;
-
- /* The counter of freeze processes */
- int bd_fsfreeze_count;
- /* Mutex for freeze */
- struct mutex bd_fsfreeze_mutex;
-};
-
-/*
- * Radix-tree tags, for tagging dirty and writeback pages within the pagecache
- * radix trees
- */
-#define PAGECACHE_TAG_DIRTY 0
-#define PAGECACHE_TAG_WRITEBACK 1
-#define PAGECACHE_TAG_TOWRITE 2
-
-int mapping_tagged(struct address_space *mapping, int tag);
-
-/*
- * Might pages of this file be mapped into userspace?
- */
-static inline int mapping_mapped(struct address_space *mapping)
-{
- return !prio_tree_empty(&mapping->i_mmap) ||
- !list_empty(&mapping->i_mmap_nonlinear);
-}
-
-/*
- * Might pages of this file have been modified in userspace?
- * Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff
- * marks vma as VM_SHARED if it is shared, and the file was opened for
- * writing i.e. vma may be mprotected writable even if now readonly.
- */
-static inline int mapping_writably_mapped(struct address_space *mapping)
-{
- return mapping->i_mmap_writable != 0;
-}
-
-/*
- * Use sequence counter to get consistent i_size on 32-bit processors.
- */
-#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
-#include <linux/seqlock.h>
-#define __NEED_I_SIZE_ORDERED
-#define i_size_ordered_init(inode) seqcount_init(&inode->i_size_seqcount)
-#else
-#define i_size_ordered_init(inode) do { } while (0)
-#endif
-
-struct posix_acl;
-#define ACL_NOT_CACHED ((void *)(-1))
-
-#define IOP_FASTPERM 0x0001
-#define IOP_LOOKUP 0x0002
-#define IOP_NOFOLLOW 0x0004
-
-/*
- * Keep mostly read-only and often accessed (especially for
- * the RCU path lookup and 'stat' data) fields at the beginning
- * of the 'struct inode'
- */
-struct inode {
- umode_t i_mode;
- unsigned short i_opflags;
- uid_t i_uid;
- gid_t i_gid;
- unsigned int i_flags;
-
-#ifdef CONFIG_FS_POSIX_ACL
- struct posix_acl *i_acl;
- struct posix_acl *i_default_acl;
-#endif
-
- const struct inode_operations *i_op;
- struct super_block *i_sb;
- struct address_space *i_mapping;
-
-#ifdef CONFIG_SECURITY
- void *i_security;
-#endif
-
- /* Stat data, not accessed from path walking */
- unsigned long i_ino;
- /*
- * Filesystems may only read i_nlink directly. They shall use the
- * following functions for modification:
- *
- * (set|clear|inc|drop)_nlink
- * inode_(inc|dec)_link_count
- */
- union {
- const unsigned int i_nlink;
- unsigned int __i_nlink;
- };
- dev_t i_rdev;
- struct timespec i_atime;
- struct timespec i_mtime;
- struct timespec i_ctime;
- spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
- unsigned short i_bytes;
- blkcnt_t i_blocks;
- loff_t i_size;
-
-#ifdef __NEED_I_SIZE_ORDERED
- seqcount_t i_size_seqcount;
-#endif
-
- /* Misc */
- unsigned long i_state;
- struct mutex i_mutex;
-
- unsigned long dirtied_when; /* jiffies of first dirtying */
-
- struct hlist_node i_hash;
- struct list_head i_wb_list; /* backing dev IO list */
- struct list_head i_lru; /* inode LRU list */
- struct list_head i_sb_list;
- union {
- struct list_head i_dentry;
- struct rcu_head i_rcu;
- };
- atomic_t i_count;
- unsigned int i_blkbits;
- u64 i_version;
- atomic_t i_dio_count;
- atomic_t i_writecount;
- const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
- struct file_lock *i_flock;
- struct address_space i_data;
-#ifdef CONFIG_QUOTA
- struct dquot *i_dquot[MAXQUOTAS];
-#endif
- struct list_head i_devices;
- union {
- struct pipe_inode_info *i_pipe;
- struct block_device *i_bdev;
- struct cdev *i_cdev;
- };
-
- __u32 i_generation;
-
-#ifdef CONFIG_FSNOTIFY
- __u32 i_fsnotify_mask; /* all events this inode cares about */
- struct hlist_head i_fsnotify_marks;
-#endif
-
-#ifdef CONFIG_IMA
- atomic_t i_readcount; /* struct files open RO */
-#endif
- void *i_private; /* fs or device private pointer */
-};
-
-static inline int inode_unhashed(struct inode *inode)
-{
- return hlist_unhashed(&inode->i_hash);
-}
-
-/*
- * inode->i_mutex nesting subclasses for the lock validator:
- *
- * 0: the object of the current VFS operation
- * 1: parent
- * 2: child/target
- * 3: quota file
- *
- * The locking order between these classes is
- * parent -> child -> normal -> xattr -> quota
- */
-enum inode_i_mutex_lock_class
-{
- I_MUTEX_NORMAL,
- I_MUTEX_PARENT,
- I_MUTEX_CHILD,
- I_MUTEX_XATTR,
- I_MUTEX_QUOTA
-};
-
-/*
- * NOTE: in a 32bit arch with a preemptable kernel and
- * an UP compile the i_size_read/write must be atomic
- * with respect to the local cpu (unlike with preempt disabled),
- * but they don't need to be atomic with respect to other cpus like in
- * true SMP (so they need either to either locally disable irq around
- * the read or for example on x86 they can be still implemented as a
- * cmpxchg8b without the need of the lock prefix). For SMP compiles
- * and 64bit archs it makes no difference if preempt is enabled or not.
- */
-static inline loff_t i_size_read(const struct inode *inode)
-{
-#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
- loff_t i_size;
- unsigned int seq;
-
- do {
- seq = read_seqcount_begin(&inode->i_size_seqcount);
- i_size = inode->i_size;
- } while (read_seqcount_retry(&inode->i_size_seqcount, seq));
- return i_size;
-#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)
- loff_t i_size;
-
- preempt_disable();
- i_size = inode->i_size;
- preempt_enable();
- return i_size;
-#else
- return inode->i_size;
-#endif
-}
-
-/*
- * NOTE: unlike i_size_read(), i_size_write() does need locking around it
- * (normally i_mutex), otherwise on 32bit/SMP an update of i_size_seqcount
- * can be lost, resulting in subsequent i_size_read() calls spinning forever.
- */
-static inline void i_size_write(struct inode *inode, loff_t i_size)
-{
-#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
- write_seqcount_begin(&inode->i_size_seqcount);
- inode->i_size = i_size;
- write_seqcount_end(&inode->i_size_seqcount);
-#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)
- preempt_disable();
- inode->i_size = i_size;
- preempt_enable();
-#else
- inode->i_size = i_size;
-#endif
-}
-
-static inline unsigned iminor(const struct inode *inode)
-{
- return MINOR(inode->i_rdev);
-}
-
-static inline unsigned imajor(const struct inode *inode)
-{
- return MAJOR(inode->i_rdev);
-}
-
-extern struct block_device *I_BDEV(struct inode *inode);
-
-struct fown_struct {
- rwlock_t lock; /* protects pid, uid, euid fields */
- struct pid *pid; /* pid or -pgrp where SIGIO should be sent */
- enum pid_type pid_type; /* Kind of process group SIGIO should be sent to */
- uid_t uid, euid; /* uid/euid of process setting the owner */
- int signum; /* posix.1b rt signal to be delivered on IO */
-};
-
-/*
- * Track a single file's readahead state
- */
-struct file_ra_state {
- pgoff_t start; /* where readahead started */
- unsigned int size; /* # of readahead pages */
- unsigned int async_size; /* do asynchronous readahead when
- there are only # of pages ahead */
-
- unsigned int ra_pages; /* Maximum readahead window */
- unsigned int mmap_miss; /* Cache miss stat for mmap accesses */
- loff_t prev_pos; /* Cache last read() position */
-};
-
-/*
- * Check if @index falls in the readahead windows.
- */
-static inline int ra_has_index(struct file_ra_state *ra, pgoff_t index)
-{
- return (index >= ra->start &&
- index < ra->start + ra->size);
-}
-
-#define FILE_MNT_WRITE_TAKEN 1
-#define FILE_MNT_WRITE_RELEASED 2
-
-struct file {
- /*
- * fu_list becomes invalid after file_free is called and queued via
- * fu_rcuhead for RCU freeing
- */
- union {
- struct list_head fu_list;
- struct rcu_head fu_rcuhead;
- } f_u;
- struct path f_path;
-#define f_dentry f_path.dentry
-#define f_vfsmnt f_path.mnt
- const struct file_operations *f_op;
-
- /*
- * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR.
- * Must not be taken from IRQ context.
- */
- spinlock_t f_lock;
-#ifdef CONFIG_SMP
- int f_sb_list_cpu;
-#endif
- atomic_long_t f_count;
- unsigned int f_flags;
- fmode_t f_mode;
- loff_t f_pos;
- struct fown_struct f_owner;
- const struct cred *f_cred;
- struct file_ra_state f_ra;
-
- u64 f_version;
-#ifdef CONFIG_SECURITY
- void *f_security;
-#endif
- /* needed for tty driver, and maybe others */
- void *private_data;
-
-#ifdef CONFIG_EPOLL
- /* Used by fs/eventpoll.c to link all the hooks to this file */
- struct list_head f_ep_links;
- struct list_head f_tfile_llink;
-#endif /* #ifdef CONFIG_EPOLL */
- struct address_space *f_mapping;
-#ifdef CONFIG_DEBUG_WRITECOUNT
- unsigned long f_mnt_write_state;
-#endif
-};
-
-struct file_handle {
- __u32 handle_bytes;
- int handle_type;
- /* file identifier */
- unsigned char f_handle[0];
-};
-
-#define get_file(x) atomic_long_inc(&(x)->f_count)
-#define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1)
-#define file_count(x) atomic_long_read(&(x)->f_count)
-
-#ifdef CONFIG_DEBUG_WRITECOUNT
-static inline void file_take_write(struct file *f)
-{
- WARN_ON(f->f_mnt_write_state != 0);
- f->f_mnt_write_state = FILE_MNT_WRITE_TAKEN;
-}
-static inline void file_release_write(struct file *f)
-{
- f->f_mnt_write_state |= FILE_MNT_WRITE_RELEASED;
-}
-static inline void file_reset_write(struct file *f)
-{
- f->f_mnt_write_state = 0;
-}
-static inline void file_check_state(struct file *f)
-{
- /*
- * At this point, either both or neither of these bits
- * should be set.
- */
- WARN_ON(f->f_mnt_write_state == FILE_MNT_WRITE_TAKEN);
- WARN_ON(f->f_mnt_write_state == FILE_MNT_WRITE_RELEASED);
-}
-static inline int file_check_writeable(struct file *f)
-{
- if (f->f_mnt_write_state == FILE_MNT_WRITE_TAKEN)
- return 0;
- printk(KERN_WARNING "writeable file with no "
- "mnt_want_write()\n");
- WARN_ON(1);
- return -EINVAL;
-}
-#else /* !CONFIG_DEBUG_WRITECOUNT */
-static inline void file_take_write(struct file *filp) {}
-static inline void file_release_write(struct file *filp) {}
-static inline void file_reset_write(struct file *filp) {}
-static inline void file_check_state(struct file *filp) {}
-static inline int file_check_writeable(struct file *filp)
-{
- return 0;
-}
-#endif /* CONFIG_DEBUG_WRITECOUNT */
-
-#define MAX_NON_LFS ((1UL<<31) - 1)
-
-/* Page cache limit. The filesystems should put that into their s_maxbytes
- limits, otherwise bad things can happen in VM. */
-#if BITS_PER_LONG==32
-#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
-#elif BITS_PER_LONG==64
-#define MAX_LFS_FILESIZE 0x7fffffffffffffffUL
-#endif
-
-#define FL_POSIX 1
-#define FL_FLOCK 2
-#define FL_ACCESS 8 /* not trying to lock, just looking */
-#define FL_EXISTS 16 /* when unlocking, test for existence */
-#define FL_LEASE 32 /* lease held on this file */
-#define FL_CLOSE 64 /* unlock on close */
-#define FL_SLEEP 128 /* A blocking lock */
-#define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */
-#define FL_UNLOCK_PENDING 512 /* Lease is being broken */
-
-/*
- * Special return value from posix_lock_file() and vfs_lock_file() for
- * asynchronous locking.
- */
-#define FILE_LOCK_DEFERRED 1
-
-/*
- * The POSIX file lock owner is determined by
- * the "struct files_struct" in the thread group
- * (or NULL for no owner - BSD locks).
- *
- * Lockd stuffs a "host" pointer into this.
- */
-typedef struct files_struct *fl_owner_t;
-
-struct file_lock_operations {
- void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
- void (*fl_release_private)(struct file_lock *);
-};
-
-struct lock_manager_operations {
- int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
- void (*lm_notify)(struct file_lock *); /* unblock callback */
- int (*lm_grant)(struct file_lock *, struct file_lock *, int);
- void (*lm_release_private)(struct file_lock *);
- void (*lm_break)(struct file_lock *);
- int (*lm_change)(struct file_lock **, int);
-};
-
-struct lock_manager {
- struct list_head list;
-};
-
-void locks_start_grace(struct lock_manager *);
-void locks_end_grace(struct lock_manager *);
-int locks_in_grace(void);
-
-/* that will die - we need it for nfs_lock_info */
-#include <linux/nfs_fs_i.h>
-
-struct file_lock {
- struct file_lock *fl_next; /* singly linked list for this inode */
- struct list_head fl_link; /* doubly linked list of all locks */
- struct list_head fl_block; /* circular list of blocked processes */
- fl_owner_t fl_owner;
- unsigned int fl_flags;
- unsigned char fl_type;
- unsigned int fl_pid;
- struct pid *fl_nspid;
- wait_queue_head_t fl_wait;
- struct file *fl_file;
- loff_t fl_start;
- loff_t fl_end;
-
- struct fasync_struct * fl_fasync; /* for lease break notifications */
- /* for lease breaks: */
- unsigned long fl_break_time;
- unsigned long fl_downgrade_time;
-
- const struct file_lock_operations *fl_ops; /* Callbacks for filesystems */
- const struct lock_manager_operations *fl_lmops; /* Callbacks for lockmanagers */
- union {
- struct nfs_lock_info nfs_fl;
- struct nfs4_lock_info nfs4_fl;
- struct {
- struct list_head link; /* link in AFS vnode's pending_locks list */
- int state; /* state of grant or error if -ve */
- } afs;
- } fl_u;
-};
-
-/* The following constant reflects the upper bound of the file/locking space */
-#ifndef OFFSET_MAX
-#define INT_LIMIT(x) (~((x)1 << (sizeof(x)*8 - 1)))
-#define OFFSET_MAX INT_LIMIT(loff_t)
-#define OFFT_OFFSET_MAX INT_LIMIT(off_t)
-#endif
-
-#include <linux/fcntl.h>
-
-extern void send_sigio(struct fown_struct *fown, int fd, int band);
-
-#ifdef CONFIG_FILE_LOCKING
-extern int fcntl_getlk(struct file *, struct flock __user *);
-extern int fcntl_setlk(unsigned int, struct file *, unsigned int,
- struct flock __user *);
-
-#if BITS_PER_LONG == 32
-extern int fcntl_getlk64(struct file *, struct flock64 __user *);
-extern int fcntl_setlk64(unsigned int, struct file *, unsigned int,
- struct flock64 __user *);
-#endif
-
-extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg);
-extern int fcntl_getlease(struct file *filp);
-
-/* fs/locks.c */
-void locks_free_lock(struct file_lock *fl);
-extern void locks_init_lock(struct file_lock *);
-extern struct file_lock * locks_alloc_lock(void);
-extern void locks_copy_lock(struct file_lock *, struct file_lock *);
-extern void __locks_copy_lock(struct file_lock *, const struct file_lock *);
-extern void locks_remove_posix(struct file *, fl_owner_t);
-extern void locks_remove_flock(struct file *);
-extern void locks_release_private(struct file_lock *);
-extern void posix_test_lock(struct file *, struct file_lock *);
-extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *);
-extern int posix_lock_file_wait(struct file *, struct file_lock *);
-extern int posix_unblock_lock(struct file *, struct file_lock *);
-extern int vfs_test_lock(struct file *, struct file_lock *);
-extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *);
-extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl);
-extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl);
-extern int __break_lease(struct inode *inode, unsigned int flags);
-extern void lease_get_mtime(struct inode *, struct timespec *time);
-extern int generic_setlease(struct file *, long, struct file_lock **);
-extern int vfs_setlease(struct file *, long, struct file_lock **);
-extern int lease_modify(struct file_lock **, int);
-extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
-extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
-extern void locks_delete_block(struct file_lock *waiter);
-extern void lock_flocks(void);
-extern void unlock_flocks(void);
-#else /* !CONFIG_FILE_LOCKING */
-static inline int fcntl_getlk(struct file *file, struct flock __user *user)
-{
- return -EINVAL;
-}
-
-static inline int fcntl_setlk(unsigned int fd, struct file *file,
- unsigned int cmd, struct flock __user *user)
-{
- return -EACCES;
-}
-
-#if BITS_PER_LONG == 32
-static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user)
-{
- return -EINVAL;
-}
-
-static inline int fcntl_setlk64(unsigned int fd, struct file *file,
- unsigned int cmd, struct flock64 __user *user)
-{
- return -EACCES;
-}
-#endif
-static inline int fcntl_setlease(unsigned int fd, struct file *filp, long arg)
-{
- return 0;
-}
-
-static inline int fcntl_getlease(struct file *filp)
-{
- return 0;
-}
-
-static inline void locks_init_lock(struct file_lock *fl)
-{
- return;
-}
-
-static inline void __locks_copy_lock(struct file_lock *new, struct file_lock *fl)
-{
- return;
-}
-
-static inline void locks_copy_lock(struct file_lock *new, struct file_lock *fl)
-{
- return;
-}
-
-static inline void locks_remove_posix(struct file *filp, fl_owner_t owner)
-{
- return;
-}
-
-static inline void locks_remove_flock(struct file *filp)
-{
- return;
-}
-
-static inline void posix_test_lock(struct file *filp, struct file_lock *fl)
-{
- return;
-}
-
-static inline int posix_lock_file(struct file *filp, struct file_lock *fl,
- struct file_lock *conflock)
-{
- return -ENOLCK;
-}
-
-static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl)
-{
- return -ENOLCK;
-}
-
-static inline int posix_unblock_lock(struct file *filp,
- struct file_lock *waiter)
-{
- return -ENOENT;
-}
-
-static inline int vfs_test_lock(struct file *filp, struct file_lock *fl)
-{
- return 0;
-}
-
-static inline int vfs_lock_file(struct file *filp, unsigned int cmd,
- struct file_lock *fl, struct file_lock *conf)
-{
- return -ENOLCK;
-}
-
-static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl)
-{
- return 0;
-}
-
-static inline int flock_lock_file_wait(struct file *filp,
- struct file_lock *request)
-{
- return -ENOLCK;
-}
-
-static inline int __break_lease(struct inode *inode, unsigned int mode)
-{
- return 0;
-}
-
-static inline void lease_get_mtime(struct inode *inode, struct timespec *time)
-{
- return;
-}
-
-static inline int generic_setlease(struct file *filp, long arg,
- struct file_lock **flp)
-{
- return -EINVAL;
-}
-
-static inline int vfs_setlease(struct file *filp, long arg,
- struct file_lock **lease)
-{
- return -EINVAL;
-}
-
-static inline int lease_modify(struct file_lock **before, int arg)
-{
- return -EINVAL;
-}
-
-static inline int lock_may_read(struct inode *inode, loff_t start,
- unsigned long len)
-{
- return 1;
-}
-
-static inline int lock_may_write(struct inode *inode, loff_t start,
- unsigned long len)
-{
- return 1;
-}
-
-static inline void locks_delete_block(struct file_lock *waiter)
-{
-}
-
-static inline void lock_flocks(void)
-{
-}
-
-static inline void unlock_flocks(void)
-{
-}
-
-#endif /* !CONFIG_FILE_LOCKING */
-
-
-struct fasync_struct {
- spinlock_t fa_lock;
- int magic;
- int fa_fd;
- struct fasync_struct *fa_next; /* singly linked list */
- struct file *fa_file;
- struct rcu_head fa_rcu;
-};
-
-#define FASYNC_MAGIC 0x4601
-
-/* SMP safe fasync helpers: */
-extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
-extern struct fasync_struct *fasync_insert_entry(int, struct file *, struct fasync_struct **, struct fasync_struct *);
-extern int fasync_remove_entry(struct file *, struct fasync_struct **);
-extern struct fasync_struct *fasync_alloc(void);
-extern void fasync_free(struct fasync_struct *);
-
-/* can be called from interrupts */
-extern void kill_fasync(struct fasync_struct **, int, int);
-
-extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
-extern int f_setown(struct file *filp, unsigned long arg, int force);
-extern void f_delown(struct file *filp);
-extern pid_t f_getown(struct file *filp);
-extern int send_sigurg(struct fown_struct *fown);
-
-/*
- * Umount options
- */
-
-#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */
-#define MNT_DETACH 0x00000002 /* Just detach from the tree */
-#define MNT_EXPIRE 0x00000004 /* Mark for expiry */
-#define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */
-#define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */
-
-extern struct list_head super_blocks;
-extern spinlock_t sb_lock;
-
-struct super_block {
- struct list_head s_list; /* Keep this first */
- dev_t s_dev; /* search index; _not_ kdev_t */
- unsigned char s_dirt;
- unsigned char s_blocksize_bits;
- unsigned long s_blocksize;
- loff_t s_maxbytes; /* Max file size */
- struct file_system_type *s_type;
- const struct super_operations *s_op;
- const struct dquot_operations *dq_op;
- const struct quotactl_ops *s_qcop;
- const struct export_operations *s_export_op;
- unsigned long s_flags;
- unsigned long s_magic;
- struct dentry *s_root;
- struct rw_semaphore s_umount;
- struct mutex s_lock;
- int s_count;
- atomic_t s_active;
-#ifdef CONFIG_SECURITY
- void *s_security;
-#endif
- const struct xattr_handler **s_xattr;
-
- struct list_head s_inodes; /* all inodes */
- struct hlist_bl_head s_anon; /* anonymous dentries for (nfs) exporting */
-#ifdef CONFIG_SMP
- struct list_head __percpu *s_files;
-#else
- struct list_head s_files;
-#endif
- struct list_head s_mounts; /* list of mounts; _not_ for fs use */
- /* s_dentry_lru, s_nr_dentry_unused protected by dcache.c lru locks */
- struct list_head s_dentry_lru; /* unused dentry lru */
- int s_nr_dentry_unused; /* # of dentry on lru */
-
- /* s_inode_lru_lock protects s_inode_lru and s_nr_inodes_unused */
- spinlock_t s_inode_lru_lock ____cacheline_aligned_in_smp;
- struct list_head s_inode_lru; /* unused inode lru */
- int s_nr_inodes_unused; /* # of inodes on lru */
-
- struct block_device *s_bdev;
- struct backing_dev_info *s_bdi;
- struct mtd_info *s_mtd;
- struct hlist_node s_instances;
- struct quota_info s_dquot; /* Diskquota specific options */
-
- int s_frozen;
- wait_queue_head_t s_wait_unfrozen;
-
- char s_id[32]; /* Informational name */
- u8 s_uuid[16]; /* UUID */
-
- void *s_fs_info; /* Filesystem private info */
- unsigned int s_max_links;
- fmode_t s_mode;
-
- /* Granularity of c/m/atime in ns.
- Cannot be worse than a second */
- u32 s_time_gran;
-
- /*
- * The next field is for VFS *only*. No filesystems have any business
- * even looking at it. You had been warned.
- */
- struct mutex s_vfs_rename_mutex; /* Kludge */
-
- /*
- * Filesystem subtype. If non-empty the filesystem type field
- * in /proc/mounts will be "type.subtype"
- */
- char *s_subtype;
-
- /*
- * Saved mount options for lazy filesystems using
- * generic_show_options()
- */
- char __rcu *s_options;
- const struct dentry_operations *s_d_op; /* default d_op for dentries */
-
- /*
- * Saved pool identifier for cleancache (-1 means none)
- */
- int cleancache_poolid;
-
- struct shrinker s_shrink; /* per-sb shrinker handle */
-
- /* Number of inodes with nlink == 0 but still referenced */
- atomic_long_t s_remove_count;
-
- /* Being remounted read-only */
- int s_readonly_remount;
-};
-
-/* superblock cache pruning functions */
-extern void prune_icache_sb(struct super_block *sb, int nr_to_scan);
-extern void prune_dcache_sb(struct super_block *sb, int nr_to_scan);
-
-extern struct timespec current_fs_time(struct super_block *sb);
-
-/*
- * Snapshotting support.
- */
-enum {
- SB_UNFROZEN = 0,
- SB_FREEZE_WRITE = 1,
- SB_FREEZE_TRANS = 2,
-};
-
-#define vfs_check_frozen(sb, level) \
- wait_event((sb)->s_wait_unfrozen, ((sb)->s_frozen < (level)))
-
-/*
- * until VFS tracks user namespaces for inodes, just make all files
- * belong to init_user_ns
- */
-extern struct user_namespace init_user_ns;
-#define inode_userns(inode) (&init_user_ns)
-extern bool inode_owner_or_capable(const struct inode *inode);
-
-/* not quite ready to be deprecated, but... */
-extern void lock_super(struct super_block *);
-extern void unlock_super(struct super_block *);
-
-/*
- * VFS helper functions..
- */
-extern int vfs_create(struct inode *, struct dentry *, umode_t, struct nameidata *);
-extern int vfs_mkdir(struct inode *, struct dentry *, umode_t);
-extern int vfs_mknod(struct inode *, struct dentry *, umode_t, dev_t);
-extern int vfs_symlink(struct inode *, struct dentry *, const char *);
-extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
-extern int vfs_rmdir(struct inode *, struct dentry *);
-extern int vfs_unlink(struct inode *, struct dentry *);
-extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
-
-/*
- * VFS dentry helper functions.
- */
-extern void dentry_unhash(struct dentry *dentry);
-
-/*
- * VFS file helper functions.
- */
-extern void inode_init_owner(struct inode *inode, const struct inode *dir,
- umode_t mode);
-/*
- * VFS FS_IOC_FIEMAP helper definitions.
- */
-struct fiemap_extent_info {
- unsigned int fi_flags; /* Flags as passed from user */
- unsigned int fi_extents_mapped; /* Number of mapped extents */
- unsigned int fi_extents_max; /* Size of fiemap_extent array */
- struct fiemap_extent __user *fi_extents_start; /* Start of
- fiemap_extent array */
-};
-int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical,
- u64 phys, u64 len, u32 flags);
-int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags);
-
-/*
- * File types
- *
- * NOTE! These match bits 12..15 of stat.st_mode
- * (ie "(i_mode >> 12) & 15").
- */
-#define DT_UNKNOWN 0
-#define DT_FIFO 1
-#define DT_CHR 2
-#define DT_DIR 4
-#define DT_BLK 6
-#define DT_REG 8
-#define DT_LNK 10
-#define DT_SOCK 12
-#define DT_WHT 14
-
-/*
- * This is the "filldir" function type, used by readdir() to let
- * the kernel specify what kind of dirent layout it wants to have.
- * This allows the kernel to read directories into kernel space or
- * to have different dirent layouts depending on the binary type.
- */
-typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
-struct block_device_operations;
-
-/* These macros are for out of kernel modules to test that
- * the kernel supports the unlocked_ioctl and compat_ioctl
- * fields in struct file_operations. */
-#define HAVE_COMPAT_IOCTL 1
-#define HAVE_UNLOCKED_IOCTL 1
-
-struct file_operations {
- struct module *owner;
- loff_t (*llseek) (struct file *, loff_t, int);
- ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
- ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
- ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
- ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
- int (*readdir) (struct file *, void *, filldir_t);
- unsigned int (*poll) (struct file *, struct poll_table_struct *);
- long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
- long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
- int (*mmap) (struct file *, struct vm_area_struct *);
- int (*open) (struct inode *, struct file *);
- int (*flush) (struct file *, fl_owner_t id);
- int (*release) (struct inode *, struct file *);
- int (*fsync) (struct file *, loff_t, loff_t, int datasync);
- int (*aio_fsync) (struct kiocb *, int datasync);
- int (*fasync) (int, struct file *, int);
- int (*lock) (struct file *, int, struct file_lock *);
- ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
- unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
- int (*check_flags)(int);
- int (*flock) (struct file *, int, struct file_lock *);
- ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
- ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
- int (*setlease)(struct file *, long, struct file_lock **);
- long (*fallocate)(struct file *file, int mode, loff_t offset,
- loff_t len);
-};
-
-struct inode_operations {
- struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- void * (*follow_link) (struct dentry *, struct nameidata *);
- int (*permission) (struct inode *, int);
- struct posix_acl * (*get_acl)(struct inode *, int);
-
- int (*readlink) (struct dentry *, char __user *,int);
- void (*put_link) (struct dentry *, struct nameidata *, void *);
-
- int (*create) (struct inode *,struct dentry *,umode_t,struct nameidata *);
- int (*link) (struct dentry *,struct inode *,struct dentry *);
- int (*unlink) (struct inode *,struct dentry *);
- int (*symlink) (struct inode *,struct dentry *,const char *);
- int (*mkdir) (struct inode *,struct dentry *,umode_t);
- int (*rmdir) (struct inode *,struct dentry *);
- int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
- int (*rename) (struct inode *, struct dentry *,
- struct inode *, struct dentry *);
- void (*truncate) (struct inode *);
- int (*setattr) (struct dentry *, struct iattr *);
- int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
- int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
- ssize_t (*listxattr) (struct dentry *, char *, size_t);
- int (*removexattr) (struct dentry *, const char *);
- void (*truncate_range)(struct inode *, loff_t, loff_t);
- int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
- u64 len);
-} ____cacheline_aligned;
-
-struct seq_file;
-
-ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
- unsigned long nr_segs, unsigned long fast_segs,
- struct iovec *fast_pointer,
- struct iovec **ret_pointer,
- int check_access);
-
-extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
-extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
-extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
- unsigned long, loff_t *);
-extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
- unsigned long, loff_t *);
-
-struct super_operations {
- struct inode *(*alloc_inode)(struct super_block *sb);
- void (*destroy_inode)(struct inode *);
-
- void (*dirty_inode) (struct inode *, int flags);
- int (*write_inode) (struct inode *, struct writeback_control *wbc);
- int (*drop_inode) (struct inode *);
- void (*evict_inode) (struct inode *);
- void (*put_super) (struct super_block *);
- void (*write_super) (struct super_block *);
- int (*sync_fs)(struct super_block *sb, int wait);
- int (*freeze_fs) (struct super_block *);
- int (*unfreeze_fs) (struct super_block *);
- int (*statfs) (struct dentry *, struct kstatfs *);
- int (*remount_fs) (struct super_block *, int *, char *);
- void (*umount_begin) (struct super_block *);
-
- int (*show_options)(struct seq_file *, struct dentry *);
- int (*show_devname)(struct seq_file *, struct dentry *);
- int (*show_path)(struct seq_file *, struct dentry *);
- int (*show_stats)(struct seq_file *, struct dentry *);
-#ifdef CONFIG_QUOTA
- ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
- ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
-#endif
- int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
- int (*nr_cached_objects)(struct super_block *);
- void (*free_cached_objects)(struct super_block *, int);
-};
-
-/*
- * Inode state bits. Protected by inode->i_lock
- *
- * Three bits determine the dirty state of the inode, I_DIRTY_SYNC,
- * I_DIRTY_DATASYNC and I_DIRTY_PAGES.
- *
- * Four bits define the lifetime of an inode. Initially, inodes are I_NEW,
- * until that flag is cleared. I_WILL_FREE, I_FREEING and I_CLEAR are set at
- * various stages of removing an inode.
- *
- * Two bits are used for locking and completion notification, I_NEW and I_SYNC.
- *
- * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on
- * fdatasync(). i_atime is the usual cause.
- * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
- * these changes separately from I_DIRTY_SYNC so that we
- * don't have to write inode on fdatasync() when only
- * mtime has changed in it.
- * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean.
- * I_NEW Serves as both a mutex and completion notification.
- * New inodes set I_NEW. If two processes both create
- * the same inode, one of them will release its inode and
- * wait for I_NEW to be released before returning.
- * Inodes in I_WILL_FREE, I_FREEING or I_CLEAR state can
- * also cause waiting on I_NEW, without I_NEW actually
- * being set. find_inode() uses this to prevent returning
- * nearly-dead inodes.
- * I_WILL_FREE Must be set when calling write_inode_now() if i_count
- * is zero. I_FREEING must be set when I_WILL_FREE is
- * cleared.
- * I_FREEING Set when inode is about to be freed but still has dirty
- * pages or buffers attached or the inode itself is still
- * dirty.
- * I_CLEAR Added by end_writeback(). In this state the inode is clean
- * and can be destroyed. Inode keeps I_FREEING.
- *
- * Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are
- * prohibited for many purposes. iget() must wait for
- * the inode to be completely released, then create it
- * anew. Other functions will just ignore such inodes,
- * if appropriate. I_NEW is used for waiting.
- *
- * I_SYNC Synchonized write of dirty inode data. The bits is
- * set during data writeback, and cleared with a wakeup
- * on the bit address once it is done.
- *
- * I_REFERENCED Marks the inode as recently references on the LRU list.
- *
- * I_DIO_WAKEUP Never set. Only used as a key for wait_on_bit().
- *
- * Q: What is the difference between I_WILL_FREE and I_FREEING?
- */
-#define I_DIRTY_SYNC (1 << 0)
-#define I_DIRTY_DATASYNC (1 << 1)
-#define I_DIRTY_PAGES (1 << 2)
-#define __I_NEW 3
-#define I_NEW (1 << __I_NEW)
-#define I_WILL_FREE (1 << 4)
-#define I_FREEING (1 << 5)
-#define I_CLEAR (1 << 6)
-#define __I_SYNC 7
-#define I_SYNC (1 << __I_SYNC)
-#define I_REFERENCED (1 << 8)
-#define __I_DIO_WAKEUP 9
-#define I_DIO_WAKEUP (1 << I_DIO_WAKEUP)
-
-#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)
-
-extern void __mark_inode_dirty(struct inode *, int);
-static inline void mark_inode_dirty(struct inode *inode)
-{
- __mark_inode_dirty(inode, I_DIRTY);
-}
-
-static inline void mark_inode_dirty_sync(struct inode *inode)
-{
- __mark_inode_dirty(inode, I_DIRTY_SYNC);
-}
-
-extern void inc_nlink(struct inode *inode);
-extern void drop_nlink(struct inode *inode);
-extern void clear_nlink(struct inode *inode);
-extern void set_nlink(struct inode *inode, unsigned int nlink);
-
-static inline void inode_inc_link_count(struct inode *inode)
-{
- inc_nlink(inode);
- mark_inode_dirty(inode);
-}
-
-static inline void inode_dec_link_count(struct inode *inode)
-{
- drop_nlink(inode);
- mark_inode_dirty(inode);
-}
-
-/**
- * inode_inc_iversion - increments i_version
- * @inode: inode that need to be updated
- *
- * Every time the inode is modified, the i_version field will be incremented.
- * The filesystem has to be mounted with i_version flag
- */
-
-static inline void inode_inc_iversion(struct inode *inode)
-{
- spin_lock(&inode->i_lock);
- inode->i_version++;
- spin_unlock(&inode->i_lock);
-}
-
-extern void touch_atime(struct path *);
-static inline void file_accessed(struct file *file)
-{
- if (!(file->f_flags & O_NOATIME))
- touch_atime(&file->f_path);
-}
-
-int sync_inode(struct inode *inode, struct writeback_control *wbc);
-int sync_inode_metadata(struct inode *inode, int wait);
-
-struct file_system_type {
- const char *name;
- int fs_flags;
- struct dentry *(*mount) (struct file_system_type *, int,
- const char *, void *);
- void (*kill_sb) (struct super_block *);
- struct module *owner;
- struct file_system_type * next;
- struct hlist_head fs_supers;
-
- struct lock_class_key s_lock_key;
- struct lock_class_key s_umount_key;
- struct lock_class_key s_vfs_rename_key;
-
- struct lock_class_key i_lock_key;
- struct lock_class_key i_mutex_key;
- struct lock_class_key i_mutex_dir_key;
-};
-
-extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags,
- void *data, int (*fill_super)(struct super_block *, void *, int));
-extern struct dentry *mount_bdev(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data,
- int (*fill_super)(struct super_block *, void *, int));
-extern struct dentry *mount_single(struct file_system_type *fs_type,
- int flags, void *data,
- int (*fill_super)(struct super_block *, void *, int));
-extern struct dentry *mount_nodev(struct file_system_type *fs_type,
- int flags, void *data,
- int (*fill_super)(struct super_block *, void *, int));
-extern struct dentry *mount_subtree(struct vfsmount *mnt, const char *path);
-void generic_shutdown_super(struct super_block *sb);
-void kill_block_super(struct super_block *sb);
-void kill_anon_super(struct super_block *sb);
-void kill_litter_super(struct super_block *sb);
-void deactivate_super(struct super_block *sb);
-void deactivate_locked_super(struct super_block *sb);
-int set_anon_super(struct super_block *s, void *data);
-int get_anon_bdev(dev_t *);
-void free_anon_bdev(dev_t);
-struct super_block *sget(struct file_system_type *type,
- int (*test)(struct super_block *,void *),
- int (*set)(struct super_block *,void *),
- void *data);
-extern struct dentry *mount_pseudo(struct file_system_type *, char *,
- const struct super_operations *ops,
- const struct dentry_operations *dops,
- unsigned long);
-
-/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
-#define fops_get(fops) \
- (((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
-#define fops_put(fops) \
- do { if (fops) module_put((fops)->owner); } while(0)
-
-extern int register_filesystem(struct file_system_type *);
-extern int unregister_filesystem(struct file_system_type *);
-extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data);
-#define kern_mount(type) kern_mount_data(type, NULL)
-extern void kern_unmount(struct vfsmount *mnt);
-extern int may_umount_tree(struct vfsmount *);
-extern int may_umount(struct vfsmount *);
-extern long do_mount(char *, char *, char *, unsigned long, void *);
-extern struct vfsmount *collect_mounts(struct path *);
-extern void drop_collected_mounts(struct vfsmount *);
-extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *,
- struct vfsmount *);
-extern int vfs_statfs(struct path *, struct kstatfs *);
-extern int user_statfs(const char __user *, struct kstatfs *);
-extern int fd_statfs(int, struct kstatfs *);
-extern int vfs_ustat(dev_t, struct kstatfs *);
-extern int freeze_super(struct super_block *super);
-extern int thaw_super(struct super_block *super);
-extern bool our_mnt(struct vfsmount *mnt);
-
-extern int current_umask(void);
-
-/* /sys/fs */
-extern struct kobject *fs_kobj;
-
-#define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK)
-extern int rw_verify_area(int, struct file *, loff_t *, size_t);
-
-#define FLOCK_VERIFY_READ 1
-#define FLOCK_VERIFY_WRITE 2
-
-#ifdef CONFIG_FILE_LOCKING
-extern int locks_mandatory_locked(struct inode *);
-extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t);
-
-/*
- * Candidates for mandatory locking have the setgid bit set
- * but no group execute bit - an otherwise meaningless combination.
- */
-
-static inline int __mandatory_lock(struct inode *ino)
-{
- return (ino->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID;
-}
-
-/*
- * ... and these candidates should be on MS_MANDLOCK mounted fs,
- * otherwise these will be advisory locks
- */
-
-static inline int mandatory_lock(struct inode *ino)
-{
- return IS_MANDLOCK(ino) && __mandatory_lock(ino);
-}
-
-static inline int locks_verify_locked(struct inode *inode)
-{
- if (mandatory_lock(inode))
- return locks_mandatory_locked(inode);
- return 0;
-}
-
-static inline int locks_verify_truncate(struct inode *inode,
- struct file *filp,
- loff_t size)
-{
- if (inode->i_flock && mandatory_lock(inode))
- return locks_mandatory_area(
- FLOCK_VERIFY_WRITE, inode, filp,
- size < inode->i_size ? size : inode->i_size,
- (size < inode->i_size ? inode->i_size - size
- : size - inode->i_size)
- );
- return 0;
-}
-
-static inline int break_lease(struct inode *inode, unsigned int mode)
-{
- if (inode->i_flock)
- return __break_lease(inode, mode);
- return 0;
-}
-#else /* !CONFIG_FILE_LOCKING */
-static inline int locks_mandatory_locked(struct inode *inode)
-{
- return 0;
-}
-
-static inline int locks_mandatory_area(int rw, struct inode *inode,
- struct file *filp, loff_t offset,
- size_t count)
-{
- return 0;
-}
-
-static inline int __mandatory_lock(struct inode *inode)
-{
- return 0;
-}
-
-static inline int mandatory_lock(struct inode *inode)
-{
- return 0;
-}
-
-static inline int locks_verify_locked(struct inode *inode)
-{
- return 0;
-}
-
-static inline int locks_verify_truncate(struct inode *inode, struct file *filp,
- size_t size)
-{
- return 0;
-}
-
-static inline int break_lease(struct inode *inode, unsigned int mode)
-{
- return 0;
-}
-
-#endif /* CONFIG_FILE_LOCKING */
-
-/* fs/open.c */
-
-extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
- struct file *filp);
-extern int do_fallocate(struct file *file, int mode, loff_t offset,
- loff_t len);
-extern long do_sys_open(int dfd, const char __user *filename, int flags,
- umode_t mode);
-extern struct file *filp_open(const char *, int, umode_t);
-extern struct file *file_open_root(struct dentry *, struct vfsmount *,
- const char *, int);
-extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
- const struct cred *);
-extern int filp_close(struct file *, fl_owner_t id);
-extern char * getname(const char __user *);
-
-/* fs/ioctl.c */
-
-extern int ioctl_preallocate(struct file *filp, void __user *argp);
-
-/* fs/dcache.c */
-extern void __init vfs_caches_init_early(void);
-extern void __init vfs_caches_init(unsigned long);
-
-extern struct kmem_cache *names_cachep;
-
-#define __getname_gfp(gfp) kmem_cache_alloc(names_cachep, (gfp))
-#define __getname() __getname_gfp(GFP_KERNEL)
-#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
-#ifndef CONFIG_AUDITSYSCALL
-#define putname(name) __putname(name)
-#else
-extern void putname(const char *name);
-#endif
-
-#ifdef CONFIG_BLOCK
-extern int register_blkdev(unsigned int, const char *);
-extern void unregister_blkdev(unsigned int, const char *);
-extern struct block_device *bdget(dev_t);
-extern struct block_device *bdgrab(struct block_device *bdev);
-extern void bd_set_size(struct block_device *, loff_t size);
-extern sector_t blkdev_max_block(struct block_device *bdev);
-extern void bd_forget(struct inode *inode);
-extern void bdput(struct block_device *);
-extern void invalidate_bdev(struct block_device *);
-extern int sync_blockdev(struct block_device *bdev);
-extern void kill_bdev(struct block_device *);
-extern struct super_block *freeze_bdev(struct block_device *);
-extern void emergency_thaw_all(void);
-extern int thaw_bdev(struct block_device *bdev, struct super_block *sb);
-extern int fsync_bdev(struct block_device *);
-#else
-static inline void bd_forget(struct inode *inode) {}
-static inline int sync_blockdev(struct block_device *bdev) { return 0; }
-static inline void kill_bdev(struct block_device *bdev) {}
-static inline void invalidate_bdev(struct block_device *bdev) {}
-
-static inline struct super_block *freeze_bdev(struct block_device *sb)
-{
- return NULL;
-}
-
-static inline int thaw_bdev(struct block_device *bdev, struct super_block *sb)
-{
- return 0;
-}
-#endif
-extern int sync_filesystem(struct super_block *);
-extern const struct file_operations def_blk_fops;
-extern const struct file_operations def_chr_fops;
-extern const struct file_operations bad_sock_fops;
-extern const struct file_operations def_fifo_fops;
-#ifdef CONFIG_BLOCK
-extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
-extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long);
-extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
-extern int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder);
-extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode,
- void *holder);
-extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode,
- void *holder);
-extern int blkdev_put(struct block_device *bdev, fmode_t mode);
-#ifdef CONFIG_SYSFS
-extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk);
-extern void bd_unlink_disk_holder(struct block_device *bdev,
- struct gendisk *disk);
-#else
-static inline int bd_link_disk_holder(struct block_device *bdev,
- struct gendisk *disk)
-{
- return 0;
-}
-static inline void bd_unlink_disk_holder(struct block_device *bdev,
- struct gendisk *disk)
-{
-}
-#endif
-#endif
-
-/* fs/char_dev.c */
-#define CHRDEV_MAJOR_HASH_SIZE 255
-extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);
-extern int register_chrdev_region(dev_t, unsigned, const char *);
-extern int __register_chrdev(unsigned int major, unsigned int baseminor,
- unsigned int count, const char *name,
- const struct file_operations *fops);
-extern void __unregister_chrdev(unsigned int major, unsigned int baseminor,
- unsigned int count, const char *name);
-extern void unregister_chrdev_region(dev_t, unsigned);
-extern void chrdev_show(struct seq_file *,off_t);
-
-static inline int register_chrdev(unsigned int major, const char *name,
- const struct file_operations *fops)
-{
- return __register_chrdev(major, 0, 256, name, fops);
-}
-
-static inline void unregister_chrdev(unsigned int major, const char *name)
-{
- __unregister_chrdev(major, 0, 256, name);
-}
-
-/* fs/block_dev.c */
-#define BDEVNAME_SIZE 32 /* Largest string for a blockdev identifier */
-#define BDEVT_SIZE 10 /* Largest string for MAJ:MIN for blkdev */
-
-#ifdef CONFIG_BLOCK
-#define BLKDEV_MAJOR_HASH_SIZE 255
-extern const char *__bdevname(dev_t, char *buffer);
-extern const char *bdevname(struct block_device *bdev, char *buffer);
-extern struct block_device *lookup_bdev(const char *);
-extern void blkdev_show(struct seq_file *,off_t);
-
-#else
-#define BLKDEV_MAJOR_HASH_SIZE 0
-#endif
-
-extern void init_special_inode(struct inode *, umode_t, dev_t);
-
-/* Invalid inode operations -- fs/bad_inode.c */
-extern void make_bad_inode(struct inode *);
-extern int is_bad_inode(struct inode *);
-
-extern const struct file_operations read_pipefifo_fops;
-extern const struct file_operations write_pipefifo_fops;
-extern const struct file_operations rdwr_pipefifo_fops;
-
-#ifdef CONFIG_BLOCK
-/*
- * return READ, READA, or WRITE
- */
-#define bio_rw(bio) ((bio)->bi_rw & (RW_MASK | RWA_MASK))
-
-/*
- * return data direction, READ or WRITE
- */
-#define bio_data_dir(bio) ((bio)->bi_rw & 1)
-
-extern void check_disk_size_change(struct gendisk *disk,
- struct block_device *bdev);
-extern int revalidate_disk(struct gendisk *);
-extern int check_disk_change(struct block_device *);
-extern int __invalidate_device(struct block_device *, bool);
-extern int invalidate_partition(struct gendisk *, int);
-#endif
-unsigned long invalidate_mapping_pages(struct address_space *mapping,
- pgoff_t start, pgoff_t end);
-
-static inline void invalidate_remote_inode(struct inode *inode)
-{
- if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
- S_ISLNK(inode->i_mode))
- invalidate_mapping_pages(inode->i_mapping, 0, -1);
-}
-extern int invalidate_inode_pages2(struct address_space *mapping);
-extern int invalidate_inode_pages2_range(struct address_space *mapping,
- pgoff_t start, pgoff_t end);
-extern int write_inode_now(struct inode *, int);
-extern int filemap_fdatawrite(struct address_space *);
-extern int filemap_flush(struct address_space *);
-extern int filemap_fdatawait(struct address_space *);
-extern int filemap_fdatawait_range(struct address_space *, loff_t lstart,
- loff_t lend);
-extern int filemap_write_and_wait(struct address_space *mapping);
-extern int filemap_write_and_wait_range(struct address_space *mapping,
- loff_t lstart, loff_t lend);
-extern int __filemap_fdatawrite_range(struct address_space *mapping,
- loff_t start, loff_t end, int sync_mode);
-extern int filemap_fdatawrite_range(struct address_space *mapping,
- loff_t start, loff_t end);
-
-extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
- int datasync);
-extern int vfs_fsync(struct file *file, int datasync);
-extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
-extern void sync_supers(void);
-extern void emergency_sync(void);
-extern void emergency_remount(void);
-#ifdef CONFIG_BLOCK
-extern sector_t bmap(struct inode *, sector_t);
-#endif
-extern int notify_change(struct dentry *, struct iattr *);
-extern int inode_permission(struct inode *, int);
-extern int generic_permission(struct inode *, int);
-
-static inline bool execute_ok(struct inode *inode)
-{
- return (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode);
-}
-
-/*
- * get_write_access() gets write permission for a file.
- * put_write_access() releases this write permission.
- * This is used for regular files.
- * We cannot support write (and maybe mmap read-write shared) accesses and
- * MAP_DENYWRITE mmappings simultaneously. The i_writecount field of an inode
- * can have the following values:
- * 0: no writers, no VM_DENYWRITE mappings
- * < 0: (-i_writecount) vm_area_structs with VM_DENYWRITE set exist
- * > 0: (i_writecount) users are writing to the file.
- *
- * Normally we operate on that counter with atomic_{inc,dec} and it's safe
- * except for the cases where we don't hold i_writecount yet. Then we need to
- * use {get,deny}_write_access() - these functions check the sign and refuse
- * to do the change if sign is wrong.
- */
-static inline int get_write_access(struct inode *inode)
-{
- return atomic_inc_unless_negative(&inode->i_writecount) ? 0 : -ETXTBSY;
-}
-static inline int deny_write_access(struct file *file)
-{
- struct inode *inode = file->f_path.dentry->d_inode;
- return atomic_dec_unless_positive(&inode->i_writecount) ? 0 : -ETXTBSY;
-}
-static inline void put_write_access(struct inode * inode)
-{
- atomic_dec(&inode->i_writecount);
-}
-static inline void allow_write_access(struct file *file)
-{
- if (file)
- atomic_inc(&file->f_path.dentry->d_inode->i_writecount);
-}
-#ifdef CONFIG_IMA
-static inline void i_readcount_dec(struct inode *inode)
-{
- BUG_ON(!atomic_read(&inode->i_readcount));
- atomic_dec(&inode->i_readcount);
-}
-static inline void i_readcount_inc(struct inode *inode)
-{
- atomic_inc(&inode->i_readcount);
-}
-#else
-static inline void i_readcount_dec(struct inode *inode)
-{
- return;
-}
-static inline void i_readcount_inc(struct inode *inode)
-{
- return;
-}
-#endif
-extern int do_pipe_flags(int *, int);
-extern struct file *create_read_pipe(struct file *f, int flags);
-extern struct file *create_write_pipe(int flags);
-extern void free_write_pipe(struct file *);
-
-extern int kernel_read(struct file *, loff_t, char *, unsigned long);
-extern struct file * open_exec(const char *);
-
-/* fs/dcache.c -- generic fs support functions */
-extern int is_subdir(struct dentry *, struct dentry *);
-extern int path_is_under(struct path *, struct path *);
-extern ino_t find_inode_number(struct dentry *, struct qstr *);
-
-#include <linux/err.h>
-
-/* needed for stackable file system support */
-extern loff_t default_llseek(struct file *file, loff_t offset, int origin);
-
-extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin);
-
-extern int inode_init_always(struct super_block *, struct inode *);
-extern void inode_init_once(struct inode *);
-extern void address_space_init_once(struct address_space *mapping);
-extern void ihold(struct inode * inode);
-extern void iput(struct inode *);
-extern struct inode * igrab(struct inode *);
-extern ino_t iunique(struct super_block *, ino_t);
-extern int inode_needs_sync(struct inode *inode);
-extern int generic_delete_inode(struct inode *inode);
-static inline int generic_drop_inode(struct inode *inode)
-{
- return !inode->i_nlink || inode_unhashed(inode);
-}
-
-extern struct inode *ilookup5_nowait(struct super_block *sb,
- unsigned long hashval, int (*test)(struct inode *, void *),
- void *data);
-extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
- int (*test)(struct inode *, void *), void *data);
-extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
-
-extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
-extern struct inode * iget_locked(struct super_block *, unsigned long);
-extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *);
-extern int insert_inode_locked(struct inode *);
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-extern void lockdep_annotate_inode_mutex_key(struct inode *inode);
-#else
-static inline void lockdep_annotate_inode_mutex_key(struct inode *inode) { };
-#endif
-extern void unlock_new_inode(struct inode *);
-extern unsigned int get_next_ino(void);
-
-extern void __iget(struct inode * inode);
-extern void iget_failed(struct inode *);
-extern void end_writeback(struct inode *);
-extern void __destroy_inode(struct inode *);
-extern struct inode *new_inode_pseudo(struct super_block *sb);
-extern struct inode *new_inode(struct super_block *sb);
-extern void free_inode_nonrcu(struct inode *inode);
-extern int should_remove_suid(struct dentry *);
-extern int file_remove_suid(struct file *);
-
-extern void __insert_inode_hash(struct inode *, unsigned long hashval);
-static inline void insert_inode_hash(struct inode *inode)
-{
- __insert_inode_hash(inode, inode->i_ino);
-}
-
-extern void __remove_inode_hash(struct inode *);
-static inline void remove_inode_hash(struct inode *inode)
-{
- if (!inode_unhashed(inode))
- __remove_inode_hash(inode);
-}
-
-extern void inode_sb_list_add(struct inode *inode);
-
-#ifdef CONFIG_BLOCK
-extern void submit_bio(int, struct bio *);
-extern int bdev_read_only(struct block_device *);
-#endif
-extern int set_blocksize(struct block_device *, int);
-extern int sb_set_blocksize(struct super_block *, int);
-extern int sb_min_blocksize(struct super_block *, int);
-
-extern int generic_file_mmap(struct file *, struct vm_area_struct *);
-extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
-extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
-int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
-extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
-extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long,
- loff_t *);
-extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
-extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
- unsigned long *, loff_t, loff_t *, size_t, size_t);
-extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
- unsigned long, loff_t, loff_t *, size_t, ssize_t);
-extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
-extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
-extern int generic_segment_checks(const struct iovec *iov,
- unsigned long *nr_segs, size_t *count, int access_flags);
-
-/* fs/block_dev.c */
-extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
- unsigned long nr_segs, loff_t pos);
-extern int blkdev_fsync(struct file *filp, loff_t start, loff_t end,
- int datasync);
-extern void block_sync_page(struct page *page);
-
-/* fs/splice.c */
-extern ssize_t generic_file_splice_read(struct file *, loff_t *,
- struct pipe_inode_info *, size_t, unsigned int);
-extern ssize_t default_file_splice_read(struct file *, loff_t *,
- struct pipe_inode_info *, size_t, unsigned int);
-extern ssize_t generic_file_splice_write(struct pipe_inode_info *,
- struct file *, loff_t *, size_t, unsigned int);
-extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe,
- struct file *out, loff_t *, size_t len, unsigned int flags);
-extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
- size_t len, unsigned int flags);
-
-extern void
-file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
-extern loff_t noop_llseek(struct file *file, loff_t offset, int origin);
-extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
-extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
-extern loff_t generic_file_llseek_size(struct file *file, loff_t offset,
- int origin, loff_t maxsize);
-extern int generic_file_open(struct inode * inode, struct file * filp);
-extern int nonseekable_open(struct inode * inode, struct file * filp);
-
-#ifdef CONFIG_FS_XIP
-extern ssize_t xip_file_read(struct file *filp, char __user *buf, size_t len,
- loff_t *ppos);
-extern int xip_file_mmap(struct file * file, struct vm_area_struct * vma);
-extern ssize_t xip_file_write(struct file *filp, const char __user *buf,
- size_t len, loff_t *ppos);
-extern int xip_truncate_page(struct address_space *mapping, loff_t from);
-#else
-static inline int xip_truncate_page(struct address_space *mapping, loff_t from)
-{
- return 0;
-}
-#endif
-
-#ifdef CONFIG_BLOCK
-typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode,
- loff_t file_offset);
-
-enum {
- /* need locking between buffered and direct access */
- DIO_LOCKING = 0x01,
-
- /* filesystem does not support filling holes */
- DIO_SKIP_HOLES = 0x02,
-};
-
-void dio_end_io(struct bio *bio, int error);
-void inode_dio_wait(struct inode *inode);
-void inode_dio_done(struct inode *inode);
-
-ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
- struct block_device *bdev, const struct iovec *iov, loff_t offset,
- unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io,
- dio_submit_t submit_io, int flags);
-
-static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb,
- struct inode *inode, const struct iovec *iov, loff_t offset,
- unsigned long nr_segs, get_block_t get_block)
-{
- return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
- offset, nr_segs, get_block, NULL, NULL,
- DIO_LOCKING | DIO_SKIP_HOLES);
-}
-#else
-static inline void inode_dio_wait(struct inode *inode)
-{
-}
-#endif
-
-extern const struct file_operations generic_ro_fops;
-
-#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
-
-extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
-extern int vfs_follow_link(struct nameidata *, const char *);
-extern int page_readlink(struct dentry *, char __user *, int);
-extern void *page_follow_link_light(struct dentry *, struct nameidata *);
-extern void page_put_link(struct dentry *, struct nameidata *, void *);
-extern int __page_symlink(struct inode *inode, const char *symname, int len,
- int nofs);
-extern int page_symlink(struct inode *inode, const char *symname, int len);
-extern const struct inode_operations page_symlink_inode_operations;
-extern int generic_readlink(struct dentry *, char __user *, int);
-extern void generic_fillattr(struct inode *, struct kstat *);
-extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
-void __inode_add_bytes(struct inode *inode, loff_t bytes);
-void inode_add_bytes(struct inode *inode, loff_t bytes);
-void inode_sub_bytes(struct inode *inode, loff_t bytes);
-loff_t inode_get_bytes(struct inode *inode);
-void inode_set_bytes(struct inode *inode, loff_t bytes);
-
-extern int vfs_readdir(struct file *, filldir_t, void *);
-
-extern int vfs_stat(const char __user *, struct kstat *);
-extern int vfs_lstat(const char __user *, struct kstat *);
-extern int vfs_fstat(unsigned int, struct kstat *);
-extern int vfs_fstatat(int , const char __user *, struct kstat *, int);
-
-extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
- unsigned long arg);
-extern int __generic_block_fiemap(struct inode *inode,
- struct fiemap_extent_info *fieinfo,
- loff_t start, loff_t len,
- get_block_t *get_block);
-extern int generic_block_fiemap(struct inode *inode,
- struct fiemap_extent_info *fieinfo, u64 start,
- u64 len, get_block_t *get_block);
-
-extern void get_filesystem(struct file_system_type *fs);
-extern void put_filesystem(struct file_system_type *fs);
-extern struct file_system_type *get_fs_type(const char *name);
-extern struct super_block *get_super(struct block_device *);
-extern struct super_block *get_super_thawed(struct block_device *);
-extern struct super_block *get_active_super(struct block_device *bdev);
-extern void drop_super(struct super_block *sb);
-extern void iterate_supers(void (*)(struct super_block *, void *), void *);
-extern void iterate_supers_type(struct file_system_type *,
- void (*)(struct super_block *, void *), void *);
-
-extern int dcache_dir_open(struct inode *, struct file *);
-extern int dcache_dir_close(struct inode *, struct file *);
-extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
-extern int dcache_readdir(struct file *, void *, filldir_t);
-extern int simple_setattr(struct dentry *, struct iattr *);
-extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
-extern int simple_statfs(struct dentry *, struct kstatfs *);
-extern int simple_open(struct inode *inode, struct file *file);
-extern int simple_link(struct dentry *, struct inode *, struct dentry *);
-extern int simple_unlink(struct inode *, struct dentry *);
-extern int simple_rmdir(struct inode *, struct dentry *);
-extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
-extern int noop_fsync(struct file *, loff_t, loff_t, int);
-extern int simple_empty(struct dentry *);
-extern int simple_readpage(struct file *file, struct page *page);
-extern int simple_write_begin(struct file *file, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned flags,
- struct page **pagep, void **fsdata);
-extern int simple_write_end(struct file *file, struct address_space *mapping,
- loff_t pos, unsigned len, unsigned copied,
- struct page *page, void *fsdata);
-
-extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
-extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
-extern const struct file_operations simple_dir_operations;
-extern const struct inode_operations simple_dir_inode_operations;
-struct tree_descr { char *name; const struct file_operations *ops; int mode; };
-struct dentry *d_alloc_name(struct dentry *, const char *);
-extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *);
-extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
-extern void simple_release_fs(struct vfsmount **mount, int *count);
-
-extern ssize_t simple_read_from_buffer(void __user *to, size_t count,
- loff_t *ppos, const void *from, size_t available);
-extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos,
- const void __user *from, size_t count);
-
-extern int generic_file_fsync(struct file *, loff_t, loff_t, int);
-
-extern int generic_check_addressable(unsigned, u64);
-
-#ifdef CONFIG_MIGRATION
-extern int buffer_migrate_page(struct address_space *,
- struct page *, struct page *,
- enum migrate_mode);
-#else
-#define buffer_migrate_page NULL
-#endif
-
-extern int inode_change_ok(const struct inode *, struct iattr *);
-extern int inode_newsize_ok(const struct inode *, loff_t offset);
-extern void setattr_copy(struct inode *inode, const struct iattr *attr);
-
-extern void file_update_time(struct file *file);
-
-extern int generic_show_options(struct seq_file *m, struct dentry *root);
-extern void save_mount_options(struct super_block *sb, char *options);
-extern void replace_mount_options(struct super_block *sb, char *options);
-
-static inline ino_t parent_ino(struct dentry *dentry)
-{
- ino_t res;
-
- /*
- * Don't strictly need d_lock here? If the parent ino could change
- * then surely we'd have a deeper race in the caller?
- */
- spin_lock(&dentry->d_lock);
- res = dentry->d_parent->d_inode->i_ino;
- spin_unlock(&dentry->d_lock);
- return res;
-}
-
-/* Transaction based IO helpers */
-
-/*
- * An argresp is stored in an allocated page and holds the
- * size of the argument or response, along with its content
- */
-struct simple_transaction_argresp {
- ssize_t size;
- char data[0];
-};
-
-#define SIMPLE_TRANSACTION_LIMIT (PAGE_SIZE - sizeof(struct simple_transaction_argresp))
-
-char *simple_transaction_get(struct file *file, const char __user *buf,
- size_t size);
-ssize_t simple_transaction_read(struct file *file, char __user *buf,
- size_t size, loff_t *pos);
-int simple_transaction_release(struct inode *inode, struct file *file);
-
-void simple_transaction_set(struct file *file, size_t n);
-
-/*
- * simple attribute files
- *
- * These attributes behave similar to those in sysfs:
- *
- * Writing to an attribute immediately sets a value, an open file can be
- * written to multiple times.
- *
- * Reading from an attribute creates a buffer from the value that might get
- * read with multiple read calls. When the attribute has been read
- * completely, no further read calls are possible until the file is opened
- * again.
- *
- * All attributes contain a text representation of a numeric value
- * that are accessed with the get() and set() functions.
- */
-#define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \
-static int __fops ## _open(struct inode *inode, struct file *file) \
-{ \
- __simple_attr_check_format(__fmt, 0ull); \
- return simple_attr_open(inode, file, __get, __set, __fmt); \
-} \
-static const struct file_operations __fops = { \
- .owner = THIS_MODULE, \
- .open = __fops ## _open, \
- .release = simple_attr_release, \
- .read = simple_attr_read, \
- .write = simple_attr_write, \
- .llseek = generic_file_llseek, \
-};
-
-static inline __printf(1, 2)
-void __simple_attr_check_format(const char *fmt, ...)
-{
- /* don't do anything, just let the compiler check the arguments; */
-}
-
-int simple_attr_open(struct inode *inode, struct file *file,
- int (*get)(void *, u64 *), int (*set)(void *, u64),
- const char *fmt);
-int simple_attr_release(struct inode *inode, struct file *file);
-ssize_t simple_attr_read(struct file *file, char __user *buf,
- size_t len, loff_t *ppos);
-ssize_t simple_attr_write(struct file *file, const char __user *buf,
- size_t len, loff_t *ppos);
-
-struct ctl_table;
-int proc_nr_files(struct ctl_table *table, int write,
- void __user *buffer, size_t *lenp, loff_t *ppos);
-int proc_nr_dentry(struct ctl_table *table, int write,
- void __user *buffer, size_t *lenp, loff_t *ppos);
-int proc_nr_inodes(struct ctl_table *table, int write,
- void __user *buffer, size_t *lenp, loff_t *ppos);
-int __init get_filesystem_list(char *buf);
-
-#define __FMODE_EXEC ((__force int) FMODE_EXEC)
-#define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY)
-
-#define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE])
-#define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \
- (flag & __FMODE_NONOTIFY)))
-
-static inline int is_sxid(umode_t mode)
-{
- return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP));
-}
-
-static inline void inode_has_no_xattr(struct inode *inode)
-{
- if (!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & MS_NOSEC))
- inode->i_flags |= S_NOSEC;
-}
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_FS_H */
diff --git a/original/linux/ftape.h b/original/linux/ftape.h
deleted file mode 100644
index 7e7038c..0000000
--- a/original/linux/ftape.h
+++ /dev/null
@@ -1,201 +0,0 @@
-#ifndef _FTAPE_H
-#define _FTAPE_H
-
-/*
- * Copyright (C) 1994-1996 Bas Laarhoven,
- * (C) 1996-1997 Claus-Justus Heine.
-
- 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, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- *
- * $Source: /homes/cvs/ftape-stacked/include/linux/ftape.h,v $
- * $Revision: 1.17.6.4 $
- * $Date: 1997/11/25 01:52:54 $
- *
- * This file contains global definitions, typedefs and macro's
- * for the QIC-40/80/3010/3020 floppy-tape driver for Linux.
- */
-
-#define FTAPE_VERSION "ftape v3.04d 25/11/97"
-
-#ifdef __KERNEL__
-#include <linux/interrupt.h>
-#include <linux/mm.h>
-#endif
-#include <linux/types.h>
-#include <linux/mtio.h>
-
-#define FT_SECTOR(x) (x+1) /* sector offset into real sector */
-#define FT_SECTOR_SIZE 1024
-#define FT_SECTORS_PER_SEGMENT 32
-#define FT_ECC_SECTORS 3
-#define FT_SEGMENT_SIZE ((FT_SECTORS_PER_SEGMENT - FT_ECC_SECTORS) * FT_SECTOR_SIZE)
-#define FT_BUFF_SIZE (FT_SECTORS_PER_SEGMENT * FT_SECTOR_SIZE)
-
-/*
- * bits of the minor device number that define drive selection
- * methods. Could be used one day to access multiple tape
- * drives on the same controller.
- */
-#define FTAPE_SEL_A 0
-#define FTAPE_SEL_B 1
-#define FTAPE_SEL_C 2
-#define FTAPE_SEL_D 3
-#define FTAPE_SEL_MASK 3
-#define FTAPE_SEL(unit) ((unit) & FTAPE_SEL_MASK)
-#define FTAPE_NO_REWIND 4 /* mask for minor nr */
-
-/* the following two may be reported when MTIOCGET is requested ... */
-typedef union {
- struct {
- __u8 error;
- __u8 command;
- } error;
- long space;
-} ft_drive_error;
-typedef union {
- struct {
- __u8 drive_status;
- __u8 drive_config;
- __u8 tape_status;
- } status;
- long space;
-} ft_drive_status;
-
-#ifdef __KERNEL__
-
-#define FT_RQM_DELAY 12
-#define FT_MILLISECOND 1
-#define FT_SECOND 1000
-#define FT_FOREVER -1
-#ifndef HZ
-#error "HZ undefined."
-#endif
-#define FT_USPT (1000000/HZ) /* microseconds per tick */
-
-/* This defines the number of retries that the driver will allow
- * before giving up (and letting a higher level handle the error).
- */
-#ifdef TESTING
-#define FT_SOFT_RETRIES 1 /* number of low level retries */
-#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
-#else
-#define FT_SOFT_RETRIES 6 /* number of low level retries (triple) */
-#define FT_RETRIES_ON_ECC_ERROR 3 /* ecc error when correcting segment */
-#endif
-
-#ifndef THE_FTAPE_MAINTAINER
-#define THE_FTAPE_MAINTAINER "the ftape maintainer"
-#endif
-
-/* Initialize missing configuration parameters.
- */
-#ifndef CONFIG_FT_NR_BUFFERS
-# define CONFIG_FT_NR_BUFFERS 3
-#endif
-#ifndef CONFIG_FT_FDC_THR
-# define CONFIG_FT_FDC_THR 8
-#endif
-#ifndef CONFIG_FT_FDC_MAX_RATE
-# define CONFIG_FT_FDC_MAX_RATE 2000
-#endif
-#ifndef CONFIG_FT_FDC_BASE
-# define CONFIG_FT_FDC_BASE 0
-#endif
-#ifndef CONFIG_FT_FDC_IRQ
-# define CONFIG_FT_FDC_IRQ 0
-#endif
-#ifndef CONFIG_FT_FDC_DMA
-# define CONFIG_FT_FDC_DMA 0
-#endif
-
-/* Turn some booleans into numbers.
- */
-#ifdef CONFIG_FT_PROBE_FC10
-# undef CONFIG_FT_PROBE_FC10
-# define CONFIG_FT_PROBE_FC10 1
-#else
-# define CONFIG_FT_PROBE_FC10 0
-#endif
-#ifdef CONFIG_FT_MACH2
-# undef CONFIG_FT_MACH2
-# define CONFIG_FT_MACH2 1
-#else
-# define CONFIG_FT_MACH2 0
-#endif
-
-/* Insert default settings
- */
-#if CONFIG_FT_PROBE_FC10 == 1
-# if CONFIG_FT_FDC_BASE == 0
-# undef CONFIG_FT_FDC_BASE
-# define CONFIG_FT_FDC_BASE 0x180
-# endif
-# if CONFIG_FT_FDC_IRQ == 0
-# undef CONFIG_FT_FDC_IRQ
-# define CONFIG_FT_FDC_IRQ 9
-# endif
-# if CONFIG_FT_FDC_DMA == 0
-# undef CONFIG_FT_FDC_DMA
-# define CONFIG_FT_FDC_DMA 3
-# endif
-#elif CONFIG_FT_MACH2 == 1 /* CONFIG_FT_PROBE_FC10 == 1 */
-# if CONFIG_FT_FDC_BASE == 0
-# undef CONFIG_FT_FDC_BASE
-# define CONFIG_FT_FDC_BASE 0x1E0
-# endif
-# if CONFIG_FT_FDC_IRQ == 0
-# undef CONFIG_FT_FDC_IRQ
-# define CONFIG_FT_FDC_IRQ 6
-# endif
-# if CONFIG_FT_FDC_DMA == 0
-# undef CONFIG_FT_FDC_DMA
-# define CONFIG_FT_FDC_DMA 2
-# endif
-#elif defined(CONFIG_FT_ALT_FDC) /* CONFIG_FT_MACH2 */
-# if CONFIG_FT_FDC_BASE == 0
-# undef CONFIG_FT_FDC_BASE
-# define CONFIG_FT_FDC_BASE 0x370
-# endif
-# if CONFIG_FT_FDC_IRQ == 0
-# undef CONFIG_FT_FDC_IRQ
-# define CONFIG_FT_FDC_IRQ 6
-# endif
-# if CONFIG_FT_FDC_DMA == 0
-# undef CONFIG_FT_FDC_DMA
-# define CONFIG_FT_FDC_DMA 2
-# endif
-#else /* CONFIG_FT_ALT_FDC */
-# if CONFIG_FT_FDC_BASE == 0
-# undef CONFIG_FT_FDC_BASE
-# define CONFIG_FT_FDC_BASE 0x3f0
-# endif
-# if CONFIG_FT_FDC_IRQ == 0
-# undef CONFIG_FT_FDC_IRQ
-# define CONFIG_FT_FDC_IRQ 6
-# endif
-# if CONFIG_FT_FDC_DMA == 0
-# undef CONFIG_FT_FDC_DMA
-# define CONFIG_FT_FDC_DMA 2
-# endif
-#endif /* standard FDC */
-
-/* some useful macro's
- */
-#define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x))
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/futex.h b/original/linux/futex.h
deleted file mode 100644
index d097b5b..0000000
--- a/original/linux/futex.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#ifndef _LINUX_FUTEX_H
-#define _LINUX_FUTEX_H
-
-#include <linux/sched.h>
-
-/* Second argument to futex syscall */
-
-
-#define FUTEX_WAIT 0
-#define FUTEX_WAKE 1
-#define FUTEX_FD 2
-#define FUTEX_REQUEUE 3
-#define FUTEX_CMP_REQUEUE 4
-#define FUTEX_WAKE_OP 5
-#define FUTEX_LOCK_PI 6
-#define FUTEX_UNLOCK_PI 7
-#define FUTEX_TRYLOCK_PI 8
-
-/*
- * Support for robust futexes: the kernel cleans up held futexes at
- * thread exit time.
- */
-
-/*
- * Per-lock list entry - embedded in user-space locks, somewhere close
- * to the futex field. (Note: user-space uses a double-linked list to
- * achieve O(1) list add and remove, but the kernel only needs to know
- * about the forward link)
- *
- * NOTE: this structure is part of the syscall ABI, and must not be
- * changed.
- */
-struct robust_list {
- struct robust_list __user *next;
-};
-
-/*
- * Per-thread list head:
- *
- * NOTE: this structure is part of the syscall ABI, and must only be
- * changed if the change is first communicated with the glibc folks.
- * (When an incompatible change is done, we'll increase the structure
- * size, which glibc will detect)
- */
-struct robust_list_head {
- /*
- * The head of the list. Points back to itself if empty:
- */
- struct robust_list list;
-
- /*
- * This relative offset is set by user-space, it gives the kernel
- * the relative position of the futex field to examine. This way
- * we keep userspace flexible, to freely shape its data-structure,
- * without hardcoding any particular offset into the kernel:
- */
- long futex_offset;
-
- /*
- * The death of the thread may race with userspace setting
- * up a lock's links. So to handle this race, userspace first
- * sets this field to the address of the to-be-taken lock,
- * then does the lock acquire, and then adds itself to the
- * list, and then clears this field. Hence the kernel will
- * always have full knowledge of all locks that the thread
- * _might_ have taken. We check the owner TID in any case,
- * so only truly owned locks will be handled.
- */
- struct robust_list __user *list_op_pending;
-};
-
-/*
- * Are there any waiters for this robust futex:
- */
-#define FUTEX_WAITERS 0x80000000
-
-/*
- * The kernel signals via this bit that a thread holding a futex
- * has exited without unlocking the futex. The kernel also does
- * a FUTEX_WAKE on such futexes, after setting the bit, to wake
- * up any possible waiters:
- */
-#define FUTEX_OWNER_DIED 0x40000000
-
-/*
- * The rest of the robust-futex field is for the TID:
- */
-#define FUTEX_TID_MASK 0x3fffffff
-
-/*
- * This limit protects against a deliberately circular list.
- * (Not worth introducing an rlimit for it)
- */
-#define ROBUST_LIST_LIMIT 2048
-
-long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout,
- u32 __user *uaddr2, u32 val2, u32 val3);
-
-extern int
-handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi);
-
-#ifdef CONFIG_FUTEX
-extern void exit_robust_list(struct task_struct *curr);
-extern void exit_pi_state_list(struct task_struct *curr);
-#else
-static inline void exit_robust_list(struct task_struct *curr)
-{
-}
-static inline void exit_pi_state_list(struct task_struct *curr)
-{
-}
-#endif
-
-#define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */
-#define FUTEX_OP_ADD 1 /* *(int *)UADDR2 += OPARG; */
-#define FUTEX_OP_OR 2 /* *(int *)UADDR2 |= OPARG; */
-#define FUTEX_OP_ANDN 3 /* *(int *)UADDR2 &= ~OPARG; */
-#define FUTEX_OP_XOR 4 /* *(int *)UADDR2 ^= OPARG; */
-
-#define FUTEX_OP_OPARG_SHIFT 8 /* Use (1 << OPARG) instead of OPARG. */
-
-#define FUTEX_OP_CMP_EQ 0 /* if (oldval == CMPARG) wake */
-#define FUTEX_OP_CMP_NE 1 /* if (oldval != CMPARG) wake */
-#define FUTEX_OP_CMP_LT 2 /* if (oldval < CMPARG) wake */
-#define FUTEX_OP_CMP_LE 3 /* if (oldval <= CMPARG) wake */
-#define FUTEX_OP_CMP_GT 4 /* if (oldval > CMPARG) wake */
-#define FUTEX_OP_CMP_GE 5 /* if (oldval >= CMPARG) wake */
-
-/* FUTEX_WAKE_OP will perform atomically
- int oldval = *(int *)UADDR2;
- *(int *)UADDR2 = oldval OP OPARG;
- if (oldval CMP CMPARG)
- wake UADDR2; */
-
-#define FUTEX_OP(op, oparg, cmp, cmparg) \
- (((op & 0xf) << 28) | ((cmp & 0xf) << 24) \
- | ((oparg & 0xfff) << 12) | (cmparg & 0xfff))
-
-#endif
diff --git a/original/linux/genetlink.h b/original/linux/genetlink.h
deleted file mode 100644
index 61549b2..0000000
--- a/original/linux/genetlink.h
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef __LINUX_GENERIC_NETLINK_H
-#define __LINUX_GENERIC_NETLINK_H
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-
-#define GENL_NAMSIZ 16 /* length of family name */
-
-#define GENL_MIN_ID NLMSG_MIN_TYPE
-#define GENL_MAX_ID 1023
-
-struct genlmsghdr {
- __u8 cmd;
- __u8 version;
- __u16 reserved;
-};
-
-#define GENL_HDRLEN NLMSG_ALIGN(sizeof(struct genlmsghdr))
-
-#define GENL_ADMIN_PERM 0x01
-#define GENL_CMD_CAP_DO 0x02
-#define GENL_CMD_CAP_DUMP 0x04
-#define GENL_CMD_CAP_HASPOL 0x08
-
-/*
- * List of reserved static generic netlink identifiers:
- */
-#define GENL_ID_GENERATE 0
-#define GENL_ID_CTRL NLMSG_MIN_TYPE
-
-/**************************************************************************
- * Controller
- **************************************************************************/
-
-enum {
- CTRL_CMD_UNSPEC,
- CTRL_CMD_NEWFAMILY,
- CTRL_CMD_DELFAMILY,
- CTRL_CMD_GETFAMILY,
- CTRL_CMD_NEWOPS,
- CTRL_CMD_DELOPS,
- CTRL_CMD_GETOPS,
- CTRL_CMD_NEWMCAST_GRP,
- CTRL_CMD_DELMCAST_GRP,
- CTRL_CMD_GETMCAST_GRP, /* unused */
- __CTRL_CMD_MAX,
-};
-
-#define CTRL_CMD_MAX (__CTRL_CMD_MAX - 1)
-
-enum {
- CTRL_ATTR_UNSPEC,
- CTRL_ATTR_FAMILY_ID,
- CTRL_ATTR_FAMILY_NAME,
- CTRL_ATTR_VERSION,
- CTRL_ATTR_HDRSIZE,
- CTRL_ATTR_MAXATTR,
- CTRL_ATTR_OPS,
- CTRL_ATTR_MCAST_GROUPS,
- __CTRL_ATTR_MAX,
-};
-
-#define CTRL_ATTR_MAX (__CTRL_ATTR_MAX - 1)
-
-enum {
- CTRL_ATTR_OP_UNSPEC,
- CTRL_ATTR_OP_ID,
- CTRL_ATTR_OP_FLAGS,
- __CTRL_ATTR_OP_MAX,
-};
-
-#define CTRL_ATTR_OP_MAX (__CTRL_ATTR_OP_MAX - 1)
-
-enum {
- CTRL_ATTR_MCAST_GRP_UNSPEC,
- CTRL_ATTR_MCAST_GRP_NAME,
- CTRL_ATTR_MCAST_GRP_ID,
- __CTRL_ATTR_MCAST_GRP_MAX,
-};
-
-#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
-
-#ifdef __KERNEL__
-
-/* All generic netlink requests are serialized by a global lock. */
-extern void genl_lock(void);
-extern void genl_unlock(void);
-
-#endif /* __KERNEL__ */
-
-#endif /* __LINUX_GENERIC_NETLINK_H */
diff --git a/original/linux/genhd.h b/original/linux/genhd.h
deleted file mode 100644
index e4af57e..0000000
--- a/original/linux/genhd.h
+++ /dev/null
@@ -1,422 +0,0 @@
-#ifndef _LINUX_GENHD_H
-#define _LINUX_GENHD_H
-
-/*
- * genhd.h Copyright (C) 1992 Drew Eckhardt
- * Generic hard disk header file by
- * Drew Eckhardt
- *
- * <drew@colorado.edu>
- */
-
-#include <linux/types.h>
-
-enum {
-/* These three have identical behaviour; use the second one if DOS FDISK gets
- confused about extended/logical partitions starting past cylinder 1023. */
- DOS_EXTENDED_PARTITION = 5,
- LINUX_EXTENDED_PARTITION = 0x85,
- WIN98_EXTENDED_PARTITION = 0x0f,
-
- LINUX_SWAP_PARTITION = 0x82,
- LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
-
- SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
- NEW_SOLARIS_X86_PARTITION = 0xbf,
-
- DM6_AUX1PARTITION = 0x51, /* no DDO: use xlated geom */
- DM6_AUX3PARTITION = 0x53, /* no DDO: use xlated geom */
- DM6_PARTITION = 0x54, /* has DDO: use xlated geom & offset */
- EZD_PARTITION = 0x55, /* EZ-DRIVE */
-
- FREEBSD_PARTITION = 0xa5, /* FreeBSD Partition ID */
- OPENBSD_PARTITION = 0xa6, /* OpenBSD Partition ID */
- NETBSD_PARTITION = 0xa9, /* NetBSD Partition ID */
- BSDI_PARTITION = 0xb7, /* BSDI Partition ID */
- MINIX_PARTITION = 0x81, /* Minix Partition ID */
- UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */
-};
-
-#ifndef __KERNEL__
-
-struct partition {
- unsigned char boot_ind; /* 0x80 - active */
- unsigned char head; /* starting head */
- unsigned char sector; /* starting sector */
- unsigned char cyl; /* starting cylinder */
- unsigned char sys_ind; /* What partition type */
- unsigned char end_head; /* end head */
- unsigned char end_sector; /* end sector */
- unsigned char end_cyl; /* end cylinder */
- unsigned int start_sect; /* starting sector counting from 0 */
- unsigned int nr_sects; /* nr of sectors in partition */
-} __attribute__((packed));
-
-#endif
-
-#ifdef __KERNEL__
-#include <linux/major.h>
-#include <linux/device.h>
-#include <linux/smp.h>
-#include <linux/string.h>
-#include <linux/fs.h>
-
-struct partition {
- unsigned char boot_ind; /* 0x80 - active */
- unsigned char head; /* starting head */
- unsigned char sector; /* starting sector */
- unsigned char cyl; /* starting cylinder */
- unsigned char sys_ind; /* What partition type */
- unsigned char end_head; /* end head */
- unsigned char end_sector; /* end sector */
- unsigned char end_cyl; /* end cylinder */
- __le32 start_sect; /* starting sector counting from 0 */
- __le32 nr_sects; /* nr of sectors in partition */
-} __attribute__((packed));
-
-struct hd_struct {
- sector_t start_sect;
- sector_t nr_sects;
- struct kobject kobj;
- struct kobject *holder_dir;
- unsigned ios[2], sectors[2]; /* READs and WRITEs */
- int policy, partno;
-};
-
-#define GENHD_FL_REMOVABLE 1
-#define GENHD_FL_DRIVERFS 2
-#define GENHD_FL_CD 8
-#define GENHD_FL_UP 16
-#define GENHD_FL_SUPPRESS_PARTITION_INFO 32
-
-struct disk_stats {
- unsigned long sectors[2]; /* READs and WRITEs */
- unsigned long ios[2];
- unsigned long merges[2];
- unsigned long ticks[2];
- unsigned long io_ticks;
- unsigned long time_in_queue;
-};
-
-struct gendisk {
- int major; /* major number of driver */
- int first_minor;
- int minors; /* maximum number of minors, =1 for
- * disks that can't be partitioned. */
- char disk_name[32]; /* name of major driver */
- struct hd_struct **part; /* [indexed by minor] */
- int part_uevent_suppress;
- struct block_device_operations *fops;
- struct request_queue *queue;
- void *private_data;
- sector_t capacity;
-
- int flags;
- struct device *driverfs_dev;
- struct kobject kobj;
- struct kobject *holder_dir;
- struct kobject *slave_dir;
-
- struct timer_rand_state *random;
- int policy;
-
- atomic_t sync_io; /* RAID */
- unsigned long stamp;
- int in_flight;
-#ifdef CONFIG_SMP
- struct disk_stats *dkstats;
-#else
- struct disk_stats dkstats;
-#endif
-};
-
-/* Structure for sysfs attributes on block devices */
-struct disk_attribute {
- struct attribute attr;
- ssize_t (*show)(struct gendisk *, char *);
- ssize_t (*store)(struct gendisk *, const char *, size_t);
-};
-
-/*
- * Macros to operate on percpu disk statistics:
- *
- * The __ variants should only be called in critical sections. The full
- * variants disable/enable preemption.
- */
-#ifdef CONFIG_SMP
-#define __disk_stat_add(gendiskp, field, addnd) \
- (per_cpu_ptr(gendiskp->dkstats, smp_processor_id())->field += addnd)
-
-#define disk_stat_read(gendiskp, field) \
-({ \
- typeof(gendiskp->dkstats->field) res = 0; \
- int i; \
- for_each_possible_cpu(i) \
- res += per_cpu_ptr(gendiskp->dkstats, i)->field; \
- res; \
-})
-
-static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) {
- int i;
- for_each_possible_cpu(i)
- memset(per_cpu_ptr(gendiskp->dkstats, i), value,
- sizeof (struct disk_stats));
-}
-
-#else
-#define __disk_stat_add(gendiskp, field, addnd) \
- (gendiskp->dkstats.field += addnd)
-#define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field)
-
-static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) {
- memset(&gendiskp->dkstats, value, sizeof (struct disk_stats));
-}
-#endif
-
-#define disk_stat_add(gendiskp, field, addnd) \
- do { \
- preempt_disable(); \
- __disk_stat_add(gendiskp, field, addnd); \
- preempt_enable(); \
- } while (0)
-
-#define __disk_stat_dec(gendiskp, field) __disk_stat_add(gendiskp, field, -1)
-#define disk_stat_dec(gendiskp, field) disk_stat_add(gendiskp, field, -1)
-
-#define __disk_stat_inc(gendiskp, field) __disk_stat_add(gendiskp, field, 1)
-#define disk_stat_inc(gendiskp, field) disk_stat_add(gendiskp, field, 1)
-
-#define __disk_stat_sub(gendiskp, field, subnd) \
- __disk_stat_add(gendiskp, field, -subnd)
-#define disk_stat_sub(gendiskp, field, subnd) \
- disk_stat_add(gendiskp, field, -subnd)
-
-
-/* Inlines to alloc and free disk stats in struct gendisk */
-#ifdef CONFIG_SMP
-static inline int init_disk_stats(struct gendisk *disk)
-{
- disk->dkstats = alloc_percpu(struct disk_stats);
- if (!disk->dkstats)
- return 0;
- return 1;
-}
-
-static inline void free_disk_stats(struct gendisk *disk)
-{
- free_percpu(disk->dkstats);
-}
-#else /* CONFIG_SMP */
-static inline int init_disk_stats(struct gendisk *disk)
-{
- return 1;
-}
-
-static inline void free_disk_stats(struct gendisk *disk)
-{
-}
-#endif /* CONFIG_SMP */
-
-/* drivers/block/ll_rw_blk.c */
-extern void disk_round_stats(struct gendisk *disk);
-
-/* drivers/block/genhd.c */
-extern int get_blkdev_list(char *, int);
-extern void add_disk(struct gendisk *disk);
-extern void del_gendisk(struct gendisk *gp);
-extern void unlink_gendisk(struct gendisk *gp);
-extern struct gendisk *get_gendisk(dev_t dev, int *part);
-
-extern void set_device_ro(struct block_device *bdev, int flag);
-extern void set_disk_ro(struct gendisk *disk, int flag);
-
-/* drivers/char/random.c */
-extern void add_disk_randomness(struct gendisk *disk);
-extern void rand_initialize_disk(struct gendisk *disk);
-
-static inline sector_t get_start_sect(struct block_device *bdev)
-{
- return bdev->bd_contains == bdev ? 0 : bdev->bd_part->start_sect;
-}
-static inline sector_t get_capacity(struct gendisk *disk)
-{
- return disk->capacity;
-}
-static inline void set_capacity(struct gendisk *disk, sector_t size)
-{
- disk->capacity = size;
-}
-
-#endif /* __KERNEL__ */
-
-#ifdef CONFIG_SOLARIS_X86_PARTITION
-
-#define SOLARIS_X86_NUMSLICE 8
-#define SOLARIS_X86_VTOC_SANE (0x600DDEEEUL)
-
-struct solaris_x86_slice {
- __le16 s_tag; /* ID tag of partition */
- __le16 s_flag; /* permission flags */
- __le32 s_start; /* start sector no of partition */
- __le32 s_size; /* # of blocks in partition */
-};
-
-struct solaris_x86_vtoc {
- unsigned int v_bootinfo[3]; /* info needed by mboot (unsupported) */
- __le32 v_sanity; /* to verify vtoc sanity */
- __le32 v_version; /* layout version */
- char v_volume[8]; /* volume name */
- __le16 v_sectorsz; /* sector size in bytes */
- __le16 v_nparts; /* number of partitions */
- unsigned int v_reserved[10]; /* free space */
- struct solaris_x86_slice
- v_slice[SOLARIS_X86_NUMSLICE]; /* slice headers */
- unsigned int timestamp[SOLARIS_X86_NUMSLICE]; /* timestamp (unsupported) */
- char v_asciilabel[128]; /* for compatibility */
-};
-
-#endif /* CONFIG_SOLARIS_X86_PARTITION */
-
-#ifdef CONFIG_BSD_DISKLABEL
-/*
- * BSD disklabel support by Yossi Gottlieb <yogo@math.tau.ac.il>
- * updated by Marc Espie <Marc.Espie@openbsd.org>
- */
-
-/* check against BSD src/sys/sys/disklabel.h for consistency */
-
-#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
-#define BSD_MAXPARTITIONS 16
-#define OPENBSD_MAXPARTITIONS 16
-#define BSD_FS_UNUSED 0 /* disklabel unused partition entry ID */
-struct bsd_disklabel {
- __le32 d_magic; /* the magic number */
- __s16 d_type; /* drive type */
- __s16 d_subtype; /* controller/d_type specific */
- char d_typename[16]; /* type name, e.g. "eagle" */
- char d_packname[16]; /* pack identifier */
- __u32 d_secsize; /* # of bytes per sector */
- __u32 d_nsectors; /* # of data sectors per track */
- __u32 d_ntracks; /* # of tracks per cylinder */
- __u32 d_ncylinders; /* # of data cylinders per unit */
- __u32 d_secpercyl; /* # of data sectors per cylinder */
- __u32 d_secperunit; /* # of data sectors per unit */
- __u16 d_sparespertrack; /* # of spare sectors per track */
- __u16 d_sparespercyl; /* # of spare sectors per cylinder */
- __u32 d_acylinders; /* # of alt. cylinders per unit */
- __u16 d_rpm; /* rotational speed */
- __u16 d_interleave; /* hardware sector interleave */
- __u16 d_trackskew; /* sector 0 skew, per track */
- __u16 d_cylskew; /* sector 0 skew, per cylinder */
- __u32 d_headswitch; /* head switch time, usec */
- __u32 d_trkseek; /* track-to-track seek, usec */
- __u32 d_flags; /* generic flags */
-#define NDDATA 5
- __u32 d_drivedata[NDDATA]; /* drive-type specific information */
-#define NSPARE 5
- __u32 d_spare[NSPARE]; /* reserved for future use */
- __le32 d_magic2; /* the magic number (again) */
- __le16 d_checksum; /* xor of data incl. partitions */
-
- /* filesystem and partition information: */
- __le16 d_npartitions; /* number of partitions in following */
- __le32 d_bbsize; /* size of boot area at sn0, bytes */
- __le32 d_sbsize; /* max size of fs superblock, bytes */
- struct bsd_partition { /* the partition table */
- __le32 p_size; /* number of sectors in partition */
- __le32 p_offset; /* starting sector */
- __le32 p_fsize; /* filesystem basic fragment size */
- __u8 p_fstype; /* filesystem type, see below */
- __u8 p_frag; /* filesystem fragments per block */
- __le16 p_cpg; /* filesystem cylinders per group */
- } d_partitions[BSD_MAXPARTITIONS]; /* actually may be more */
-};
-
-#endif /* CONFIG_BSD_DISKLABEL */
-
-#ifdef CONFIG_UNIXWARE_DISKLABEL
-/*
- * Unixware slices support by Andrzej Krzysztofowicz <ankry@mif.pg.gda.pl>
- * and Krzysztof G. Baranowski <kgb@knm.org.pl>
- */
-
-#define UNIXWARE_DISKMAGIC (0xCA5E600DUL) /* The disk magic number */
-#define UNIXWARE_DISKMAGIC2 (0x600DDEEEUL) /* The slice table magic nr */
-#define UNIXWARE_NUMSLICE 16
-#define UNIXWARE_FS_UNUSED 0 /* Unused slice entry ID */
-
-struct unixware_slice {
- __le16 s_label; /* label */
- __le16 s_flags; /* permission flags */
- __le32 start_sect; /* starting sector */
- __le32 nr_sects; /* number of sectors in slice */
-};
-
-struct unixware_disklabel {
- __le32 d_type; /* drive type */
- __le32 d_magic; /* the magic number */
- __le32 d_version; /* version number */
- char d_serial[12]; /* serial number of the device */
- __le32 d_ncylinders; /* # of data cylinders per device */
- __le32 d_ntracks; /* # of tracks per cylinder */
- __le32 d_nsectors; /* # of data sectors per track */
- __le32 d_secsize; /* # of bytes per sector */
- __le32 d_part_start; /* # of first sector of this partition */
- __le32 d_unknown1[12]; /* ? */
- __le32 d_alt_tbl; /* byte offset of alternate table */
- __le32 d_alt_len; /* byte length of alternate table */
- __le32 d_phys_cyl; /* # of physical cylinders per device */
- __le32 d_phys_trk; /* # of physical tracks per cylinder */
- __le32 d_phys_sec; /* # of physical sectors per track */
- __le32 d_phys_bytes; /* # of physical bytes per sector */
- __le32 d_unknown2; /* ? */
- __le32 d_unknown3; /* ? */
- __le32 d_pad[8]; /* pad */
-
- struct unixware_vtoc {
- __le32 v_magic; /* the magic number */
- __le32 v_version; /* version number */
- char v_name[8]; /* volume name */
- __le16 v_nslices; /* # of slices */
- __le16 v_unknown1; /* ? */
- __le32 v_reserved[10]; /* reserved */
- struct unixware_slice
- v_slice[UNIXWARE_NUMSLICE]; /* slice headers */
- } vtoc;
-
-}; /* 408 */
-
-#endif /* CONFIG_UNIXWARE_DISKLABEL */
-
-#ifdef CONFIG_MINIX_SUBPARTITION
-# define MINIX_NR_SUBPARTITIONS 4
-#endif /* CONFIG_MINIX_SUBPARTITION */
-
-#ifdef __KERNEL__
-
-char *disk_name (struct gendisk *hd, int part, char *buf);
-
-extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
-extern void add_partition(struct gendisk *, int, sector_t, sector_t);
-extern void delete_partition(struct gendisk *, int);
-
-extern struct gendisk *alloc_disk_node(int minors, int node_id);
-extern struct gendisk *alloc_disk(int minors);
-extern struct kobject *get_disk(struct gendisk *disk);
-extern void put_disk(struct gendisk *disk);
-
-extern void blk_register_region(dev_t dev, unsigned long range,
- struct module *module,
- struct kobject *(*probe)(dev_t, int *, void *),
- int (*lock)(dev_t, void *),
- void *data);
-extern void blk_unregister_region(dev_t dev, unsigned long range);
-
-static inline struct block_device *bdget_disk(struct gendisk *disk, int index)
-{
- return bdget(MKDEV(disk->major, disk->first_minor) + index);
-}
-
-#endif
-
-#endif
diff --git a/original/linux/genlock.h b/original/linux/genlock.h
deleted file mode 100644
index 587c49d..0000000
--- a/original/linux/genlock.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _GENLOCK_H_
-#define _GENLOCK_H_
-
-#ifdef __KERNEL__
-
-struct genlock;
-struct genlock_handle;
-
-struct genlock_handle *genlock_get_handle(void);
-struct genlock_handle *genlock_get_handle_fd(int fd);
-void genlock_put_handle(struct genlock_handle *handle);
-struct genlock *genlock_create_lock(struct genlock_handle *);
-struct genlock *genlock_attach_lock(struct genlock_handle *, int fd);
-int genlock_wait(struct genlock_handle *handle, u32 timeout);
-/* genlock_release_lock was deprecated */
-int genlock_lock(struct genlock_handle *handle, int op, int flags,
- u32 timeout);
-#endif
-
-#define GENLOCK_UNLOCK 0
-#define GENLOCK_WRLOCK 1
-#define GENLOCK_RDLOCK 2
-
-#define GENLOCK_NOBLOCK (1 << 0)
-#define GENLOCK_WRITE_TO_READ (1 << 1)
-
-struct genlock_lock {
- int fd;
- int op;
- int flags;
- int timeout;
-};
-
-#define GENLOCK_IOC_MAGIC 'G'
-
-#define GENLOCK_IOC_NEW _IO(GENLOCK_IOC_MAGIC, 0)
-#define GENLOCK_IOC_EXPORT _IOR(GENLOCK_IOC_MAGIC, 1, \
- struct genlock_lock)
-#define GENLOCK_IOC_ATTACH _IOW(GENLOCK_IOC_MAGIC, 2, \
- struct genlock_lock)
-
-/* Deprecated */
-#define GENLOCK_IOC_LOCK _IOW(GENLOCK_IOC_MAGIC, 3, \
- struct genlock_lock)
-
-/* Deprecated */
-#define GENLOCK_IOC_RELEASE _IO(GENLOCK_IOC_MAGIC, 4)
-#define GENLOCK_IOC_WAIT _IOW(GENLOCK_IOC_MAGIC, 5, \
- struct genlock_lock)
-#define GENLOCK_IOC_DREADLOCK _IOW(GENLOCK_IOC_MAGIC, 6, \
- struct genlock_lock)
-#endif
diff --git a/original/linux/gfp.h b/original/linux/gfp.h
deleted file mode 100644
index cc9e608..0000000
--- a/original/linux/gfp.h
+++ /dev/null
@@ -1,166 +0,0 @@
-#ifndef __LINUX_GFP_H
-#define __LINUX_GFP_H
-
-#include <linux/mmzone.h>
-#include <linux/stddef.h>
-#include <linux/linkage.h>
-
-struct vm_area_struct;
-
-/*
- * GFP bitmasks..
- */
-/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low three bits) */
-#define __GFP_DMA ((__force gfp_t)0x01u)
-#define __GFP_HIGHMEM ((__force gfp_t)0x02u)
-#ifdef CONFIG_DMA_IS_DMA32
-#define __GFP_DMA32 ((__force gfp_t)0x01) /* ZONE_DMA is ZONE_DMA32 */
-#elif BITS_PER_LONG < 64
-#define __GFP_DMA32 ((__force gfp_t)0x00) /* ZONE_NORMAL is ZONE_DMA32 */
-#else
-#define __GFP_DMA32 ((__force gfp_t)0x04) /* Has own ZONE_DMA32 */
-#endif
-
-/*
- * Action modifiers - doesn't change the zoning
- *
- * __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt
- * _might_ fail. This depends upon the particular VM implementation.
- *
- * __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller
- * cannot handle allocation failures.
- *
- * __GFP_NORETRY: The VM implementation must not retry indefinitely.
- */
-#define __GFP_WAIT ((__force gfp_t)0x10u) /* Can wait and reschedule? */
-#define __GFP_HIGH ((__force gfp_t)0x20u) /* Should access emergency pools? */
-#define __GFP_IO ((__force gfp_t)0x40u) /* Can start physical IO? */
-#define __GFP_FS ((__force gfp_t)0x80u) /* Can call down to low-level FS? */
-#define __GFP_COLD ((__force gfp_t)0x100u) /* Cache-cold page required */
-#define __GFP_NOWARN ((__force gfp_t)0x200u) /* Suppress page allocation failure warning */
-#define __GFP_REPEAT ((__force gfp_t)0x400u) /* Retry the allocation. Might fail */
-#define __GFP_NOFAIL ((__force gfp_t)0x800u) /* Retry for ever. Cannot fail */
-#define __GFP_NORETRY ((__force gfp_t)0x1000u)/* Do not retry. Might fail */
-#define __GFP_NO_GROW ((__force gfp_t)0x2000u)/* Slab internal usage */
-#define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */
-#define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */
-#define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */
-#define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */
-
-#define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */
-#define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
-
-/* if you forget to add the bitmask here kernel will crash, period */
-#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
- __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
- __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
- __GFP_NOMEMALLOC|__GFP_HARDWALL)
-
-/* This equals 0, but use constants in case they ever change */
-#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
-/* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */
-#define GFP_ATOMIC (__GFP_HIGH)
-#define GFP_NOIO (__GFP_WAIT)
-#define GFP_NOFS (__GFP_WAIT | __GFP_IO)
-#define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS)
-#define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL)
-#define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | \
- __GFP_HIGHMEM)
-
-/* Flag - indicates that the buffer will be suitable for DMA. Ignored on some
- platforms, used as appropriate on others */
-
-#define GFP_DMA __GFP_DMA
-
-/* 4GB DMA on some platforms */
-#define GFP_DMA32 __GFP_DMA32
-
-
-static inline int gfp_zone(gfp_t gfp)
-{
- int zone = GFP_ZONEMASK & (__force int) gfp;
- BUG_ON(zone >= GFP_ZONETYPES);
- return zone;
-}
-
-/*
- * There is only one page-allocator function, and two main namespaces to
- * it. The alloc_page*() variants return 'struct page *' and as such
- * can allocate highmem pages, the *get*page*() variants return
- * virtual kernel addresses to the allocated page(s).
- */
-
-/*
- * We get the zone list from the current node and the gfp_mask.
- * This zone list contains a maximum of MAXNODES*MAX_NR_ZONES zones.
- *
- * For the normal case of non-DISCONTIGMEM systems the NODE_DATA() gets
- * optimized to &contig_page_data at compile-time.
- */
-
-#ifndef HAVE_ARCH_FREE_PAGE
-static inline void arch_free_page(struct page *page, int order) { }
-#endif
-
-extern struct page *
-FASTCALL(__alloc_pages(gfp_t, unsigned int, struct zonelist *));
-
-static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
- unsigned int order)
-{
- if (unlikely(order >= MAX_ORDER))
- return NULL;
-
- /* Unknown node is current node */
- if (nid < 0)
- nid = numa_node_id();
-
- return __alloc_pages(gfp_mask, order,
- NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_mask));
-}
-
-#ifdef CONFIG_NUMA
-extern struct page *alloc_pages_current(gfp_t gfp_mask, unsigned order);
-
-static inline struct page *
-alloc_pages(gfp_t gfp_mask, unsigned int order)
-{
- if (unlikely(order >= MAX_ORDER))
- return NULL;
-
- return alloc_pages_current(gfp_mask, order);
-}
-extern struct page *alloc_page_vma(gfp_t gfp_mask,
- struct vm_area_struct *vma, unsigned long addr);
-#else
-#define alloc_pages(gfp_mask, order) \
- alloc_pages_node(numa_node_id(), gfp_mask, order)
-#define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0)
-#endif
-#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0)
-
-extern unsigned long FASTCALL(__get_free_pages(gfp_t gfp_mask, unsigned int order));
-extern unsigned long FASTCALL(get_zeroed_page(gfp_t gfp_mask));
-
-#define __get_free_page(gfp_mask) \
- __get_free_pages((gfp_mask),0)
-
-#define __get_dma_pages(gfp_mask, order) \
- __get_free_pages((gfp_mask) | GFP_DMA,(order))
-
-extern void FASTCALL(__free_pages(struct page *page, unsigned int order));
-extern void FASTCALL(free_pages(unsigned long addr, unsigned int order));
-extern void FASTCALL(free_hot_page(struct page *page));
-extern void FASTCALL(free_cold_page(struct page *page));
-
-#define __free_page(page) __free_pages((page), 0)
-#define free_page(addr) free_pages((addr),0)
-
-void page_alloc_init(void);
-#ifdef CONFIG_NUMA
-void drain_node_pages(int node);
-#else
-static inline void drain_node_pages(int node) { };
-#endif
-
-#endif /* __LINUX_GFP_H */
diff --git a/original/linux/hardirq.h b/original/linux/hardirq.h
deleted file mode 100644
index 50d8b57..0000000
--- a/original/linux/hardirq.h
+++ /dev/null
@@ -1,129 +0,0 @@
-#ifndef LINUX_HARDIRQ_H
-#define LINUX_HARDIRQ_H
-
-#include <linux/preempt.h>
-#include <linux/smp_lock.h>
-#include <linux/lockdep.h>
-#include <asm/hardirq.h>
-#include <asm/system.h>
-
-/*
- * We put the hardirq and softirq counter into the preemption
- * counter. The bitmask has the following meaning:
- *
- * - bits 0-7 are the preemption count (max preemption depth: 256)
- * - bits 8-15 are the softirq count (max # of softirqs: 256)
- *
- * The hardirq count can be overridden per architecture, the default is:
- *
- * - bits 16-27 are the hardirq count (max # of hardirqs: 4096)
- * - ( bit 28 is the PREEMPT_ACTIVE flag. )
- *
- * PREEMPT_MASK: 0x000000ff
- * SOFTIRQ_MASK: 0x0000ff00
- * HARDIRQ_MASK: 0x0fff0000
- */
-#define PREEMPT_BITS 8
-#define SOFTIRQ_BITS 8
-
-#ifndef HARDIRQ_BITS
-#define HARDIRQ_BITS 12
-/*
- * The hardirq mask has to be large enough to have space for potentially
- * all IRQ sources in the system nesting on a single CPU.
- */
-#if (1 << HARDIRQ_BITS) < NR_IRQS
-# error HARDIRQ_BITS is too low!
-#endif
-#endif
-
-#define PREEMPT_SHIFT 0
-#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
-#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
-
-#define __IRQ_MASK(x) ((1UL << (x))-1)
-
-#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
-#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
-#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
-
-#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
-#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
-#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
-
-#if PREEMPT_ACTIVE < (1 << (HARDIRQ_SHIFT + HARDIRQ_BITS))
-#error PREEMPT_ACTIVE is too low!
-#endif
-
-#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
-#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
-#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
-
-/*
- * Are we doing bottom half or hardware interrupt processing?
- * Are we in a softirq context? Interrupt context?
- */
-#define in_irq() (hardirq_count())
-#define in_softirq() (softirq_count())
-#define in_interrupt() (irq_count())
-
-#if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL)
-# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
-#else
-# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0)
-#endif
-
-#ifdef CONFIG_PREEMPT
-# define preemptible() (preempt_count() == 0 && !irqs_disabled())
-# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
-#else
-# define preemptible() 0
-# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
-#endif
-
-#ifdef CONFIG_SMP
-extern void synchronize_irq(unsigned int irq);
-#else
-# define synchronize_irq(irq) barrier()
-#endif
-
-struct task_struct;
-
-#ifndef CONFIG_VIRT_CPU_ACCOUNTING
-static inline void account_system_vtime(struct task_struct *tsk)
-{
-}
-#endif
-
-/*
- * It is safe to do non-atomic ops on ->hardirq_context,
- * because NMI handlers may not preempt and the ops are
- * always balanced, so the interrupted value of ->hardirq_context
- * will always be restored.
- */
-#define irq_enter() \
- do { \
- account_system_vtime(current); \
- add_preempt_count(HARDIRQ_OFFSET); \
- trace_hardirq_enter(); \
- } while (0)
-
-/*
- * Exit irq context without processing softirqs:
- */
-#define __irq_exit() \
- do { \
- trace_hardirq_exit(); \
- account_system_vtime(current); \
- sub_preempt_count(HARDIRQ_OFFSET); \
- } while (0)
-
-/*
- * Exit irq context and process softirqs if needed:
- */
-extern void irq_exit(void);
-
-#define nmi_enter() do { lockdep_off(); irq_enter(); } while (0)
-#define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0)
-
-#endif /* LINUX_HARDIRQ_H */
diff --git a/original/linux/hdlc/ioctl.h b/original/linux/hdlc/ioctl.h
deleted file mode 100644
index 78430ba..0000000
--- a/original/linux/hdlc/ioctl.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __HDLC_IOCTL_H__
-#define __HDLC_IOCTL_H__
-
-typedef struct {
- unsigned int clock_rate; /* bits per second */
- unsigned int clock_type; /* internal, external, TX-internal etc. */
- unsigned short loopback;
-} sync_serial_settings; /* V.35, V.24, X.21 */
-
-typedef struct {
- unsigned int clock_rate; /* bits per second */
- unsigned int clock_type; /* internal, external, TX-internal etc. */
- unsigned short loopback;
- unsigned int slot_map;
-} te1_settings; /* T1, E1 */
-
-typedef struct {
- unsigned short encoding;
- unsigned short parity;
-} raw_hdlc_proto;
-
-typedef struct {
- unsigned int t391;
- unsigned int t392;
- unsigned int n391;
- unsigned int n392;
- unsigned int n393;
- unsigned short lmi;
- unsigned short dce; /* 1 for DCE (network side) operation */
-} fr_proto;
-
-typedef struct {
- unsigned int dlci;
-} fr_proto_pvc; /* for creating/deleting FR PVCs */
-
-typedef struct {
- unsigned int dlci;
- char master[IFNAMSIZ]; /* Name of master FRAD device */
-}fr_proto_pvc_info; /* for returning PVC information only */
-
-typedef struct {
- unsigned int interval;
- unsigned int timeout;
-} cisco_proto;
-
-/* PPP doesn't need any info now - supply length = 0 to ioctl */
-
-#endif /* __HDLC_IOCTL_H__ */
diff --git a/original/linux/hdreg.h b/original/linux/hdreg.h
deleted file mode 100644
index 2b54eac..0000000
--- a/original/linux/hdreg.h
+++ /dev/null
@@ -1,705 +0,0 @@
-#ifndef _LINUX_HDREG_H
-#define _LINUX_HDREG_H
-
-#ifdef __KERNEL__
-#include <linux/ata.h>
-
-/*
- * This file contains some defines for the AT-hd-controller.
- * Various sources.
- */
-
-/* ide.c has its own port definitions in "ide.h" */
-
-#define HD_IRQ 14
-
-/* Hd controller regs. Ref: IBM AT Bios-listing */
-#define HD_DATA 0x1f0 /* _CTL when writing */
-#define HD_ERROR 0x1f1 /* see err-bits */
-#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */
-#define HD_SECTOR 0x1f3 /* starting sector */
-#define HD_LCYL 0x1f4 /* starting cylinder */
-#define HD_HCYL 0x1f5 /* high byte of starting cyl */
-#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */
-#define HD_STATUS 0x1f7 /* see status-bits */
-#define HD_FEATURE HD_ERROR /* same io address, read=error, write=feature */
-#define HD_PRECOMP HD_FEATURE /* obsolete use of this port - predates IDE */
-#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */
-
-#define HD_CMD 0x3f6 /* used for resets */
-#define HD_ALTSTATUS 0x3f6 /* same as HD_STATUS but doesn't clear irq */
-
-/* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */
-
-/* Bits of HD_STATUS */
-#define ERR_STAT 0x01
-#define INDEX_STAT 0x02
-#define ECC_STAT 0x04 /* Corrected error */
-#define DRQ_STAT 0x08
-#define SEEK_STAT 0x10
-#define SRV_STAT 0x10
-#define WRERR_STAT 0x20
-#define READY_STAT 0x40
-#define BUSY_STAT 0x80
-
-/* Bits for HD_ERROR */
-#define MARK_ERR 0x01 /* Bad address mark */
-#define TRK0_ERR 0x02 /* couldn't find track 0 */
-#define ABRT_ERR 0x04 /* Command aborted */
-#define MCR_ERR 0x08 /* media change request */
-#define ID_ERR 0x10 /* ID field not found */
-#define MC_ERR 0x20 /* media changed */
-#define ECC_ERR 0x40 /* Uncorrectable ECC error */
-#define BBD_ERR 0x80 /* pre-EIDE meaning: block marked bad */
-#define ICRC_ERR 0x80 /* new meaning: CRC error during transfer */
-
-/* Bits of HD_NSECTOR */
-#define CD 0x01
-#define IO 0x02
-#define REL 0x04
-#define TAG_MASK 0xf8
-#endif /* __KERNEL__ */
-
-/*
- * Command Header sizes for IOCTL commands
- */
-
-#define HDIO_DRIVE_CMD_HDR_SIZE (4 * sizeof(u8))
-#define HDIO_DRIVE_HOB_HDR_SIZE (8 * sizeof(u8))
-#define HDIO_DRIVE_TASK_HDR_SIZE (8 * sizeof(u8))
-
-#define IDE_DRIVE_TASK_INVALID -1
-#define IDE_DRIVE_TASK_NO_DATA 0
-#define IDE_DRIVE_TASK_SET_XFER 1
-
-#define IDE_DRIVE_TASK_IN 2
-
-#define IDE_DRIVE_TASK_OUT 3
-#define IDE_DRIVE_TASK_RAW_WRITE 4
-
-/*
- * Define standard taskfile in/out register
- */
-#define IDE_TASKFILE_STD_IN_FLAGS 0xFE
-#define IDE_HOB_STD_IN_FLAGS 0x3C
-#ifndef __KERNEL__
-#define IDE_TASKFILE_STD_OUT_FLAGS 0xFE
-#define IDE_HOB_STD_OUT_FLAGS 0x3C
-#endif
-
-typedef unsigned char task_ioreg_t;
-typedef unsigned long sata_ioreg_t;
-
-typedef union ide_reg_valid_s {
- unsigned all : 16;
- struct {
- unsigned data : 1;
- unsigned error_feature : 1;
- unsigned sector : 1;
- unsigned nsector : 1;
- unsigned lcyl : 1;
- unsigned hcyl : 1;
- unsigned select : 1;
- unsigned status_command : 1;
-
- unsigned data_hob : 1;
- unsigned error_feature_hob : 1;
- unsigned sector_hob : 1;
- unsigned nsector_hob : 1;
- unsigned lcyl_hob : 1;
- unsigned hcyl_hob : 1;
- unsigned select_hob : 1;
- unsigned control_hob : 1;
- } b;
-} ide_reg_valid_t;
-
-typedef struct ide_task_request_s {
- task_ioreg_t io_ports[8];
- task_ioreg_t hob_ports[8];
- ide_reg_valid_t out_flags;
- ide_reg_valid_t in_flags;
- int data_phase;
- int req_cmd;
- unsigned long out_size;
- unsigned long in_size;
-} ide_task_request_t;
-
-typedef struct ide_ioctl_request_s {
- ide_task_request_t *task_request;
- unsigned char *out_buffer;
- unsigned char *in_buffer;
-} ide_ioctl_request_t;
-
-struct hd_drive_cmd_hdr {
- task_ioreg_t command;
- task_ioreg_t sector_number;
- task_ioreg_t feature;
- task_ioreg_t sector_count;
-};
-
-typedef struct hd_drive_task_hdr {
- task_ioreg_t data;
- task_ioreg_t feature;
- task_ioreg_t sector_count;
- task_ioreg_t sector_number;
- task_ioreg_t low_cylinder;
- task_ioreg_t high_cylinder;
- task_ioreg_t device_head;
- task_ioreg_t command;
-} task_struct_t;
-
-typedef struct hd_drive_hob_hdr {
- task_ioreg_t data;
- task_ioreg_t feature;
- task_ioreg_t sector_count;
- task_ioreg_t sector_number;
- task_ioreg_t low_cylinder;
- task_ioreg_t high_cylinder;
- task_ioreg_t device_head;
- task_ioreg_t control;
-} hob_struct_t;
-
-#define TASKFILE_INVALID 0x7fff
-#define TASKFILE_48 0x8000
-
-#define TASKFILE_NO_DATA 0x0000
-
-#define TASKFILE_IN 0x0001
-#define TASKFILE_MULTI_IN 0x0002
-
-#define TASKFILE_OUT 0x0004
-#define TASKFILE_MULTI_OUT 0x0008
-#define TASKFILE_IN_OUT 0x0010
-
-#define TASKFILE_IN_DMA 0x0020
-#define TASKFILE_OUT_DMA 0x0040
-#define TASKFILE_IN_DMAQ 0x0080
-#define TASKFILE_OUT_DMAQ 0x0100
-
-#define TASKFILE_P_IN 0x0200
-#define TASKFILE_P_OUT 0x0400
-#define TASKFILE_P_IN_DMA 0x0800
-#define TASKFILE_P_OUT_DMA 0x1000
-#define TASKFILE_P_IN_DMAQ 0x2000
-#define TASKFILE_P_OUT_DMAQ 0x4000
-
-/* ATA/ATAPI Commands pre T13 Spec */
-#define WIN_NOP 0x00
-/*
- * 0x01->0x02 Reserved
- */
-#define CFA_REQ_EXT_ERROR_CODE 0x03 /* CFA Request Extended Error Code */
-/*
- * 0x04->0x07 Reserved
- */
-#define WIN_SRST 0x08 /* ATAPI soft reset command */
-#define WIN_DEVICE_RESET 0x08
-/*
- * 0x09->0x0F Reserved
- */
-#define WIN_RECAL 0x10
-#define WIN_RESTORE WIN_RECAL
-/*
- * 0x10->0x1F Reserved
- */
-#define WIN_READ 0x20 /* 28-Bit */
-#define WIN_READ_ONCE 0x21 /* 28-Bit without retries */
-#define WIN_READ_LONG 0x22 /* 28-Bit */
-#define WIN_READ_LONG_ONCE 0x23 /* 28-Bit without retries */
-#define WIN_READ_EXT 0x24 /* 48-Bit */
-#define WIN_READDMA_EXT 0x25 /* 48-Bit */
-#define WIN_READDMA_QUEUED_EXT 0x26 /* 48-Bit */
-#define WIN_READ_NATIVE_MAX_EXT 0x27 /* 48-Bit */
-/*
- * 0x28
- */
-#define WIN_MULTREAD_EXT 0x29 /* 48-Bit */
-/*
- * 0x2A->0x2F Reserved
- */
-#define WIN_WRITE 0x30 /* 28-Bit */
-#define WIN_WRITE_ONCE 0x31 /* 28-Bit without retries */
-#define WIN_WRITE_LONG 0x32 /* 28-Bit */
-#define WIN_WRITE_LONG_ONCE 0x33 /* 28-Bit without retries */
-#define WIN_WRITE_EXT 0x34 /* 48-Bit */
-#define WIN_WRITEDMA_EXT 0x35 /* 48-Bit */
-#define WIN_WRITEDMA_QUEUED_EXT 0x36 /* 48-Bit */
-#define WIN_SET_MAX_EXT 0x37 /* 48-Bit */
-#define CFA_WRITE_SECT_WO_ERASE 0x38 /* CFA Write Sectors without erase */
-#define WIN_MULTWRITE_EXT 0x39 /* 48-Bit */
-/*
- * 0x3A->0x3B Reserved
- */
-#define WIN_WRITE_VERIFY 0x3C /* 28-Bit */
-/*
- * 0x3D->0x3F Reserved
- */
-#define WIN_VERIFY 0x40 /* 28-Bit - Read Verify Sectors */
-#define WIN_VERIFY_ONCE 0x41 /* 28-Bit - without retries */
-#define WIN_VERIFY_EXT 0x42 /* 48-Bit */
-/*
- * 0x43->0x4F Reserved
- */
-#define WIN_FORMAT 0x50
-/*
- * 0x51->0x5F Reserved
- */
-#define WIN_INIT 0x60
-/*
- * 0x61->0x5F Reserved
- */
-#define WIN_SEEK 0x70 /* 0x70-0x7F Reserved */
-
-#define CFA_TRANSLATE_SECTOR 0x87 /* CFA Translate Sector */
-#define WIN_DIAGNOSE 0x90
-#define WIN_SPECIFY 0x91 /* set drive geometry translation */
-#define WIN_DOWNLOAD_MICROCODE 0x92
-#define WIN_STANDBYNOW2 0x94
-#define WIN_STANDBY2 0x96
-#define WIN_SETIDLE2 0x97
-#define WIN_CHECKPOWERMODE2 0x98
-#define WIN_SLEEPNOW2 0x99
-/*
- * 0x9A VENDOR
- */
-#define WIN_PACKETCMD 0xA0 /* Send a packet command. */
-#define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */
-#define WIN_QUEUED_SERVICE 0xA2
-#define WIN_SMART 0xB0 /* self-monitoring and reporting */
-#define CFA_ERASE_SECTORS 0xC0
-#define WIN_MULTREAD 0xC4 /* read sectors using multiple mode*/
-#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */
-#define WIN_SETMULT 0xC6 /* enable/disable multiple mode */
-#define WIN_READDMA_QUEUED 0xC7 /* read sectors using Queued DMA transfers */
-#define WIN_READDMA 0xC8 /* read sectors using DMA transfers */
-#define WIN_READDMA_ONCE 0xC9 /* 28-Bit - without retries */
-#define WIN_WRITEDMA 0xCA /* write sectors using DMA transfers */
-#define WIN_WRITEDMA_ONCE 0xCB /* 28-Bit - without retries */
-#define WIN_WRITEDMA_QUEUED 0xCC /* write sectors using Queued DMA transfers */
-#define CFA_WRITE_MULTI_WO_ERASE 0xCD /* CFA Write multiple without erase */
-#define WIN_GETMEDIASTATUS 0xDA
-#define WIN_ACKMEDIACHANGE 0xDB /* ATA-1, ATA-2 vendor */
-#define WIN_POSTBOOT 0xDC
-#define WIN_PREBOOT 0xDD
-#define WIN_DOORLOCK 0xDE /* lock door on removable drives */
-#define WIN_DOORUNLOCK 0xDF /* unlock door on removable drives */
-#define WIN_STANDBYNOW1 0xE0
-#define WIN_IDLEIMMEDIATE 0xE1 /* force drive to become "ready" */
-#define WIN_STANDBY 0xE2 /* Set device in Standby Mode */
-#define WIN_SETIDLE1 0xE3
-#define WIN_READ_BUFFER 0xE4 /* force read only 1 sector */
-#define WIN_CHECKPOWERMODE1 0xE5
-#define WIN_SLEEPNOW1 0xE6
-#define WIN_FLUSH_CACHE 0xE7
-#define WIN_WRITE_BUFFER 0xE8 /* force write only 1 sector */
-#define WIN_WRITE_SAME 0xE9 /* read ata-2 to use */
- /* SET_FEATURES 0x22 or 0xDD */
-#define WIN_FLUSH_CACHE_EXT 0xEA /* 48-Bit */
-#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */
-#define WIN_MEDIAEJECT 0xED
-#define WIN_IDENTIFY_DMA 0xEE /* same as WIN_IDENTIFY, but DMA */
-#define WIN_SETFEATURES 0xEF /* set special drive features */
-#define EXABYTE_ENABLE_NEST 0xF0
-#define WIN_SECURITY_SET_PASS 0xF1
-#define WIN_SECURITY_UNLOCK 0xF2
-#define WIN_SECURITY_ERASE_PREPARE 0xF3
-#define WIN_SECURITY_ERASE_UNIT 0xF4
-#define WIN_SECURITY_FREEZE_LOCK 0xF5
-#define WIN_SECURITY_DISABLE 0xF6
-#define WIN_READ_NATIVE_MAX 0xF8 /* return the native maximum address */
-#define WIN_SET_MAX 0xF9
-#define DISABLE_SEAGATE 0xFB
-
-/* WIN_SMART sub-commands */
-
-#define SMART_READ_VALUES 0xD0
-#define SMART_READ_THRESHOLDS 0xD1
-#define SMART_AUTOSAVE 0xD2
-#define SMART_SAVE 0xD3
-#define SMART_IMMEDIATE_OFFLINE 0xD4
-#define SMART_READ_LOG_SECTOR 0xD5
-#define SMART_WRITE_LOG_SECTOR 0xD6
-#define SMART_WRITE_THRESHOLDS 0xD7
-#define SMART_ENABLE 0xD8
-#define SMART_DISABLE 0xD9
-#define SMART_STATUS 0xDA
-#define SMART_AUTO_OFFLINE 0xDB
-
-/* Password used in TF4 & TF5 executing SMART commands */
-
-#define SMART_LCYL_PASS 0x4F
-#define SMART_HCYL_PASS 0xC2
-
-/* WIN_SETFEATURES sub-commands */
-#define SETFEATURES_EN_8BIT 0x01 /* Enable 8-Bit Transfers */
-#define SETFEATURES_EN_WCACHE 0x02 /* Enable write cache */
-#define SETFEATURES_DIS_DEFECT 0x04 /* Disable Defect Management */
-#define SETFEATURES_EN_APM 0x05 /* Enable advanced power management */
-#define SETFEATURES_EN_SAME_R 0x22 /* for a region ATA-1 */
-#define SETFEATURES_DIS_MSN 0x31 /* Disable Media Status Notification */
-#define SETFEATURES_DIS_RETRY 0x33 /* Disable Retry */
-#define SETFEATURES_EN_AAM 0x42 /* Enable Automatic Acoustic Management */
-#define SETFEATURES_RW_LONG 0x44 /* Set Length of VS bytes */
-#define SETFEATURES_SET_CACHE 0x54 /* Set Cache segments to SC Reg. Val */
-#define SETFEATURES_DIS_RLA 0x55 /* Disable read look-ahead feature */
-#define SETFEATURES_EN_RI 0x5D /* Enable release interrupt */
-#define SETFEATURES_EN_SI 0x5E /* Enable SERVICE interrupt */
-#define SETFEATURES_DIS_RPOD 0x66 /* Disable reverting to power on defaults */
-#define SETFEATURES_DIS_ECC 0x77 /* Disable ECC byte count */
-#define SETFEATURES_DIS_8BIT 0x81 /* Disable 8-Bit Transfers */
-#define SETFEATURES_DIS_WCACHE 0x82 /* Disable write cache */
-#define SETFEATURES_EN_DEFECT 0x84 /* Enable Defect Management */
-#define SETFEATURES_DIS_APM 0x85 /* Disable advanced power management */
-#define SETFEATURES_EN_ECC 0x88 /* Enable ECC byte count */
-#define SETFEATURES_EN_MSN 0x95 /* Enable Media Status Notification */
-#define SETFEATURES_EN_RETRY 0x99 /* Enable Retry */
-#define SETFEATURES_EN_RLA 0xAA /* Enable read look-ahead feature */
-#define SETFEATURES_PREFETCH 0xAB /* Sets drive prefetch value */
-#define SETFEATURES_EN_REST 0xAC /* ATA-1 */
-#define SETFEATURES_4B_RW_LONG 0xBB /* Set Lenght of 4 bytes */
-#define SETFEATURES_DIS_AAM 0xC2 /* Disable Automatic Acoustic Management */
-#define SETFEATURES_EN_RPOD 0xCC /* Enable reverting to power on defaults */
-#define SETFEATURES_DIS_RI 0xDD /* Disable release interrupt ATAPI */
-#define SETFEATURES_EN_SAME_M 0xDD /* for a entire device ATA-1 */
-#define SETFEATURES_DIS_SI 0xDE /* Disable SERVICE interrupt ATAPI */
-
-/* WIN_SECURITY sub-commands */
-
-#define SECURITY_SET_PASSWORD 0xBA
-#define SECURITY_UNLOCK 0xBB
-#define SECURITY_ERASE_PREPARE 0xBC
-#define SECURITY_ERASE_UNIT 0xBD
-#define SECURITY_FREEZE_LOCK 0xBE
-#define SECURITY_DISABLE_PASSWORD 0xBF
-
-struct hd_geometry {
- unsigned char heads;
- unsigned char sectors;
- unsigned short cylinders;
- unsigned long start;
-};
-
-/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
-#define HDIO_GETGEO 0x0301 /* get device geometry */
-#define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */
-#define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */
-#define HDIO_GET_QDMA 0x0305 /* get use-qdma flag */
-
-#define HDIO_SET_XFER 0x0306 /* set transfer rate via proc */
-
-#define HDIO_OBSOLETE_IDENTITY 0x0307 /* OBSOLETE, DO NOT USE: returns 142 bytes */
-#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */
-#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */
-#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */
-#define HDIO_GET_DMA 0x030b /* get use-dma flag */
-#define HDIO_GET_NICE 0x030c /* get nice flags */
-#define HDIO_GET_IDENTITY 0x030d /* get IDE identification info */
-#define HDIO_GET_WCACHE 0x030e /* get write cache mode on|off */
-#define HDIO_GET_ACOUSTIC 0x030f /* get acoustic value */
-#define HDIO_GET_ADDRESS 0x0310 /* */
-
-#define HDIO_GET_BUSSTATE 0x031a /* get the bus state of the hwif */
-#define HDIO_TRISTATE_HWIF 0x031b /* execute a channel tristate */
-#define HDIO_DRIVE_RESET 0x031c /* execute a device reset */
-#define HDIO_DRIVE_TASKFILE 0x031d /* execute raw taskfile */
-#define HDIO_DRIVE_TASK 0x031e /* execute task and special drive command */
-#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */
-#define HDIO_DRIVE_CMD_AEB HDIO_DRIVE_TASK
-
-/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */
-#define HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */
-#define HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */
-#define HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */
-#define HDIO_SET_32BIT 0x0324 /* change io_32bit flags */
-#define HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */
-#define HDIO_SET_DMA 0x0326 /* change use-dma flag */
-#define HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */
-#define HDIO_SCAN_HWIF 0x0328 /* register and (re)scan interface */
-#define HDIO_SET_NICE 0x0329 /* set nice flags */
-#define HDIO_UNREGISTER_HWIF 0x032a /* unregister interface */
-#define HDIO_SET_WCACHE 0x032b /* change write cache enable-disable */
-#define HDIO_SET_ACOUSTIC 0x032c /* change acoustic behavior */
-#define HDIO_SET_BUSSTATE 0x032d /* set the bus state of the hwif */
-#define HDIO_SET_QDMA 0x032e /* change use-qdma flag */
-#define HDIO_SET_ADDRESS 0x032f /* change lba addressing modes */
-
-/* bus states */
-enum {
- BUSSTATE_OFF = 0,
- BUSSTATE_ON,
- BUSSTATE_TRISTATE
-};
-
-/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x033n/0x033n */
-/* 0x330 is reserved - used to be HDIO_GETGEO_BIG */
-/* 0x331 is reserved - used to be HDIO_GETGEO_BIG_RAW */
-/* 0x338 is reserved - used to be HDIO_SET_IDE_SCSI */
-/* 0x339 is reserved - used to be HDIO_SET_SCSI_IDE */
-
-#define __NEW_HD_DRIVE_ID
-
-/*
- * Structure returned by HDIO_GET_IDENTITY, as per ANSI NCITS ATA6 rev.1b spec.
- *
- * If you change something here, please remember to update fix_driveid() in
- * ide/probe.c.
- */
-struct hd_driveid {
- unsigned short config; /* lots of obsolete bit flags */
- unsigned short cyls; /* Obsolete, "physical" cyls */
- unsigned short reserved2; /* reserved (word 2) */
- unsigned short heads; /* Obsolete, "physical" heads */
- unsigned short track_bytes; /* unformatted bytes per track */
- unsigned short sector_bytes; /* unformatted bytes per sector */
- unsigned short sectors; /* Obsolete, "physical" sectors per track */
- unsigned short vendor0; /* vendor unique */
- unsigned short vendor1; /* vendor unique */
- unsigned short vendor2; /* Retired vendor unique */
- unsigned char serial_no[20]; /* 0 = not_specified */
- unsigned short buf_type; /* Retired */
- unsigned short buf_size; /* Retired, 512 byte increments
- * 0 = not_specified
- */
- unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */
- unsigned char fw_rev[8]; /* 0 = not_specified */
- unsigned char model[40]; /* 0 = not_specified */
- unsigned char max_multsect; /* 0=not_implemented */
- unsigned char vendor3; /* vendor unique */
- unsigned short dword_io; /* 0=not_implemented; 1=implemented */
- unsigned char vendor4; /* vendor unique */
- unsigned char capability; /* (upper byte of word 49)
- * 3: IORDYsup
- * 2: IORDYsw
- * 1: LBA
- * 0: DMA
- */
- unsigned short reserved50; /* reserved (word 50) */
- unsigned char vendor5; /* Obsolete, vendor unique */
- unsigned char tPIO; /* Obsolete, 0=slow, 1=medium, 2=fast */
- unsigned char vendor6; /* Obsolete, vendor unique */
- unsigned char tDMA; /* Obsolete, 0=slow, 1=medium, 2=fast */
- unsigned short field_valid; /* (word 53)
- * 2: ultra_ok word 88
- * 1: eide_ok words 64-70
- * 0: cur_ok words 54-58
- */
- unsigned short cur_cyls; /* Obsolete, logical cylinders */
- unsigned short cur_heads; /* Obsolete, l heads */
- unsigned short cur_sectors; /* Obsolete, l sectors per track */
- unsigned short cur_capacity0; /* Obsolete, l total sectors on drive */
- unsigned short cur_capacity1; /* Obsolete, (2 words, misaligned int) */
- unsigned char multsect; /* current multiple sector count */
- unsigned char multsect_valid; /* when (bit0==1) multsect is ok */
- unsigned int lba_capacity; /* Obsolete, total number of sectors */
- unsigned short dma_1word; /* Obsolete, single-word dma info */
- unsigned short dma_mword; /* multiple-word dma info */
- unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */
- unsigned short eide_dma_min; /* min mword dma cycle time (ns) */
- unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */
- unsigned short eide_pio; /* min cycle time (ns), no IORDY */
- unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */
- unsigned short words69_70[2]; /* reserved words 69-70
- * future command overlap and queuing
- */
- /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */
- unsigned short words71_74[4]; /* reserved words 71-74
- * for IDENTIFY PACKET DEVICE command
- */
- unsigned short queue_depth; /* (word 75)
- * 15:5 reserved
- * 4:0 Maximum queue depth -1
- */
- unsigned short words76_79[4]; /* reserved words 76-79 */
- unsigned short major_rev_num; /* (word 80) */
- unsigned short minor_rev_num; /* (word 81) */
- unsigned short command_set_1; /* (word 82) supported
- * 15: Obsolete
- * 14: NOP command
- * 13: READ_BUFFER
- * 12: WRITE_BUFFER
- * 11: Obsolete
- * 10: Host Protected Area
- * 9: DEVICE Reset
- * 8: SERVICE Interrupt
- * 7: Release Interrupt
- * 6: look-ahead
- * 5: write cache
- * 4: PACKET Command
- * 3: Power Management Feature Set
- * 2: Removable Feature Set
- * 1: Security Feature Set
- * 0: SMART Feature Set
- */
- unsigned short command_set_2; /* (word 83)
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13: FLUSH CACHE EXT
- * 12: FLUSH CACHE
- * 11: Device Configuration Overlay
- * 10: 48-bit Address Feature Set
- * 9: Automatic Acoustic Management
- * 8: SET MAX security
- * 7: reserved 1407DT PARTIES
- * 6: SetF sub-command Power-Up
- * 5: Power-Up in Standby Feature Set
- * 4: Removable Media Notification
- * 3: APM Feature Set
- * 2: CFA Feature Set
- * 1: READ/WRITE DMA QUEUED
- * 0: Download MicroCode
- */
- unsigned short cfsse; /* (word 84)
- * cmd set-feature supported extensions
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13:6 reserved
- * 5: General Purpose Logging
- * 4: Streaming Feature Set
- * 3: Media Card Pass Through
- * 2: Media Serial Number Valid
- * 1: SMART selt-test supported
- * 0: SMART error logging
- */
- unsigned short cfs_enable_1; /* (word 85)
- * command set-feature enabled
- * 15: Obsolete
- * 14: NOP command
- * 13: READ_BUFFER
- * 12: WRITE_BUFFER
- * 11: Obsolete
- * 10: Host Protected Area
- * 9: DEVICE Reset
- * 8: SERVICE Interrupt
- * 7: Release Interrupt
- * 6: look-ahead
- * 5: write cache
- * 4: PACKET Command
- * 3: Power Management Feature Set
- * 2: Removable Feature Set
- * 1: Security Feature Set
- * 0: SMART Feature Set
- */
- unsigned short cfs_enable_2; /* (word 86)
- * command set-feature enabled
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13: FLUSH CACHE EXT
- * 12: FLUSH CACHE
- * 11: Device Configuration Overlay
- * 10: 48-bit Address Feature Set
- * 9: Automatic Acoustic Management
- * 8: SET MAX security
- * 7: reserved 1407DT PARTIES
- * 6: SetF sub-command Power-Up
- * 5: Power-Up in Standby Feature Set
- * 4: Removable Media Notification
- * 3: APM Feature Set
- * 2: CFA Feature Set
- * 1: READ/WRITE DMA QUEUED
- * 0: Download MicroCode
- */
- unsigned short csf_default; /* (word 87)
- * command set-feature default
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13:6 reserved
- * 5: General Purpose Logging enabled
- * 4: Valid CONFIGURE STREAM executed
- * 3: Media Card Pass Through enabled
- * 2: Media Serial Number Valid
- * 1: SMART selt-test supported
- * 0: SMART error logging
- */
- unsigned short dma_ultra; /* (word 88) */
- unsigned short trseuc; /* time required for security erase */
- unsigned short trsEuc; /* time required for enhanced erase */
- unsigned short CurAPMvalues; /* current APM values */
- unsigned short mprc; /* master password revision code */
- unsigned short hw_config; /* hardware config (word 93)
- * 15: Shall be ZERO
- * 14: Shall be ONE
- * 13:
- * 12:
- * 11:
- * 10:
- * 9:
- * 8:
- * 7:
- * 6:
- * 5:
- * 4:
- * 3:
- * 2:
- * 1:
- * 0: Shall be ONE
- */
- unsigned short acoustic; /* (word 94)
- * 15:8 Vendor's recommended value
- * 7:0 current value
- */
- unsigned short msrqs; /* min stream request size */
- unsigned short sxfert; /* stream transfer time */
- unsigned short sal; /* stream access latency */
- unsigned int spg; /* stream performance granularity */
- unsigned long long lba_capacity_2;/* 48-bit total number of sectors */
- unsigned short words104_125[22];/* reserved words 104-125 */
- unsigned short last_lun; /* (word 126) */
- unsigned short word127; /* (word 127) Feature Set
- * Removable Media Notification
- * 15:2 reserved
- * 1:0 00 = not supported
- * 01 = supported
- * 10 = reserved
- * 11 = reserved
- */
- unsigned short dlf; /* (word 128)
- * device lock function
- * 15:9 reserved
- * 8 security level 1:max 0:high
- * 7:6 reserved
- * 5 enhanced erase
- * 4 expire
- * 3 frozen
- * 2 locked
- * 1 en/disabled
- * 0 capability
- */
- unsigned short csfo; /* (word 129)
- * current set features options
- * 15:4 reserved
- * 3: auto reassign
- * 2: reverting
- * 1: read-look-ahead
- * 0: write cache
- */
- unsigned short words130_155[26];/* reserved vendor words 130-155 */
- unsigned short word156; /* reserved vendor word 156 */
- unsigned short words157_159[3];/* reserved vendor words 157-159 */
- unsigned short cfa_power; /* (word 160) CFA Power Mode
- * 15 word 160 supported
- * 14 reserved
- * 13
- * 12
- * 11:0
- */
- unsigned short words161_175[15];/* Reserved for CFA */
- unsigned short words176_205[30];/* Current Media Serial Number */
- unsigned short words206_254[49];/* reserved words 206-254 */
- unsigned short integrity_word; /* (word 255)
- * 15:8 Checksum
- * 7:0 Signature
- */
-};
-
-/*
- * IDE "nice" flags. These are used on a per drive basis to determine
- * when to be nice and give more bandwidth to the other devices which
- * share the same IDE bus.
- */
-#define IDE_NICE_DSC_OVERLAP (0) /* per the DSC overlap protocol */
-#define IDE_NICE_ATAPI_OVERLAP (1) /* not supported yet */
-#define IDE_NICE_0 (2) /* when sure that it won't affect us */
-#define IDE_NICE_1 (3) /* when probably won't affect us much */
-#define IDE_NICE_2 (4) /* when we know it's on our expense */
-
-#endif /* _LINUX_HDREG_H */
diff --git a/original/linux/hdsmart.h b/original/linux/hdsmart.h
deleted file mode 100644
index 7974a47..0000000
--- a/original/linux/hdsmart.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * linux/include/linux/hdsmart.h
- *
- * Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
- * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>
- *
- * 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, or (at your option)
- * any later version.
- *
- * You should have received a copy of the GNU General Public License
- * (for example /usr/src/linux/COPYING); if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _LINUX_HDSMART_H
-#define _LINUX_HDSMART_H
-
-#define OFFLINE_FULL_SCAN 0
-#define SHORT_SELF_TEST 1
-#define EXTEND_SELF_TEST 2
-#define SHORT_CAPTIVE_SELF_TEST 129
-#define EXTEND_CAPTIVE_SELF_TEST 130
-
-/* smart_attribute is the vendor specific in SFF-8035 spec */
-typedef struct ata_smart_attribute_s {
- unsigned char id;
- unsigned short status_flag;
- unsigned char normalized;
- unsigned char worse_normal;
- unsigned char raw[6];
- unsigned char reserv;
-} __attribute__ ((packed)) ata_smart_attribute_t;
-
-/* smart_values is format of the read drive Atrribute command */
-typedef struct ata_smart_values_s {
- unsigned short revnumber;
- ata_smart_attribute_t vendor_attributes [30];
- unsigned char offline_data_collection_status;
- unsigned char self_test_exec_status;
- unsigned short total_time_to_complete_off_line;
- unsigned char vendor_specific_366;
- unsigned char offline_data_collection_capability;
- unsigned short smart_capability;
- unsigned char errorlog_capability;
- unsigned char vendor_specific_371;
- unsigned char short_test_completion_time;
- unsigned char extend_test_completion_time;
- unsigned char reserved_374_385 [12];
- unsigned char vendor_specific_386_509 [125];
- unsigned char chksum;
-} __attribute__ ((packed)) ata_smart_values_t;
-
-/* Smart Threshold data structures */
-/* Vendor attribute of SMART Threshold */
-typedef struct ata_smart_threshold_entry_s {
- unsigned char id;
- unsigned char normalized_threshold;
- unsigned char reserved[10];
-} __attribute__ ((packed)) ata_smart_threshold_entry_t;
-
-/* Format of Read SMART THreshold Command */
-typedef struct ata_smart_thresholds_s {
- unsigned short revnumber;
- ata_smart_threshold_entry_t thres_entries[30];
- unsigned char reserved[149];
- unsigned char chksum;
-} __attribute__ ((packed)) ata_smart_thresholds_t;
-
-typedef struct ata_smart_errorlog_command_struct_s {
- unsigned char devicecontrolreg;
- unsigned char featuresreg;
- unsigned char sector_count;
- unsigned char sector_number;
- unsigned char cylinder_low;
- unsigned char cylinder_high;
- unsigned char drive_head;
- unsigned char commandreg;
- unsigned int timestamp;
-} __attribute__ ((packed)) ata_smart_errorlog_command_struct_t;
-
-typedef struct ata_smart_errorlog_error_struct_s {
- unsigned char error_condition;
- unsigned char extended_error[14];
- unsigned char state;
- unsigned short timestamp;
-} __attribute__ ((packed)) ata_smart_errorlog_error_struct_t;
-
-typedef struct ata_smart_errorlog_struct_s {
- ata_smart_errorlog_command_struct_t commands[6];
- ata_smart_errorlog_error_struct_t error_struct;
-} __attribute__ ((packed)) ata_smart_errorlog_struct_t;
-
-typedef struct ata_smart_errorlog_s {
- unsigned char revnumber;
- unsigned char error_log_pointer;
- ata_smart_errorlog_struct_t errorlog_struct[5];
- unsigned short ata_error_count;
- unsigned short non_fatal_count;
- unsigned short drive_timeout_count;
- unsigned char reserved[53];
- unsigned char chksum;
-} __attribute__ ((packed)) ata_smart_errorlog_t;
-
-typedef struct ata_smart_selftestlog_struct_s {
- unsigned char selftestnumber;
- unsigned char selfteststatus;
- unsigned short timestamp;
- unsigned char selftestfailurecheckpoint;
- unsigned int lbafirstfailure;
- unsigned char vendorspecific[15];
-} __attribute__ ((packed)) ata_smart_selftestlog_struct_t;
-
-typedef struct ata_smart_selftestlog_s {
- unsigned short revnumber;
- ata_smart_selftestlog_struct_t selftest_struct[21];
- unsigned char vendorspecific[2];
- unsigned char mostrecenttest;
- unsigned char resevered[2];
- unsigned char chksum;
-} __attribute__ ((packed)) ata_smart_selftestlog_t;
-
-#endif /* _LINUX_HDSMART_H */
diff --git a/original/linux/hid.h b/original/linux/hid.h
deleted file mode 100644
index 895001f..0000000
--- a/original/linux/hid.h
+++ /dev/null
@@ -1,847 +0,0 @@
-#ifndef __HID_H
-#define __HID_H
-
-/*
- * Copyright (c) 1999 Andreas Gal
- * Copyright (c) 2000-2001 Vojtech Pavlik
- * Copyright (c) 2006-2007 Jiri Kosina
- */
-
-/*
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
- */
-
-/*
- * USB HID (Human Interface Device) interface class code
- */
-
-#define USB_INTERFACE_CLASS_HID 3
-
-/*
- * USB HID interface subclass and protocol codes
- */
-
-#define USB_INTERFACE_SUBCLASS_BOOT 1
-#define USB_INTERFACE_PROTOCOL_KEYBOARD 1
-#define USB_INTERFACE_PROTOCOL_MOUSE 2
-
-/*
- * HID class requests
- */
-
-#define HID_REQ_GET_REPORT 0x01
-#define HID_REQ_GET_IDLE 0x02
-#define HID_REQ_GET_PROTOCOL 0x03
-#define HID_REQ_SET_REPORT 0x09
-#define HID_REQ_SET_IDLE 0x0A
-#define HID_REQ_SET_PROTOCOL 0x0B
-
-/*
- * HID class descriptor types
- */
-
-#define HID_DT_HID (USB_TYPE_CLASS | 0x01)
-#define HID_DT_REPORT (USB_TYPE_CLASS | 0x02)
-#define HID_DT_PHYSICAL (USB_TYPE_CLASS | 0x03)
-
-#define HID_MAX_DESCRIPTOR_SIZE 4096
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/list.h>
-#include <linux/mod_devicetable.h> /* hid_device_id */
-#include <linux/timer.h>
-#include <linux/workqueue.h>
-#include <linux/input.h>
-
-/*
- * We parse each description item into this structure. Short items data
- * values are expanded to 32-bit signed int, long items contain a pointer
- * into the data area.
- */
-
-struct hid_item {
- unsigned format;
- __u8 size;
- __u8 type;
- __u8 tag;
- union {
- __u8 u8;
- __s8 s8;
- __u16 u16;
- __s16 s16;
- __u32 u32;
- __s32 s32;
- __u8 *longdata;
- } data;
-};
-
-/*
- * HID report item format
- */
-
-#define HID_ITEM_FORMAT_SHORT 0
-#define HID_ITEM_FORMAT_LONG 1
-
-/*
- * Special tag indicating long items
- */
-
-#define HID_ITEM_TAG_LONG 15
-
-/*
- * HID report descriptor item type (prefix bit 2,3)
- */
-
-#define HID_ITEM_TYPE_MAIN 0
-#define HID_ITEM_TYPE_GLOBAL 1
-#define HID_ITEM_TYPE_LOCAL 2
-#define HID_ITEM_TYPE_RESERVED 3
-
-/*
- * HID report descriptor main item tags
- */
-
-#define HID_MAIN_ITEM_TAG_INPUT 8
-#define HID_MAIN_ITEM_TAG_OUTPUT 9
-#define HID_MAIN_ITEM_TAG_FEATURE 11
-#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION 10
-#define HID_MAIN_ITEM_TAG_END_COLLECTION 12
-
-/*
- * HID report descriptor main item contents
- */
-
-#define HID_MAIN_ITEM_CONSTANT 0x001
-#define HID_MAIN_ITEM_VARIABLE 0x002
-#define HID_MAIN_ITEM_RELATIVE 0x004
-#define HID_MAIN_ITEM_WRAP 0x008
-#define HID_MAIN_ITEM_NONLINEAR 0x010
-#define HID_MAIN_ITEM_NO_PREFERRED 0x020
-#define HID_MAIN_ITEM_NULL_STATE 0x040
-#define HID_MAIN_ITEM_VOLATILE 0x080
-#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100
-
-/*
- * HID report descriptor collection item types
- */
-
-#define HID_COLLECTION_PHYSICAL 0
-#define HID_COLLECTION_APPLICATION 1
-#define HID_COLLECTION_LOGICAL 2
-
-/*
- * HID report descriptor global item tags
- */
-
-#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE 0
-#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM 1
-#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM 2
-#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM 3
-#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM 4
-#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT 5
-#define HID_GLOBAL_ITEM_TAG_UNIT 6
-#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE 7
-#define HID_GLOBAL_ITEM_TAG_REPORT_ID 8
-#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT 9
-#define HID_GLOBAL_ITEM_TAG_PUSH 10
-#define HID_GLOBAL_ITEM_TAG_POP 11
-
-/*
- * HID report descriptor local item tags
- */
-
-#define HID_LOCAL_ITEM_TAG_USAGE 0
-#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1
-#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2
-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3
-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4
-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5
-#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7
-#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8
-#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9
-#define HID_LOCAL_ITEM_TAG_DELIMITER 10
-
-/*
- * HID usage tables
- */
-
-#define HID_USAGE_PAGE 0xffff0000
-
-#define HID_UP_UNDEFINED 0x00000000
-#define HID_UP_GENDESK 0x00010000
-#define HID_UP_SIMULATION 0x00020000
-#define HID_UP_KEYBOARD 0x00070000
-#define HID_UP_LED 0x00080000
-#define HID_UP_BUTTON 0x00090000
-#define HID_UP_ORDINAL 0x000a0000
-#define HID_UP_CONSUMER 0x000c0000
-#define HID_UP_DIGITIZER 0x000d0000
-#define HID_UP_PID 0x000f0000
-#define HID_UP_HPVENDOR 0xff7f0000
-#define HID_UP_MSVENDOR 0xff000000
-#define HID_UP_CUSTOM 0x00ff0000
-#define HID_UP_LOGIVENDOR 0xffbc0000
-
-#define HID_USAGE 0x0000ffff
-
-#define HID_GD_POINTER 0x00010001
-#define HID_GD_MOUSE 0x00010002
-#define HID_GD_JOYSTICK 0x00010004
-#define HID_GD_GAMEPAD 0x00010005
-#define HID_GD_KEYBOARD 0x00010006
-#define HID_GD_KEYPAD 0x00010007
-#define HID_GD_MULTIAXIS 0x00010008
-#define HID_GD_X 0x00010030
-#define HID_GD_Y 0x00010031
-#define HID_GD_Z 0x00010032
-#define HID_GD_RX 0x00010033
-#define HID_GD_RY 0x00010034
-#define HID_GD_RZ 0x00010035
-#define HID_GD_SLIDER 0x00010036
-#define HID_GD_DIAL 0x00010037
-#define HID_GD_WHEEL 0x00010038
-#define HID_GD_HATSWITCH 0x00010039
-#define HID_GD_BUFFER 0x0001003a
-#define HID_GD_BYTECOUNT 0x0001003b
-#define HID_GD_MOTION 0x0001003c
-#define HID_GD_START 0x0001003d
-#define HID_GD_SELECT 0x0001003e
-#define HID_GD_VX 0x00010040
-#define HID_GD_VY 0x00010041
-#define HID_GD_VZ 0x00010042
-#define HID_GD_VBRX 0x00010043
-#define HID_GD_VBRY 0x00010044
-#define HID_GD_VBRZ 0x00010045
-#define HID_GD_VNO 0x00010046
-#define HID_GD_FEATURE 0x00010047
-#define HID_GD_UP 0x00010090
-#define HID_GD_DOWN 0x00010091
-#define HID_GD_RIGHT 0x00010092
-#define HID_GD_LEFT 0x00010093
-
-#define HID_DG_DIGITIZER 0x000d0001
-#define HID_DG_PEN 0x000d0002
-#define HID_DG_LIGHTPEN 0x000d0003
-#define HID_DG_TOUCHSCREEN 0x000d0004
-#define HID_DG_TOUCHPAD 0x000d0005
-#define HID_DG_STYLUS 0x000d0020
-#define HID_DG_PUCK 0x000d0021
-#define HID_DG_FINGER 0x000d0022
-#define HID_DG_TIPPRESSURE 0x000d0030
-#define HID_DG_BARRELPRESSURE 0x000d0031
-#define HID_DG_INRANGE 0x000d0032
-#define HID_DG_TOUCH 0x000d0033
-#define HID_DG_UNTOUCH 0x000d0034
-#define HID_DG_TAP 0x000d0035
-#define HID_DG_TABLETFUNCTIONKEY 0x000d0039
-#define HID_DG_PROGRAMCHANGEKEY 0x000d003a
-#define HID_DG_INVERT 0x000d003c
-#define HID_DG_TIPSWITCH 0x000d0042
-#define HID_DG_TIPSWITCH2 0x000d0043
-#define HID_DG_BARRELSWITCH 0x000d0044
-#define HID_DG_ERASER 0x000d0045
-#define HID_DG_TABLETPICK 0x000d0046
-/*
- * as of May 20, 2009 the usages below are not yet in the official USB spec
- * but are being pushed by Microsft as described in their paper "Digitizer
- * Drivers for Windows Touch and Pen-Based Computers"
- */
-#define HID_DG_CONFIDENCE 0x000d0047
-#define HID_DG_WIDTH 0x000d0048
-#define HID_DG_HEIGHT 0x000d0049
-#define HID_DG_CONTACTID 0x000d0051
-#define HID_DG_INPUTMODE 0x000d0052
-#define HID_DG_DEVICEINDEX 0x000d0053
-#define HID_DG_CONTACTCOUNT 0x000d0054
-#define HID_DG_CONTACTMAX 0x000d0055
-
-/*
- * HID report types --- Ouch! HID spec says 1 2 3!
- */
-
-#define HID_INPUT_REPORT 0
-#define HID_OUTPUT_REPORT 1
-#define HID_FEATURE_REPORT 2
-
-/*
- * HID connect requests
- */
-
-#define HID_CONNECT_HIDINPUT 0x01
-#define HID_CONNECT_HIDINPUT_FORCE 0x02
-#define HID_CONNECT_HIDRAW 0x04
-#define HID_CONNECT_HIDDEV 0x08
-#define HID_CONNECT_HIDDEV_FORCE 0x10
-#define HID_CONNECT_FF 0x20
-#define HID_CONNECT_DEFAULT (HID_CONNECT_HIDINPUT|HID_CONNECT_HIDRAW| \
- HID_CONNECT_HIDDEV|HID_CONNECT_FF)
-
-/*
- * HID device quirks.
- */
-
-/*
- * Increase this if you need to configure more HID quirks at module load time
- */
-#define MAX_USBHID_BOOT_QUIRKS 4
-
-#define HID_QUIRK_INVERT 0x00000001
-#define HID_QUIRK_NOTOUCH 0x00000002
-#define HID_QUIRK_IGNORE 0x00000004
-#define HID_QUIRK_NOGET 0x00000008
-#define HID_QUIRK_HIDDEV_FORCE 0x00000010
-#define HID_QUIRK_BADPAD 0x00000020
-#define HID_QUIRK_MULTI_INPUT 0x00000040
-#define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000
-#define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000
-#define HID_QUIRK_NO_INIT_REPORTS 0x20000000
-#define HID_QUIRK_NO_IGNORE 0x40000000
-
-/*
- * This is the global environment of the parser. This information is
- * persistent for main-items. The global environment can be saved and
- * restored with PUSH/POP statements.
- */
-
-struct hid_global {
- unsigned usage_page;
- __s32 logical_minimum;
- __s32 logical_maximum;
- __s32 physical_minimum;
- __s32 physical_maximum;
- __s32 unit_exponent;
- unsigned unit;
- unsigned report_id;
- unsigned report_size;
- unsigned report_count;
-};
-
-/*
- * This is the local environment. It is persistent up the next main-item.
- */
-
-#define HID_MAX_USAGES 12288
-#define HID_DEFAULT_NUM_COLLECTIONS 16
-
-struct hid_local {
- unsigned usage[HID_MAX_USAGES]; /* usage array */
- unsigned collection_index[HID_MAX_USAGES]; /* collection index array */
- unsigned usage_index;
- unsigned usage_minimum;
- unsigned delimiter_depth;
- unsigned delimiter_branch;
-};
-
-/*
- * This is the collection stack. We climb up the stack to determine
- * application and function of each field.
- */
-
-struct hid_collection {
- unsigned type;
- unsigned usage;
- unsigned level;
-};
-
-struct hid_usage {
- unsigned hid; /* hid usage code */
- unsigned collection_index; /* index into collection array */
- /* hidinput data */
- __u16 code; /* input driver code */
- __u8 type; /* input driver type */
- __s8 hat_min; /* hat switch fun */
- __s8 hat_max; /* ditto */
- __s8 hat_dir; /* ditto */
-};
-
-struct hid_input;
-
-struct hid_field {
- unsigned physical; /* physical usage for this field */
- unsigned logical; /* logical usage for this field */
- unsigned application; /* application usage for this field */
- struct hid_usage *usage; /* usage table for this function */
- unsigned maxusage; /* maximum usage index */
- unsigned flags; /* main-item flags (i.e. volatile,array,constant) */
- unsigned report_offset; /* bit offset in the report */
- unsigned report_size; /* size of this field in the report */
- unsigned report_count; /* number of this field in the report */
- unsigned report_type; /* (input,output,feature) */
- __s32 *value; /* last known value(s) */
- __s32 logical_minimum;
- __s32 logical_maximum;
- __s32 physical_minimum;
- __s32 physical_maximum;
- __s32 unit_exponent;
- unsigned unit;
- struct hid_report *report; /* associated report */
- unsigned index; /* index into report->field[] */
- /* hidinput data */
- struct hid_input *hidinput; /* associated input structure */
- __u16 dpad; /* dpad input code */
-};
-
-#define HID_MAX_FIELDS 64
-
-struct hid_report {
- struct list_head list;
- unsigned id; /* id of this report */
- unsigned type; /* report type */
- struct hid_field *field[HID_MAX_FIELDS]; /* fields of the report */
- unsigned maxfield; /* maximum valid field index */
- unsigned size; /* size of the report (bits) */
- struct hid_device *device; /* associated device */
-};
-
-struct hid_report_enum {
- unsigned numbered;
- struct list_head report_list;
- struct hid_report *report_id_hash[256];
-};
-
-#define HID_REPORT_TYPES 3
-
-#define HID_MIN_BUFFER_SIZE 64 /* make sure there is at least a packet size of space */
-#define HID_MAX_BUFFER_SIZE 4096 /* 4kb */
-#define HID_CONTROL_FIFO_SIZE 256 /* to init devices with >100 reports */
-#define HID_OUTPUT_FIFO_SIZE 64
-
-struct hid_control_fifo {
- unsigned char dir;
- struct hid_report *report;
- char *raw_report;
-};
-
-struct hid_output_fifo {
- struct hid_report *report;
- char *raw_report;
-};
-
-#define HID_CLAIMED_INPUT 1
-#define HID_CLAIMED_HIDDEV 2
-#define HID_CLAIMED_HIDRAW 4
-
-#define HID_STAT_ADDED 1
-#define HID_STAT_PARSED 2
-
-struct hid_input {
- struct list_head list;
- struct hid_report *report;
- struct input_dev *input;
-};
-
-enum hid_type {
- HID_TYPE_OTHER = 0,
- HID_TYPE_USBMOUSE
-};
-
-struct hid_driver;
-struct hid_ll_driver;
-
-struct hid_device { /* device report descriptor */
- __u8 *rdesc;
- unsigned rsize;
- struct hid_collection *collection; /* List of HID collections */
- unsigned collection_size; /* Number of allocated hid_collections */
- unsigned maxcollection; /* Number of parsed collections */
- unsigned maxapplication; /* Number of applications */
- __u16 bus; /* BUS ID */
- __u32 vendor; /* Vendor ID */
- __u32 product; /* Product ID */
- __u32 version; /* HID version */
- enum hid_type type; /* device type (mouse, kbd, ...) */
- unsigned country; /* HID country */
- struct hid_report_enum report_enum[HID_REPORT_TYPES];
-
- struct device dev; /* device */
- struct hid_driver *driver;
- struct hid_ll_driver *ll_driver;
-
- unsigned int status; /* see STAT flags above */
- unsigned claimed; /* Claimed by hidinput, hiddev? */
- unsigned quirks; /* Various quirks the device can pull on us */
-
- struct list_head inputs; /* The list of inputs */
- void *hiddev; /* The hiddev structure */
- void *hidraw;
- int minor; /* Hiddev minor number */
-
- int open; /* is the device open by anyone? */
- char name[128]; /* Device name */
- char phys[64]; /* Device physical location */
- char uniq[64]; /* Device unique identifier (serial #) */
-
- void *driver_data;
-
- /* temporary hid_ff handling (until moved to the drivers) */
- int (*ff_init)(struct hid_device *);
-
- /* hiddev event handler */
- int (*hiddev_connect)(struct hid_device *, unsigned int);
- void (*hiddev_disconnect)(struct hid_device *);
- void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field,
- struct hid_usage *, __s32);
- void (*hiddev_report_event) (struct hid_device *, struct hid_report *);
-
- /* handler for raw output data, used by hidraw */
- int (*hid_output_raw_report) (struct hid_device *, __u8 *, size_t, unsigned char);
-
- /* debugging support via debugfs */
- unsigned short debug;
- struct dentry *debug_dir;
- struct dentry *debug_rdesc;
- struct dentry *debug_events;
- struct list_head debug_list;
- wait_queue_head_t debug_wait;
-};
-
-static inline void *hid_get_drvdata(struct hid_device *hdev)
-{
- return dev_get_drvdata(&hdev->dev);
-}
-
-static inline void hid_set_drvdata(struct hid_device *hdev, void *data)
-{
- dev_set_drvdata(&hdev->dev, data);
-}
-
-#define HID_GLOBAL_STACK_SIZE 4
-#define HID_COLLECTION_STACK_SIZE 4
-
-struct hid_parser {
- struct hid_global global;
- struct hid_global global_stack[HID_GLOBAL_STACK_SIZE];
- unsigned global_stack_ptr;
- struct hid_local local;
- unsigned collection_stack[HID_COLLECTION_STACK_SIZE];
- unsigned collection_stack_ptr;
- struct hid_device *device;
-};
-
-struct hid_class_descriptor {
- __u8 bDescriptorType;
- __le16 wDescriptorLength;
-} __attribute__ ((packed));
-
-struct hid_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
- __le16 bcdHID;
- __u8 bCountryCode;
- __u8 bNumDescriptors;
-
- struct hid_class_descriptor desc[1];
-} __attribute__ ((packed));
-
-#define HID_DEVICE(b, ven, prod) \
- .bus = (b), \
- .vendor = (ven), .product = (prod)
-
-#define HID_USB_DEVICE(ven, prod) HID_DEVICE(BUS_USB, ven, prod)
-#define HID_BLUETOOTH_DEVICE(ven, prod) HID_DEVICE(BUS_BLUETOOTH, ven, prod)
-
-#define HID_REPORT_ID(rep) \
- .report_type = (rep)
-#define HID_USAGE_ID(uhid, utype, ucode) \
- .usage_hid = (uhid), .usage_type = (utype), .usage_code = (ucode)
-/* we don't want to catch types and codes equal to 0 */
-#define HID_TERMINATOR (HID_ANY_ID - 1)
-
-struct hid_report_id {
- __u32 report_type;
-};
-struct hid_usage_id {
- __u32 usage_hid;
- __u32 usage_type;
- __u32 usage_code;
-};
-
-/**
- * struct hid_driver
- * @name: driver name (e.g. "Footech_bar-wheel")
- * @id_table: which devices is this driver for (must be non-NULL for probe
- * to be called)
- * @dyn_list: list of dynamically added device ids
- * @dyn_lock: lock protecting @dyn_list
- * @probe: new device inserted
- * @remove: device removed (NULL if not a hot-plug capable driver)
- * @report_table: on which reports to call raw_event (NULL means all)
- * @raw_event: if report in report_table, this hook is called (NULL means nop)
- * @usage_table: on which events to call event (NULL means all)
- * @event: if usage in usage_table, this hook is called (NULL means nop)
- * @report_fixup: called before report descriptor parsing (NULL means nop)
- * @input_mapping: invoked on input registering before mapping an usage
- * @input_mapped: invoked on input registering after mapping an usage
- * @suspend: invoked on suspend (NULL means nop)
- * @resume: invoked on resume if device was not reset (NULL means nop)
- * @reset_resume: invoked on resume if device was reset (NULL means nop)
- *
- * raw_event and event should return 0 on no action performed, 1 when no
- * further processing should be done and negative on error
- *
- * input_mapping shall return a negative value to completely ignore this usage
- * (e.g. doubled or invalid usage), zero to continue with parsing of this
- * usage by generic code (no special handling needed) or positive to skip
- * generic parsing (needed special handling which was done in the hook already)
- * input_mapped shall return negative to inform the layer that this usage
- * should not be considered for further processing or zero to notify that
- * no processing was performed and should be done in a generic manner
- * Both these functions may be NULL which means the same behavior as returning
- * zero from them.
- */
-struct hid_driver {
- char *name;
- const struct hid_device_id *id_table;
-
- struct list_head dyn_list;
- spinlock_t dyn_lock;
-
- int (*probe)(struct hid_device *dev, const struct hid_device_id *id);
- void (*remove)(struct hid_device *dev);
-
- const struct hid_report_id *report_table;
- int (*raw_event)(struct hid_device *hdev, struct hid_report *report,
- u8 *data, int size);
- const struct hid_usage_id *usage_table;
- int (*event)(struct hid_device *hdev, struct hid_field *field,
- struct hid_usage *usage, __s32 value);
-
- void (*report_fixup)(struct hid_device *hdev, __u8 *buf,
- unsigned int size);
-
- int (*input_mapping)(struct hid_device *hdev,
- struct hid_input *hidinput, struct hid_field *field,
- struct hid_usage *usage, unsigned long **bit, int *max);
- int (*input_mapped)(struct hid_device *hdev,
- struct hid_input *hidinput, struct hid_field *field,
- struct hid_usage *usage, unsigned long **bit, int *max);
-#ifdef CONFIG_PM
- int (*suspend)(struct hid_device *hdev, pm_message_t message);
- int (*resume)(struct hid_device *hdev);
- int (*reset_resume)(struct hid_device *hdev);
-#endif
-/* private: */
- struct device_driver driver;
-};
-
-/**
- * hid_ll_driver - low level driver callbacks
- * @start: called on probe to start the device
- * @stop: called on remove
- * @open: called by input layer on open
- * @close: called by input layer on close
- * @hidinput_input_event: event input event (e.g. ff or leds)
- * @parse: this method is called only once to parse the device data,
- * shouldn't allocate anything to not leak memory
- */
-struct hid_ll_driver {
- int (*start)(struct hid_device *hdev);
- void (*stop)(struct hid_device *hdev);
-
- int (*open)(struct hid_device *hdev);
- void (*close)(struct hid_device *hdev);
-
- int (*power)(struct hid_device *hdev, int level);
-
- int (*hidinput_input_event) (struct input_dev *idev, unsigned int type,
- unsigned int code, int value);
-
- int (*parse)(struct hid_device *hdev);
-};
-
-#define PM_HINT_FULLON 1<<5
-#define PM_HINT_NORMAL 1<<1
-
-/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
-/* We ignore a few input applications that are not widely used */
-#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || ((a >= 0x000d0002) && (a <= 0x000d0006)))
-
-/* HID core API */
-
-extern int hid_debug;
-
-extern int hid_add_device(struct hid_device *);
-extern void hid_destroy_device(struct hid_device *);
-
-extern int __must_check __hid_register_driver(struct hid_driver *,
- struct module *, const char *mod_name);
-static inline int __must_check hid_register_driver(struct hid_driver *driver)
-{
- return __hid_register_driver(driver, THIS_MODULE, KBUILD_MODNAME);
-}
-extern void hid_unregister_driver(struct hid_driver *);
-
-extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
-extern void hidinput_report_event(struct hid_device *hid, struct hid_report *report);
-extern int hidinput_connect(struct hid_device *hid, unsigned int force);
-extern void hidinput_disconnect(struct hid_device *);
-
-int hid_set_field(struct hid_field *, unsigned, __s32);
-int hid_input_report(struct hid_device *, int type, u8 *, int, int);
-int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
-void hid_output_report(struct hid_report *report, __u8 *data);
-struct hid_device *hid_allocate_device(void);
-struct hid_report *hid_register_report(struct hid_device *device, unsigned type, unsigned id);
-int hid_parse_report(struct hid_device *hid, __u8 *start, unsigned size);
-int hid_check_keys_pressed(struct hid_device *hid);
-int hid_connect(struct hid_device *hid, unsigned int connect_mask);
-void hid_disconnect(struct hid_device *hid);
-
-/**
- * hid_map_usage - map usage input bits
- *
- * @hidinput: hidinput which we are interested in
- * @usage: usage to fill in
- * @bit: pointer to input->{}bit (out parameter)
- * @max: maximal valid usage->code to consider later (out parameter)
- * @type: input event type (EV_KEY, EV_REL, ...)
- * @c: code which corresponds to this usage and type
- */
-static inline void hid_map_usage(struct hid_input *hidinput,
- struct hid_usage *usage, unsigned long **bit, int *max,
- __u8 type, __u16 c)
-{
- struct input_dev *input = hidinput->input;
-
- usage->type = type;
- usage->code = c;
-
- switch (type) {
- case EV_ABS:
- *bit = input->absbit;
- *max = ABS_MAX;
- break;
- case EV_REL:
- *bit = input->relbit;
- *max = REL_MAX;
- break;
- case EV_KEY:
- *bit = input->keybit;
- *max = KEY_MAX;
- break;
- case EV_LED:
- *bit = input->ledbit;
- *max = LED_MAX;
- break;
- }
-}
-
-/**
- * hid_map_usage_clear - map usage input bits and clear the input bit
- *
- * The same as hid_map_usage, except the @c bit is also cleared in supported
- * bits (@bit).
- */
-static inline void hid_map_usage_clear(struct hid_input *hidinput,
- struct hid_usage *usage, unsigned long **bit, int *max,
- __u8 type, __u16 c)
-{
- hid_map_usage(hidinput, usage, bit, max, type, c);
- clear_bit(c, *bit);
-}
-
-/**
- * hid_parse - parse HW reports
- *
- * @hdev: hid device
- *
- * Call this from probe after you set up the device (if needed). Your
- * report_fixup will be called (if non-NULL) after reading raw report from
- * device before passing it to hid layer for real parsing.
- */
-static inline int __must_check hid_parse(struct hid_device *hdev)
-{
- int ret;
-
- if (hdev->status & HID_STAT_PARSED)
- return 0;
-
- ret = hdev->ll_driver->parse(hdev);
- if (!ret)
- hdev->status |= HID_STAT_PARSED;
-
- return ret;
-}
-
-/**
- * hid_hw_start - start underlaying HW
- *
- * @hdev: hid device
- * @connect_mask: which outputs to connect, see HID_CONNECT_*
- *
- * Call this in probe function *after* hid_parse. This will setup HW buffers
- * and start the device (if not deffered to device open). hid_hw_stop must be
- * called if this was successfull.
- */
-static inline int __must_check hid_hw_start(struct hid_device *hdev,
- unsigned int connect_mask)
-{
- int ret = hdev->ll_driver->start(hdev);
- if (ret || !connect_mask)
- return ret;
- ret = hid_connect(hdev, connect_mask);
- if (ret)
- hdev->ll_driver->stop(hdev);
- return ret;
-}
-
-/**
- * hid_hw_stop - stop underlaying HW
- *
- * @hdev: hid device
- *
- * This is usually called from remove function or from probe when something
- * failed and hid_hw_start was called already.
- */
-static inline void hid_hw_stop(struct hid_device *hdev)
-{
- hid_disconnect(hdev);
- hdev->ll_driver->stop(hdev);
-}
-
-void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
- int interrupt);
-
-extern int hid_generic_init(void);
-extern void hid_generic_exit(void);
-
-/* HID quirks API */
-u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct);
-int usbhid_quirks_init(char **quirks_param);
-void usbhid_quirks_exit(void);
-void usbhid_set_leds(struct hid_device *hid);
-
-#ifdef CONFIG_HID_PID
-int hid_pidff_init(struct hid_device *hid);
-#else
-#define hid_pidff_init NULL
-#endif
-
-#define dbg_hid(format, arg...) if (hid_debug) \
- printk(KERN_DEBUG "%s: " format ,\
- __FILE__ , ## arg)
-#define err_hid(format, arg...) printk(KERN_ERR "%s: " format "\n" , \
- __FILE__ , ## arg)
-#endif /* HID_FF */
-
-#endif
-
diff --git a/original/linux/hidraw.h b/original/linux/hidraw.h
deleted file mode 100644
index dd8d692..0000000
--- a/original/linux/hidraw.h
+++ /dev/null
@@ -1,89 +0,0 @@
-#ifndef _HIDRAW_H
-#define _HIDRAW_H
-
-/*
- * Copyright (c) 2007 Jiri Kosina
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <linux/hid.h>
-#include <linux/types.h>
-
-struct hidraw_report_descriptor {
- __u32 size;
- __u8 value[HID_MAX_DESCRIPTOR_SIZE];
-};
-
-struct hidraw_devinfo {
- __u32 bustype;
- __s16 vendor;
- __s16 product;
-};
-
-/* ioctl interface */
-#define HIDIOCGRDESCSIZE _IOR('H', 0x01, int)
-#define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor)
-#define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo)
-#define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len)
-#define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len)
-
-#define HIDRAW_FIRST_MINOR 0
-#define HIDRAW_MAX_DEVICES 64
-/* number of reports to buffer */
-#define HIDRAW_BUFFER_SIZE 64
-
-
-/* kernel-only API declarations */
-#ifdef __KERNEL__
-
-struct hidraw {
- unsigned int minor;
- int exist;
- int open;
- wait_queue_head_t wait;
- struct hid_device *hid;
- struct device *dev;
- struct list_head list;
-};
-
-struct hidraw_report {
- __u8 *value;
- int len;
-};
-
-struct hidraw_list {
- struct hidraw_report buffer[HIDRAW_BUFFER_SIZE];
- int head;
- int tail;
- struct fasync_struct *fasync;
- struct hidraw *hidraw;
- struct list_head node;
- struct mutex read_mutex;
-};
-
-#ifdef CONFIG_HIDRAW
-int hidraw_init(void);
-void hidraw_exit(void);
-void hidraw_report_event(struct hid_device *, u8 *, int);
-int hidraw_connect(struct hid_device *);
-void hidraw_disconnect(struct hid_device *);
-#else
-static inline int hidraw_init(void) { return 0; }
-static inline void hidraw_exit(void) { }
-static inline void hidraw_report_event(struct hid_device *hid, u8 *data, int len) { }
-static inline int hidraw_connect(struct hid_device *hid) { return -1; }
-static inline void hidraw_disconnect(struct hid_device *hid) { }
-#endif
-
-#endif
-
-#endif
diff --git a/original/linux/highmem.h b/original/linux/highmem.h
deleted file mode 100644
index 85ce7ef..0000000
--- a/original/linux/highmem.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef _LINUX_HIGHMEM_H
-#define _LINUX_HIGHMEM_H
-
-#include <linux/fs.h>
-#include <linux/mm.h>
-
-#include <asm/cacheflush.h>
-
-#ifndef ARCH_HAS_FLUSH_ANON_PAGE
-static inline void flush_anon_page(struct page *page, unsigned long vmaddr)
-{
-}
-#endif
-
-#ifndef ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
-static inline void flush_kernel_dcache_page(struct page *page)
-{
-}
-#endif
-
-#ifdef CONFIG_HIGHMEM
-
-#include <asm/highmem.h>
-
-/* declarations for linux/mm/highmem.c */
-unsigned int nr_free_highpages(void);
-
-#else /* CONFIG_HIGHMEM */
-
-static inline unsigned int nr_free_highpages(void) { return 0; }
-
-static inline void *kmap(struct page *page)
-{
- might_sleep();
- return page_address(page);
-}
-
-#define kunmap(page) do { (void) (page); } while (0)
-
-#define kmap_atomic(page, idx) page_address(page)
-#define kunmap_atomic(addr, idx) do { } while (0)
-#define kmap_atomic_pfn(pfn, idx) page_address(pfn_to_page(pfn))
-#define kmap_atomic_to_page(ptr) virt_to_page(ptr)
-
-#endif /* CONFIG_HIGHMEM */
-
-/* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */
-static inline void clear_user_highpage(struct page *page, unsigned long vaddr)
-{
- void *addr = kmap_atomic(page, KM_USER0);
- clear_user_page(addr, vaddr, page);
- kunmap_atomic(addr, KM_USER0);
- /* Make sure this page is cleared on other CPU's too before using it */
- smp_wmb();
-}
-
-#ifndef __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE
-static inline struct page *
-alloc_zeroed_user_highpage(struct vm_area_struct *vma, unsigned long vaddr)
-{
- struct page *page = alloc_page_vma(GFP_HIGHUSER, vma, vaddr);
-
- if (page)
- clear_user_highpage(page, vaddr);
-
- return page;
-}
-#endif
-
-static inline void clear_highpage(struct page *page)
-{
- void *kaddr = kmap_atomic(page, KM_USER0);
- clear_page(kaddr);
- kunmap_atomic(kaddr, KM_USER0);
-}
-
-/*
- * Same but also flushes aliased cache contents to RAM.
- */
-static inline void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size)
-{
- void *kaddr;
-
- BUG_ON(offset + size > PAGE_SIZE);
-
- kaddr = kmap_atomic(page, KM_USER0);
- memset((char *)kaddr + offset, 0, size);
- flush_dcache_page(page);
- kunmap_atomic(kaddr, KM_USER0);
-}
-
-static inline void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr)
-{
- char *vfrom, *vto;
-
- vfrom = kmap_atomic(from, KM_USER0);
- vto = kmap_atomic(to, KM_USER1);
- copy_user_page(vto, vfrom, vaddr, to);
- kunmap_atomic(vfrom, KM_USER0);
- kunmap_atomic(vto, KM_USER1);
- /* Make sure this page is cleared on other CPU's too before using it */
- smp_wmb();
-}
-
-static inline void copy_highpage(struct page *to, struct page *from)
-{
- char *vfrom, *vto;
-
- vfrom = kmap_atomic(from, KM_USER0);
- vto = kmap_atomic(to, KM_USER1);
- copy_page(vto, vfrom);
- kunmap_atomic(vfrom, KM_USER0);
- kunmap_atomic(vto, KM_USER1);
-}
-
-#endif /* _LINUX_HIGHMEM_H */
diff --git a/original/linux/hil.h b/original/linux/hil.h
deleted file mode 100644
index 13352d7..0000000
--- a/original/linux/hil.h
+++ /dev/null
@@ -1,483 +0,0 @@
-#ifndef _HIL_H_
-#define _HIL_H_
-
-/*
- * Hewlett Packard Human Interface Loop (HP-HIL) Protocol -- header.
- *
- * Copyright (c) 2001 Brian S. Julin
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL").
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- *
- * References:
- * HP-HIL Technical Reference Manual. Hewlett Packard Product No. 45918A
- *
- * A note of thanks to HP for providing and shipping reference materials
- * free of charge to help in the development of HIL support for Linux.
- *
- */
-
-#include <asm/types.h>
-
-/* Physical constants relevant to raw loop/device timing.
- */
-
-#define HIL_CLOCK 8MHZ
-#define HIL_EK1_CLOCK 30HZ
-#define HIL_EK2_CLOCK 60HZ
-
-#define HIL_TIMEOUT_DEV 5 /* ms */
-#define HIL_TIMEOUT_DEVS 10 /* ms */
-#define HIL_TIMEOUT_NORESP 10 /* ms */
-#define HIL_TIMEOUT_DEVS_DATA 16 /* ms */
-#define HIL_TIMEOUT_SELFTEST 200 /* ms */
-
-
-/* Actual wire line coding. These will only be useful if someone is
- * implementing a software MLC to run HIL devices on a non-parisc machine.
- */
-
-#define HIL_WIRE_PACKET_LEN 15
-enum hil_wire_bitpos {
- HIL_WIRE_START = 0,
- HIL_WIRE_ADDR2,
- HIL_WIRE_ADDR1,
- HIL_WIRE_ADDR0,
- HIL_WIRE_COMMAND,
- HIL_WIRE_DATA7,
- HIL_WIRE_DATA6,
- HIL_WIRE_DATA5,
- HIL_WIRE_DATA4,
- HIL_WIRE_DATA3,
- HIL_WIRE_DATA2,
- HIL_WIRE_DATA1,
- HIL_WIRE_DATA0,
- HIL_WIRE_PARITY,
- HIL_WIRE_STOP
-};
-
-/* HP documentation uses these bit positions to refer to commands;
- * we will call these "packets".
- */
-enum hil_pkt_bitpos {
- HIL_PKT_CMD = 0x00000800,
- HIL_PKT_ADDR2 = 0x00000400,
- HIL_PKT_ADDR1 = 0x00000200,
- HIL_PKT_ADDR0 = 0x00000100,
- HIL_PKT_ADDR_MASK = 0x00000700,
- HIL_PKT_ADDR_SHIFT = 8,
- HIL_PKT_DATA7 = 0x00000080,
- HIL_PKT_DATA6 = 0x00000040,
- HIL_PKT_DATA5 = 0x00000020,
- HIL_PKT_DATA4 = 0x00000010,
- HIL_PKT_DATA3 = 0x00000008,
- HIL_PKT_DATA2 = 0x00000004,
- HIL_PKT_DATA1 = 0x00000002,
- HIL_PKT_DATA0 = 0x00000001,
- HIL_PKT_DATA_MASK = 0x000000FF,
- HIL_PKT_DATA_SHIFT = 0
-};
-
-/* The HIL MLC also has several error/status/control bits. We extend the
- * "packet" to include these when direct access to the MLC is available,
- * or emulate them in cases where they are not available.
- *
- * This way the device driver knows that the underlying MLC driver
- * has had to deal with loop errors.
- */
-enum hil_error_bitpos {
- HIL_ERR_OB = 0x00000800, /* MLC is busy sending an auto-poll,
- or we have filled up the output
- buffer and must wait. */
- HIL_ERR_INT = 0x00010000, /* A normal interrupt has occurred. */
- HIL_ERR_NMI = 0x00020000, /* An NMI has occurred. */
- HIL_ERR_LERR = 0x00040000, /* A poll didn't come back. */
- HIL_ERR_PERR = 0x01000000, /* There was a Parity Error. */
- HIL_ERR_FERR = 0x02000000, /* There was a Framing Error. */
- HIL_ERR_FOF = 0x04000000 /* Input FIFO Overflowed. */
-};
-
-enum hil_control_bitpos {
- HIL_CTRL_TEST = 0x00010000,
- HIL_CTRL_IPF = 0x00040000,
- HIL_CTRL_APE = 0x02000000
-};
-
-/* Bits 30,31 are unused, we use them to control write behavior. */
-#define HIL_DO_ALTER_CTRL 0x40000000 /* Write MSW of packet to control
- before writing LSW to loop */
-#define HIL_CTRL_ONLY 0xc0000000 /* *Only* alter the control registers */
-
-/* This gives us a 32-bit "packet"
- */
-typedef u32 hil_packet;
-
-
-/* HIL Loop commands
- */
-enum hil_command {
- HIL_CMD_IFC = 0x00, /* Interface Clear */
- HIL_CMD_EPT = 0x01, /* Enter Pass-Thru Mode */
- HIL_CMD_ELB = 0x02, /* Enter Loop-Back Mode */
- HIL_CMD_IDD = 0x03, /* Identify and Describe */
- HIL_CMD_DSR = 0x04, /* Device Soft Reset */
- HIL_CMD_PST = 0x05, /* Perform Self Test */
- HIL_CMD_RRG = 0x06, /* Read Register */
- HIL_CMD_WRG = 0x07, /* Write Register */
- HIL_CMD_ACF = 0x08, /* Auto Configure */
- HIL_CMDID_ACF = 0x07, /* Auto Configure bits with incremented ID */
- HIL_CMD_POL = 0x10, /* Poll */
- HIL_CMDCT_POL = 0x0f, /* Poll command bits with item count */
- HIL_CMD_RPL = 0x20, /* RePoll */
- HIL_CMDCT_RPL = 0x0f, /* RePoll command bits with item count */
- HIL_CMD_RNM = 0x30, /* Report Name */
- HIL_CMD_RST = 0x31, /* Report Status */
- HIL_CMD_EXD = 0x32, /* Extended Describe */
- HIL_CMD_RSC = 0x33, /* Report Security Code */
-
- /* 0x34 to 0x3c reserved for future use */
-
- HIL_CMD_DKA = 0x3d, /* Disable Keyswitch Autorepeat */
- HIL_CMD_EK1 = 0x3e, /* Enable Keyswitch Autorepeat 1 */
- HIL_CMD_EK2 = 0x3f, /* Enable Keyswitch Autorepeat 2 */
- HIL_CMD_PR1 = 0x40, /* Prompt1 */
- HIL_CMD_PR2 = 0x41, /* Prompt2 */
- HIL_CMD_PR3 = 0x42, /* Prompt3 */
- HIL_CMD_PR4 = 0x43, /* Prompt4 */
- HIL_CMD_PR5 = 0x44, /* Prompt5 */
- HIL_CMD_PR6 = 0x45, /* Prompt6 */
- HIL_CMD_PR7 = 0x46, /* Prompt7 */
- HIL_CMD_PRM = 0x47, /* Prompt (General Purpose) */
- HIL_CMD_AK1 = 0x48, /* Acknowlege1 */
- HIL_CMD_AK2 = 0x49, /* Acknowlege2 */
- HIL_CMD_AK3 = 0x4a, /* Acknowlege3 */
- HIL_CMD_AK4 = 0x4b, /* Acknowlege4 */
- HIL_CMD_AK5 = 0x4c, /* Acknowlege5 */
- HIL_CMD_AK6 = 0x4d, /* Acknowlege6 */
- HIL_CMD_AK7 = 0x4e, /* Acknowlege7 */
- HIL_CMD_ACK = 0x4f, /* Acknowlege (General Purpose) */
-
- /* 0x50 to 0x78 reserved for future use */
- /* 0x80 to 0xEF device-specific commands */
- /* 0xf0 to 0xf9 reserved for future use */
-
- HIL_CMD_RIO = 0xfa, /* Register I/O Error */
- HIL_CMD_SHR = 0xfb, /* System Hard Reset */
- HIL_CMD_TER = 0xfc, /* Transmission Error */
- HIL_CMD_CAE = 0xfd, /* Configuration Address Error */
- HIL_CMD_DHR = 0xfe, /* Device Hard Reset */
-
- /* 0xff is prohibited from use. */
-};
-
-
-/*
- * Response "records" to HIL commands
- */
-
-/* Device ID byte
- */
-#define HIL_IDD_DID_TYPE_MASK 0xe0 /* Primary type bits */
-#define HIL_IDD_DID_TYPE_KB_INTEGRAL 0xa0 /* Integral keyboard */
-#define HIL_IDD_DID_TYPE_KB_ITF 0xc0 /* ITD keyboard */
-#define HIL_IDD_DID_TYPE_KB_RSVD 0xe0 /* Reserved keyboard type */
-#define HIL_IDD_DID_TYPE_KB_LANG_MASK 0x1f /* Keyboard locale bits */
-#define HIL_IDD_DID_KBLANG_USE_ESD 0x00 /* Use ESD Locale instead */
-#define HIL_IDD_DID_TYPE_ABS 0x80 /* Absolute Positioners */
-#define HIL_IDD_DID_ABS_RSVD1_MASK 0xf8 /* Reserved */
-#define HIL_IDD_DID_ABS_RSVD1 0x98
-#define HIL_IDD_DID_ABS_TABLET_MASK 0xf8 /* Tablets and digitizers */
-#define HIL_IDD_DID_ABS_TABLET 0x90
-#define HIL_IDD_DID_ABS_TSCREEN_MASK 0xfc /* Touch screens */
-#define HIL_IDD_DID_ABS_TSCREEN 0x8c
-#define HIL_IDD_DID_ABS_RSVD2_MASK 0xfc /* Reserved */
-#define HIL_IDD_DID_ABS_RSVD2 0x88
-#define HIL_IDD_DID_ABS_RSVD3_MASK 0xfc /* Reserved */
-#define HIL_IDD_DID_ABS_RSVD3 0x80
-#define HIL_IDD_DID_TYPE_REL 0x60 /* Relative Positioners */
-#define HIL_IDD_DID_REL_RSVD1_MASK 0xf0 /* Reserved */
-#define HIL_IDD_DID_REL_RSVD1 0x70
-#define HIL_IDD_DID_REL_RSVD2_MASK 0xfc /* Reserved */
-#define HIL_IDD_DID_REL_RSVD2 0x6c
-#define HIL_IDD_DID_REL_MOUSE_MASK 0xfc /* Mouse */
-#define HIL_IDD_DID_REL_MOUSE 0x68
-#define HIL_IDD_DID_REL_QUAD_MASK 0xf8 /* Other Quadrature Devices */
-#define HIL_IDD_DID_REL_QUAD 0x60
-#define HIL_IDD_DID_TYPE_CHAR 0x40 /* Character Entry */
-#define HIL_IDD_DID_CHAR_BARCODE_MASK 0xfc /* Barcode Reader */
-#define HIL_IDD_DID_CHAR_BARCODE 0x5c
-#define HIL_IDD_DID_CHAR_RSVD1_MASK 0xfc /* Reserved */
-#define HIL_IDD_DID_CHAR_RSVD1 0x58
-#define HIL_IDD_DID_CHAR_RSVD2_MASK 0xf8 /* Reserved */
-#define HIL_IDD_DID_CHAR_RSVD2 0x50
-#define HIL_IDD_DID_CHAR_RSVD3_MASK 0xf0 /* Reserved */
-#define HIL_IDD_DID_CHAR_RSVD3 0x40
-#define HIL_IDD_DID_TYPE_OTHER 0x20 /* Miscellaneous */
-#define HIL_IDD_DID_OTHER_RSVD1_MASK 0xf0 /* Reserved */
-#define HIL_IDD_DID_OTHER_RSVD1 0x30
-#define HIL_IDD_DID_OTHER_BARCODE_MASK 0xfc /* Tone Generator */
-#define HIL_IDD_DID_OTHER_BARCODE 0x2c
-#define HIL_IDD_DID_OTHER_RSVD2_MASK 0xfc /* Reserved */
-#define HIL_IDD_DID_OTHER_RSVD2 0x28
-#define HIL_IDD_DID_OTHER_RSVD3_MASK 0xf8 /* Reserved */
-#define HIL_IDD_DID_OTHER_RSVD3 0x20
-#define HIL_IDD_DID_TYPE_KEYPAD 0x00 /* Vectra Keyboard */
-
-/* IDD record header
- */
-#define HIL_IDD_HEADER_AXSET_MASK 0x03 /* Number of axis in a set */
-#define HIL_IDD_HEADER_RSC 0x04 /* Supports RSC command */
-#define HIL_IDD_HEADER_EXD 0x08 /* Supports EXD command */
-#define HIL_IDD_HEADER_IOD 0x10 /* IOD byte to follow */
-#define HIL_IDD_HEADER_16BIT 0x20 /* 16 (vs. 8) bit resolution */
-#define HIL_IDD_HEADER_ABS 0x40 /* Reports Absolute Position */
-#define HIL_IDD_HEADER_2X_AXIS 0x80 /* Two sets of 1-3 axis */
-
-/* I/O Descriptor
- */
-#define HIL_IDD_IOD_NBUTTON_MASK 0x07 /* Number of buttons */
-#define HIL_IDD_IOD_PROXIMITY 0x08 /* Proximity in/out events */
-#define HIL_IDD_IOD_PROMPT_MASK 0x70 /* Number of prompts/acks */
-#define HIL_IDD_IOD_PROMPT_SHIFT 4
-#define HIL_IDD_IOD_PROMPT 0x80 /* Generic prompt/ack */
-
-#define HIL_IDD_NUM_AXES_PER_SET(header_packet) \
-((header_packet) & HIL_IDD_HEADER_AXSET_MASK)
-
-#define HIL_IDD_NUM_AXSETS(header_packet) \
-(2 - !((header_packet) & HIL_IDD_HEADER_2X_AXIS))
-
-#define HIL_IDD_LEN(header_packet) \
-((4 - !(header_packet & HIL_IDD_HEADER_IOD) - \
- 2 * !(HIL_IDD_NUM_AXES_PER_SET(header_packet))) + \
- 2 * HIL_IDD_NUM_AXES_PER_SET(header_packet) * \
- !!((header_packet) & HIL_IDD_HEADER_ABS))
-
-/* The following HIL_IDD_* macros assume you have an array of
- * packets and/or unpacked 8-bit data in the order that they
- * were received.
- */
-
-#define HIL_IDD_AXIS_COUNTS_PER_M(header_ptr) \
-(!(HIL_IDD_NUM_AXSETS(*(header_ptr))) ? -1 : \
-(((*(header_ptr + 1) & HIL_PKT_DATA_MASK) + \
- ((*(header_ptr + 2) & HIL_PKT_DATA_MASK)) << 8) \
-* ((*(header_ptr) & HIL_IDD_HEADER_16BIT) ? 100 : 1)))
-
-#define HIL_IDD_AXIS_MAX(header_ptr, __axnum) \
-((!(*(header_ptr) & HIL_IDD_HEADER_ABS) || \
- (HIL_IDD_NUM_AXES_PER_SET(*(header_ptr)) <= __axnum)) ? 0 : \
- ((HIL_PKT_DATA_MASK & *((header_ptr) + 3 + 2 * __axnum)) + \
- ((HIL_PKT_DATA_MASK & *((header_ptr) + 4 + 2 * __axnum)) << 8)))
-
-#define HIL_IDD_IOD(header_ptr) \
-(*(header_ptr + HIL_IDD_LEN((*header_ptr)) - 1))
-
-#define HIL_IDD_HAS_GEN_PROMPT(header_ptr) \
-((*header_ptr & HIL_IDD_HEADER_IOD) && \
- (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROMPT))
-
-#define HIL_IDD_HAS_GEN_PROXIMITY(header_ptr) \
-((*header_ptr & HIL_IDD_HEADER_IOD) && \
- (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_PROXIMITY))
-
-#define HIL_IDD_NUM_BUTTONS(header_ptr) \
-((*header_ptr & HIL_IDD_HEADER_IOD) ? \
- (HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NBUTTON_MASK) : 0)
-
-#define HIL_IDD_NUM_PROMPTS(header_ptr) \
-((*header_ptr & HIL_IDD_HEADER_IOD) ? \
- ((HIL_IDD_IOD(header_ptr) & HIL_IDD_IOD_NPROMPT_MASK) \
- >> HIL_IDD_IOD_PROMPT_SHIFT) : 0)
-
-/* The response to HIL EXD commands -- the "extended describe record" */
-#define HIL_EXD_HEADER_WRG 0x03 /* Supports type2 WRG */
-#define HIL_EXD_HEADER_WRG_TYPE1 0x01 /* Supports type1 WRG */
-#define HIL_EXD_HEADER_WRG_TYPE2 0x02 /* Supports type2 WRG */
-#define HIL_EXD_HEADER_RRG 0x04 /* Supports RRG command */
-#define HIL_EXD_HEADER_RNM 0x10 /* Supports RNM command */
-#define HIL_EXD_HEADER_RST 0x20 /* Supports RST command */
-#define HIL_EXD_HEADER_LOCALE 0x40 /* Contains locale code */
-
-#define HIL_EXD_NUM_RRG(header_ptr) \
-((*header_ptr & HIL_EXD_HEADER_RRG) ? \
- (*(header_ptr + 1) & HIL_PKT_DATA_MASK) : 0)
-
-#define HIL_EXD_NUM_WWG(header_ptr) \
-((*header_ptr & HIL_EXD_HEADER_WRG) ? \
- (*(header_ptr + 2 - !(*header_ptr & HIL_EXD_HEADER_RRG)) & \
- HIL_PKT_DATA_MASK) : 0)
-
-#define HIL_EXD_LEN(header_ptr) \
-(!!(*header_ptr & HIL_EXD_HEADER_RRG) + \
- !!(*header_ptr & HIL_EXD_HEADER_WRG) + \
- !!(*header_ptr & HIL_EXD_HEADER_LOCALE) + \
- 2 * !!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) + 1)
-
-#define HIL_EXD_LOCALE(header_ptr) \
-(!(*header_ptr & HIL_EXD_HEADER_LOCALE) ? -1 : \
- (*(header_ptr + HIL_EXD_LEN(header_ptr) - 1) & HIL_PKT_DATA_MASK))
-
-#define HIL_EXD_WRG_TYPE2_LEN(header_ptr) \
-(!(*header_ptr & HIL_EXD_HEADER_WRG_TYPE2) ? -1 : \
- (*(header_ptr + HIL_EXD_LEN(header_ptr) - 2 - \
- !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) + \
- ((*(header_ptr + HIL_EXD_LEN(header_ptr) - 1 - \
- !!(*header_ptr & HIL_EXD_HEADER_LOCALE)) & HIL_PKT_DATA_MASK) << 8))
-
-/* Device locale codes. */
-
-/* Last defined locale code. Everything above this is "Reserved",
- and note that this same table applies to the Device ID Byte where
- keyboards may have a nationality code which is only 5 bits. */
-#define HIL_LOCALE_MAX 0x1f
-
-/* Map to hopefully useful strings. I was trying to make these look
- like locale.aliases strings do; maybe that isn't the right table to
- emulate. In either case, I didn't have much to work on. */
-#define HIL_LOCALE_MAP \
-"", /* 0x00 Reserved */ \
-"", /* 0x01 Reserved */ \
-"", /* 0x02 Reserved */ \
-"swiss.french", /* 0x03 Swiss/French */ \
-"portuguese", /* 0x04 Portuguese */ \
-"arabic", /* 0x05 Arabic */ \
-"hebrew", /* 0x06 Hebrew */ \
-"english.canadian", /* 0x07 Canadian English */ \
-"turkish", /* 0x08 Turkish */ \
-"greek", /* 0x09 Greek */ \
-"thai", /* 0x0a Thai (Thailand) */ \
-"italian", /* 0x0b Italian */ \
-"korean", /* 0x0c Hangul (Korea) */ \
-"dutch", /* 0x0d Dutch */ \
-"swedish", /* 0x0e Swedish */ \
-"german", /* 0x0f German */ \
-"chinese", /* 0x10 Chinese-PRC */ \
-"chinese", /* 0x11 Chinese-ROC */ \
-"swiss.french", /* 0x12 Swiss/French II */ \
-"spanish", /* 0x13 Spanish */ \
-"swiss.german", /* 0x14 Swiss/German II */ \
-"flemish", /* 0x15 Belgian (Flemish) */ \
-"finnish", /* 0x16 Finnish */ \
-"english.uk", /* 0x17 United Kingdom */ \
-"french.canadian", /* 0x18 French/Canadian */ \
-"swiss.german", /* 0x19 Swiss/German */ \
-"norwegian", /* 0x1a Norwegian */ \
-"french", /* 0x1b French */ \
-"danish", /* 0x1c Danish */ \
-"japanese", /* 0x1d Katakana */ \
-"spanish", /* 0x1e Latin American/Spanish*/\
-"english.us" /* 0x1f United States */ \
-
-
-/* HIL keycodes */
-#define HIL_KEYCODES_SET1_TBLSIZE 128
-#define HIL_KEYCODES_SET1 \
- KEY_5, KEY_RESERVED, KEY_RIGHTALT, KEY_LEFTALT, \
- KEY_RIGHTSHIFT, KEY_LEFTSHIFT, KEY_LEFTCTRL, KEY_SYSRQ, \
- KEY_KP4, KEY_KP8, KEY_KP5, KEY_KP9, \
- KEY_KP6, KEY_KP7, KEY_KPCOMMA, KEY_KPENTER, \
- KEY_KP1, KEY_KPSLASH, KEY_KP2, KEY_KPPLUS, \
- KEY_KP3, KEY_KPASTERISK, KEY_KP0, KEY_KPMINUS, \
- KEY_B, KEY_V, KEY_C, KEY_X, \
- KEY_Z, KEY_RESERVED, KEY_RESERVED, KEY_ESC, \
- KEY_6, KEY_F10, KEY_3, KEY_F11, \
- KEY_KPDOT, KEY_F9, KEY_TAB /*KP*/, KEY_F12, \
- KEY_H, KEY_G, KEY_F, KEY_D, \
- KEY_S, KEY_A, KEY_RESERVED, KEY_CAPSLOCK, \
- KEY_U, KEY_Y, KEY_T, KEY_R, \
- KEY_E, KEY_W, KEY_Q, KEY_TAB, \
- KEY_7, KEY_6, KEY_5, KEY_4, \
- KEY_3, KEY_2, KEY_1, KEY_GRAVE, \
- KEY_F13, KEY_F14, KEY_F15, KEY_F16, \
- KEY_F17, KEY_F18, KEY_F19, KEY_F20, \
- KEY_MENU, KEY_F4, KEY_F3, KEY_F2, \
- KEY_F1, KEY_VOLUMEUP, KEY_STOP, KEY_SENDFILE, \
- KEY_SYSRQ, KEY_F5, KEY_F6, KEY_F7, \
- KEY_F8, KEY_VOLUMEDOWN, KEY_DEL_EOL, KEY_DEL_EOS, \
- KEY_8, KEY_9, KEY_0, KEY_MINUS, \
- KEY_EQUAL, KEY_BACKSPACE, KEY_INS_LINE, KEY_DEL_LINE, \
- KEY_I, KEY_O, KEY_P, KEY_LEFTBRACE, \
- KEY_RIGHTBRACE, KEY_BACKSLASH, KEY_INSERT, KEY_DELETE, \
- KEY_J, KEY_K, KEY_L, KEY_SEMICOLON, \
- KEY_APOSTROPHE, KEY_ENTER, KEY_HOME, KEY_PAGEUP, \
- KEY_M, KEY_COMMA, KEY_DOT, KEY_SLASH, \
- KEY_BACKSLASH, KEY_SELECT, KEY_102ND, KEY_PAGEDOWN, \
- KEY_N, KEY_SPACE, KEY_NEXT, KEY_RESERVED, \
- KEY_LEFT, KEY_DOWN, KEY_UP, KEY_RIGHT
-
-
-#define HIL_KEYCODES_SET3_TBLSIZE 128
-#define HIL_KEYCODES_SET3 \
- KEY_RESERVED, KEY_ESC, KEY_1, KEY_2, \
- KEY_3, KEY_4, KEY_5, KEY_6, \
- KEY_7, KEY_8, KEY_9, KEY_0, \
- KEY_MINUS, KEY_EQUAL, KEY_BACKSPACE, KEY_TAB, \
- KEY_Q, KEY_W, KEY_E, KEY_R, \
- KEY_T, KEY_Y, KEY_U, KEY_I, \
- KEY_O, KEY_P, KEY_LEFTBRACE, KEY_RIGHTBRACE, \
- KEY_ENTER, KEY_LEFTCTRL, KEY_A, KEY_S, \
- KEY_D, KEY_F, KEY_G, KEY_H, \
- KEY_J, KEY_K, KEY_L, KEY_SEMICOLON, \
- KEY_APOSTROPHE,KEY_GRAVE, KEY_LEFTSHIFT, KEY_BACKSLASH, \
- KEY_Z, KEY_X, KEY_C, KEY_V, \
- KEY_B, KEY_N, KEY_M, KEY_COMMA, \
- KEY_DOT, KEY_SLASH, KEY_RIGHTSHIFT, KEY_KPASTERISK, \
- KEY_LEFTALT, KEY_SPACE, KEY_CAPSLOCK, KEY_F1, \
- KEY_F2, KEY_F3, KEY_F4, KEY_F5, \
- KEY_F6, KEY_F7, KEY_F8, KEY_F9, \
- KEY_F10, KEY_NUMLOCK, KEY_SCROLLLOCK, KEY_KP7, \
- KEY_KP8, KEY_KP9, KEY_KPMINUS, KEY_KP4, \
- KEY_KP5, KEY_KP6, KEY_KPPLUS, KEY_KP1, \
- KEY_KP2, KEY_KP3, KEY_KP0, KEY_KPDOT, \
- KEY_SYSRQ, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, \
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, \
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, \
- KEY_UP, KEY_LEFT, KEY_DOWN, KEY_RIGHT, \
- KEY_HOME, KEY_PAGEUP, KEY_END, KEY_PAGEDOWN, \
- KEY_INSERT, KEY_DELETE, KEY_102ND, KEY_RESERVED, \
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, \
- KEY_F1, KEY_F2, KEY_F3, KEY_F4, \
- KEY_F5, KEY_F6, KEY_F7, KEY_F8, \
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, \
- KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED
-
-
-/* Response to POL command, the "poll record header" */
-
-#define HIL_POL_NUM_AXES_MASK 0x03 /* Number of axis reported */
-#define HIL_POL_CTS 0x04 /* Device ready to receive data */
-#define HIL_POL_STATUS_PENDING 0x08 /* Device has status to report */
-#define HIL_POL_CHARTYPE_MASK 0x70 /* Type of character data to follow */
-#define HIL_POL_CHARTYPE_NONE 0x00 /* No character data to follow */
-#define HIL_POL_CHARTYPE_RSVD1 0x10 /* Reserved Set 1 */
-#define HIL_POL_CHARTYPE_ASCII 0x20 /* U.S. ASCII */
-#define HIL_POL_CHARTYPE_BINARY 0x30 /* Binary data */
-#define HIL_POL_CHARTYPE_SET1 0x40 /* Keycode Set 1 */
-#define HIL_POL_CHARTYPE_RSVD2 0x50 /* Reserved Set 2 */
-#define HIL_POL_CHARTYPE_SET2 0x60 /* Keycode Set 2 */
-#define HIL_POL_CHARTYPE_SET3 0x70 /* Keycode Set 3 */
-#define HIL_POL_AXIS_ALT 0x80 /* Data is from axis set 2 */
-
-
-#endif /* _HIL_H_ */
diff --git a/original/linux/i2c.h b/original/linux/i2c.h
deleted file mode 100644
index eb0628a..0000000
--- a/original/linux/i2c.h
+++ /dev/null
@@ -1,655 +0,0 @@
-/* ------------------------------------------------------------------------- */
-/* */
-/* i2c.h - definitions for the i2c-bus interface */
-/* */
-/* ------------------------------------------------------------------------- */
-/* Copyright (C) 1995-2000 Simon G. Vogl
-
- 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.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-/* ------------------------------------------------------------------------- */
-
-/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
- Frodo Looijaard <frodol@dds.nl> */
-
-#ifndef _LINUX_I2C_H
-#define _LINUX_I2C_H
-
-#include <linux/types.h>
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include <linux/i2c-id.h>
-#include <linux/mod_devicetable.h>
-#include <linux/device.h> /* for struct device */
-#include <linux/sched.h> /* for completion */
-#include <linux/mutex.h>
-
-/* --- For i2c-isa ---------------------------------------------------- */
-
-extern void i2c_adapter_dev_release(struct device *dev);
-extern struct device_driver i2c_adapter_driver;
-extern struct class i2c_adapter_class;
-extern struct bus_type i2c_bus_type;
-
-/* --- General options ------------------------------------------------ */
-
-struct i2c_msg;
-struct i2c_algorithm;
-struct i2c_adapter;
-struct i2c_client;
-struct i2c_driver;
-union i2c_smbus_data;
-
-/*
- * The master routines are the ones normally used to transmit data to devices
- * on a bus (or read from them). Apart from two basic transfer functions to
- * transmit one message at a time, a more complex version can be used to
- * transmit an arbitrary number of messages without interruption.
- */
-extern int i2c_master_send(struct i2c_client *,const char* ,int);
-extern int i2c_master_recv(struct i2c_client *,char* ,int);
-
-/* Transfer num messages.
- */
-extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num);
-
-/*
- * Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
- * This is not tested/implemented yet and will change in the future.
- */
-extern int i2c_slave_send(struct i2c_client *,char*,int);
-extern int i2c_slave_recv(struct i2c_client *,char*,int);
-
-
-
-/* This is the very generalized SMBus access routine. You probably do not
- want to use this, though; one of the functions below may be much easier,
- and probably just as fast.
- Note that we use i2c_adapter here, because you do not need a specific
- smbus adapter to call this function. */
-extern s32 i2c_smbus_xfer (struct i2c_adapter * adapter, u16 addr,
- unsigned short flags,
- char read_write, u8 command, int size,
- union i2c_smbus_data * data);
-
-/* Now follow the 'nice' access routines. These also document the calling
- conventions of smbus_access. */
-
-extern s32 i2c_smbus_write_quick(struct i2c_client * client, u8 value);
-extern s32 i2c_smbus_read_byte(struct i2c_client * client);
-extern s32 i2c_smbus_write_byte(struct i2c_client * client, u8 value);
-extern s32 i2c_smbus_read_byte_data(struct i2c_client * client, u8 command);
-extern s32 i2c_smbus_write_byte_data(struct i2c_client * client,
- u8 command, u8 value);
-extern s32 i2c_smbus_read_word_data(struct i2c_client * client, u8 command);
-extern s32 i2c_smbus_write_word_data(struct i2c_client * client,
- u8 command, u16 value);
-extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
- u8 command, u8 length,
- const u8 *values);
-/* Returns the number of read bytes */
-extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
- u8 command, u8 *values);
-extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
- u8 command, u8 length,
- const u8 *values);
-
-/*
- * A driver is capable of handling one or more physical devices present on
- * I2C adapters. This information is used to inform the driver of adapter
- * events.
- *
- * The driver.owner field should be set to the module owner of this driver.
- * The driver.name field should be set to the name of this driver.
- */
-
-struct i2c_driver {
- int id;
- unsigned int class;
-
- /* Notifies the driver that a new bus has appeared. This routine
- * can be used by the driver to test if the bus meets its conditions
- * & seek for the presence of the chip(s) it supports. If found, it
- * registers the client(s) that are on the bus to the i2c admin. via
- * i2c_attach_client.
- */
- int (*attach_adapter)(struct i2c_adapter *);
- int (*detach_adapter)(struct i2c_adapter *);
-
- /* tells the driver that a client is about to be deleted & gives it
- * the chance to remove its private data. Also, if the client struct
- * has been dynamically allocated by the driver in the function above,
- * it must be freed here.
- */
- int (*detach_client)(struct i2c_client *);
-
- /* a ioctl like command that can be used to perform specific functions
- * with the device.
- */
- int (*command)(struct i2c_client *client,unsigned int cmd, void *arg);
-
- struct device_driver driver;
- struct list_head list;
-};
-#define to_i2c_driver(d) container_of(d, struct i2c_driver, driver)
-
-#define I2C_NAME_SIZE 50
-
-/*
- * i2c_client identifies a single device (i.e. chip) that is connected to an
- * i2c bus. The behaviour is defined by the routines of the driver. This
- * function is mainly used for lookup & other admin. functions.
- */
-struct i2c_client {
- unsigned int flags; /* div., see below */
- unsigned short addr; /* chip address - NOTE: 7bit */
- /* addresses are stored in the */
- /* _LOWER_ 7 bits */
- struct i2c_adapter *adapter; /* the adapter we sit on */
- struct i2c_driver *driver; /* and our access routines */
- int usage_count; /* How many accesses currently */
- /* to the client */
- struct device dev; /* the device structure */
- struct list_head list;
- char name[I2C_NAME_SIZE];
- struct completion released;
-};
-#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
-
-static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
-{
- return to_i2c_client(container_of(kobj, struct device, kobj));
-}
-
-static inline void *i2c_get_clientdata (struct i2c_client *dev)
-{
- return dev_get_drvdata (&dev->dev);
-}
-
-static inline void i2c_set_clientdata (struct i2c_client *dev, void *data)
-{
- dev_set_drvdata (&dev->dev, data);
-}
-
-/*
- * The following structs are for those who like to implement new bus drivers:
- * i2c_algorithm is the interface to a class of hardware solutions which can
- * be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584
- * to name two of the most common.
- */
-struct i2c_algorithm {
- /* If an adapter algorithm can't do I2C-level access, set master_xfer
- to NULL. If an adapter algorithm can do SMBus access, set
- smbus_xfer. If set to NULL, the SMBus protocol is simulated
- using common I2C messages */
- /* master_xfer should return the number of messages successfully
- processed, or a negative value on error */
- int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
- int num);
- int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
- unsigned short flags, char read_write,
- u8 command, int size, union i2c_smbus_data * data);
-
- /* --- these optional/future use for some adapter types.*/
- int (*slave_send)(struct i2c_adapter *,char*,int);
- int (*slave_recv)(struct i2c_adapter *,char*,int);
-
- /* --- ioctl like call to set div. parameters. */
- int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long);
-
- /* To determine what the adapter supports */
- u32 (*functionality) (struct i2c_adapter *);
-};
-
-/*
- * i2c_adapter is the structure used to identify a physical i2c bus along
- * with the access algorithms necessary to access it.
- */
-struct i2c_adapter {
- struct module *owner;
- unsigned int id;
- unsigned int class;
- struct i2c_algorithm *algo;/* the algorithm to access the bus */
- void *algo_data;
-
- /* --- administration stuff. */
- int (*client_register)(struct i2c_client *);
- int (*client_unregister)(struct i2c_client *);
-
- /* data fields that are valid for all devices */
- struct mutex bus_lock;
- struct mutex clist_lock;
-
- int timeout;
- int retries;
- struct device dev; /* the adapter device */
- struct class_device class_dev; /* the class device */
-
- int nr;
- struct list_head clients;
- struct list_head list;
- char name[I2C_NAME_SIZE];
- struct completion dev_released;
- struct completion class_dev_released;
-};
-#define dev_to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
-#define class_dev_to_i2c_adapter(d) container_of(d, struct i2c_adapter, class_dev)
-
-static inline void *i2c_get_adapdata (struct i2c_adapter *dev)
-{
- return dev_get_drvdata (&dev->dev);
-}
-
-static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data)
-{
- dev_set_drvdata (&dev->dev, data);
-}
-
-/*flags for the client struct: */
-#define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */
-#define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */
- /* Must equal I2C_M_TEN below */
-
-/* i2c adapter classes (bitmask) */
-#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */
-#define I2C_CLASS_TV_ANALOG (1<<1) /* bttv + friends */
-#define I2C_CLASS_TV_DIGITAL (1<<2) /* dvb cards */
-#define I2C_CLASS_DDC (1<<3) /* i2c-matroxfb ? */
-#define I2C_CLASS_CAM_ANALOG (1<<4) /* camera with analog CCD */
-#define I2C_CLASS_CAM_DIGITAL (1<<5) /* most webcams */
-#define I2C_CLASS_SOUND (1<<6) /* sound devices */
-#define I2C_CLASS_ALL (UINT_MAX) /* all of the above */
-
-/* i2c_client_address_data is the struct for holding default client
- * addresses for a driver and for the parameters supplied on the
- * command line
- */
-struct i2c_client_address_data {
- unsigned short *normal_i2c;
- unsigned short *probe;
- unsigned short *ignore;
- unsigned short **forces;
-};
-
-/* Internal numbers to terminate lists */
-#define I2C_CLIENT_END 0xfffeU
-
-/* The numbers to use to set I2C bus address */
-#define ANY_I2C_BUS 0xffff
-#define ANY_I2C_ISA_BUS 9191
-
-
-/* ----- functions exported by i2c.o */
-
-/* administration...
- */
-extern int i2c_add_adapter(struct i2c_adapter *);
-extern int i2c_del_adapter(struct i2c_adapter *);
-
-extern int i2c_register_driver(struct module *, struct i2c_driver *);
-extern int i2c_del_driver(struct i2c_driver *);
-
-static inline int i2c_add_driver(struct i2c_driver *driver)
-{
- return i2c_register_driver(THIS_MODULE, driver);
-}
-
-extern int i2c_attach_client(struct i2c_client *);
-extern int i2c_detach_client(struct i2c_client *);
-
-/* Should be used to make sure that client-struct is valid and that it
- is okay to access the i2c-client.
- returns -ENODEV if client has gone in the meantime */
-extern int i2c_use_client(struct i2c_client *);
-extern int i2c_release_client(struct i2c_client *);
-
-/* call the i2c_client->command() of all attached clients with
- * the given arguments */
-extern void i2c_clients_command(struct i2c_adapter *adap,
- unsigned int cmd, void *arg);
-
-/* returns -EBUSY if address has been taken, 0 if not. Note that the only
- other place at which this is called is within i2c_attach_client; so
- you can cheat by simply not registering. Not recommended, of course! */
-extern int i2c_check_addr (struct i2c_adapter *adapter, int addr);
-
-/* Detect function. It iterates over all possible addresses itself.
- * It will only call found_proc if some client is connected at the
- * specific address (unless a 'force' matched);
- */
-extern int i2c_probe(struct i2c_adapter *adapter,
- struct i2c_client_address_data *address_data,
- int (*found_proc) (struct i2c_adapter *, int, int));
-
-/* An ioctl like call to set div. parameters of the adapter.
- */
-extern int i2c_control(struct i2c_client *,unsigned int, unsigned long);
-
-extern struct i2c_adapter* i2c_get_adapter(int id);
-extern void i2c_put_adapter(struct i2c_adapter *adap);
-
-
-/* Return the functionality mask */
-static inline u32 i2c_get_functionality(struct i2c_adapter *adap)
-{
- return adap->algo->functionality(adap);
-}
-
-/* Return 1 if adapter supports everything we need, 0 if not. */
-static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func)
-{
- return (func & i2c_get_functionality(adap)) == func;
-}
-
-/* Return id number for a specific adapter */
-static inline int i2c_adapter_id(struct i2c_adapter *adap)
-{
- return adap->nr;
-}
-#endif /* __KERNEL__ */
-
-/*
- * I2C Message - used for pure i2c transaction, also from /dev interface
- */
-struct i2c_msg {
- __u16 addr; /* slave address */
- __u16 flags;
-#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
-#define I2C_M_RD 0x01
-#define I2C_M_NOSTART 0x4000
-#define I2C_M_REV_DIR_ADDR 0x2000
-#define I2C_M_IGNORE_NAK 0x1000
-#define I2C_M_NO_RD_ACK 0x0800
- __u16 len; /* msg length */
- __u8 *buf; /* pointer to msg data */
-};
-
-/* To determine what functionality is present */
-
-#define I2C_FUNC_I2C 0x00000001
-#define I2C_FUNC_10BIT_ADDR 0x00000002
-#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */
-#define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */
-#define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 /* SMBus 2.0 */
-#define I2C_FUNC_SMBUS_QUICK 0x00010000
-#define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
-#define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
-#define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
-#define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
-#define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
-#define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
-#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
-#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
-#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
-#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */
-#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
-#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */
-#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */
-
-#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
- I2C_FUNC_SMBUS_WRITE_BYTE)
-#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
- I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
-#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
- I2C_FUNC_SMBUS_WRITE_WORD_DATA)
-#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
- I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
-#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
- I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
-#define I2C_FUNC_SMBUS_I2C_BLOCK_2 (I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \
- I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2)
-
-#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
- I2C_FUNC_SMBUS_BYTE | \
- I2C_FUNC_SMBUS_BYTE_DATA | \
- I2C_FUNC_SMBUS_WORD_DATA | \
- I2C_FUNC_SMBUS_PROC_CALL | \
- I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
- I2C_FUNC_SMBUS_I2C_BLOCK)
-
-/*
- * Data for SMBus Messages
- */
-#define I2C_SMBUS_BLOCK_MAX 32 /* As specified in SMBus standard */
-union i2c_smbus_data {
- __u8 byte;
- __u16 word;
- __u8 block[I2C_SMBUS_BLOCK_MAX + 2]; /* block[0] is used for length */
- /* and one more for user-space compatibility */
-};
-
-/* smbus_access read or write markers */
-#define I2C_SMBUS_READ 1
-#define I2C_SMBUS_WRITE 0
-
-/* SMBus transaction types (size parameter in the above functions)
- Note: these no longer correspond to the (arbitrary) PIIX4 internal codes! */
-#define I2C_SMBUS_QUICK 0
-#define I2C_SMBUS_BYTE 1
-#define I2C_SMBUS_BYTE_DATA 2
-#define I2C_SMBUS_WORD_DATA 3
-#define I2C_SMBUS_PROC_CALL 4
-#define I2C_SMBUS_BLOCK_DATA 5
-#define I2C_SMBUS_I2C_BLOCK_DATA 6
-#define I2C_SMBUS_BLOCK_PROC_CALL 7 /* SMBus 2.0 */
-
-
-/* ----- commands for the ioctl like i2c_command call:
- * note that additional calls are defined in the algorithm and hw
- * dependent layers - these can be listed here, or see the
- * corresponding header files.
- */
- /* -> bit-adapter specific ioctls */
-#define I2C_RETRIES 0x0701 /* number of times a device address */
- /* should be polled when not */
- /* acknowledging */
-#define I2C_TIMEOUT 0x0702 /* set timeout - call with int */
-
-
-/* this is for i2c-dev.c */
-#define I2C_SLAVE 0x0703 /* Change slave address */
- /* Attn.: Slave address is 7 or 10 bits */
-#define I2C_SLAVE_FORCE 0x0706 /* Change slave address */
- /* Attn.: Slave address is 7 or 10 bits */
- /* This changes the address, even if it */
- /* is already taken! */
-#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */
-
-#define I2C_FUNCS 0x0705 /* Get the adapter functionality */
-#define I2C_RDWR 0x0707 /* Combined R/W transfer (one stop only)*/
-#define I2C_PEC 0x0708 /* != 0 for SMBus PEC */
-
-#define I2C_SMBUS 0x0720 /* SMBus-level access */
-
-/* ----- I2C-DEV: char device interface stuff ------------------------- */
-#ifdef __KERNEL__
-
-#define I2C_MAJOR 89 /* Device major number */
-
-/* These defines are used for probing i2c client addresses */
-/* The length of the option lists */
-#define I2C_CLIENT_MAX_OPTS 48
-
-/* Default fill of many variables */
-#define I2C_CLIENT_DEFAULTS {I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END, \
- I2C_CLIENT_END, I2C_CLIENT_END, I2C_CLIENT_END}
-
-/* I2C_CLIENT_MODULE_PARM creates a module parameter, and puts it in the
- module header */
-
-#define I2C_CLIENT_MODULE_PARM(var,desc) \
- static unsigned short var[I2C_CLIENT_MAX_OPTS] = I2C_CLIENT_DEFAULTS; \
- static unsigned int var##_num; \
- module_param_array(var, short, &var##_num, 0); \
- MODULE_PARM_DESC(var,desc)
-
-#define I2C_CLIENT_MODULE_PARM_FORCE(name) \
-I2C_CLIENT_MODULE_PARM(force_##name, \
- "List of adapter,address pairs which are " \
- "unquestionably assumed to contain a `" \
- # name "' chip")
-
-
-#define I2C_CLIENT_INSMOD_COMMON \
-I2C_CLIENT_MODULE_PARM(probe, "List of adapter,address pairs to scan " \
- "additionally"); \
-I2C_CLIENT_MODULE_PARM(ignore, "List of adapter,address pairs not to " \
- "scan"); \
-static struct i2c_client_address_data addr_data = { \
- .normal_i2c = normal_i2c, \
- .probe = probe, \
- .ignore = ignore, \
- .forces = forces, \
-}
-
-/* These are the ones you want to use in your own drivers. Pick the one
- which matches the number of devices the driver differenciates between. */
-#define I2C_CLIENT_INSMOD \
- I2C_CLIENT_MODULE_PARM(force, \
- "List of adapter,address pairs to boldly assume " \
- "to be present"); \
- static unsigned short *forces[] = { \
- force, \
- NULL \
- }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_1(chip1) \
-enum chips { any_chip, chip1 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-static unsigned short *forces[] = { force, force_##chip1, NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_2(chip1, chip2) \
-enum chips { any_chip, chip1, chip2 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_3(chip1, chip2, chip3) \
-enum chips { any_chip, chip1, chip2, chip3 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip3); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, force_##chip3, \
- NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_4(chip1, chip2, chip3, chip4) \
-enum chips { any_chip, chip1, chip2, chip3, chip4 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip3); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip4); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, force_##chip3, \
- force_##chip4, NULL}; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_5(chip1, chip2, chip3, chip4, chip5) \
-enum chips { any_chip, chip1, chip2, chip3, chip4, chip5 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip3); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip4); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip5); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, force_##chip3, \
- force_##chip4, force_##chip5, \
- NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_6(chip1, chip2, chip3, chip4, chip5, chip6) \
-enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip3); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip4); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip5); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip6); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, force_##chip3, \
- force_##chip4, force_##chip5, \
- force_##chip6, NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_7(chip1, chip2, chip3, chip4, chip5, chip6, chip7) \
-enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \
- chip7 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip3); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip4); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip5); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip6); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip7); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, force_##chip3, \
- force_##chip4, force_##chip5, \
- force_##chip6, force_##chip7, \
- NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-
-#define I2C_CLIENT_INSMOD_8(chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8) \
-enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, \
- chip7, chip8 }; \
-I2C_CLIENT_MODULE_PARM(force, "List of adapter,address pairs to " \
- "boldly assume to be present"); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip1); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip2); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip3); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip4); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip5); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip6); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip7); \
-I2C_CLIENT_MODULE_PARM_FORCE(chip8); \
-static unsigned short *forces[] = { force, force_##chip1, \
- force_##chip2, force_##chip3, \
- force_##chip4, force_##chip5, \
- force_##chip6, force_##chip7, \
- force_##chip8, NULL }; \
-I2C_CLIENT_INSMOD_COMMON
-#endif /* __KERNEL__ */
-#endif /* _LINUX_I2C_H */
diff --git a/original/linux/icmp.h b/original/linux/icmp.h
deleted file mode 100644
index f0b571f..0000000
--- a/original/linux/icmp.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions for the ICMP protocol.
- *
- * Version: @(#)icmp.h 1.0.3 04/28/93
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_ICMP_H
-#define _LINUX_ICMP_H
-
-#include <linux/types.h>
-
-#define ICMP_ECHOREPLY 0 /* Echo Reply */
-#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
-#define ICMP_SOURCE_QUENCH 4 /* Source Quench */
-#define ICMP_REDIRECT 5 /* Redirect (change route) */
-#define ICMP_ECHO 8 /* Echo Request */
-#define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */
-#define ICMP_PARAMETERPROB 12 /* Parameter Problem */
-#define ICMP_TIMESTAMP 13 /* Timestamp Request */
-#define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */
-#define ICMP_INFO_REQUEST 15 /* Information Request */
-#define ICMP_INFO_REPLY 16 /* Information Reply */
-#define ICMP_ADDRESS 17 /* Address Mask Request */
-#define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */
-#define NR_ICMP_TYPES 18
-
-
-/* Codes for UNREACH. */
-#define ICMP_NET_UNREACH 0 /* Network Unreachable */
-#define ICMP_HOST_UNREACH 1 /* Host Unreachable */
-#define ICMP_PROT_UNREACH 2 /* Protocol Unreachable */
-#define ICMP_PORT_UNREACH 3 /* Port Unreachable */
-#define ICMP_FRAG_NEEDED 4 /* Fragmentation Needed/DF set */
-#define ICMP_SR_FAILED 5 /* Source Route failed */
-#define ICMP_NET_UNKNOWN 6
-#define ICMP_HOST_UNKNOWN 7
-#define ICMP_HOST_ISOLATED 8
-#define ICMP_NET_ANO 9
-#define ICMP_HOST_ANO 10
-#define ICMP_NET_UNR_TOS 11
-#define ICMP_HOST_UNR_TOS 12
-#define ICMP_PKT_FILTERED 13 /* Packet filtered */
-#define ICMP_PREC_VIOLATION 14 /* Precedence violation */
-#define ICMP_PREC_CUTOFF 15 /* Precedence cut off */
-#define NR_ICMP_UNREACH 15 /* instead of hardcoding immediate value */
-
-/* Codes for REDIRECT. */
-#define ICMP_REDIR_NET 0 /* Redirect Net */
-#define ICMP_REDIR_HOST 1 /* Redirect Host */
-#define ICMP_REDIR_NETTOS 2 /* Redirect Net for TOS */
-#define ICMP_REDIR_HOSTTOS 3 /* Redirect Host for TOS */
-
-/* Codes for TIME_EXCEEDED. */
-#define ICMP_EXC_TTL 0 /* TTL count exceeded */
-#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
-
-
-struct icmphdr {
- __u8 type;
- __u8 code;
- __u16 checksum;
- union {
- struct {
- __u16 id;
- __u16 sequence;
- } echo;
- __u32 gateway;
- struct {
- __u16 __unused;
- __u16 mtu;
- } frag;
- } un;
-};
-
-/*
- * constants for (set|get)sockopt
- */
-
-#define ICMP_FILTER 1
-
-struct icmp_filter {
- __u32 data;
-};
-
-
-#endif /* _LINUX_ICMP_H */
diff --git a/original/linux/icmpv6.h b/original/linux/icmpv6.h
deleted file mode 100644
index 4c4c74e..0000000
--- a/original/linux/icmpv6.h
+++ /dev/null
@@ -1,196 +0,0 @@
-#ifndef _LINUX_ICMPV6_H
-#define _LINUX_ICMPV6_H
-
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-struct icmp6hdr {
-
- __u8 icmp6_type;
- __u8 icmp6_code;
- __sum16 icmp6_cksum;
-
-
- union {
- __be32 un_data32[1];
- __be16 un_data16[2];
- __u8 un_data8[4];
-
- struct icmpv6_echo {
- __be16 identifier;
- __be16 sequence;
- } u_echo;
-
- struct icmpv6_nd_advt {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u32 reserved:5,
- override:1,
- solicited:1,
- router:1,
- reserved2:24;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u32 router:1,
- solicited:1,
- override:1,
- reserved:29;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
- } u_nd_advt;
-
- struct icmpv6_nd_ra {
- __u8 hop_limit;
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 reserved:3,
- router_pref:2,
- home_agent:1,
- other:1,
- managed:1;
-
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u8 managed:1,
- other:1,
- home_agent:1,
- router_pref:2,
- reserved:3;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
- __be16 rt_lifetime;
- } u_nd_ra;
-
- } icmp6_dataun;
-
-#define icmp6_identifier icmp6_dataun.u_echo.identifier
-#define icmp6_sequence icmp6_dataun.u_echo.sequence
-#define icmp6_pointer icmp6_dataun.un_data32[0]
-#define icmp6_mtu icmp6_dataun.un_data32[0]
-#define icmp6_unused icmp6_dataun.un_data32[0]
-#define icmp6_maxdelay icmp6_dataun.un_data16[0]
-#define icmp6_router icmp6_dataun.u_nd_advt.router
-#define icmp6_solicited icmp6_dataun.u_nd_advt.solicited
-#define icmp6_override icmp6_dataun.u_nd_advt.override
-#define icmp6_ndiscreserved icmp6_dataun.u_nd_advt.reserved
-#define icmp6_hop_limit icmp6_dataun.u_nd_ra.hop_limit
-#define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed
-#define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other
-#define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime
-#define icmp6_router_pref icmp6_dataun.u_nd_ra.router_pref
-};
-
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb)
-{
- return (struct icmp6hdr *)skb_transport_header(skb);
-}
-#endif
-
-#define ICMPV6_ROUTER_PREF_LOW 0x3
-#define ICMPV6_ROUTER_PREF_MEDIUM 0x0
-#define ICMPV6_ROUTER_PREF_HIGH 0x1
-#define ICMPV6_ROUTER_PREF_INVALID 0x2
-
-#define ICMPV6_DEST_UNREACH 1
-#define ICMPV6_PKT_TOOBIG 2
-#define ICMPV6_TIME_EXCEED 3
-#define ICMPV6_PARAMPROB 4
-
-#define ICMPV6_INFOMSG_MASK 0x80
-
-#define ICMPV6_ECHO_REQUEST 128
-#define ICMPV6_ECHO_REPLY 129
-#define ICMPV6_MGM_QUERY 130
-#define ICMPV6_MGM_REPORT 131
-#define ICMPV6_MGM_REDUCTION 132
-
-#define ICMPV6_NI_QUERY 139
-#define ICMPV6_NI_REPLY 140
-
-#define ICMPV6_MLD2_REPORT 143
-
-#define ICMPV6_DHAAD_REQUEST 144
-#define ICMPV6_DHAAD_REPLY 145
-#define ICMPV6_MOBILE_PREFIX_SOL 146
-#define ICMPV6_MOBILE_PREFIX_ADV 147
-
-/*
- * Codes for Destination Unreachable
- */
-#define ICMPV6_NOROUTE 0
-#define ICMPV6_ADM_PROHIBITED 1
-#define ICMPV6_NOT_NEIGHBOUR 2
-#define ICMPV6_ADDR_UNREACH 3
-#define ICMPV6_PORT_UNREACH 4
-
-/*
- * Codes for Time Exceeded
- */
-#define ICMPV6_EXC_HOPLIMIT 0
-#define ICMPV6_EXC_FRAGTIME 1
-
-/*
- * Codes for Parameter Problem
- */
-#define ICMPV6_HDR_FIELD 0
-#define ICMPV6_UNK_NEXTHDR 1
-#define ICMPV6_UNK_OPTION 2
-
-/*
- * constants for (set|get)sockopt
- */
-
-#define ICMPV6_FILTER 1
-
-/*
- * ICMPV6 filter
- */
-
-#define ICMPV6_FILTER_BLOCK 1
-#define ICMPV6_FILTER_PASS 2
-#define ICMPV6_FILTER_BLOCKOTHERS 3
-#define ICMPV6_FILTER_PASSONLY 4
-
-struct icmp6_filter {
- __u32 data[8];
-};
-
-/*
- * Definitions for MLDv2
- */
-#define MLD2_MODE_IS_INCLUDE 1
-#define MLD2_MODE_IS_EXCLUDE 2
-#define MLD2_CHANGE_TO_INCLUDE 3
-#define MLD2_CHANGE_TO_EXCLUDE 4
-#define MLD2_ALLOW_NEW_SOURCES 5
-#define MLD2_BLOCK_OLD_SOURCES 6
-
-#define MLD2_ALL_MCR_INIT { { { 0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,0x16 } } }
-
-#ifdef __KERNEL__
-
-#include <linux/netdevice.h>
-
-extern void icmpv6_send(struct sk_buff *skb,
- u8 type, u8 code,
- __u32 info);
-
-extern int icmpv6_init(void);
-extern int icmpv6_err_convert(u8 type, u8 code,
- int *err);
-extern void icmpv6_cleanup(void);
-extern void icmpv6_param_prob(struct sk_buff *skb,
- u8 code, int pos);
-
-struct flowi;
-struct in6_addr;
-extern void icmpv6_flow_init(struct sock *sk,
- struct flowi *fl,
- u8 type,
- const struct in6_addr *saddr,
- const struct in6_addr *daddr,
- int oif);
-#endif
-
-#endif
diff --git a/original/linux/idle_stats_device.h b/original/linux/idle_stats_device.h
deleted file mode 100644
index cd613af..0000000
--- a/original/linux/idle_stats_device.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef __ARCH_ARM_MACH_MSM_IDLE_STATS_DEVICE_H
-#define __ARCH_ARM_MACH_MSM_IDLE_STATS_DEVICE_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#define MSM_IDLE_STATS_EVENT_NONE 0
-#define MSM_IDLE_STATS_EVENT_BUSY_TIMER_EXPIRED 1
-#define MSM_IDLE_STATS_EVENT_BUSY_TIMER_EXPIRED_RESET 2
-#define MSM_IDLE_STATS_EVENT_COLLECTION_NEARLY_FULL 4
-#define MSM_IDLE_STATS_EVENT_COLLECTION_FULL 8
-#define MSM_IDLE_STATS_EVENT_IDLE_TIMER_EXPIRED 16
-
-/*
- * All time, timer, and time interval values are in units of
- * microseconds unless stated otherwise.
- */
-#define MSM_IDLE_STATS_NR_MAX_INTERVALS 200
-
-struct msm_idle_pulse {
- __s64 busy_start_time;
- __u32 busy_interval;
- __u32 wait_interval;
-};
-
-struct msm_idle_read_stats {
- __u32 event;
- __s64 return_timestamp;
- __u32 busy_timer_remaining;
- __u32 nr_collected;
- struct msm_idle_pulse pulse_chain[MSM_IDLE_STATS_NR_MAX_INTERVALS];
-};
-
-struct msm_idle_write_stats {
- __u32 busy_timer;
- __u32 next_busy_timer;
- __u32 max_samples;
-};
-
-#define MSM_IDLE_STATS_IOC_MAGIC 0xD8
-#define MSM_IDLE_STATS_IOC_READ_STATS \
- _IOWR(MSM_IDLE_STATS_IOC_MAGIC, 1, struct msm_idle_read_stats)
-#define MSM_IDLE_STATS_IOC_WRITE_STATS \
- _IOWR(MSM_IDLE_STATS_IOC_MAGIC, 2, struct msm_idle_write_stats)
-
-#ifdef __KERNEL__
-#include <linux/hrtimer.h>
-#include <linux/mutex.h>
-#include <linux/miscdevice.h>
-
-struct msm_idle_stats_device {
- const char *name;
- void (*get_sample)(struct msm_idle_stats_device *device,
- struct msm_idle_pulse *pulse);
-
- struct miscdevice miscdev;
- spinlock_t lock;
- wait_queue_head_t wait;
- struct list_head list;
- struct hrtimer busy_timer;
- ktime_t busy_timer_interval;
- ktime_t idle_start;
- ktime_t remaining_time;
- __u32 max_samples;
-
- struct msm_idle_read_stats *stats;
- struct msm_idle_read_stats stats_vector[2];
-};
-
-int msm_idle_stats_register_device(struct msm_idle_stats_device *device);
-int msm_idle_stats_deregister_device(struct msm_idle_stats_device *device);
-void msm_idle_stats_prepare_idle_start(struct msm_idle_stats_device *device);
-void msm_idle_stats_abort_idle_start(struct msm_idle_stats_device *device);
-void msm_idle_stats_idle_start(struct msm_idle_stats_device *device);
-void msm_idle_stats_idle_end(struct msm_idle_stats_device *device,
- struct msm_idle_pulse *pulse);
-void msm_idle_stats_update_event(struct msm_idle_stats_device *device,
- __u32 event);
-#endif
-
-#endif /* __ARCH_ARM_MACH_MSM_IDLE_STATS_DEVICE_H */
-
diff --git a/original/linux/if.h b/original/linux/if.h
deleted file mode 100644
index be350e6..0000000
--- a/original/linux/if.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the INET interface module.
- *
- * Version: @(#)if.h 1.0.2 04/18/93
- *
- * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988
- * Ross Biro
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_IF_H
-#define _LINUX_IF_H
-
-#include <linux/types.h> /* for "__kernel_caddr_t" et al */
-#include <linux/socket.h> /* for "struct sockaddr" et al */
-#include <linux/compiler.h> /* for "__user" et al */
-
-#define IFNAMSIZ 16
-#define IFALIASZ 256
-#include <linux/hdlc/ioctl.h>
-
-/* Standard interface flags (netdevice->flags). */
-#define IFF_UP 0x1 /* interface is up */
-#define IFF_BROADCAST 0x2 /* broadcast address valid */
-#define IFF_DEBUG 0x4 /* turn on debugging */
-#define IFF_LOOPBACK 0x8 /* is a loopback net */
-#define IFF_POINTOPOINT 0x10 /* interface is has p-p link */
-#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */
-#define IFF_RUNNING 0x40 /* interface RFC2863 OPER_UP */
-#define IFF_NOARP 0x80 /* no ARP protocol */
-#define IFF_PROMISC 0x100 /* receive all packets */
-#define IFF_ALLMULTI 0x200 /* receive all multicast packets*/
-
-#define IFF_MASTER 0x400 /* master of a load balancer */
-#define IFF_SLAVE 0x800 /* slave of a load balancer */
-
-#define IFF_MULTICAST 0x1000 /* Supports multicast */
-
-#define IFF_PORTSEL 0x2000 /* can set media type */
-#define IFF_AUTOMEDIA 0x4000 /* auto media select active */
-#define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses*/
-
-#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */
-#define IFF_DORMANT 0x20000 /* driver signals dormant */
-
-#define IFF_ECHO 0x40000 /* echo sent packets */
-
-#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
- IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
-
-/* Private (from user) interface flags (netdevice->priv_flags). */
-#define IFF_802_1Q_VLAN 0x1 /* 802.1Q VLAN device. */
-#define IFF_EBRIDGE 0x2 /* Ethernet bridging device. */
-#define IFF_SLAVE_INACTIVE 0x4 /* bonding slave not the curr. active */
-#define IFF_MASTER_8023AD 0x8 /* bonding master, 802.3ad. */
-#define IFF_MASTER_ALB 0x10 /* bonding master, balance-alb. */
-#define IFF_BONDING 0x20 /* bonding master or slave */
-#define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */
-#define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */
-#define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */
-#define IFF_WAN_HDLC 0x200 /* WAN HDLC device */
-#define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to
- * release skb->dst
- */
-#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
-#define IFF_IN_NETPOLL 0x1000 /* whether we are processing netpoll */
-#define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */
-
-#define IF_GET_IFACE 0x0001 /* for querying only */
-#define IF_GET_PROTO 0x0002
-
-/* For definitions see hdlc.h */
-#define IF_IFACE_V35 0x1000 /* V.35 serial interface */
-#define IF_IFACE_V24 0x1001 /* V.24 serial interface */
-#define IF_IFACE_X21 0x1002 /* X.21 serial interface */
-#define IF_IFACE_T1 0x1003 /* T1 telco serial interface */
-#define IF_IFACE_E1 0x1004 /* E1 telco serial interface */
-#define IF_IFACE_SYNC_SERIAL 0x1005 /* can't be set by software */
-#define IF_IFACE_X21D 0x1006 /* X.21 Dual Clocking (FarSite) */
-
-/* For definitions see hdlc.h */
-#define IF_PROTO_HDLC 0x2000 /* raw HDLC protocol */
-#define IF_PROTO_PPP 0x2001 /* PPP protocol */
-#define IF_PROTO_CISCO 0x2002 /* Cisco HDLC protocol */
-#define IF_PROTO_FR 0x2003 /* Frame Relay protocol */
-#define IF_PROTO_FR_ADD_PVC 0x2004 /* Create FR PVC */
-#define IF_PROTO_FR_DEL_PVC 0x2005 /* Delete FR PVC */
-#define IF_PROTO_X25 0x2006 /* X.25 */
-#define IF_PROTO_HDLC_ETH 0x2007 /* raw HDLC, Ethernet emulation */
-#define IF_PROTO_FR_ADD_ETH_PVC 0x2008 /* Create FR Ethernet-bridged PVC */
-#define IF_PROTO_FR_DEL_ETH_PVC 0x2009 /* Delete FR Ethernet-bridged PVC */
-#define IF_PROTO_FR_PVC 0x200A /* for reading PVC status */
-#define IF_PROTO_FR_ETH_PVC 0x200B
-#define IF_PROTO_RAW 0x200C /* RAW Socket */
-
-/* RFC 2863 operational status */
-enum {
- IF_OPER_UNKNOWN,
- IF_OPER_NOTPRESENT,
- IF_OPER_DOWN,
- IF_OPER_LOWERLAYERDOWN,
- IF_OPER_TESTING,
- IF_OPER_DORMANT,
- IF_OPER_UP,
-};
-
-/* link modes */
-enum {
- IF_LINK_MODE_DEFAULT,
- IF_LINK_MODE_DORMANT, /* limit upward transition to dormant */
-};
-
-/*
- * Device mapping structure. I'd just gone off and designed a
- * beautiful scheme using only loadable modules with arguments
- * for driver options and along come the PCMCIA people 8)
- *
- * Ah well. The get() side of this is good for WDSETUP, and it'll
- * be handy for debugging things. The set side is fine for now and
- * being very small might be worth keeping for clean configuration.
- */
-
-struct ifmap {
- unsigned long mem_start;
- unsigned long mem_end;
- unsigned short base_addr;
- unsigned char irq;
- unsigned char dma;
- unsigned char port;
- /* 3 bytes spare */
-};
-
-struct if_settings {
- unsigned int type; /* Type of physical device or protocol */
- unsigned int size; /* Size of the data allocated by the caller */
- union {
- /* {atm/eth/dsl}_settings anyone ? */
- raw_hdlc_proto __user *raw_hdlc;
- cisco_proto __user *cisco;
- fr_proto __user *fr;
- fr_proto_pvc __user *fr_pvc;
- fr_proto_pvc_info __user *fr_pvc_info;
-
- /* interface settings */
- sync_serial_settings __user *sync;
- te1_settings __user *te1;
- } ifs_ifsu;
-};
-
-/*
- * Interface request structure used for socket
- * ioctl's. All interface ioctl's must have parameter
- * definitions which begin with ifr_name. The
- * remainder may be interface specific.
- */
-
-struct ifreq {
-#define IFHWADDRLEN 6
- union
- {
- char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
- } ifr_ifrn;
-
- union {
- struct sockaddr ifru_addr;
- struct sockaddr ifru_dstaddr;
- struct sockaddr ifru_broadaddr;
- struct sockaddr ifru_netmask;
- struct sockaddr ifru_hwaddr;
- short ifru_flags;
- int ifru_ivalue;
- int ifru_mtu;
- struct ifmap ifru_map;
- char ifru_slave[IFNAMSIZ]; /* Just fits the size */
- char ifru_newname[IFNAMSIZ];
- void __user * ifru_data;
- struct if_settings ifru_settings;
- } ifr_ifru;
-};
-
-#define ifr_name ifr_ifrn.ifrn_name /* interface name */
-#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
-#define ifr_addr ifr_ifru.ifru_addr /* address */
-#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */
-#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */
-#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */
-#define ifr_flags ifr_ifru.ifru_flags /* flags */
-#define ifr_metric ifr_ifru.ifru_ivalue /* metric */
-#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
-#define ifr_map ifr_ifru.ifru_map /* device map */
-#define ifr_slave ifr_ifru.ifru_slave /* slave device */
-#define ifr_data ifr_ifru.ifru_data /* for use by interface */
-#define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */
-#define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */
-#define ifr_qlen ifr_ifru.ifru_ivalue /* Queue length */
-#define ifr_newname ifr_ifru.ifru_newname /* New name */
-#define ifr_settings ifr_ifru.ifru_settings /* Device/proto settings*/
-
-/*
- * Structure used in SIOCGIFCONF request.
- * Used to retrieve interface configuration
- * for machine (useful for programs which
- * must know all networks accessible).
- */
-
-struct ifconf {
- int ifc_len; /* size of buffer */
- union {
- char __user *ifcu_buf;
- struct ifreq __user *ifcu_req;
- } ifc_ifcu;
-};
-#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
-#define ifc_req ifc_ifcu.ifcu_req /* array of structures */
-
-#endif /* _LINUX_IF_H */
diff --git a/original/linux/if_addr.h b/original/linux/if_addr.h
deleted file mode 100644
index fd97404..0000000
--- a/original/linux/if_addr.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef __LINUX_IF_ADDR_H
-#define __LINUX_IF_ADDR_H
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-
-struct ifaddrmsg
-{
- __u8 ifa_family;
- __u8 ifa_prefixlen; /* The prefix length */
- __u8 ifa_flags; /* Flags */
- __u8 ifa_scope; /* Address scope */
- __u32 ifa_index; /* Link index */
-};
-
-/*
- * Important comment:
- * IFA_ADDRESS is prefix address, rather than local interface address.
- * It makes no difference for normally configured broadcast interfaces,
- * but for point-to-point IFA_ADDRESS is DESTINATION address,
- * local address is supplied in IFA_LOCAL attribute.
- */
-enum
-{
- IFA_UNSPEC,
- IFA_ADDRESS,
- IFA_LOCAL,
- IFA_LABEL,
- IFA_BROADCAST,
- IFA_ANYCAST,
- IFA_CACHEINFO,
- IFA_MULTICAST,
- __IFA_MAX,
-};
-
-#define IFA_MAX (__IFA_MAX - 1)
-
-/* ifa_flags */
-#define IFA_F_SECONDARY 0x01
-#define IFA_F_TEMPORARY IFA_F_SECONDARY
-
-#define IFA_F_NODAD 0x02
-#define IFA_F_OPTIMISTIC 0x04
-#define IFA_F_DADFAILED 0x08
-#define IFA_F_HOMEADDRESS 0x10
-#define IFA_F_DEPRECATED 0x20
-#define IFA_F_TENTATIVE 0x40
-#define IFA_F_PERMANENT 0x80
-
-struct ifa_cacheinfo
-{
- __u32 ifa_prefered;
- __u32 ifa_valid;
- __u32 cstamp; /* created timestamp, hundredths of seconds */
- __u32 tstamp; /* updated timestamp, hundredths of seconds */
-};
-
-/* backwards compatibility for userspace */
-#ifndef __KERNEL__
-#define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
-#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
-#endif
-
-#endif
diff --git a/original/linux/if_alg.h b/original/linux/if_alg.h
deleted file mode 100644
index 0f9acce..0000000
--- a/original/linux/if_alg.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * if_alg: User-space algorithm interface
- *
- * Copyright (c) 2010 Herbert Xu <herbert@gondor.apana.org.au>
- *
- * 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.
- *
- */
-
-#ifndef _LINUX_IF_ALG_H
-#define _LINUX_IF_ALG_H
-
-#include <linux/types.h>
-
-struct sockaddr_alg {
- __u16 salg_family;
- __u8 salg_type[14];
- __u32 salg_feat;
- __u32 salg_mask;
- __u8 salg_name[64];
-};
-
-struct af_alg_iv {
- __u32 ivlen;
- __u8 iv[0];
-};
-
-/* Socket options */
-#define ALG_SET_KEY 1
-#define ALG_SET_IV 2
-#define ALG_SET_OP 3
-
-/* Operations */
-#define ALG_OP_DECRYPT 0
-#define ALG_OP_ENCRYPT 1
-
-#endif /* _LINUX_IF_ALG_H */
diff --git a/original/linux/if_arcnet.h b/original/linux/if_arcnet.h
deleted file mode 100644
index af380cb..0000000
--- a/original/linux/if_arcnet.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the ARCnet interface.
- *
- * Authors: David Woodhouse and Avery Pennarun
- *
- * 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.
- */
-
-#ifndef _LINUX_IF_ARCNET_H
-#define _LINUX_IF_ARCNET_H
-
-#include <linux/if_ether.h>
-
-
-/*
- * These are the defined ARCnet Protocol ID's.
- */
-
-/* CAP mode */
-/* No macro but uses 1-8 */
-
-/* RFC1201 Protocol ID's */
-#define ARC_P_IP 212 /* 0xD4 */
-#define ARC_P_IPV6 196 /* 0xC4: RFC2497 */
-#define ARC_P_ARP 213 /* 0xD5 */
-#define ARC_P_RARP 214 /* 0xD6 */
-#define ARC_P_IPX 250 /* 0xFA */
-#define ARC_P_NOVELL_EC 236 /* 0xEC */
-
-/* Old RFC1051 Protocol ID's */
-#define ARC_P_IP_RFC1051 240 /* 0xF0 */
-#define ARC_P_ARP_RFC1051 241 /* 0xF1 */
-
-/* MS LanMan/WfWg "NDIS" encapsulation */
-#define ARC_P_ETHER 232 /* 0xE8 */
-
-/* Unsupported/indirectly supported protocols */
-#define ARC_P_DATAPOINT_BOOT 0 /* very old Datapoint equipment */
-#define ARC_P_DATAPOINT_MOUNT 1
-#define ARC_P_POWERLAN_BEACON 8 /* Probably ATA-Netbios related */
-#define ARC_P_POWERLAN_BEACON2 243 /* 0xF3 */
-#define ARC_P_LANSOFT 251 /* 0xFB - what is this? */
-#define ARC_P_ATALK 0xDD
-
-/* Hardware address length */
-#define ARCNET_ALEN 1
-
-/*
- * The RFC1201-specific components of an arcnet packet header.
- */
-struct arc_rfc1201
-{
- uint8_t proto; /* protocol ID field - varies */
- uint8_t split_flag; /* for use with split packets */
- uint16_t sequence; /* sequence number */
- uint8_t payload[0]; /* space remaining in packet (504 bytes)*/
-};
-#define RFC1201_HDR_SIZE 4
-
-
-/*
- * The RFC1051-specific components.
- */
-struct arc_rfc1051
-{
- uint8_t proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */
- uint8_t payload[0]; /* 507 bytes */
-};
-#define RFC1051_HDR_SIZE 1
-
-
-/*
- * The ethernet-encap-specific components. We have a real ethernet header
- * and some data.
- */
-struct arc_eth_encap
-{
- uint8_t proto; /* Always ARC_P_ETHER */
- struct ethhdr eth; /* standard ethernet header (yuck!) */
- uint8_t payload[0]; /* 493 bytes */
-};
-#define ETH_ENCAP_HDR_SIZE 14
-
-
-struct arc_cap
-{
- uint8_t proto;
- uint8_t cookie[sizeof(int)]; /* Actually NOT sent over the network */
- union {
- uint8_t ack;
- uint8_t raw[0]; /* 507 bytes */
- } mes;
-};
-
-/*
- * The data needed by the actual arcnet hardware.
- *
- * Now, in the real arcnet hardware, the third and fourth bytes are the
- * 'offset' specification instead of the length, and the soft data is at
- * the _end_ of the 512-byte buffer. We hide this complexity inside the
- * driver.
- */
-struct arc_hardware
-{
- uint8_t source, /* source ARCnet - filled in automagically */
- dest, /* destination ARCnet - 0 for broadcast */
- offset[2]; /* offset bytes (some weird semantics) */
-};
-#define ARC_HDR_SIZE 4
-
-/*
- * This is an ARCnet frame header, as seen by the kernel (and userspace,
- * when you do a raw packet capture).
- */
-struct archdr
-{
- /* hardware requirements */
- struct arc_hardware hard;
-
- /* arcnet encapsulation-specific bits */
- union {
- struct arc_rfc1201 rfc1201;
- struct arc_rfc1051 rfc1051;
- struct arc_eth_encap eth_encap;
- struct arc_cap cap;
- uint8_t raw[0]; /* 508 bytes */
- } soft;
-};
-
-#endif /* _LINUX_IF_ARCNET_H */
diff --git a/original/linux/if_arp.h b/original/linux/if_arp.h
deleted file mode 100644
index 6d722f4..0000000
--- a/original/linux/if_arp.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the ARP (RFC 826) protocol.
- *
- * Version: @(#)if_arp.h 1.0.1 04/16/93
- *
- * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
- * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source.
- * Ross Biro
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Florian La Roche,
- * Jonathan Layes <layes@loran.com>
- * Arnaldo Carvalho de Melo <acme@conectiva.com.br> ARPHRD_HWX25
- *
- * 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.
- */
-#ifndef _LINUX_IF_ARP_H
-#define _LINUX_IF_ARP_H
-
-#include <linux/netdevice.h>
-
-/* ARP protocol HARDWARE identifiers. */
-#define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */
-#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */
-#define ARPHRD_EETHER 2 /* Experimental Ethernet */
-#define ARPHRD_AX25 3 /* AX.25 Level 2 */
-#define ARPHRD_PRONET 4 /* PROnet token ring */
-#define ARPHRD_CHAOS 5 /* Chaosnet */
-#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */
-#define ARPHRD_ARCNET 7 /* ARCnet */
-#define ARPHRD_APPLETLK 8 /* APPLEtalk */
-#define ARPHRD_DLCI 15 /* Frame Relay DLCI */
-#define ARPHRD_ATM 19 /* ATM */
-#define ARPHRD_METRICOM 23 /* Metricom STRIP (new IANA id) */
-#define ARPHRD_IEEE1394 24 /* IEEE 1394 IPv4 - RFC 2734 */
-#define ARPHRD_EUI64 27 /* EUI-64 */
-#define ARPHRD_INFINIBAND 32 /* InfiniBand */
-
-/* Dummy types for non ARP hardware */
-#define ARPHRD_SLIP 256
-#define ARPHRD_CSLIP 257
-#define ARPHRD_SLIP6 258
-#define ARPHRD_CSLIP6 259
-#define ARPHRD_RSRVD 260 /* Notional KISS type */
-#define ARPHRD_ADAPT 264
-#define ARPHRD_ROSE 270
-#define ARPHRD_X25 271 /* CCITT X.25 */
-#define ARPHRD_HWX25 272 /* Boards with X.25 in firmware */
-#define ARPHRD_CAN 280 /* Controller Area Network */
-#define ARPHRD_PPP 512
-#define ARPHRD_CISCO 513 /* Cisco HDLC */
-#define ARPHRD_HDLC ARPHRD_CISCO
-#define ARPHRD_LAPB 516 /* LAPB */
-#define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */
-#define ARPHRD_RAWHDLC 518 /* Raw HDLC */
-
-#define ARPHRD_TUNNEL 768 /* IPIP tunnel */
-#define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */
-#define ARPHRD_FRAD 770 /* Frame Relay Access Device */
-#define ARPHRD_SKIP 771 /* SKIP vif */
-#define ARPHRD_LOOPBACK 772 /* Loopback device */
-#define ARPHRD_LOCALTLK 773 /* Localtalk device */
-#define ARPHRD_FDDI 774 /* Fiber Distributed Data Interface */
-#define ARPHRD_BIF 775 /* AP1000 BIF */
-#define ARPHRD_SIT 776 /* sit0 device - IPv6-in-IPv4 */
-#define ARPHRD_IPDDP 777 /* IP over DDP tunneller */
-#define ARPHRD_IPGRE 778 /* GRE over IP */
-#define ARPHRD_PIMREG 779 /* PIMSM register interface */
-#define ARPHRD_HIPPI 780 /* High Performance Parallel Interface */
-#define ARPHRD_ASH 781 /* Nexus 64Mbps Ash */
-#define ARPHRD_ECONET 782 /* Acorn Econet */
-#define ARPHRD_IRDA 783 /* Linux-IrDA */
-/* ARP works differently on different FC media .. so */
-#define ARPHRD_FCPP 784 /* Point to point fibrechannel */
-#define ARPHRD_FCAL 785 /* Fibrechannel arbitrated loop */
-#define ARPHRD_FCPL 786 /* Fibrechannel public loop */
-#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */
- /* 787->799 reserved for fibrechannel media types */
-#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */
-#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */
-#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */
-#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */
-#define ARPHRD_IEEE802154 804
-
-#define ARPHRD_PHONET 820 /* PhoNet media type */
-#define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */
-#define ARPHRD_CAIF 822 /* CAIF media type */
-
-#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */
-#define ARPHRD_NONE 0xFFFE /* zero header length */
-
-/* ARP protocol opcodes. */
-#define ARPOP_REQUEST 1 /* ARP request */
-#define ARPOP_REPLY 2 /* ARP reply */
-#define ARPOP_RREQUEST 3 /* RARP request */
-#define ARPOP_RREPLY 4 /* RARP reply */
-#define ARPOP_InREQUEST 8 /* InARP request */
-#define ARPOP_InREPLY 9 /* InARP reply */
-#define ARPOP_NAK 10 /* (ATM)ARP NAK */
-
-
-/* ARP ioctl request. */
-struct arpreq {
- struct sockaddr arp_pa; /* protocol address */
- struct sockaddr arp_ha; /* hardware address */
- int arp_flags; /* flags */
- struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
- char arp_dev[16];
-};
-
-struct arpreq_old {
- struct sockaddr arp_pa; /* protocol address */
- struct sockaddr arp_ha; /* hardware address */
- int arp_flags; /* flags */
- struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
-};
-
-/* ARP Flag values. */
-#define ATF_COM 0x02 /* completed entry (ha valid) */
-#define ATF_PERM 0x04 /* permanent entry */
-#define ATF_PUBL 0x08 /* publish entry */
-#define ATF_USETRAILERS 0x10 /* has requested trailers */
-#define ATF_NETMASK 0x20 /* want to use a netmask (only
- for proxy entries) */
-#define ATF_DONTPUB 0x40 /* don't answer this addresses */
-
-/*
- * This structure defines an ethernet arp header.
- */
-
-struct arphdr {
- __be16 ar_hrd; /* format of hardware address */
- __be16 ar_pro; /* format of protocol address */
- unsigned char ar_hln; /* length of hardware address */
- unsigned char ar_pln; /* length of protocol address */
- __be16 ar_op; /* ARP opcode (command) */
-
-#if 0
- /*
- * Ethernet looks like this : This bit is variable sized however...
- */
- unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
- unsigned char ar_sip[4]; /* sender IP address */
- unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
- unsigned char ar_tip[4]; /* target IP address */
-#endif
-
-};
-
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct arphdr *arp_hdr(const struct sk_buff *skb)
-{
- return (struct arphdr *)skb_network_header(skb);
-}
-
-static inline int arp_hdr_len(struct net_device *dev)
-{
- /* ARP header, plus 2 device addresses, plus 2 IP addresses. */
- return sizeof(struct arphdr) + (dev->addr_len + sizeof(u32)) * 2;
-}
-#endif
-
-#endif /* _LINUX_IF_ARP_H */
diff --git a/original/linux/if_bridge.h b/original/linux/if_bridge.h
deleted file mode 100644
index fd1b6eb..0000000
--- a/original/linux/if_bridge.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Linux ethernet bridge
- *
- * Authors:
- * Lennert Buytenhek <buytenh@gnu.org>
- *
- * $Id: if_bridge.h,v 1.1 2000/02/18 16:47:01 davem Exp $
- *
- * 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.
- */
-
-#ifndef _LINUX_IF_BRIDGE_H
-#define _LINUX_IF_BRIDGE_H
-
-#include <linux/types.h>
-
-#define SYSFS_BRIDGE_ATTR "bridge"
-#define SYSFS_BRIDGE_FDB "brforward"
-#define SYSFS_BRIDGE_PORT_SUBDIR "brif"
-#define SYSFS_BRIDGE_PORT_ATTR "brport"
-#define SYSFS_BRIDGE_PORT_LINK "bridge"
-
-#define BRCTL_VERSION 1
-
-#define BRCTL_GET_VERSION 0
-#define BRCTL_GET_BRIDGES 1
-#define BRCTL_ADD_BRIDGE 2
-#define BRCTL_DEL_BRIDGE 3
-#define BRCTL_ADD_IF 4
-#define BRCTL_DEL_IF 5
-#define BRCTL_GET_BRIDGE_INFO 6
-#define BRCTL_GET_PORT_LIST 7
-#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
-#define BRCTL_SET_BRIDGE_HELLO_TIME 9
-#define BRCTL_SET_BRIDGE_MAX_AGE 10
-#define BRCTL_SET_AGEING_TIME 11
-#define BRCTL_SET_GC_INTERVAL 12
-#define BRCTL_GET_PORT_INFO 13
-#define BRCTL_SET_BRIDGE_STP_STATE 14
-#define BRCTL_SET_BRIDGE_PRIORITY 15
-#define BRCTL_SET_PORT_PRIORITY 16
-#define BRCTL_SET_PATH_COST 17
-#define BRCTL_GET_FDB_ENTRIES 18
-
-#define BR_STATE_DISABLED 0
-#define BR_STATE_LISTENING 1
-#define BR_STATE_LEARNING 2
-#define BR_STATE_FORWARDING 3
-#define BR_STATE_BLOCKING 4
-
-struct __bridge_info
-{
- __u64 designated_root;
- __u64 bridge_id;
- __u32 root_path_cost;
- __u32 max_age;
- __u32 hello_time;
- __u32 forward_delay;
- __u32 bridge_max_age;
- __u32 bridge_hello_time;
- __u32 bridge_forward_delay;
- __u8 topology_change;
- __u8 topology_change_detected;
- __u8 root_port;
- __u8 stp_enabled;
- __u32 ageing_time;
- __u32 gc_interval;
- __u32 hello_timer_value;
- __u32 tcn_timer_value;
- __u32 topology_change_timer_value;
- __u32 gc_timer_value;
-};
-
-struct __port_info
-{
- __u64 designated_root;
- __u64 designated_bridge;
- __u16 port_id;
- __u16 designated_port;
- __u32 path_cost;
- __u32 designated_cost;
- __u8 state;
- __u8 top_change_ack;
- __u8 config_pending;
- __u8 unused0;
- __u32 message_age_timer_value;
- __u32 forward_delay_timer_value;
- __u32 hold_timer_value;
-};
-
-struct __fdb_entry
-{
- __u8 mac_addr[6];
- __u8 port_no;
- __u8 is_local;
- __u32 ageing_timer_value;
- __u32 unused;
-};
-
-#ifdef __KERNEL__
-
-#include <linux/netdevice.h>
-
-extern void brioctl_set(int (*ioctl_hook)(unsigned int, void __user *));
-extern int (*br_handle_frame_hook)(struct net_bridge_port *p, struct sk_buff **pskb);
-extern int (*br_should_route_hook)(struct sk_buff **pskb);
-
-#endif
-
-#endif
diff --git a/original/linux/if_ether.h b/original/linux/if_ether.h
deleted file mode 100644
index 12a4997..0000000
--- a/original/linux/if_ether.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the Ethernet IEEE 802.3 interface.
- *
- * Version: @(#)if_ether.h 1.0.1a 02/08/94
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Donald Becker, <becker@super.org>
- * Alan Cox, <alan@lxorguk.ukuu.org.uk>
- * Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
- *
- * 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.
- */
-
-#ifndef _LINUX_IF_ETHER_H
-#define _LINUX_IF_ETHER_H
-
-#include <linux/types.h>
-
-/*
- * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
- * and FCS/CRC (frame check sequence).
- */
-
-#define ETH_ALEN 6 /* Octets in one ethernet addr */
-#define ETH_HLEN 14 /* Total octets in header. */
-#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */
-#define ETH_DATA_LEN 1500 /* Max. octets in payload */
-#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */
-#define ETH_FCS_LEN 4 /* Octets in the FCS */
-
-/*
- * These are the defined Ethernet Protocol ID's.
- */
-
-#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */
-#define ETH_P_PUP 0x0200 /* Xerox PUP packet */
-#define ETH_P_PUPAT 0x0201 /* Xerox PUP Addr Trans packet */
-#define ETH_P_IP 0x0800 /* Internet Protocol packet */
-#define ETH_P_X25 0x0805 /* CCITT X.25 */
-#define ETH_P_ARP 0x0806 /* Address Resolution packet */
-#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */
-#define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */
-#define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */
-#define ETH_P_DEC 0x6000 /* DEC Assigned proto */
-#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */
-#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */
-#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */
-#define ETH_P_LAT 0x6004 /* DEC LAT */
-#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */
-#define ETH_P_CUST 0x6006 /* DEC Customer use */
-#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */
-#define ETH_P_TEB 0x6558 /* Trans Ether Bridging */
-#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */
-#define ETH_P_ATALK 0x809B /* Appletalk DDP */
-#define ETH_P_AARP 0x80F3 /* Appletalk AARP */
-#define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */
-#define ETH_P_IPX 0x8137 /* IPX over DIX */
-#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */
-#define ETH_P_PAUSE 0x8808 /* IEEE Pause frames. See 802.3 31B */
-#define ETH_P_SLOW 0x8809 /* Slow Protocol. See 802.3ad 43B */
-#define ETH_P_WCCP 0x883E /* Web-cache coordination protocol
- * defined in draft-wilson-wrec-wccp-v2-00.txt */
-#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
-#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
-#define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */
-#define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */
-#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */
-#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
- * over Ethernet
- */
-#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
-#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */
-#define ETH_P_TIPC 0x88CA /* TIPC */
-#define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
-#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
-#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */
-#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
-
-/*
- * Non DIX types. Won't clash for 1500 types.
- */
-
-#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */
-#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */
-#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */
-#define ETH_P_802_2 0x0004 /* 802.2 frames */
-#define ETH_P_SNAP 0x0005 /* Internal only */
-#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */
-#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/
-#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */
-#define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */
-#define ETH_P_CAN 0x000C /* Controller Area Network */
-#define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/
-#define ETH_P_TR_802_2 0x0011 /* 802.2 frames */
-#define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */
-#define ETH_P_CONTROL 0x0016 /* Card specific control frames */
-#define ETH_P_IRDA 0x0017 /* Linux-IrDA */
-#define ETH_P_ECONET 0x0018 /* Acorn Econet */
-#define ETH_P_HDLC 0x0019 /* HDLC frames */
-#define ETH_P_ARCNET 0x001A /* 1A for ArcNet :-) */
-#define ETH_P_DSA 0x001B /* Distributed Switch Arch. */
-#define ETH_P_TRAILER 0x001C /* Trailer switch tagging */
-#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */
-#define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */
-#define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */
-
-/*
- * This is an Ethernet frame header.
- */
-
-struct ethhdr {
- unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
- unsigned char h_source[ETH_ALEN]; /* source ether addr */
- __be16 h_proto; /* packet type ID field */
-} __attribute__((packed));
-
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
-{
- return (struct ethhdr *)skb_mac_header(skb);
-}
-
-int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
-
-#ifdef CONFIG_SYSCTL
-extern struct ctl_table ether_table[];
-#endif
-
-extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
-
-/*
- * Display a 6 byte device address (MAC) in a readable format.
- */
-extern char *print_mac(char *buf, const unsigned char *addr) __deprecated;
-#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
-#define MAC_BUF_SIZE 18
-#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE]
-
-#endif
-
-#endif /* _LINUX_IF_ETHER_H */
diff --git a/original/linux/if_fc.h b/original/linux/if_fc.h
deleted file mode 100644
index 376a34e..0000000
--- a/original/linux/if_fc.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for Fibre Channel.
- *
- * Version: @(#)if_fc.h 0.0 11/20/98
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Donald Becker, <becker@super.org>
- * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
- * Vineet Abraham, <vma@iol.unh.edu>
- *
- * 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.
- */
-#ifndef _LINUX_IF_FC_H
-#define _LINUX_IF_FC_H
-
-
-#define FC_ALEN 6 /* Octets in one ethernet addr */
-#define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc))
-#define FC_ID_LEN 3 /* Octets in a Fibre Channel Address */
-
-/* LLC and SNAP constants */
-#define EXTENDED_SAP 0xAA
-#define UI_CMD 0x03
-
-/* This is NOT the Fibre Channel frame header. The FC frame header is
- * constructed in the driver as the Tachyon needs certain fields in
- * certains positions. So, it can't be generalized here.*/
-
-struct fch_hdr {
- __u8 daddr[FC_ALEN]; /* destination address */
- __u8 saddr[FC_ALEN]; /* source address */
-};
-
-/* This is a Fibre Channel LLC structure */
-struct fcllc {
- __u8 dsap; /* destination SAP */
- __u8 ssap; /* source SAP */
- __u8 llc; /* LLC control field */
- __u8 protid[3]; /* protocol id */
- __be16 ethertype; /* ether type field */
-};
-
-#endif /* _LINUX_IF_FC_H */
diff --git a/original/linux/if_fddi.h b/original/linux/if_fddi.h
deleted file mode 100644
index e0a1500..0000000
--- a/original/linux/if_fddi.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the ANSI FDDI interface.
- *
- * Version: @(#)if_fddi.h 1.0.2 Sep 29 2004
- *
- * Author: Lawrence V. Stefani, <stefani@lkg.dec.com>
- *
- * if_fddi.h is based on previous if_ether.h and if_tr.h work by
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Donald Becker, <becker@super.org>
- * Alan Cox, <alan@redhat.com>
- * Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
- * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
- *
- * 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.
- */
-#ifndef _LINUX_IF_FDDI_H
-#define _LINUX_IF_FDDI_H
-
-/*
- * Define max and min legal sizes. The frame sizes do not include
- * 4 byte FCS/CRC (frame check sequence).
- */
-#define FDDI_K_ALEN 6 /* Octets in one FDDI address */
-#define FDDI_K_8022_HLEN 16 /* Total octets in 802.2 header */
-#define FDDI_K_SNAP_HLEN 21 /* Total octets in 802.2 SNAP header */
-#define FDDI_K_8022_ZLEN 16 /* Min octets in 802.2 frame sans FCS */
-#define FDDI_K_SNAP_ZLEN 21 /* Min octets in 802.2 SNAP frame sans FCS */
-#define FDDI_K_8022_DLEN 4475 /* Max octets in 802.2 payload */
-#define FDDI_K_SNAP_DLEN 4470 /* Max octets in 802.2 SNAP payload */
-#define FDDI_K_LLC_ZLEN 13 /* Min octets in LLC frame sans FCS */
-#define FDDI_K_LLC_LEN 4491 /* Max octets in LLC frame sans FCS */
-
-/* Define FDDI Frame Control (FC) Byte values */
-#define FDDI_FC_K_VOID 0x00
-#define FDDI_FC_K_NON_RESTRICTED_TOKEN 0x80
-#define FDDI_FC_K_RESTRICTED_TOKEN 0xC0
-#define FDDI_FC_K_SMT_MIN 0x41
-#define FDDI_FC_K_SMT_MAX 0x4F
-#define FDDI_FC_K_MAC_MIN 0xC1
-#define FDDI_FC_K_MAC_MAX 0xCF
-#define FDDI_FC_K_ASYNC_LLC_MIN 0x50
-#define FDDI_FC_K_ASYNC_LLC_DEF 0x54
-#define FDDI_FC_K_ASYNC_LLC_MAX 0x5F
-#define FDDI_FC_K_SYNC_LLC_MIN 0xD0
-#define FDDI_FC_K_SYNC_LLC_MAX 0xD7
-#define FDDI_FC_K_IMPLEMENTOR_MIN 0x60
-#define FDDI_FC_K_IMPLEMENTOR_MAX 0x6F
-#define FDDI_FC_K_RESERVED_MIN 0x70
-#define FDDI_FC_K_RESERVED_MAX 0x7F
-
-/* Define LLC and SNAP constants */
-#define FDDI_EXTENDED_SAP 0xAA
-#define FDDI_UI_CMD 0x03
-
-/* Define 802.2 Type 1 header */
-struct fddi_8022_1_hdr
- {
- __u8 dsap; /* destination service access point */
- __u8 ssap; /* source service access point */
- __u8 ctrl; /* control byte #1 */
- } __attribute__ ((packed));
-
-/* Define 802.2 Type 2 header */
-struct fddi_8022_2_hdr
- {
- __u8 dsap; /* destination service access point */
- __u8 ssap; /* source service access point */
- __u8 ctrl_1; /* control byte #1 */
- __u8 ctrl_2; /* control byte #2 */
- } __attribute__ ((packed));
-
-/* Define 802.2 SNAP header */
-#define FDDI_K_OUI_LEN 3
-struct fddi_snap_hdr
- {
- __u8 dsap; /* always 0xAA */
- __u8 ssap; /* always 0xAA */
- __u8 ctrl; /* always 0x03 */
- __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */
- __be16 ethertype; /* packet type ID field */
- } __attribute__ ((packed));
-
-/* Define FDDI LLC frame header */
-struct fddihdr
- {
- __u8 fc; /* frame control */
- __u8 daddr[FDDI_K_ALEN]; /* destination address */
- __u8 saddr[FDDI_K_ALEN]; /* source address */
- union
- {
- struct fddi_8022_1_hdr llc_8022_1;
- struct fddi_8022_2_hdr llc_8022_2;
- struct fddi_snap_hdr llc_snap;
- } hdr;
- } __attribute__ ((packed));
-
-#ifdef __KERNEL__
-/* Define FDDI statistics structure */
-struct fddi_statistics {
-
- /* Generic statistics. */
-
- struct net_device_stats gen;
-
- /* Detailed FDDI statistics. Adopted from RFC 1512 */
-
- __u8 smt_station_id[8];
- __u32 smt_op_version_id;
- __u32 smt_hi_version_id;
- __u32 smt_lo_version_id;
- __u8 smt_user_data[32];
- __u32 smt_mib_version_id;
- __u32 smt_mac_cts;
- __u32 smt_non_master_cts;
- __u32 smt_master_cts;
- __u32 smt_available_paths;
- __u32 smt_config_capabilities;
- __u32 smt_config_policy;
- __u32 smt_connection_policy;
- __u32 smt_t_notify;
- __u32 smt_stat_rpt_policy;
- __u32 smt_trace_max_expiration;
- __u32 smt_bypass_present;
- __u32 smt_ecm_state;
- __u32 smt_cf_state;
- __u32 smt_remote_disconnect_flag;
- __u32 smt_station_status;
- __u32 smt_peer_wrap_flag;
- __u32 smt_time_stamp;
- __u32 smt_transition_time_stamp;
- __u32 mac_frame_status_functions;
- __u32 mac_t_max_capability;
- __u32 mac_tvx_capability;
- __u32 mac_available_paths;
- __u32 mac_current_path;
- __u8 mac_upstream_nbr[FDDI_K_ALEN];
- __u8 mac_downstream_nbr[FDDI_K_ALEN];
- __u8 mac_old_upstream_nbr[FDDI_K_ALEN];
- __u8 mac_old_downstream_nbr[FDDI_K_ALEN];
- __u32 mac_dup_address_test;
- __u32 mac_requested_paths;
- __u32 mac_downstream_port_type;
- __u8 mac_smt_address[FDDI_K_ALEN];
- __u32 mac_t_req;
- __u32 mac_t_neg;
- __u32 mac_t_max;
- __u32 mac_tvx_value;
- __u32 mac_frame_cts;
- __u32 mac_copied_cts;
- __u32 mac_transmit_cts;
- __u32 mac_error_cts;
- __u32 mac_lost_cts;
- __u32 mac_frame_error_threshold;
- __u32 mac_frame_error_ratio;
- __u32 mac_rmt_state;
- __u32 mac_da_flag;
- __u32 mac_una_da_flag;
- __u32 mac_frame_error_flag;
- __u32 mac_ma_unitdata_available;
- __u32 mac_hardware_present;
- __u32 mac_ma_unitdata_enable;
- __u32 path_tvx_lower_bound;
- __u32 path_t_max_lower_bound;
- __u32 path_max_t_req;
- __u32 path_configuration[8];
- __u32 port_my_type[2];
- __u32 port_neighbor_type[2];
- __u32 port_connection_policies[2];
- __u32 port_mac_indicated[2];
- __u32 port_current_path[2];
- __u8 port_requested_paths[3*2];
- __u32 port_mac_placement[2];
- __u32 port_available_paths[2];
- __u32 port_pmd_class[2];
- __u32 port_connection_capabilities[2];
- __u32 port_bs_flag[2];
- __u32 port_lct_fail_cts[2];
- __u32 port_ler_estimate[2];
- __u32 port_lem_reject_cts[2];
- __u32 port_lem_cts[2];
- __u32 port_ler_cutoff[2];
- __u32 port_ler_alarm[2];
- __u32 port_connect_state[2];
- __u32 port_pcm_state[2];
- __u32 port_pc_withhold[2];
- __u32 port_ler_flag[2];
- __u32 port_hardware_present[2];
- };
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_IF_FDDI_H */
diff --git a/original/linux/if_hippi.h b/original/linux/if_hippi.h
deleted file mode 100644
index 94d31ca..0000000
--- a/original/linux/if_hippi.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the HIPPI interface.
- *
- * Version: @(#)if_hippi.h 1.0.0 05/26/97
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Donald Becker, <becker@super.org>
- * Alan Cox, <alan@redhat.com>
- * Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk>
- * Jes Sorensen, <Jes.Sorensen@cern.ch>
- *
- * 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.
- */
-
-#ifndef _LINUX_IF_HIPPI_H
-#define _LINUX_IF_HIPPI_H
-
-#include <asm/byteorder.h>
-
-/*
- * HIPPI magic constants.
- */
-
-#define HIPPI_ALEN 6 /* Bytes in one HIPPI hw-addr */
-#define HIPPI_HLEN sizeof(struct hippi_hdr)
-#define HIPPI_ZLEN 0 /* Min. bytes in frame without FCS */
-#define HIPPI_DATA_LEN 65280 /* Max. bytes in payload */
-#define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN)
- /* Max. bytes in frame without FCS */
-
-/*
- * Define LLC and SNAP constants.
- */
-#define HIPPI_EXTENDED_SAP 0xAA
-#define HIPPI_UI_CMD 0x03
-
-
-/*
- * Do we need to list some sort of ID's here?
- */
-
-/*
- * HIPPI statistics collection data.
- */
-
-struct hipnet_statistics
-{
- int rx_packets; /* total packets received */
- int tx_packets; /* total packets transmitted */
- int rx_errors; /* bad packets received */
- int tx_errors; /* packet transmit problems */
- int rx_dropped; /* no space in linux buffers */
- int tx_dropped; /* no space available in linux */
-
- /* detailed rx_errors: */
- int rx_length_errors;
- int rx_over_errors; /* receiver ring buff overflow */
- int rx_crc_errors; /* recved pkt with crc error */
- int rx_frame_errors; /* recv'd frame alignment error */
- int rx_fifo_errors; /* recv'r fifo overrun */
- int rx_missed_errors; /* receiver missed packet */
-
- /* detailed tx_errors */
- int tx_aborted_errors;
- int tx_carrier_errors;
- int tx_fifo_errors;
- int tx_heartbeat_errors;
- int tx_window_errors;
-};
-
-
-struct hippi_fp_hdr
-{
-#if 0
- __u8 ulp; /* must contain 4 */
-#if defined (__BIG_ENDIAN_BITFIELD)
- __u8 d1_data_present:1; /* must be 1 */
- __u8 start_d2_burst_boundary:1; /* must be zero */
- __u8 reserved:6; /* must be zero */
-#if 0
- __u16 reserved1:5;
- __u16 d1_area_size:8; /* must be 3 */
- __u16 d2_offset:3; /* must be zero */
-#endif
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 reserved:6; /* must be zero */
- __u8 start_d2_burst_boundary:1; /* must be zero */
- __u8 d1_data_present:1; /* must be 1 */
-#if 0
- __u16 d2_offset:3; /* must be zero */
- __u16 d1_area_size:8; /* must be 3 */
- __u16 reserved1:5; /* must be zero */
-#endif
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
-#else
- __be32 fixed;
-#endif
- __be32 d2_size;
-} __attribute__ ((packed));
-
-struct hippi_le_hdr
-{
-#if defined (__BIG_ENDIAN_BITFIELD)
- __u8 fc:3;
- __u8 double_wide:1;
- __u8 message_type:4;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 message_type:4;
- __u8 double_wide:1;
- __u8 fc:3;
-#endif
- __u8 dest_switch_addr[3];
-#if defined (__BIG_ENDIAN_BITFIELD)
- __u8 dest_addr_type:4,
- src_addr_type:4;
-#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 src_addr_type:4,
- dest_addr_type:4;
-#endif
- __u8 src_switch_addr[3];
- __u16 reserved;
- __u8 daddr[HIPPI_ALEN];
- __u16 locally_administered;
- __u8 saddr[HIPPI_ALEN];
-} __attribute__ ((packed));
-
-#define HIPPI_OUI_LEN 3
-/*
- * Looks like the dsap and ssap fields have been swapped by mistake in
- * RFC 2067 "IP over HIPPI".
- */
-struct hippi_snap_hdr
-{
- __u8 dsap; /* always 0xAA */
- __u8 ssap; /* always 0xAA */
- __u8 ctrl; /* always 0x03 */
- __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/
- __be16 ethertype; /* packet type ID field */
-} __attribute__ ((packed));
-
-struct hippi_hdr
-{
- struct hippi_fp_hdr fp;
- struct hippi_le_hdr le;
- struct hippi_snap_hdr snap;
-} __attribute__ ((packed));
-
-#endif /* _LINUX_IF_HIPPI_H */
diff --git a/original/linux/if_link.h b/original/linux/if_link.h
deleted file mode 100644
index 2fc66dd..0000000
--- a/original/linux/if_link.h
+++ /dev/null
@@ -1,353 +0,0 @@
-#ifndef _LINUX_IF_LINK_H
-#define _LINUX_IF_LINK_H
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-
-/* This struct should be in sync with struct rtnl_link_stats64 */
-struct rtnl_link_stats {
- __u32 rx_packets; /* total packets received */
- __u32 tx_packets; /* total packets transmitted */
- __u32 rx_bytes; /* total bytes received */
- __u32 tx_bytes; /* total bytes transmitted */
- __u32 rx_errors; /* bad packets received */
- __u32 tx_errors; /* packet transmit problems */
- __u32 rx_dropped; /* no space in linux buffers */
- __u32 tx_dropped; /* no space available in linux */
- __u32 multicast; /* multicast packets received */
- __u32 collisions;
-
- /* detailed rx_errors: */
- __u32 rx_length_errors;
- __u32 rx_over_errors; /* receiver ring buff overflow */
- __u32 rx_crc_errors; /* recved pkt with crc error */
- __u32 rx_frame_errors; /* recv'd frame alignment error */
- __u32 rx_fifo_errors; /* recv'r fifo overrun */
- __u32 rx_missed_errors; /* receiver missed packet */
-
- /* detailed tx_errors */
- __u32 tx_aborted_errors;
- __u32 tx_carrier_errors;
- __u32 tx_fifo_errors;
- __u32 tx_heartbeat_errors;
- __u32 tx_window_errors;
-
- /* for cslip etc */
- __u32 rx_compressed;
- __u32 tx_compressed;
-};
-
-/* The main device statistics structure */
-struct rtnl_link_stats64 {
- __u64 rx_packets; /* total packets received */
- __u64 tx_packets; /* total packets transmitted */
- __u64 rx_bytes; /* total bytes received */
- __u64 tx_bytes; /* total bytes transmitted */
- __u64 rx_errors; /* bad packets received */
- __u64 tx_errors; /* packet transmit problems */
- __u64 rx_dropped; /* no space in linux buffers */
- __u64 tx_dropped; /* no space available in linux */
- __u64 multicast; /* multicast packets received */
- __u64 collisions;
-
- /* detailed rx_errors: */
- __u64 rx_length_errors;
- __u64 rx_over_errors; /* receiver ring buff overflow */
- __u64 rx_crc_errors; /* recved pkt with crc error */
- __u64 rx_frame_errors; /* recv'd frame alignment error */
- __u64 rx_fifo_errors; /* recv'r fifo overrun */
- __u64 rx_missed_errors; /* receiver missed packet */
-
- /* detailed tx_errors */
- __u64 tx_aborted_errors;
- __u64 tx_carrier_errors;
- __u64 tx_fifo_errors;
- __u64 tx_heartbeat_errors;
- __u64 tx_window_errors;
-
- /* for cslip etc */
- __u64 rx_compressed;
- __u64 tx_compressed;
-};
-
-/* The struct should be in sync with struct ifmap */
-struct rtnl_link_ifmap {
- __u64 mem_start;
- __u64 mem_end;
- __u64 base_addr;
- __u16 irq;
- __u8 dma;
- __u8 port;
-};
-
-enum {
- IFLA_UNSPEC,
- IFLA_ADDRESS,
- IFLA_BROADCAST,
- IFLA_IFNAME,
- IFLA_MTU,
- IFLA_LINK,
- IFLA_QDISC,
- IFLA_STATS,
- IFLA_COST,
-#define IFLA_COST IFLA_COST
- IFLA_PRIORITY,
-#define IFLA_PRIORITY IFLA_PRIORITY
- IFLA_MASTER,
-#define IFLA_MASTER IFLA_MASTER
- IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */
-#define IFLA_WIRELESS IFLA_WIRELESS
- IFLA_PROTINFO, /* Protocol specific information for a link */
-#define IFLA_PROTINFO IFLA_PROTINFO
- IFLA_TXQLEN,
-#define IFLA_TXQLEN IFLA_TXQLEN
- IFLA_MAP,
-#define IFLA_MAP IFLA_MAP
- IFLA_WEIGHT,
-#define IFLA_WEIGHT IFLA_WEIGHT
- IFLA_OPERSTATE,
- IFLA_LINKMODE,
- IFLA_LINKINFO,
-#define IFLA_LINKINFO IFLA_LINKINFO
- IFLA_NET_NS_PID,
- IFLA_IFALIAS,
- IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */
- IFLA_VFINFO_LIST,
- IFLA_STATS64,
- IFLA_VF_PORTS,
- IFLA_PORT_SELF,
- __IFLA_MAX
-};
-
-
-#define IFLA_MAX (__IFLA_MAX - 1)
-
-/* backwards compatibility for userspace */
-#ifndef __KERNEL__
-#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
-#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
-#endif
-
-/* ifi_flags.
-
- IFF_* flags.
-
- The only change is:
- IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are
- more not changeable by user. They describe link media
- characteristics and set by device driver.
-
- Comments:
- - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid
- - If neither of these three flags are set;
- the interface is NBMA.
-
- - IFF_MULTICAST does not mean anything special:
- multicasts can be used on all not-NBMA links.
- IFF_MULTICAST means that this media uses special encapsulation
- for multicast frames. Apparently, all IFF_POINTOPOINT and
- IFF_BROADCAST devices are able to use multicasts too.
- */
-
-/* IFLA_LINK.
- For usual devices it is equal ifi_index.
- If it is a "virtual interface" (f.e. tunnel), ifi_link
- can point to real physical interface (f.e. for bandwidth calculations),
- or maybe 0, what means, that real media is unknown (usual
- for IPIP tunnels, when route to endpoint is allowed to change)
- */
-
-/* Subtype attributes for IFLA_PROTINFO */
-enum {
- IFLA_INET6_UNSPEC,
- IFLA_INET6_FLAGS, /* link flags */
- IFLA_INET6_CONF, /* sysctl parameters */
- IFLA_INET6_STATS, /* statistics */
- IFLA_INET6_MCAST, /* MC things. What of them? */
- IFLA_INET6_CACHEINFO, /* time values and max reasm size */
- IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */
- __IFLA_INET6_MAX
-};
-
-#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
-
-struct ifla_cacheinfo {
- __u32 max_reasm_len;
- __u32 tstamp; /* ipv6InterfaceTable updated timestamp */
- __u32 reachable_time;
- __u32 retrans_time;
-};
-
-enum {
- IFLA_INFO_UNSPEC,
- IFLA_INFO_KIND,
- IFLA_INFO_DATA,
- IFLA_INFO_XSTATS,
- __IFLA_INFO_MAX,
-};
-
-#define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
-
-/* VLAN section */
-
-enum {
- IFLA_VLAN_UNSPEC,
- IFLA_VLAN_ID,
- IFLA_VLAN_FLAGS,
- IFLA_VLAN_EGRESS_QOS,
- IFLA_VLAN_INGRESS_QOS,
- __IFLA_VLAN_MAX,
-};
-
-#define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
-
-struct ifla_vlan_flags {
- __u32 flags;
- __u32 mask;
-};
-
-enum {
- IFLA_VLAN_QOS_UNSPEC,
- IFLA_VLAN_QOS_MAPPING,
- __IFLA_VLAN_QOS_MAX
-};
-
-#define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
-
-struct ifla_vlan_qos_mapping {
- __u32 from;
- __u32 to;
-};
-
-/* MACVLAN section */
-enum {
- IFLA_MACVLAN_UNSPEC,
- IFLA_MACVLAN_MODE,
- __IFLA_MACVLAN_MAX,
-};
-
-#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
-
-enum macvlan_mode {
- MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */
- MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */
- MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
-};
-
-/* SR-IOV virtual function management section */
-
-enum {
- IFLA_VF_INFO_UNSPEC,
- IFLA_VF_INFO,
- __IFLA_VF_INFO_MAX,
-};
-
-#define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
-
-enum {
- IFLA_VF_UNSPEC,
- IFLA_VF_MAC, /* Hardware queue specific attributes */
- IFLA_VF_VLAN,
- IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
- __IFLA_VF_MAX,
-};
-
-#define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
-
-struct ifla_vf_mac {
- __u32 vf;
- __u8 mac[32]; /* MAX_ADDR_LEN */
-};
-
-struct ifla_vf_vlan {
- __u32 vf;
- __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
- __u32 qos;
-};
-
-struct ifla_vf_tx_rate {
- __u32 vf;
- __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
-};
-
-struct ifla_vf_info {
- __u32 vf;
- __u8 mac[32];
- __u32 vlan;
- __u32 qos;
- __u32 tx_rate;
-};
-
-/* VF ports management section
- *
- * Nested layout of set/get msg is:
- *
- * [IFLA_NUM_VF]
- * [IFLA_VF_PORTS]
- * [IFLA_VF_PORT]
- * [IFLA_PORT_*], ...
- * [IFLA_VF_PORT]
- * [IFLA_PORT_*], ...
- * ...
- * [IFLA_PORT_SELF]
- * [IFLA_PORT_*], ...
- */
-
-enum {
- IFLA_VF_PORT_UNSPEC,
- IFLA_VF_PORT, /* nest */
- __IFLA_VF_PORT_MAX,
-};
-
-#define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
-
-enum {
- IFLA_PORT_UNSPEC,
- IFLA_PORT_VF, /* __u32 */
- IFLA_PORT_PROFILE, /* string */
- IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */
- IFLA_PORT_INSTANCE_UUID, /* binary UUID */
- IFLA_PORT_HOST_UUID, /* binary UUID */
- IFLA_PORT_REQUEST, /* __u8 */
- IFLA_PORT_RESPONSE, /* __u16, output only */
- __IFLA_PORT_MAX,
-};
-
-#define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
-
-#define PORT_PROFILE_MAX 40
-#define PORT_UUID_MAX 16
-#define PORT_SELF_VF -1
-
-enum {
- PORT_REQUEST_PREASSOCIATE = 0,
- PORT_REQUEST_PREASSOCIATE_RR,
- PORT_REQUEST_ASSOCIATE,
- PORT_REQUEST_DISASSOCIATE,
-};
-
-enum {
- PORT_VDP_RESPONSE_SUCCESS = 0,
- PORT_VDP_RESPONSE_INVALID_FORMAT,
- PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
- PORT_VDP_RESPONSE_UNUSED_VTID,
- PORT_VDP_RESPONSE_VTID_VIOLATION,
- PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
- PORT_VDP_RESPONSE_OUT_OF_SYNC,
- /* 0x08-0xFF reserved for future VDP use */
- PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
- PORT_PROFILE_RESPONSE_INPROGRESS,
- PORT_PROFILE_RESPONSE_INVALID,
- PORT_PROFILE_RESPONSE_BADSTATE,
- PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
- PORT_PROFILE_RESPONSE_ERROR,
-};
-
-struct ifla_port_vsi {
- __u8 vsi_mgr_id;
- __u8 vsi_type_id[3];
- __u8 vsi_type_version;
- __u8 pad[3];
-};
-
-#endif /* _LINUX_IF_LINK_H */
diff --git a/original/linux/if_packet.h b/original/linux/if_packet.h
deleted file mode 100644
index b925585..0000000
--- a/original/linux/if_packet.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef __LINUX_IF_PACKET_H
-#define __LINUX_IF_PACKET_H
-
-struct sockaddr_pkt
-{
- unsigned short spkt_family;
- unsigned char spkt_device[14];
- unsigned short spkt_protocol;
-};
-
-struct sockaddr_ll
-{
- unsigned short sll_family;
- unsigned short sll_protocol;
- int sll_ifindex;
- unsigned short sll_hatype;
- unsigned char sll_pkttype;
- unsigned char sll_halen;
- unsigned char sll_addr[8];
-};
-
-/* Packet types */
-
-#define PACKET_HOST 0 /* To us */
-#define PACKET_BROADCAST 1 /* To all */
-#define PACKET_MULTICAST 2 /* To group */
-#define PACKET_OTHERHOST 3 /* To someone else */
-#define PACKET_OUTGOING 4 /* Outgoing of any type */
-/* These ones are invisible by user level */
-#define PACKET_LOOPBACK 5 /* MC/BRD frame looped back */
-#define PACKET_FASTROUTE 6 /* Fastrouted frame */
-
-/* Packet socket options */
-
-#define PACKET_ADD_MEMBERSHIP 1
-#define PACKET_DROP_MEMBERSHIP 2
-#define PACKET_RECV_OUTPUT 3
-/* Value 4 is still used by obsolete turbo-packet. */
-#define PACKET_RX_RING 5
-#define PACKET_STATISTICS 6
-#define PACKET_COPY_THRESH 7
-
-struct tpacket_stats
-{
- unsigned int tp_packets;
- unsigned int tp_drops;
-};
-
-struct tpacket_hdr
-{
- unsigned long tp_status;
-#define TP_STATUS_KERNEL 0
-#define TP_STATUS_USER 1
-#define TP_STATUS_COPY 2
-#define TP_STATUS_LOSING 4
-#define TP_STATUS_CSUMNOTREADY 8
- unsigned int tp_len;
- unsigned int tp_snaplen;
- unsigned short tp_mac;
- unsigned short tp_net;
- unsigned int tp_sec;
- unsigned int tp_usec;
-};
-
-#define TPACKET_ALIGNMENT 16
-#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
-#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
-
-/*
- Frame structure:
-
- - Start. Frame must be aligned to TPACKET_ALIGNMENT=16
- - struct tpacket_hdr
- - pad to TPACKET_ALIGNMENT=16
- - struct sockaddr_ll
- - Gap, chosen so that packet data (Start+tp_net) alignes to TPACKET_ALIGNMENT=16
- - Start+tp_mac: [ Optional MAC header ]
- - Start+tp_net: Packet data, aligned to TPACKET_ALIGNMENT=16.
- - Pad to align to TPACKET_ALIGNMENT=16
- */
-
-struct tpacket_req
-{
- unsigned int tp_block_size; /* Minimal size of contiguous block */
- unsigned int tp_block_nr; /* Number of blocks */
- unsigned int tp_frame_size; /* Size of frame */
- unsigned int tp_frame_nr; /* Total number of frames */
-};
-
-struct packet_mreq
-{
- int mr_ifindex;
- unsigned short mr_type;
- unsigned short mr_alen;
- unsigned char mr_address[8];
-};
-
-#define PACKET_MR_MULTICAST 0
-#define PACKET_MR_PROMISC 1
-#define PACKET_MR_ALLMULTI 2
-
-#endif
diff --git a/original/linux/if_ppp.h b/original/linux/if_ppp.h
deleted file mode 100644
index 768372f..0000000
--- a/original/linux/if_ppp.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* $Id: if_ppp.h,v 1.21 2000/03/27 06:03:36 paulus Exp $ */
-
-/*
- * if_ppp.h - Point-to-Point Protocol definitions.
- *
- * Copyright (c) 1989 Carnegie Mellon University.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by Carnegie Mellon University. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- */
-
-/*
- * ==FILEVERSION 20050812==
- *
- * NOTE TO MAINTAINERS:
- * If you modify this file at all, please set the above date.
- * if_ppp.h is shipped with a PPP distribution as well as with the kernel;
- * if everyone increases the FILEVERSION number above, then scripts
- * can do the right thing when deciding whether to install a new if_ppp.h
- * file. Don't change the format of that line otherwise, so the
- * installation script can recognize it.
- */
-
-#ifndef _IF_PPP_H_
-#define _IF_PPP_H_
-
-#include <linux/compiler.h>
-
-/*
- * Packet sizes
- */
-
-#define PPP_MTU 1500 /* Default MTU (size of Info field) */
-#define PPP_MAXMRU 65000 /* Largest MRU we allow */
-#define PROTO_IPX 0x002b /* protocol numbers */
-#define PROTO_DNA_RT 0x0027 /* DNA Routing */
-
-
-/*
- * Bit definitions for flags.
- */
-
-#define SC_COMP_PROT 0x00000001 /* protocol compression (output) */
-#define SC_COMP_AC 0x00000002 /* header compression (output) */
-#define SC_COMP_TCP 0x00000004 /* TCP (VJ) compression (output) */
-#define SC_NO_TCP_CCID 0x00000008 /* disable VJ connection-id comp. */
-#define SC_REJ_COMP_AC 0x00000010 /* reject adrs/ctrl comp. on input */
-#define SC_REJ_COMP_TCP 0x00000020 /* reject TCP (VJ) comp. on input */
-#define SC_CCP_OPEN 0x00000040 /* Look at CCP packets */
-#define SC_CCP_UP 0x00000080 /* May send/recv compressed packets */
-#define SC_ENABLE_IP 0x00000100 /* IP packets may be exchanged */
-#define SC_LOOP_TRAFFIC 0x00000200 /* send traffic to pppd */
-#define SC_MULTILINK 0x00000400 /* do multilink encapsulation */
-#define SC_MP_SHORTSEQ 0x00000800 /* use short MP sequence numbers */
-#define SC_COMP_RUN 0x00001000 /* compressor has been inited */
-#define SC_DECOMP_RUN 0x00002000 /* decompressor has been inited */
-#define SC_MP_XSHORTSEQ 0x00004000 /* transmit short MP seq numbers */
-#define SC_DEBUG 0x00010000 /* enable debug messages */
-#define SC_LOG_INPKT 0x00020000 /* log contents of good pkts recvd */
-#define SC_LOG_OUTPKT 0x00040000 /* log contents of pkts sent */
-#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
-#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
-#define SC_SYNC 0x00200000 /* synchronous serial mode */
-#define SC_MUST_COMP 0x00400000 /* no uncompressed packets may be sent or received */
-#define SC_MASK 0x0f600fff /* bits that user can change */
-
-/* state bits */
-#define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */
-#define SC_RCV_ODDP 0x08000000 /* have rcvd char with odd parity */
-#define SC_RCV_EVNP 0x04000000 /* have rcvd char with even parity */
-#define SC_RCV_B7_1 0x02000000 /* have rcvd char with bit 7 = 1 */
-#define SC_RCV_B7_0 0x01000000 /* have rcvd char with bit 7 = 0 */
-#define SC_DC_FERROR 0x00800000 /* fatal decomp error detected */
-#define SC_DC_ERROR 0x00400000 /* non-fatal decomp error detected */
-
-/*
- * Ioctl definitions.
- */
-
-struct npioctl {
- int protocol; /* PPP protocol, e.g. PPP_IP */
- enum NPmode mode;
-};
-
-/* Structure describing a CCP configuration option, for PPPIOCSCOMPRESS */
-struct ppp_option_data {
- __u8 __user *ptr;
- __u32 length;
- int transmit;
-};
-
-struct ifpppstatsreq {
- struct ifreq b;
- struct ppp_stats stats; /* statistic information */
-};
-
-struct ifpppcstatsreq {
- struct ifreq b;
- struct ppp_comp_stats stats;
-};
-
-#define ifr__name b.ifr_ifrn.ifrn_name
-#define stats_ptr b.ifr_ifru.ifru_data
-
-/*
- * Ioctl definitions.
- */
-
-#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
-#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
-#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
-#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
-#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
-#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
-#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
-#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
-#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
-#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */
-#define PPPIOCGXASYNCMAP _IOR('t', 80, ext_accm) /* get extended ACCM */
-#define PPPIOCSXASYNCMAP _IOW('t', 79, ext_accm) /* set extended ACCM */
-#define PPPIOCXFERUNIT _IO('t', 78) /* transfer PPP unit */
-#define PPPIOCSCOMPRESS _IOW('t', 77, struct ppp_option_data)
-#define PPPIOCGNPMODE _IOWR('t', 76, struct npioctl) /* get NP mode */
-#define PPPIOCSNPMODE _IOW('t', 75, struct npioctl) /* set NP mode */
-#define PPPIOCSPASS _IOW('t', 71, struct sock_fprog) /* set pass filter */
-#define PPPIOCSACTIVE _IOW('t', 70, struct sock_fprog) /* set active filt */
-#define PPPIOCGDEBUG _IOR('t', 65, int) /* Read debug level */
-#define PPPIOCSDEBUG _IOW('t', 64, int) /* Set debug level */
-#define PPPIOCGIDLE _IOR('t', 63, struct ppp_idle) /* get idle time */
-#define PPPIOCNEWUNIT _IOWR('t', 62, int) /* create new ppp unit */
-#define PPPIOCATTACH _IOW('t', 61, int) /* attach to ppp unit */
-#define PPPIOCDETACH _IOW('t', 60, int) /* detach from ppp unit/chan */
-#define PPPIOCSMRRU _IOW('t', 59, int) /* set multilink MRU */
-#define PPPIOCCONNECT _IOW('t', 58, int) /* connect channel to unit */
-#define PPPIOCDISCONN _IO('t', 57) /* disconnect channel */
-#define PPPIOCATTCHAN _IOW('t', 56, int) /* attach to ppp channel */
-#define PPPIOCGCHAN _IOR('t', 55, int) /* get ppp channel number */
-
-#define SIOCGPPPSTATS (SIOCDEVPRIVATE + 0)
-#define SIOCGPPPVER (SIOCDEVPRIVATE + 1) /* NEVER change this!! */
-#define SIOCGPPPCSTATS (SIOCDEVPRIVATE + 2)
-
-#if !defined(ifr_mtu)
-#define ifr_mtu ifr_ifru.ifru_metric
-#endif
-
-#endif /* _IF_PPP_H_ */
diff --git a/original/linux/if_pppol2tp.h b/original/linux/if_pppol2tp.h
deleted file mode 100644
index 184bc55..0000000
--- a/original/linux/if_pppol2tp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/***************************************************************************
- * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661)
- *
- * This file supplies definitions required by the PPP over L2TP driver
- * (l2tp_ppp.c). All version information wrt this file is located in l2tp_ppp.c
- *
- * License:
- * 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.
- *
- */
-
-#ifndef __LINUX_IF_PPPOL2TP_H
-#define __LINUX_IF_PPPOL2TP_H
-
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-#include <linux/in.h>
-#endif
-
-/* Structure used to connect() the socket to a particular tunnel UDP
- * socket.
- */
-struct pppol2tp_addr {
- __kernel_pid_t pid; /* pid that owns the fd.
- * 0 => current */
- int fd; /* FD of UDP socket to use */
-
- struct sockaddr_in addr; /* IP address and port to send to */
-
- __u16 s_tunnel, s_session; /* For matching incoming packets */
- __u16 d_tunnel, d_session; /* For sending outgoing packets */
-};
-
-/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
- * bits. So we need a different sockaddr structure.
- */
-struct pppol2tpv3_addr {
- pid_t pid; /* pid that owns the fd.
- * 0 => current */
- int fd; /* FD of UDP or IP socket to use */
-
- struct sockaddr_in addr; /* IP address and port to send to */
-
- __u32 s_tunnel, s_session; /* For matching incoming packets */
- __u32 d_tunnel, d_session; /* For sending outgoing packets */
-};
-
-/* Socket options:
- * DEBUG - bitmask of debug message categories
- * SENDSEQ - 0 => don't send packets with sequence numbers
- * 1 => send packets with sequence numbers
- * RECVSEQ - 0 => receive packet sequence numbers are optional
- * 1 => drop receive packets without sequence numbers
- * LNSMODE - 0 => act as LAC.
- * 1 => act as LNS.
- * REORDERTO - reorder timeout (in millisecs). If 0, don't try to reorder.
- */
-enum {
- PPPOL2TP_SO_DEBUG = 1,
- PPPOL2TP_SO_RECVSEQ = 2,
- PPPOL2TP_SO_SENDSEQ = 3,
- PPPOL2TP_SO_LNSMODE = 4,
- PPPOL2TP_SO_REORDERTO = 5,
-};
-
-/* Debug message categories for the DEBUG socket option */
-enum {
- PPPOL2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if
- * compiled in) */
- PPPOL2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel
- * interface */
- PPPOL2TP_MSG_SEQ = (1 << 2), /* sequence numbers */
- PPPOL2TP_MSG_DATA = (1 << 3), /* data packets */
-};
-
-
-
-#endif
diff --git a/original/linux/if_pppolac.h b/original/linux/if_pppolac.h
deleted file mode 100644
index c06bd6c..0000000
--- a/original/linux/if_pppolac.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* include/linux/if_pppolac.h
- *
- * Header for PPP on L2TP Access Concentrator / PPPoLAC Socket (RFC 2661)
- *
- * Copyright (C) 2009 Google, Inc.
- * Author: Chia-chi Yeh <chiachi@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __LINUX_IF_PPPOLAC_H
-#define __LINUX_IF_PPPOLAC_H
-
-#include <linux/socket.h>
-#include <linux/types.h>
-
-struct sockaddr_pppolac {
- sa_family_t sa_family; /* AF_PPPOX */
- unsigned int sa_protocol; /* PX_PROTO_OLAC */
- int udp_socket;
- struct __attribute__((packed)) {
- __u16 tunnel, session;
- } local, remote;
-} __attribute__((packed));
-
-#endif /* __LINUX_IF_PPPOLAC_H */
diff --git a/original/linux/if_pppopns.h b/original/linux/if_pppopns.h
deleted file mode 100644
index 0cf34b4..0000000
--- a/original/linux/if_pppopns.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* include/linux/if_pppopns.h
- *
- * Header for PPP on PPTP Network Server / PPPoPNS Socket (RFC 2637)
- *
- * Copyright (C) 2009 Google, Inc.
- * Author: Chia-chi Yeh <chiachi@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __LINUX_IF_PPPOPNS_H
-#define __LINUX_IF_PPPOPNS_H
-
-#include <linux/socket.h>
-#include <linux/types.h>
-
-struct sockaddr_pppopns {
- sa_family_t sa_family; /* AF_PPPOX */
- unsigned int sa_protocol; /* PX_PROTO_OPNS */
- int tcp_socket;
- __u16 local;
- __u16 remote;
-} __attribute__((packed));
-
-#endif /* __LINUX_IF_PPPOPNS_H */
diff --git a/original/linux/if_pppox.h b/original/linux/if_pppox.h
deleted file mode 100644
index 999ccd3..0000000
--- a/original/linux/if_pppox.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/***************************************************************************
- * Linux PPP over X - Generic PPP transport layer sockets
- * Linux PPP over Ethernet (PPPoE) Socket Implementation (RFC 2516)
- *
- * This file supplies definitions required by the PPP over Ethernet driver
- * (pppox.c). All version information wrt this file is located in pppox.c
- *
- * License:
- * 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.
- *
- */
-
-#ifndef __LINUX_IF_PPPOX_H
-#define __LINUX_IF_PPPOX_H
-
-
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-#ifdef __KERNEL__
-#include <linux/if_ether.h>
-#include <linux/if.h>
-#include <linux/netdevice.h>
-#include <linux/ppp_channel.h>
-#endif /* __KERNEL__ */
-#include <linux/if_pppol2tp.h>
-#include <linux/if_pppolac.h>
-#include <linux/if_pppopns.h>
-
-/* For user-space programs to pick up these definitions
- * which they wouldn't get otherwise without defining __KERNEL__
- */
-#ifndef AF_PPPOX
-#define AF_PPPOX 24
-#define PF_PPPOX AF_PPPOX
-#endif /* !(AF_PPPOX) */
-
-/************************************************************************
- * PPPoE addressing definition
- */
-typedef __be16 sid_t;
-struct pppoe_addr {
- sid_t sid; /* Session identifier */
- unsigned char remote[ETH_ALEN]; /* Remote address */
- char dev[IFNAMSIZ]; /* Local device to use */
-};
-
-/************************************************************************
- * PPTP addressing definition
- */
-struct pptp_addr {
- __be16 call_id;
- struct in_addr sin_addr;
-};
-
-/************************************************************************
- * Protocols supported by AF_PPPOX
- */
-#define PX_PROTO_OE 0 /* Currently just PPPoE */
-#define PX_PROTO_OL2TP 1 /* Now L2TP also */
-#define PX_PROTO_PPTP 2
-#define PX_PROTO_OLAC 3
-#define PX_PROTO_OPNS 4
-#define PX_MAX_PROTO 5
-
-struct sockaddr_pppox {
- sa_family_t sa_family; /* address family, AF_PPPOX */
- unsigned int sa_protocol; /* protocol identifier */
- union {
- struct pppoe_addr pppoe;
- struct pptp_addr pptp;
- } sa_addr;
-} __attribute__((packed));
-
-/* The use of the above union isn't viable because the size of this
- * struct must stay fixed over time -- applications use sizeof(struct
- * sockaddr_pppox) to fill it. We use a protocol specific sockaddr
- * type instead.
- */
-struct sockaddr_pppol2tp {
- sa_family_t sa_family; /* address family, AF_PPPOX */
- unsigned int sa_protocol; /* protocol identifier */
- struct pppol2tp_addr pppol2tp;
-} __attribute__((packed));
-
-/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
- * bits. So we need a different sockaddr structure.
- */
-struct sockaddr_pppol2tpv3 {
- sa_family_t sa_family; /* address family, AF_PPPOX */
- unsigned int sa_protocol; /* protocol identifier */
- struct pppol2tpv3_addr pppol2tp;
-} __attribute__((packed));
-
-/*********************************************************************
- *
- * ioctl interface for defining forwarding of connections
- *
- ********************************************************************/
-
-#define PPPOEIOCSFWD _IOW(0xB1 ,0, size_t)
-#define PPPOEIOCDFWD _IO(0xB1 ,1)
-/*#define PPPOEIOCGFWD _IOWR(0xB1,2, size_t)*/
-
-/* Codes to identify message types */
-#define PADI_CODE 0x09
-#define PADO_CODE 0x07
-#define PADR_CODE 0x19
-#define PADS_CODE 0x65
-#define PADT_CODE 0xa7
-struct pppoe_tag {
- __be16 tag_type;
- __be16 tag_len;
- char tag_data[0];
-} __attribute__ ((packed));
-
-/* Tag identifiers */
-#define PTT_EOL __cpu_to_be16(0x0000)
-#define PTT_SRV_NAME __cpu_to_be16(0x0101)
-#define PTT_AC_NAME __cpu_to_be16(0x0102)
-#define PTT_HOST_UNIQ __cpu_to_be16(0x0103)
-#define PTT_AC_COOKIE __cpu_to_be16(0x0104)
-#define PTT_VENDOR __cpu_to_be16(0x0105)
-#define PTT_RELAY_SID __cpu_to_be16(0x0110)
-#define PTT_SRV_ERR __cpu_to_be16(0x0201)
-#define PTT_SYS_ERR __cpu_to_be16(0x0202)
-#define PTT_GEN_ERR __cpu_to_be16(0x0203)
-
-struct pppoe_hdr {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 ver : 4;
- __u8 type : 4;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u8 type : 4;
- __u8 ver : 4;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
- __u8 code;
- __be16 sid;
- __be16 length;
- struct pppoe_tag tag[0];
-} __attribute__((packed));
-
-/* Length of entire PPPoE + PPP header */
-#define PPPOE_SES_HLEN 8
-
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct pppoe_hdr *pppoe_hdr(const struct sk_buff *skb)
-{
- return (struct pppoe_hdr *)skb_network_header(skb);
-}
-
-struct pppoe_opt {
- struct net_device *dev; /* device associated with socket*/
- int ifindex; /* ifindex of device associated with socket */
- struct pppoe_addr pa; /* what this socket is bound to*/
- struct sockaddr_pppox relay; /* what socket data will be
- relayed to (PPPoE relaying) */
-};
-
-struct pptp_opt {
- struct pptp_addr src_addr;
- struct pptp_addr dst_addr;
- u32 ack_sent, ack_recv;
- u32 seq_sent, seq_recv;
- int ppp_flags;
-};
-
-struct pppolac_opt {
- __u32 local;
- __u32 remote;
- __u32 recv_sequence;
- __u32 xmit_sequence;
- atomic_t sequencing;
- int (*backlog_rcv)(struct sock *sk_udp, struct sk_buff *skb);
-};
-
-struct pppopns_opt {
- __u16 local;
- __u16 remote;
- __u32 recv_sequence;
- __u32 xmit_sequence;
- void (*data_ready)(struct sock *sk_raw, int length);
- int (*backlog_rcv)(struct sock *sk_raw, struct sk_buff *skb);
-};
-
-#include <net/sock.h>
-
-struct pppox_sock {
- /* struct sock must be the first member of pppox_sock */
- struct sock sk;
- struct ppp_channel chan;
- struct pppox_sock *next; /* for hash table */
- union {
- struct pppoe_opt pppoe;
- struct pptp_opt pptp;
- struct pppolac_opt lac;
- struct pppopns_opt pns;
- } proto;
- __be16 num;
-};
-#define pppoe_dev proto.pppoe.dev
-#define pppoe_ifindex proto.pppoe.ifindex
-#define pppoe_pa proto.pppoe.pa
-#define pppoe_relay proto.pppoe.relay
-
-static inline struct pppox_sock *pppox_sk(struct sock *sk)
-{
- return (struct pppox_sock *)sk;
-}
-
-static inline struct sock *sk_pppox(struct pppox_sock *po)
-{
- return (struct sock *)po;
-}
-
-struct module;
-
-struct pppox_proto {
- int (*create)(struct net *net, struct socket *sock);
- int (*ioctl)(struct socket *sock, unsigned int cmd,
- unsigned long arg);
- struct module *owner;
-};
-
-extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
-extern void unregister_pppox_proto(int proto_num);
-extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
-extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
-
-/* PPPoX socket states */
-enum {
- PPPOX_NONE = 0, /* initial state */
- PPPOX_CONNECTED = 1, /* connection established ==TCP_ESTABLISHED */
- PPPOX_BOUND = 2, /* bound to ppp device */
- PPPOX_RELAY = 4, /* forwarding is enabled */
- PPPOX_ZOMBIE = 8, /* dead, but still bound to ppp device */
- PPPOX_DEAD = 16 /* dead, useless, please clean me up!*/
-};
-
-#endif /* __KERNEL__ */
-
-#endif /* !(__LINUX_IF_PPPOX_H) */
diff --git a/original/linux/if_tr.h b/original/linux/if_tr.h
deleted file mode 100644
index 2f94cf2..0000000
--- a/original/linux/if_tr.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the Token-Ring IEEE 802.5 interface.
- *
- * Version: @(#)if_tr.h 0.0 07/11/94
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Donald Becker, <becker@super.org>
- * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
- *
- * 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.
- */
-#ifndef _LINUX_IF_TR_H
-#define _LINUX_IF_TR_H
-
-#include <asm/byteorder.h> /* For __be16 */
-
-/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble
- and FCS/CRC (frame check sequence). */
-#define TR_ALEN 6 /* Octets in one token-ring addr */
-#define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc))
-#define AC 0x10
-#define LLC_FRAME 0x40
-
-/* LLC and SNAP constants */
-#define EXTENDED_SAP 0xAA
-#define UI_CMD 0x03
-
-/* This is an Token-Ring frame header. */
-struct trh_hdr {
- __u8 ac; /* access control field */
- __u8 fc; /* frame control field */
- __u8 daddr[TR_ALEN]; /* destination address */
- __u8 saddr[TR_ALEN]; /* source address */
- __be16 rcf; /* route control field */
- __be16 rseg[8]; /* routing registers */
-};
-
-#ifdef __KERNEL__
-#include <linux/skbuff.h>
-
-static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb)
-{
- return (struct trh_hdr *)skb->mac.raw;
-}
-#ifdef CONFIG_SYSCTL
-extern struct ctl_table tr_table[];
-#endif
-#endif
-
-/* This is an Token-Ring LLC structure */
-struct trllc {
- __u8 dsap; /* destination SAP */
- __u8 ssap; /* source SAP */
- __u8 llc; /* LLC control field */
- __u8 protid[3]; /* protocol id */
- __be16 ethertype; /* ether type field */
-};
-
-/* Token-Ring statistics collection data. */
-struct tr_statistics {
- unsigned long rx_packets; /* total packets received */
- unsigned long tx_packets; /* total packets transmitted */
- unsigned long rx_bytes; /* total bytes received */
- unsigned long tx_bytes; /* total bytes transmitted */
- unsigned long rx_errors; /* bad packets received */
- unsigned long tx_errors; /* packet transmit problems */
- unsigned long rx_dropped; /* no space in linux buffers */
- unsigned long tx_dropped; /* no space available in linux */
- unsigned long multicast; /* multicast packets received */
- unsigned long transmit_collision;
-
- /* detailed Token-Ring errors. See IBM Token-Ring Network
- Architecture for more info */
-
- unsigned long line_errors;
- unsigned long internal_errors;
- unsigned long burst_errors;
- unsigned long A_C_errors;
- unsigned long abort_delimiters;
- unsigned long lost_frames;
- unsigned long recv_congest_count;
- unsigned long frame_copied_errors;
- unsigned long frequency_errors;
- unsigned long token_errors;
- unsigned long dummy1;
-};
-
-/* source routing stuff */
-#define TR_RII 0x80
-#define TR_RCF_DIR_BIT 0x80
-#define TR_RCF_LEN_MASK 0x1f00
-#define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */
-#define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */
-#define TR_RCF_FRAME2K 0x20
-#define TR_RCF_BROADCAST_MASK 0xC000
-#define TR_MAXRIFLEN 18
-
-#endif /* _LINUX_IF_TR_H */
diff --git a/original/linux/if_tun.h b/original/linux/if_tun.h
deleted file mode 100644
index 06b1829..0000000
--- a/original/linux/if_tun.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Universal TUN/TAP device driver.
- * Copyright (C) 1999-2000 Maxim Krasnyansky <max_mk@yahoo.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __IF_TUN_H
-#define __IF_TUN_H
-
-#include <linux/types.h>
-#include <linux/if_ether.h>
-#include <linux/filter.h>
-
-/* Read queue size */
-#define TUN_READQ_SIZE 500
-
-/* TUN device flags */
-#define TUN_TUN_DEV 0x0001
-#define TUN_TAP_DEV 0x0002
-#define TUN_TYPE_MASK 0x000f
-
-#define TUN_FASYNC 0x0010
-#define TUN_NOCHECKSUM 0x0020
-#define TUN_NO_PI 0x0040
-#define TUN_ONE_QUEUE 0x0080
-#define TUN_PERSIST 0x0100
-#define TUN_VNET_HDR 0x0200
-
-/* Ioctl defines */
-#define TUNSETNOCSUM _IOW('T', 200, int)
-#define TUNSETDEBUG _IOW('T', 201, int)
-#define TUNSETIFF _IOW('T', 202, int)
-#define TUNSETPERSIST _IOW('T', 203, int)
-#define TUNSETOWNER _IOW('T', 204, int)
-#define TUNSETLINK _IOW('T', 205, int)
-#define TUNSETGROUP _IOW('T', 206, int)
-#define TUNGETFEATURES _IOR('T', 207, unsigned int)
-#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)
-#define TUNSETTXFILTER _IOW('T', 209, unsigned int)
-#define TUNGETIFF _IOR('T', 210, unsigned int)
-#define TUNGETSNDBUF _IOR('T', 211, int)
-#define TUNSETSNDBUF _IOW('T', 212, int)
-#define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog)
-#define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog)
-#define TUNGETVNETHDRSZ _IOR('T', 215, int)
-#define TUNSETVNETHDRSZ _IOW('T', 216, int)
-
-/* TUNSETIFF ifr flags */
-#define IFF_TUN 0x0001
-#define IFF_TAP 0x0002
-#define IFF_NO_PI 0x1000
-#define IFF_ONE_QUEUE 0x2000
-#define IFF_VNET_HDR 0x4000
-#define IFF_TUN_EXCL 0x8000
-
-/* Features for GSO (TUNSETOFFLOAD). */
-#define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */
-#define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */
-#define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */
-#define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */
-#define TUN_F_UFO 0x10 /* I can handle UFO packets */
-
-/* Protocol info prepended to the packets (when IFF_NO_PI is not set) */
-#define TUN_PKT_STRIP 0x0001
-struct tun_pi {
- __u16 flags;
- __be16 proto;
-};
-
-/*
- * Filter spec (used for SETXXFILTER ioctls)
- * This stuff is applicable only to the TAP (Ethernet) devices.
- * If the count is zero the filter is disabled and the driver accepts
- * all packets (promisc mode).
- * If the filter is enabled in order to accept broadcast packets
- * broadcast addr must be explicitly included in the addr list.
- */
-#define TUN_FLT_ALLMULTI 0x0001 /* Accept all multicast packets */
-struct tun_filter {
- __u16 flags; /* TUN_FLT_ flags see above */
- __u16 count; /* Number of addresses */
- __u8 addr[0][ETH_ALEN];
-};
-
-#ifdef __KERNEL__
-#if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE)
-struct socket *tun_get_socket(struct file *);
-#else
-#include <linux/err.h>
-#include <linux/errno.h>
-struct file;
-struct socket;
-static inline struct socket *tun_get_socket(struct file *f)
-{
- return ERR_PTR(-EINVAL);
-}
-#endif /* CONFIG_TUN */
-#endif /* __KERNEL__ */
-#endif /* __IF_TUN_H */
diff --git a/original/linux/if_vlan.h b/original/linux/if_vlan.h
deleted file mode 100644
index 3d870fd..0000000
--- a/original/linux/if_vlan.h
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
- * VLAN An implementation of 802.1Q VLAN tagging.
- *
- * Authors: Ben Greear <greearb@candelatech.com>
- *
- * 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.
- *
- */
-
-#ifndef _LINUX_IF_VLAN_H_
-#define _LINUX_IF_VLAN_H_
-
-#ifdef __KERNEL__
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-
-#define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header)
- * that VLAN requires.
- */
-#define VLAN_ETH_ALEN 6 /* Octets in one ethernet addr */
-#define VLAN_ETH_HLEN 18 /* Total octets in header. */
-#define VLAN_ETH_ZLEN 64 /* Min. octets in frame sans FCS */
-
-/*
- * According to 802.3ac, the packet can be 4 bytes longer. --Klika Jan
- */
-#define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */
-#define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */
-
-/*
- * struct vlan_hdr - vlan header
- * @h_vlan_TCI: priority and VLAN ID
- * @h_vlan_encapsulated_proto: packet type ID or len
- */
-struct vlan_hdr {
- __be16 h_vlan_TCI;
- __be16 h_vlan_encapsulated_proto;
-};
-
-/**
- * struct vlan_ethhdr - vlan ethernet header (ethhdr + vlan_hdr)
- * @h_dest: destination ethernet address
- * @h_source: source ethernet address
- * @h_vlan_proto: ethernet protocol (always 0x8100)
- * @h_vlan_TCI: priority and VLAN ID
- * @h_vlan_encapsulated_proto: packet type ID or len
- */
-struct vlan_ethhdr {
- unsigned char h_dest[ETH_ALEN];
- unsigned char h_source[ETH_ALEN];
- __be16 h_vlan_proto;
- __be16 h_vlan_TCI;
- __be16 h_vlan_encapsulated_proto;
-};
-
-#include <linux/skbuff.h>
-
-static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
-{
- return (struct vlan_ethhdr *)skb_mac_header(skb);
-}
-
-#define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */
-#define VLAN_PRIO_SHIFT 13
-#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */
-#define VLAN_TAG_PRESENT VLAN_CFI_MASK
-#define VLAN_VID_MASK 0x0fff /* VLAN Identifier */
-
-/* found in socket.c */
-extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
-
-/* if this changes, algorithm will have to be reworked because this
- * depends on completely exhausting the VLAN identifier space. Thus
- * it gives constant time look-up, but in many cases it wastes memory.
- */
-#define VLAN_GROUP_ARRAY_LEN 4096
-#define VLAN_GROUP_ARRAY_SPLIT_PARTS 8
-#define VLAN_GROUP_ARRAY_PART_LEN (VLAN_GROUP_ARRAY_LEN/VLAN_GROUP_ARRAY_SPLIT_PARTS)
-
-struct vlan_group {
- struct net_device *real_dev; /* The ethernet(like) device
- * the vlan is attached to.
- */
- unsigned int nr_vlans;
- int killall;
- struct hlist_node hlist; /* linked list */
- struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS];
- struct rcu_head rcu;
-};
-
-static inline struct net_device *vlan_group_get_device(struct vlan_group *vg,
- u16 vlan_id)
-{
- struct net_device **array;
- array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN];
- return array ? array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] : NULL;
-}
-
-static inline void vlan_group_set_device(struct vlan_group *vg,
- u16 vlan_id,
- struct net_device *dev)
-{
- struct net_device **array;
- if (!vg)
- return;
- array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN];
- array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev;
-}
-
-#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
-#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
-
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
-extern u16 vlan_dev_vlan_id(const struct net_device *dev);
-
-extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
- u16 vlan_tci, int polling);
-extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
-extern gro_result_t
-vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
- unsigned int vlan_tci, struct sk_buff *skb);
-extern gro_result_t
-vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
- unsigned int vlan_tci);
-
-#else
-static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
-{
- BUG();
- return NULL;
-}
-
-static inline u16 vlan_dev_vlan_id(const struct net_device *dev)
-{
- BUG();
- return 0;
-}
-
-static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
- u16 vlan_tci, int polling)
-{
- BUG();
- return NET_XMIT_SUCCESS;
-}
-
-static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
-{
- return 0;
-}
-
-static inline gro_result_t
-vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
- unsigned int vlan_tci, struct sk_buff *skb)
-{
- return GRO_DROP;
-}
-
-static inline gro_result_t
-vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
- unsigned int vlan_tci)
-{
- return GRO_DROP;
-}
-#endif
-
-/**
- * vlan_hwaccel_rx - netif_rx wrapper for VLAN RX acceleration
- * @skb: buffer
- * @grp: vlan group
- * @vlan_tci: VLAN TCI as received from the card
- */
-static inline int vlan_hwaccel_rx(struct sk_buff *skb,
- struct vlan_group *grp,
- u16 vlan_tci)
-{
- return __vlan_hwaccel_rx(skb, grp, vlan_tci, 0);
-}
-
-/**
- * vlan_hwaccel_receive_skb - netif_receive_skb wrapper for VLAN RX acceleration
- * @skb: buffer
- * @grp: vlan group
- * @vlan_tci: VLAN TCI as received from the card
- */
-static inline int vlan_hwaccel_receive_skb(struct sk_buff *skb,
- struct vlan_group *grp,
- u16 vlan_tci)
-{
- return __vlan_hwaccel_rx(skb, grp, vlan_tci, 1);
-}
-
-/**
- * __vlan_put_tag - regular VLAN tag inserting
- * @skb: skbuff to tag
- * @vlan_tci: VLAN TCI to insert
- *
- * Inserts the VLAN tag into @skb as part of the payload
- * Returns a VLAN tagged skb. If a new skb is created, @skb is freed.
- *
- * Following the skb_unshare() example, in case of error, the calling function
- * doesn't have to worry about freeing the original skb.
- */
-static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
-{
- struct vlan_ethhdr *veth;
-
- if (skb_cow_head(skb, VLAN_HLEN) < 0) {
- kfree_skb(skb);
- return NULL;
- }
- veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN);
-
- /* Move the mac addresses to the beginning of the new header. */
- memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN);
- skb->mac_header -= VLAN_HLEN;
-
- /* first, the ethernet type */
- veth->h_vlan_proto = htons(ETH_P_8021Q);
-
- /* now, the TCI */
- veth->h_vlan_TCI = htons(vlan_tci);
-
- skb->protocol = htons(ETH_P_8021Q);
-
- return skb;
-}
-
-/**
- * __vlan_hwaccel_put_tag - hardware accelerated VLAN inserting
- * @skb: skbuff to tag
- * @vlan_tci: VLAN TCI to insert
- *
- * Puts the VLAN TCI in @skb->vlan_tci and lets the device do the rest
- */
-static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
- u16 vlan_tci)
-{
- skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci;
- return skb;
-}
-
-#define HAVE_VLAN_PUT_TAG
-
-/**
- * vlan_put_tag - inserts VLAN tag according to device features
- * @skb: skbuff to tag
- * @vlan_tci: VLAN TCI to insert
- *
- * Assumes skb->dev is the target that will xmit this frame.
- * Returns a VLAN tagged skb.
- */
-static inline struct sk_buff *vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
-{
- if (skb->dev->features & NETIF_F_HW_VLAN_TX) {
- return __vlan_hwaccel_put_tag(skb, vlan_tci);
- } else {
- return __vlan_put_tag(skb, vlan_tci);
- }
-}
-
-/**
- * __vlan_get_tag - get the VLAN ID that is part of the payload
- * @skb: skbuff to query
- * @vlan_tci: buffer to store vlaue
- *
- * Returns error if the skb is not of VLAN type
- */
-static inline int __vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
-{
- struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data;
-
- if (veth->h_vlan_proto != htons(ETH_P_8021Q)) {
- return -EINVAL;
- }
-
- *vlan_tci = ntohs(veth->h_vlan_TCI);
- return 0;
-}
-
-/**
- * __vlan_hwaccel_get_tag - get the VLAN ID that is in @skb->cb[]
- * @skb: skbuff to query
- * @vlan_tci: buffer to store vlaue
- *
- * Returns error if @skb->vlan_tci is not set correctly
- */
-static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb,
- u16 *vlan_tci)
-{
- if (vlan_tx_tag_present(skb)) {
- *vlan_tci = vlan_tx_tag_get(skb);
- return 0;
- } else {
- *vlan_tci = 0;
- return -EINVAL;
- }
-}
-
-#define HAVE_VLAN_GET_TAG
-
-/**
- * vlan_get_tag - get the VLAN ID from the skb
- * @skb: skbuff to query
- * @vlan_tci: buffer to store vlaue
- *
- * Returns error if the skb is not VLAN tagged
- */
-static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
-{
- if (skb->dev->features & NETIF_F_HW_VLAN_TX) {
- return __vlan_hwaccel_get_tag(skb, vlan_tci);
- } else {
- return __vlan_get_tag(skb, vlan_tci);
- }
-}
-
-#endif /* __KERNEL__ */
-
-/* VLAN IOCTLs are found in sockios.h */
-
-/* Passed in vlan_ioctl_args structure to determine behaviour. */
-enum vlan_ioctl_cmds {
- ADD_VLAN_CMD,
- DEL_VLAN_CMD,
- SET_VLAN_INGRESS_PRIORITY_CMD,
- SET_VLAN_EGRESS_PRIORITY_CMD,
- GET_VLAN_INGRESS_PRIORITY_CMD,
- GET_VLAN_EGRESS_PRIORITY_CMD,
- SET_VLAN_NAME_TYPE_CMD,
- SET_VLAN_FLAG_CMD,
- GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */
- GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */
-};
-
-enum vlan_flags {
- VLAN_FLAG_REORDER_HDR = 0x1,
- VLAN_FLAG_GVRP = 0x2,
- VLAN_FLAG_LOOSE_BINDING = 0x4,
-};
-
-enum vlan_name_types {
- VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */
- VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */
- VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */
- VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */
- VLAN_NAME_TYPE_HIGHEST
-};
-
-struct vlan_ioctl_args {
- int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */
- char device1[24];
-
- union {
- char device2[24];
- int VID;
- unsigned int skb_priority;
- unsigned int name_type;
- unsigned int bind_type;
- unsigned int flag; /* Matches vlan_dev_info flags */
- } u;
-
- short vlan_qos;
-};
-
-#endif /* !(_LINUX_IF_VLAN_H_) */
diff --git a/original/linux/in.h b/original/linux/in.h
deleted file mode 100644
index 94f557f..0000000
--- a/original/linux/in.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions of the Internet Protocol.
- *
- * Version: @(#)in.h 1.0.1 04/21/93
- *
- * Authors: Original taken from the GNU Project <netinet/in.h> file.
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_IN_H
-#define _LINUX_IN_H
-
-#include <linux/types.h>
-#include <linux/socket.h>
-
-/* Standard well-defined IP protocols. */
-enum {
- IPPROTO_IP = 0, /* Dummy protocol for TCP */
- IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
- IPPROTO_IGMP = 2, /* Internet Group Management Protocol */
- IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */
- IPPROTO_TCP = 6, /* Transmission Control Protocol */
- IPPROTO_EGP = 8, /* Exterior Gateway Protocol */
- IPPROTO_PUP = 12, /* PUP protocol */
- IPPROTO_UDP = 17, /* User Datagram Protocol */
- IPPROTO_IDP = 22, /* XNS IDP protocol */
- IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol */
- IPPROTO_RSVP = 46, /* RSVP protocol */
- IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */
-
- IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */
-
- IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */
- IPPROTO_AH = 51, /* Authentication Header protocol */
- IPPROTO_PIM = 103, /* Protocol Independent Multicast */
-
- IPPROTO_COMP = 108, /* Compression Header protocol */
- IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */
-
- IPPROTO_RAW = 255, /* Raw IP packets */
- IPPROTO_MAX
-};
-
-
-/* Internet address. */
-struct in_addr {
- __u32 s_addr;
-};
-
-#define IP_TOS 1
-#define IP_TTL 2
-#define IP_HDRINCL 3
-#define IP_OPTIONS 4
-#define IP_ROUTER_ALERT 5
-#define IP_RECVOPTS 6
-#define IP_RETOPTS 7
-#define IP_PKTINFO 8
-#define IP_PKTOPTIONS 9
-#define IP_MTU_DISCOVER 10
-#define IP_RECVERR 11
-#define IP_RECVTTL 12
-#define IP_RECVTOS 13
-#define IP_MTU 14
-#define IP_FREEBIND 15
-#define IP_IPSEC_POLICY 16
-#define IP_XFRM_POLICY 17
-#define IP_PASSSEC 18
-
-/* BSD compatibility */
-#define IP_RECVRETOPTS IP_RETOPTS
-
-/* IP_MTU_DISCOVER values */
-#define IP_PMTUDISC_DONT 0 /* Never send DF frames */
-#define IP_PMTUDISC_WANT 1 /* Use per route hints */
-#define IP_PMTUDISC_DO 2 /* Always DF */
-
-#define IP_MULTICAST_IF 32
-#define IP_MULTICAST_TTL 33
-#define IP_MULTICAST_LOOP 34
-#define IP_ADD_MEMBERSHIP 35
-#define IP_DROP_MEMBERSHIP 36
-#define IP_UNBLOCK_SOURCE 37
-#define IP_BLOCK_SOURCE 38
-#define IP_ADD_SOURCE_MEMBERSHIP 39
-#define IP_DROP_SOURCE_MEMBERSHIP 40
-#define IP_MSFILTER 41
-#define MCAST_JOIN_GROUP 42
-#define MCAST_BLOCK_SOURCE 43
-#define MCAST_UNBLOCK_SOURCE 44
-#define MCAST_LEAVE_GROUP 45
-#define MCAST_JOIN_SOURCE_GROUP 46
-#define MCAST_LEAVE_SOURCE_GROUP 47
-#define MCAST_MSFILTER 48
-
-#define MCAST_EXCLUDE 0
-#define MCAST_INCLUDE 1
-
-/* These need to appear somewhere around here */
-#define IP_DEFAULT_MULTICAST_TTL 1
-#define IP_DEFAULT_MULTICAST_LOOP 1
-
-/* Request struct for multicast socket ops */
-
-struct ip_mreq
-{
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_interface; /* local IP address of interface */
-};
-
-struct ip_mreqn
-{
- struct in_addr imr_multiaddr; /* IP multicast address of group */
- struct in_addr imr_address; /* local IP address of interface */
- int imr_ifindex; /* Interface index */
-};
-
-struct ip_mreq_source {
- __u32 imr_multiaddr;
- __u32 imr_interface;
- __u32 imr_sourceaddr;
-};
-
-struct ip_msfilter {
- __u32 imsf_multiaddr;
- __u32 imsf_interface;
- __u32 imsf_fmode;
- __u32 imsf_numsrc;
- __u32 imsf_slist[1];
-};
-
-#define IP_MSFILTER_SIZE(numsrc) \
- (sizeof(struct ip_msfilter) - sizeof(__u32) \
- + (numsrc) * sizeof(__u32))
-
-struct group_req
-{
- __u32 gr_interface; /* interface index */
- struct __kernel_sockaddr_storage gr_group; /* group address */
-};
-
-struct group_source_req
-{
- __u32 gsr_interface; /* interface index */
- struct __kernel_sockaddr_storage gsr_group; /* group address */
- struct __kernel_sockaddr_storage gsr_source; /* source address */
-};
-
-struct group_filter
-{
- __u32 gf_interface; /* interface index */
- struct __kernel_sockaddr_storage gf_group; /* multicast address */
- __u32 gf_fmode; /* filter mode */
- __u32 gf_numsrc; /* number of sources */
- struct __kernel_sockaddr_storage gf_slist[1]; /* interface index */
-};
-
-#define GROUP_FILTER_SIZE(numsrc) \
- (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
- + (numsrc) * sizeof(struct __kernel_sockaddr_storage))
-
-struct in_pktinfo
-{
- int ipi_ifindex;
- struct in_addr ipi_spec_dst;
- struct in_addr ipi_addr;
-};
-
-/* Structure describing an Internet (IP) socket address. */
-#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
-struct sockaddr_in {
- sa_family_t sin_family; /* Address family */
- unsigned short int sin_port; /* Port number */
- struct in_addr sin_addr; /* Internet address */
-
- /* Pad to size of `struct sockaddr'. */
- unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) -
- sizeof(unsigned short int) - sizeof(struct in_addr)];
-};
-#define sin_zero __pad /* for BSD UNIX comp. -FvK */
-
-
-/*
- * Definitions of the bits in an Internet address integer.
- * On subnets, host and network parts are found according
- * to the subnet mask, not these masks.
- */
-#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0)
-#define IN_CLASSA_NET 0xff000000
-#define IN_CLASSA_NSHIFT 24
-#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
-#define IN_CLASSA_MAX 128
-
-#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000)
-#define IN_CLASSB_NET 0xffff0000
-#define IN_CLASSB_NSHIFT 16
-#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
-#define IN_CLASSB_MAX 65536
-
-#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000)
-#define IN_CLASSC_NET 0xffffff00
-#define IN_CLASSC_NSHIFT 8
-#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
-
-#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
-#define IN_MULTICAST(a) IN_CLASSD(a)
-#define IN_MULTICAST_NET 0xF0000000
-
-#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
-#define IN_BADCLASS(a) IN_EXPERIMENTAL((a))
-
-/* Address to accept any incoming messages. */
-#define INADDR_ANY ((unsigned long int) 0x00000000)
-
-/* Address to send to all hosts. */
-#define INADDR_BROADCAST ((unsigned long int) 0xffffffff)
-
-/* Address indicating an error return. */
-#define INADDR_NONE ((unsigned long int) 0xffffffff)
-
-/* Network number for local host loopback. */
-#define IN_LOOPBACKNET 127
-
-/* Address to loopback in software to local host. */
-#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */
-#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000)
-
-/* Defines for Multicast INADDR */
-#define INADDR_UNSPEC_GROUP 0xe0000000U /* 224.0.0.0 */
-#define INADDR_ALLHOSTS_GROUP 0xe0000001U /* 224.0.0.1 */
-#define INADDR_ALLRTRS_GROUP 0xe0000002U /* 224.0.0.2 */
-#define INADDR_MAX_LOCAL_GROUP 0xe00000ffU /* 224.0.0.255 */
-
-
-/* <asm/byteorder.h> contains the htonl type stuff.. */
-#include <asm/byteorder.h>
-
-#ifdef __KERNEL__
-/* Some random defines to make it easier in the kernel.. */
-#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000))
-#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000))
-#define BADCLASS(x) (((x) & htonl(0xf0000000)) == htonl(0xf0000000))
-#define ZERONET(x) (((x) & htonl(0xff000000)) == htonl(0x00000000))
-#define LOCAL_MCAST(x) (((x) & htonl(0xFFFFFF00)) == htonl(0xE0000000))
-
-#endif
-
-#endif /* _LINUX_IN_H */
diff --git a/original/linux/in6.h b/original/linux/in6.h
deleted file mode 100644
index 097a34b..0000000
--- a/original/linux/in6.h
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- * Types and definitions for AF_INET6
- * Linux INET6 implementation
- *
- * Authors:
- * Pedro Roque <roque@di.fc.ul.pt>
- *
- * Sources:
- * IPv6 Program Interfaces for BSD Systems
- * <draft-ietf-ipngwg-bsd-api-05.txt>
- *
- * Advanced Sockets API for IPv6
- * <draft-stevens-advanced-api-00.txt>
- *
- * 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.
- */
-
-#ifndef _LINUX_IN6_H
-#define _LINUX_IN6_H
-
-#include <linux/types.h>
-
-/*
- * IPv6 address structure
- */
-
-struct in6_addr {
- union {
- __u8 u6_addr8[16];
- __be16 u6_addr16[8];
- __be32 u6_addr32[4];
- } in6_u;
-#define s6_addr in6_u.u6_addr8
-#define s6_addr16 in6_u.u6_addr16
-#define s6_addr32 in6_u.u6_addr32
-};
-
-/* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
- * NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
- * in network byte order, not in host byte order as are the IPv4 equivalents
- */
-#ifdef __KERNEL__
-extern const struct in6_addr in6addr_any;
-#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
-extern const struct in6_addr in6addr_loopback;
-#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
-extern const struct in6_addr in6addr_linklocal_allnodes;
-#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
- { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
-extern const struct in6_addr in6addr_linklocal_allrouters;
-#define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \
- { { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
-#endif
-
-struct sockaddr_in6 {
- unsigned short int sin6_family; /* AF_INET6 */
- __be16 sin6_port; /* Transport layer port # */
- __be32 sin6_flowinfo; /* IPv6 flow information */
- struct in6_addr sin6_addr; /* IPv6 address */
- __u32 sin6_scope_id; /* scope id (new in RFC2553) */
-};
-
-struct ipv6_mreq {
- /* IPv6 multicast address of group */
- struct in6_addr ipv6mr_multiaddr;
-
- /* local IPv6 address of interface */
- int ipv6mr_ifindex;
-};
-
-#define ipv6mr_acaddr ipv6mr_multiaddr
-
-struct in6_flowlabel_req {
- struct in6_addr flr_dst;
- __be32 flr_label;
- __u8 flr_action;
- __u8 flr_share;
- __u16 flr_flags;
- __u16 flr_expires;
- __u16 flr_linger;
- __u32 __flr_pad;
- /* Options in format of IPV6_PKTOPTIONS */
-};
-
-#define IPV6_FL_A_GET 0
-#define IPV6_FL_A_PUT 1
-#define IPV6_FL_A_RENEW 2
-
-#define IPV6_FL_F_CREATE 1
-#define IPV6_FL_F_EXCL 2
-
-#define IPV6_FL_S_NONE 0
-#define IPV6_FL_S_EXCL 1
-#define IPV6_FL_S_PROCESS 2
-#define IPV6_FL_S_USER 3
-#define IPV6_FL_S_ANY 255
-
-
-/*
- * Bitmask constant declarations to help applications select out the
- * flow label and priority fields.
- *
- * Note that this are in host byte order while the flowinfo field of
- * sockaddr_in6 is in network byte order.
- */
-
-#define IPV6_FLOWINFO_FLOWLABEL 0x000fffff
-#define IPV6_FLOWINFO_PRIORITY 0x0ff00000
-
-/* These definitions are obsolete */
-#define IPV6_PRIORITY_UNCHARACTERIZED 0x0000
-#define IPV6_PRIORITY_FILLER 0x0100
-#define IPV6_PRIORITY_UNATTENDED 0x0200
-#define IPV6_PRIORITY_RESERVED1 0x0300
-#define IPV6_PRIORITY_BULK 0x0400
-#define IPV6_PRIORITY_RESERVED2 0x0500
-#define IPV6_PRIORITY_INTERACTIVE 0x0600
-#define IPV6_PRIORITY_CONTROL 0x0700
-#define IPV6_PRIORITY_8 0x0800
-#define IPV6_PRIORITY_9 0x0900
-#define IPV6_PRIORITY_10 0x0a00
-#define IPV6_PRIORITY_11 0x0b00
-#define IPV6_PRIORITY_12 0x0c00
-#define IPV6_PRIORITY_13 0x0d00
-#define IPV6_PRIORITY_14 0x0e00
-#define IPV6_PRIORITY_15 0x0f00
-
-/*
- * IPV6 extension headers
- */
-#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */
-#define IPPROTO_ROUTING 43 /* IPv6 routing header */
-#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */
-#define IPPROTO_ICMPV6 58 /* ICMPv6 */
-#define IPPROTO_NONE 59 /* IPv6 no next header */
-#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */
-#define IPPROTO_MH 135 /* IPv6 mobility header */
-
-/*
- * IPv6 TLV options.
- */
-#define IPV6_TLV_PAD0 0
-#define IPV6_TLV_PADN 1
-#define IPV6_TLV_ROUTERALERT 5
-#define IPV6_TLV_JUMBO 194
-#define IPV6_TLV_HAO 201 /* home address option */
-
-/*
- * IPV6 socket options
- */
-
-#define IPV6_ADDRFORM 1
-#define IPV6_2292PKTINFO 2
-#define IPV6_2292HOPOPTS 3
-#define IPV6_2292DSTOPTS 4
-#define IPV6_2292RTHDR 5
-#define IPV6_2292PKTOPTIONS 6
-#define IPV6_CHECKSUM 7
-#define IPV6_2292HOPLIMIT 8
-#define IPV6_NEXTHOP 9
-#define IPV6_AUTHHDR 10 /* obsolete */
-#define IPV6_FLOWINFO 11
-
-#define IPV6_UNICAST_HOPS 16
-#define IPV6_MULTICAST_IF 17
-#define IPV6_MULTICAST_HOPS 18
-#define IPV6_MULTICAST_LOOP 19
-#define IPV6_ADD_MEMBERSHIP 20
-#define IPV6_DROP_MEMBERSHIP 21
-#define IPV6_ROUTER_ALERT 22
-#define IPV6_MTU_DISCOVER 23
-#define IPV6_MTU 24
-#define IPV6_RECVERR 25
-#define IPV6_V6ONLY 26
-#define IPV6_JOIN_ANYCAST 27
-#define IPV6_LEAVE_ANYCAST 28
-
-/* IPV6_MTU_DISCOVER values */
-#define IPV6_PMTUDISC_DONT 0
-#define IPV6_PMTUDISC_WANT 1
-#define IPV6_PMTUDISC_DO 2
-#define IPV6_PMTUDISC_PROBE 3
-
-/* Flowlabel */
-#define IPV6_FLOWLABEL_MGR 32
-#define IPV6_FLOWINFO_SEND 33
-
-#define IPV6_IPSEC_POLICY 34
-#define IPV6_XFRM_POLICY 35
-
-/*
- * Multicast:
- * Following socket options are shared between IPv4 and IPv6.
- *
- * MCAST_JOIN_GROUP 42
- * MCAST_BLOCK_SOURCE 43
- * MCAST_UNBLOCK_SOURCE 44
- * MCAST_LEAVE_GROUP 45
- * MCAST_JOIN_SOURCE_GROUP 46
- * MCAST_LEAVE_SOURCE_GROUP 47
- * MCAST_MSFILTER 48
- */
-
-/*
- * Advanced API (RFC3542) (1)
- *
- * Note: IPV6_RECVRTHDRDSTOPTS does not exist. see net/ipv6/datagram.c.
- */
-
-#define IPV6_RECVPKTINFO 49
-#define IPV6_PKTINFO 50
-#define IPV6_RECVHOPLIMIT 51
-#define IPV6_HOPLIMIT 52
-#define IPV6_RECVHOPOPTS 53
-#define IPV6_HOPOPTS 54
-#define IPV6_RTHDRDSTOPTS 55
-#define IPV6_RECVRTHDR 56
-#define IPV6_RTHDR 57
-#define IPV6_RECVDSTOPTS 58
-#define IPV6_DSTOPTS 59
-#define IPV6_RECVPATHMTU 60
-#define IPV6_PATHMTU 61
-#define IPV6_DONTFRAG 62
-#if 0 /* not yet */
-#define IPV6_USE_MIN_MTU 63
-#endif
-
-/*
- * Netfilter (1)
- *
- * Following socket options are used in ip6_tables;
- * see include/linux/netfilter_ipv6/ip6_tables.h.
- *
- * IP6T_SO_SET_REPLACE / IP6T_SO_GET_INFO 64
- * IP6T_SO_SET_ADD_COUNTERS / IP6T_SO_GET_ENTRIES 65
- */
-
-/*
- * Advanced API (RFC3542) (2)
- */
-#define IPV6_RECVTCLASS 66
-#define IPV6_TCLASS 67
-
-/*
- * Netfilter (2)
- *
- * Following socket options are used in ip6_tables;
- * see include/linux/netfilter_ipv6/ip6_tables.h.
- *
- * IP6T_SO_GET_REVISION_MATCH 68
- * IP6T_SO_GET_REVISION_TARGET 69
- */
-
-/* RFC5014: Source address selection */
-#define IPV6_ADDR_PREFERENCES 72
-
-#define IPV6_PREFER_SRC_TMP 0x0001
-#define IPV6_PREFER_SRC_PUBLIC 0x0002
-#define IPV6_PREFER_SRC_PUBTMP_DEFAULT 0x0100
-#define IPV6_PREFER_SRC_COA 0x0004
-#define IPV6_PREFER_SRC_HOME 0x0400
-#define IPV6_PREFER_SRC_CGA 0x0008
-#define IPV6_PREFER_SRC_NONCGA 0x0800
-
-/* RFC5082: Generalized Ttl Security Mechanism */
-#define IPV6_MINHOPCOUNT 73
-
-#define IPV6_ORIGDSTADDR 74
-#define IPV6_RECVORIGDSTADDR IPV6_ORIGDSTADDR
-#define IPV6_TRANSPARENT 75
-
-/*
- * Multicast Routing:
- * see include/linux/mroute6.h.
- *
- * MRT6_INIT 200
- * MRT6_DONE 201
- * MRT6_ADD_MIF 202
- * MRT6_DEL_MIF 203
- * MRT6_ADD_MFC 204
- * MRT6_DEL_MFC 205
- * MRT6_VERSION 206
- * MRT6_ASSERT 207
- * MRT6_PIM 208
- * (reserved) 209
- */
-#endif
diff --git a/original/linux/in_route.h b/original/linux/in_route.h
deleted file mode 100644
index b261b8c..0000000
--- a/original/linux/in_route.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _LINUX_IN_ROUTE_H
-#define _LINUX_IN_ROUTE_H
-
-/* IPv4 routing cache flags */
-
-#define RTCF_DEAD RTNH_F_DEAD
-#define RTCF_ONLINK RTNH_F_ONLINK
-
-/* Obsolete flag. About to be deleted */
-#define RTCF_NOPMTUDISC RTM_F_NOPMTUDISC
-
-#define RTCF_NOTIFY 0x00010000
-#define RTCF_DIRECTDST 0x00020000 /* unused */
-#define RTCF_REDIRECTED 0x00040000
-#define RTCF_TPROXY 0x00080000 /* unused */
-
-#define RTCF_FAST 0x00200000 /* unused */
-#define RTCF_MASQ 0x00400000 /* unused */
-#define RTCF_SNAT 0x00800000 /* unused */
-#define RTCF_DOREDIRECT 0x01000000
-#define RTCF_DIRECTSRC 0x04000000
-#define RTCF_DNAT 0x08000000
-#define RTCF_BROADCAST 0x10000000
-#define RTCF_MULTICAST 0x20000000
-#define RTCF_REJECT 0x40000000 /* unused */
-#define RTCF_LOCAL 0x80000000
-
-#define RTCF_NAT (RTCF_DNAT|RTCF_SNAT)
-
-#define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK)
-
-#endif /* _LINUX_IN_ROUTE_H */
diff --git a/original/linux/init.h b/original/linux/init.h
deleted file mode 100644
index 6667785..0000000
--- a/original/linux/init.h
+++ /dev/null
@@ -1,278 +0,0 @@
-#ifndef _LINUX_INIT_H
-#define _LINUX_INIT_H
-
-#include <linux/compiler.h>
-
-/* These macros are used to mark some functions or
- * initialized data (doesn't apply to uninitialized data)
- * as `initialization' functions. The kernel can take this
- * as hint that the function is used only during the initialization
- * phase and free up used memory resources after
- *
- * Usage:
- * For functions:
- *
- * You should add __init immediately before the function name, like:
- *
- * static void __init initme(int x, int y)
- * {
- * extern int z; z = x * y;
- * }
- *
- * If the function has a prototype somewhere, you can also add
- * __init between closing brace of the prototype and semicolon:
- *
- * extern int initialize_foobar_device(int, int, int) __init;
- *
- * For initialized data:
- * You should insert __initdata between the variable name and equal
- * sign followed by value, e.g.:
- *
- * static int init_variable __initdata = 0;
- * static char linux_logo[] __initdata = { 0x32, 0x36, ... };
- *
- * Don't forget to initialize data not at file scope, i.e. within a function,
- * as gcc otherwise puts the data into the bss section and not into the init
- * section.
- *
- * Also note, that this data cannot be "const".
- */
-
-/* These are for everybody (although not all archs will actually
- discard it in modules) */
-#define __init __attribute__ ((__section__ (".init.text")))
-#define __initdata __attribute__ ((__section__ (".init.data")))
-#define __exitdata __attribute__ ((__section__(".exit.data")))
-#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
-
-#ifdef MODULE
-#define __exit __attribute__ ((__section__(".exit.text")))
-#else
-#define __exit __attribute_used__ __attribute__ ((__section__(".exit.text")))
-#endif
-
-/* For assembly routines */
-#define __INIT .section ".init.text","ax"
-#define __FINIT .previous
-#define __INITDATA .section ".init.data","aw"
-
-#ifndef __ASSEMBLY__
-/*
- * Used for initialization calls..
- */
-typedef int (*initcall_t)(void);
-typedef void (*exitcall_t)(void);
-
-extern initcall_t __con_initcall_start[], __con_initcall_end[];
-extern initcall_t __security_initcall_start[], __security_initcall_end[];
-
-/* Defined in init/main.c */
-extern char saved_command_line[];
-
-/* used by init/main.c */
-extern void setup_arch(char **);
-
-#endif
-
-#ifndef MODULE
-
-#ifndef __ASSEMBLY__
-
-/* initcalls are now grouped by functionality into separate
- * subsections. Ordering inside the subsections is determined
- * by link order.
- * For backwards compatibility, initcall() puts the call in
- * the device init subsection.
- */
-
-#define __define_initcall(level,fn) \
- static initcall_t __initcall_##fn __attribute_used__ \
- __attribute__((__section__(".initcall" level ".init"))) = fn
-
-#define core_initcall(fn) __define_initcall("1",fn)
-#define postcore_initcall(fn) __define_initcall("2",fn)
-#define arch_initcall(fn) __define_initcall("3",fn)
-#define subsys_initcall(fn) __define_initcall("4",fn)
-#define fs_initcall(fn) __define_initcall("5",fn)
-#define device_initcall(fn) __define_initcall("6",fn)
-#define late_initcall(fn) __define_initcall("7",fn)
-
-#define __initcall(fn) device_initcall(fn)
-
-#define __exitcall(fn) \
- static exitcall_t __exitcall_##fn __exit_call = fn
-
-#define console_initcall(fn) \
- static initcall_t __initcall_##fn \
- __attribute_used__ __attribute__((__section__(".con_initcall.init")))=fn
-
-#define security_initcall(fn) \
- static initcall_t __initcall_##fn \
- __attribute_used__ __attribute__((__section__(".security_initcall.init"))) = fn
-
-struct obs_kernel_param {
- const char *str;
- int (*setup_func)(char *);
- int early;
-};
-
-/*
- * Only for really core code. See moduleparam.h for the normal way.
- *
- * Force the alignment so the compiler doesn't space elements of the
- * obs_kernel_param "array" too far apart in .init.setup.
- */
-#define __setup_param(str, unique_id, fn, early) \
- static char __setup_str_##unique_id[] __initdata = str; \
- static struct obs_kernel_param __setup_##unique_id \
- __attribute_used__ \
- __attribute__((__section__(".init.setup"))) \
- __attribute__((aligned((sizeof(long))))) \
- = { __setup_str_##unique_id, fn, early }
-
-#define __setup_null_param(str, unique_id) \
- __setup_param(str, unique_id, NULL, 0)
-
-#define __setup(str, fn) \
- __setup_param(str, fn, fn, 0)
-
-#define __obsolete_setup(str) \
- __setup_null_param(str, __LINE__)
-
-/* NOTE: fn is as per module_param, not __setup! Emits warning if fn
- * returns non-zero. */
-#define early_param(str, fn) \
- __setup_param(str, fn, fn, 1)
-
-/* Relies on saved_command_line being set */
-void __init parse_early_param(void);
-#endif /* __ASSEMBLY__ */
-
-/**
- * module_init() - driver initialization entry point
- * @x: function to be run at kernel boot time or module insertion
- *
- * module_init() will either be called during do_initcalls (if
- * builtin) or at module insertion time (if a module). There can only
- * be one per module.
- */
-#define module_init(x) __initcall(x);
-
-/**
- * module_exit() - driver exit entry point
- * @x: function to be run when driver is removed
- *
- * module_exit() will wrap the driver clean-up code
- * with cleanup_module() when used with rmmod when
- * the driver is a module. If the driver is statically
- * compiled into the kernel, module_exit() has no effect.
- * There can only be one per module.
- */
-#define module_exit(x) __exitcall(x);
-
-#else /* MODULE */
-
-/* Don't use these in modules, but some people do... */
-#define core_initcall(fn) module_init(fn)
-#define postcore_initcall(fn) module_init(fn)
-#define arch_initcall(fn) module_init(fn)
-#define subsys_initcall(fn) module_init(fn)
-#define fs_initcall(fn) module_init(fn)
-#define device_initcall(fn) module_init(fn)
-#define late_initcall(fn) module_init(fn)
-
-#define security_initcall(fn) module_init(fn)
-
-/* These macros create a dummy inline: gcc 2.9x does not count alias
- as usage, hence the `unused function' warning when __init functions
- are declared static. We use the dummy __*_module_inline functions
- both to kill the warning and check the type of the init/cleanup
- function. */
-
-/* Each module must use one module_init(), or one no_module_init */
-#define module_init(initfn) \
- static inline initcall_t __inittest(void) \
- { return initfn; } \
- int init_module(void) __attribute__((alias(#initfn)));
-
-/* This is only required if you want to be unloadable. */
-#define module_exit(exitfn) \
- static inline exitcall_t __exittest(void) \
- { return exitfn; } \
- void cleanup_module(void) __attribute__((alias(#exitfn)));
-
-#define __setup_param(str, unique_id, fn) /* nothing */
-#define __setup_null_param(str, unique_id) /* nothing */
-#define __setup(str, func) /* nothing */
-#define __obsolete_setup(str) /* nothing */
-#endif
-
-/* Data marked not to be saved by software_suspend() */
-#define __nosavedata __attribute__ ((__section__ (".data.nosave")))
-
-/* This means "can be init if no module support, otherwise module load
- may call it." */
-#ifdef CONFIG_MODULES
-#define __init_or_module
-#define __initdata_or_module
-#else
-#define __init_or_module __init
-#define __initdata_or_module __initdata
-#endif /*CONFIG_MODULES*/
-
-#ifdef CONFIG_HOTPLUG
-#define __devinit
-#define __devinitdata
-#define __devexit
-#define __devexitdata
-#else
-#define __devinit __init
-#define __devinitdata __initdata
-#define __devexit __exit
-#define __devexitdata __exitdata
-#endif
-
-#ifdef CONFIG_HOTPLUG_CPU
-#define __cpuinit
-#define __cpuinitdata
-#define __cpuexit
-#define __cpuexitdata
-#else
-#define __cpuinit __init
-#define __cpuinitdata __initdata
-#define __cpuexit __exit
-#define __cpuexitdata __exitdata
-#endif
-
-#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
- || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
-#define __meminit
-#define __meminitdata
-#define __memexit
-#define __memexitdata
-#else
-#define __meminit __init
-#define __meminitdata __initdata
-#define __memexit __exit
-#define __memexitdata __exitdata
-#endif
-
-/* Functions marked as __devexit may be discarded at kernel link time, depending
- on config options. Newer versions of binutils detect references from
- retained sections to discarded sections and flag an error. Pointers to
- __devexit functions must use __devexit_p(function_name), the wrapper will
- insert either the function_name or NULL, depending on the config options.
- */
-#if defined(MODULE) || defined(CONFIG_HOTPLUG)
-#define __devexit_p(x) x
-#else
-#define __devexit_p(x) NULL
-#endif
-
-#ifdef MODULE
-#define __exit_p(x) x
-#else
-#define __exit_p(x) NULL
-#endif
-
-#endif /* _LINUX_INIT_H */
diff --git a/original/linux/inotify.h b/original/linux/inotify.h
deleted file mode 100644
index d4f48c6..0000000
--- a/original/linux/inotify.h
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Inode based directory notification for Linux
- *
- * Copyright (C) 2005 John McCutchan
- */
-
-#ifndef _LINUX_INOTIFY_H
-#define _LINUX_INOTIFY_H
-
-#include <linux/types.h>
-
-/*
- * struct inotify_event - structure read from the inotify device for each event
- *
- * When you are watching a directory, you will receive the filename for events
- * such as IN_CREATE, IN_DELETE, IN_OPEN, IN_CLOSE, ..., relative to the wd.
- */
-struct inotify_event {
- __s32 wd; /* watch descriptor */
- __u32 mask; /* watch mask */
- __u32 cookie; /* cookie to synchronize two events */
- __u32 len; /* length (including nulls) of name */
- char name[0]; /* stub for possible name */
-};
-
-/* the following are legal, implemented events that user-space can watch for */
-#define IN_ACCESS 0x00000001 /* File was accessed */
-#define IN_MODIFY 0x00000002 /* File was modified */
-#define IN_ATTRIB 0x00000004 /* Metadata changed */
-#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */
-#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
-#define IN_OPEN 0x00000020 /* File was opened */
-#define IN_MOVED_FROM 0x00000040 /* File was moved from X */
-#define IN_MOVED_TO 0x00000080 /* File was moved to Y */
-#define IN_CREATE 0x00000100 /* Subfile was created */
-#define IN_DELETE 0x00000200 /* Subfile was deleted */
-#define IN_DELETE_SELF 0x00000400 /* Self was deleted */
-#define IN_MOVE_SELF 0x00000800 /* Self was moved */
-
-/* the following are legal events. they are sent as needed to any watch */
-#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */
-#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
-#define IN_IGNORED 0x00008000 /* File was ignored */
-
-/* helper events */
-#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
-#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */
-
-/* special flags */
-#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */
-#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */
-#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */
-#define IN_ISDIR 0x40000000 /* event occurred against dir */
-#define IN_ONESHOT 0x80000000 /* only send event once */
-
-/*
- * All of the events - we build the list by hand so that we can add flags in
- * the future and not break backward compatibility. Apps will get only the
- * events that they originally wanted. Be sure to add new events here!
- */
-#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
- IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
- IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \
- IN_MOVE_SELF)
-
-#ifdef __KERNEL__
-
-#include <linux/dcache.h>
-#include <linux/fs.h>
-
-/*
- * struct inotify_watch - represents a watch request on a specific inode
- *
- * h_list is protected by ih->mutex of the associated inotify_handle.
- * i_list, mask are protected by inode->inotify_mutex of the associated inode.
- * ih, inode, and wd are never written to once the watch is created.
- *
- * Callers must use the established inotify interfaces to access inotify_watch
- * contents. The content of this structure is private to the inotify
- * implementation.
- */
-struct inotify_watch {
- struct list_head h_list; /* entry in inotify_handle's list */
- struct list_head i_list; /* entry in inode's list */
- atomic_t count; /* reference count */
- struct inotify_handle *ih; /* associated inotify handle */
- struct inode *inode; /* associated inode */
- __s32 wd; /* watch descriptor */
- __u32 mask; /* event mask for this watch */
-};
-
-struct inotify_operations {
- void (*handle_event)(struct inotify_watch *, u32, u32, u32,
- const char *, struct inode *);
- void (*destroy_watch)(struct inotify_watch *);
-};
-
-#ifdef CONFIG_INOTIFY
-
-/* Kernel API for producing events */
-
-extern void inotify_d_instantiate(struct dentry *, struct inode *);
-extern void inotify_d_move(struct dentry *);
-extern void inotify_inode_queue_event(struct inode *, __u32, __u32,
- const char *, struct inode *);
-extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32,
- const char *);
-extern void inotify_unmount_inodes(struct list_head *);
-extern void inotify_inode_is_dead(struct inode *);
-extern u32 inotify_get_cookie(void);
-
-/* Kernel Consumer API */
-
-extern struct inotify_handle *inotify_init(const struct inotify_operations *);
-extern void inotify_init_watch(struct inotify_watch *);
-extern void inotify_destroy(struct inotify_handle *);
-extern __s32 inotify_find_watch(struct inotify_handle *, struct inode *,
- struct inotify_watch **);
-extern __s32 inotify_find_update_watch(struct inotify_handle *, struct inode *,
- u32);
-extern __s32 inotify_add_watch(struct inotify_handle *, struct inotify_watch *,
- struct inode *, __u32);
-extern int inotify_rm_watch(struct inotify_handle *, struct inotify_watch *);
-extern int inotify_rm_wd(struct inotify_handle *, __u32);
-extern void inotify_remove_watch_locked(struct inotify_handle *,
- struct inotify_watch *);
-extern void get_inotify_watch(struct inotify_watch *);
-extern void put_inotify_watch(struct inotify_watch *);
-
-#else
-
-static inline void inotify_d_instantiate(struct dentry *dentry,
- struct inode *inode)
-{
-}
-
-static inline void inotify_d_move(struct dentry *dentry)
-{
-}
-
-static inline void inotify_inode_queue_event(struct inode *inode,
- __u32 mask, __u32 cookie,
- const char *filename,
- struct inode *n_inode)
-{
-}
-
-static inline void inotify_dentry_parent_queue_event(struct dentry *dentry,
- __u32 mask, __u32 cookie,
- const char *filename)
-{
-}
-
-static inline void inotify_unmount_inodes(struct list_head *list)
-{
-}
-
-static inline void inotify_inode_is_dead(struct inode *inode)
-{
-}
-
-static inline u32 inotify_get_cookie(void)
-{
- return 0;
-}
-
-static inline struct inotify_handle *inotify_init(const struct inotify_operations *ops)
-{
- return ERR_PTR(-EOPNOTSUPP);
-}
-
-static inline void inotify_init_watch(struct inotify_watch *watch)
-{
-}
-
-static inline void inotify_destroy(struct inotify_handle *ih)
-{
-}
-
-static inline __s32 inotify_find_watch(struct inotify_handle *ih, struct inode *inode,
- struct inotify_watch **watchp)
-{
- return -EOPNOTSUPP;
-}
-
-static inline __s32 inotify_find_update_watch(struct inotify_handle *ih,
- struct inode *inode, u32 mask)
-{
- return -EOPNOTSUPP;
-}
-
-static inline __s32 inotify_add_watch(struct inotify_handle *ih,
- struct inotify_watch *watch,
- struct inode *inode, __u32 mask)
-{
- return -EOPNOTSUPP;
-}
-
-static inline int inotify_rm_watch(struct inotify_handle *ih,
- struct inotify_watch *watch)
-{
- return -EOPNOTSUPP;
-}
-
-static inline int inotify_rm_wd(struct inotify_handle *ih, __u32 wd)
-{
- return -EOPNOTSUPP;
-}
-
-static inline void inotify_remove_watch_locked(struct inotify_handle *ih,
- struct inotify_watch *watch)
-{
-}
-
-static inline void get_inotify_watch(struct inotify_watch *watch)
-{
-}
-
-static inline void put_inotify_watch(struct inotify_watch *watch)
-{
-}
-
-#endif /* CONFIG_INOTIFY */
-
-#endif /* __KERNEL __ */
-
-#endif /* _LINUX_INOTIFY_H */
diff --git a/original/linux/input.h b/original/linux/input.h
deleted file mode 100644
index 3d45b48..0000000
--- a/original/linux/input.h
+++ /dev/null
@@ -1,1663 +0,0 @@
-#ifndef _INPUT_H
-#define _INPUT_H
-
-/*
- * Copyright (c) 1999-2002 Vojtech Pavlik
- *
- * 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.
- */
-
-#ifdef __KERNEL__
-#include <linux/time.h>
-#include <linux/list.h>
-#else
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <linux/types.h>
-#endif
-
-/*
- * The event structure itself
- */
-
-struct input_event {
- struct timeval time;
- __u16 type;
- __u16 code;
- __s32 value;
-};
-
-/*
- * Protocol version.
- */
-
-#define EV_VERSION 0x010001
-
-/*
- * IOCTLs (0x00 - 0x7f)
- */
-
-struct input_id {
- __u16 bustype;
- __u16 vendor;
- __u16 product;
- __u16 version;
-};
-
-/**
- * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls
- * @value: latest reported value for the axis.
- * @minimum: specifies minimum value for the axis.
- * @maximum: specifies maximum value for the axis.
- * @fuzz: specifies fuzz value that is used to filter noise from
- * the event stream.
- * @flat: values that are within this value will be discarded by
- * joydev interface and reported as 0 instead.
- * @resolution: specifies resolution for the values reported for
- * the axis.
- *
- * Note that input core does not clamp reported values to the
- * [minimum, maximum] limits, such task is left to userspace.
- *
- * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in
- * units per millimeter (units/mm), resolution for rotational axes
- * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian.
- */
-struct input_absinfo {
- __s32 value;
- __s32 minimum;
- __s32 maximum;
- __s32 fuzz;
- __s32 flat;
- __s32 resolution;
-};
-
-/**
- * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls
- * @scancode: scancode represented in machine-endian form.
- * @len: length of the scancode that resides in @scancode buffer.
- * @index: index in the keymap, may be used instead of scancode
- * @flags: allows to specify how kernel should handle the request. For
- * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel
- * should perform lookup in keymap by @index instead of @scancode
- * @keycode: key code assigned to this scancode
- *
- * The structure is used to retrieve and modify keymap data. Users have
- * option of performing lookup either by @scancode itself or by @index
- * in keymap entry. EVIOCGKEYCODE will also return scancode or index
- * (depending on which element was used to perform lookup).
- */
-struct input_keymap_entry {
-#define INPUT_KEYMAP_BY_INDEX (1 << 0)
- __u8 flags;
- __u8 len;
- __u16 index;
- __u32 keycode;
- __u8 scancode[32];
-};
-
-#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */
-#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */
-#define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */
-#define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */
-
-#define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */
-#define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry)
-#define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */
-#define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry)
-
-#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */
-#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */
-#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */
-#define EVIOCGPROP(len) _IOC(_IOC_READ, 'E', 0x09, len) /* get device properties */
-
-/**
- * EVIOCGMTSLOTS(len) - get MT slot values
- *
- * The ioctl buffer argument should be binary equivalent to
- *
- * struct input_mt_request_layout {
- * __u32 code;
- * __s32 values[num_slots];
- * };
- *
- * where num_slots is the (arbitrary) number of MT slots to extract.
- *
- * The ioctl size argument (len) is the size of the buffer, which
- * should satisfy len = (num_slots + 1) * sizeof(__s32). If len is
- * too small to fit all available slots, the first num_slots are
- * returned.
- *
- * Before the call, code is set to the wanted ABS_MT event type. On
- * return, values[] is filled with the slot values for the specified
- * ABS_MT code.
- *
- * If the request code is not an ABS_MT value, -EINVAL is returned.
- */
-#define EVIOCGMTSLOTS(len) _IOC(_IOC_READ, 'E', 0x0a, len)
-
-#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */
-#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */
-#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */
-#define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */
-
-#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + (ev), len) /* get event bits */
-#define EVIOCGABS(abs) _IOR('E', 0x40 + (abs), struct input_absinfo) /* get abs value/limits */
-#define EVIOCSABS(abs) _IOW('E', 0xc0 + (abs), struct input_absinfo) /* set abs value/limits */
-
-#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */
-#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */
-#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */
-
-#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */
-
-#define EVIOCGSUSPENDBLOCK _IOR('E', 0x91, int) /* get suspend block enable */
-#define EVIOCSSUSPENDBLOCK _IOW('E', 0x91, int) /* set suspend block enable */
-
-#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */
-
-/*
- * Device properties and quirks
- */
-
-#define INPUT_PROP_POINTER 0x00 /* needs a pointer */
-#define INPUT_PROP_DIRECT 0x01 /* direct input devices */
-#define INPUT_PROP_BUTTONPAD 0x02 /* has button(s) under pad */
-#define INPUT_PROP_SEMI_MT 0x03 /* touch rectangle only */
-
-#define INPUT_PROP_MAX 0x1f
-#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
-
-/*
- * Event types
- */
-
-#define EV_SYN 0x00
-#define EV_KEY 0x01
-#define EV_REL 0x02
-#define EV_ABS 0x03
-#define EV_MSC 0x04
-#define EV_SW 0x05
-#define EV_LED 0x11
-#define EV_SND 0x12
-#define EV_REP 0x14
-#define EV_FF 0x15
-#define EV_PWR 0x16
-#define EV_FF_STATUS 0x17
-#define EV_MAX 0x1f
-#define EV_CNT (EV_MAX+1)
-
-/*
- * Synchronization events.
- */
-
-#define SYN_REPORT 0
-#define SYN_CONFIG 1
-#define SYN_MT_REPORT 2
-#define SYN_DROPPED 3
-#define SYN_TIME_SEC 4
-#define SYN_TIME_NSEC 5
-
-/*
- * Keys and buttons
- *
- * Most of the keys/buttons are modeled after USB HUT 1.12
- * (see http://www.usb.org/developers/hidpage).
- * Abbreviations in the comments:
- * AC - Application Control
- * AL - Application Launch Button
- * SC - System Control
- */
-
-#define KEY_RESERVED 0
-#define KEY_ESC 1
-#define KEY_1 2
-#define KEY_2 3
-#define KEY_3 4
-#define KEY_4 5
-#define KEY_5 6
-#define KEY_6 7
-#define KEY_7 8
-#define KEY_8 9
-#define KEY_9 10
-#define KEY_0 11
-#define KEY_MINUS 12
-#define KEY_EQUAL 13
-#define KEY_BACKSPACE 14
-#define KEY_TAB 15
-#define KEY_Q 16
-#define KEY_W 17
-#define KEY_E 18
-#define KEY_R 19
-#define KEY_T 20
-#define KEY_Y 21
-#define KEY_U 22
-#define KEY_I 23
-#define KEY_O 24
-#define KEY_P 25
-#define KEY_LEFTBRACE 26
-#define KEY_RIGHTBRACE 27
-#define KEY_ENTER 28
-#define KEY_LEFTCTRL 29
-#define KEY_A 30
-#define KEY_S 31
-#define KEY_D 32
-#define KEY_F 33
-#define KEY_G 34
-#define KEY_H 35
-#define KEY_J 36
-#define KEY_K 37
-#define KEY_L 38
-#define KEY_SEMICOLON 39
-#define KEY_APOSTROPHE 40
-#define KEY_GRAVE 41
-#define KEY_LEFTSHIFT 42
-#define KEY_BACKSLASH 43
-#define KEY_Z 44
-#define KEY_X 45
-#define KEY_C 46
-#define KEY_V 47
-#define KEY_B 48
-#define KEY_N 49
-#define KEY_M 50
-#define KEY_COMMA 51
-#define KEY_DOT 52
-#define KEY_SLASH 53
-#define KEY_RIGHTSHIFT 54
-#define KEY_KPASTERISK 55
-#define KEY_LEFTALT 56
-#define KEY_SPACE 57
-#define KEY_CAPSLOCK 58
-#define KEY_F1 59
-#define KEY_F2 60
-#define KEY_F3 61
-#define KEY_F4 62
-#define KEY_F5 63
-#define KEY_F6 64
-#define KEY_F7 65
-#define KEY_F8 66
-#define KEY_F9 67
-#define KEY_F10 68
-#define KEY_NUMLOCK 69
-#define KEY_SCROLLLOCK 70
-#define KEY_KP7 71
-#define KEY_KP8 72
-#define KEY_KP9 73
-#define KEY_KPMINUS 74
-#define KEY_KP4 75
-#define KEY_KP5 76
-#define KEY_KP6 77
-#define KEY_KPPLUS 78
-#define KEY_KP1 79
-#define KEY_KP2 80
-#define KEY_KP3 81
-#define KEY_KP0 82
-#define KEY_KPDOT 83
-
-#define KEY_ZENKAKUHANKAKU 85
-#define KEY_102ND 86
-#define KEY_F11 87
-#define KEY_F12 88
-#define KEY_RO 89
-#define KEY_KATAKANA 90
-#define KEY_HIRAGANA 91
-#define KEY_HENKAN 92
-#define KEY_KATAKANAHIRAGANA 93
-#define KEY_MUHENKAN 94
-#define KEY_KPJPCOMMA 95
-#define KEY_KPENTER 96
-#define KEY_RIGHTCTRL 97
-#define KEY_KPSLASH 98
-#define KEY_SYSRQ 99
-#define KEY_RIGHTALT 100
-#define KEY_LINEFEED 101
-#define KEY_HOME 102
-#define KEY_UP 103
-#define KEY_PAGEUP 104
-#define KEY_LEFT 105
-#define KEY_RIGHT 106
-#define KEY_END 107
-#define KEY_DOWN 108
-#define KEY_PAGEDOWN 109
-#define KEY_INSERT 110
-#define KEY_DELETE 111
-#define KEY_MACRO 112
-#define KEY_MUTE 113
-#define KEY_VOLUMEDOWN 114
-#define KEY_VOLUMEUP 115
-#define KEY_POWER 116 /* SC System Power Down */
-#define KEY_KPEQUAL 117
-#define KEY_KPPLUSMINUS 118
-#define KEY_PAUSE 119
-#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */
-
-#define KEY_KPCOMMA 121
-#define KEY_HANGEUL 122
-#define KEY_HANGUEL KEY_HANGEUL
-#define KEY_HANJA 123
-#define KEY_YEN 124
-#define KEY_LEFTMETA 125
-#define KEY_RIGHTMETA 126
-#define KEY_COMPOSE 127
-
-#define KEY_STOP 128 /* AC Stop */
-#define KEY_AGAIN 129
-#define KEY_PROPS 130 /* AC Properties */
-#define KEY_UNDO 131 /* AC Undo */
-#define KEY_FRONT 132
-#define KEY_COPY 133 /* AC Copy */
-#define KEY_OPEN 134 /* AC Open */
-#define KEY_PASTE 135 /* AC Paste */
-#define KEY_FIND 136 /* AC Search */
-#define KEY_CUT 137 /* AC Cut */
-#define KEY_HELP 138 /* AL Integrated Help Center */
-#define KEY_MENU 139 /* Menu (show menu) */
-#define KEY_CALC 140 /* AL Calculator */
-#define KEY_SETUP 141
-#define KEY_SLEEP 142 /* SC System Sleep */
-#define KEY_WAKEUP 143 /* System Wake Up */
-#define KEY_FILE 144 /* AL Local Machine Browser */
-#define KEY_SENDFILE 145
-#define KEY_DELETEFILE 146
-#define KEY_XFER 147
-#define KEY_PROG1 148
-#define KEY_PROG2 149
-#define KEY_WWW 150 /* AL Internet Browser */
-#define KEY_MSDOS 151
-#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */
-#define KEY_SCREENLOCK KEY_COFFEE
-#define KEY_DIRECTION 153
-#define KEY_CYCLEWINDOWS 154
-#define KEY_MAIL 155
-#define KEY_BOOKMARKS 156 /* AC Bookmarks */
-#define KEY_COMPUTER 157
-#define KEY_BACK 158 /* AC Back */
-#define KEY_FORWARD 159 /* AC Forward */
-#define KEY_CLOSECD 160
-#define KEY_EJECTCD 161
-#define KEY_EJECTCLOSECD 162
-#define KEY_NEXTSONG 163
-#define KEY_PLAYPAUSE 164
-#define KEY_PREVIOUSSONG 165
-#define KEY_STOPCD 166
-#define KEY_RECORD 167
-#define KEY_REWIND 168
-#define KEY_PHONE 169 /* Media Select Telephone */
-#define KEY_ISO 170
-#define KEY_CONFIG 171 /* AL Consumer Control Configuration */
-#define KEY_HOMEPAGE 172 /* AC Home */
-#define KEY_REFRESH 173 /* AC Refresh */
-#define KEY_EXIT 174 /* AC Exit */
-#define KEY_MOVE 175
-#define KEY_EDIT 176
-#define KEY_SCROLLUP 177
-#define KEY_SCROLLDOWN 178
-#define KEY_KPLEFTPAREN 179
-#define KEY_KPRIGHTPAREN 180
-#define KEY_NEW 181 /* AC New */
-#define KEY_REDO 182 /* AC Redo/Repeat */
-
-#define KEY_F13 183
-#define KEY_F14 184
-#define KEY_F15 185
-#define KEY_F16 186
-#define KEY_F17 187
-#define KEY_F18 188
-#define KEY_F19 189
-#define KEY_F20 190
-#define KEY_F21 191
-#define KEY_F22 192
-#define KEY_F23 193
-#define KEY_F24 194
-
-#define KEY_PLAYCD 200
-#define KEY_PAUSECD 201
-#define KEY_PROG3 202
-#define KEY_PROG4 203
-#define KEY_DASHBOARD 204 /* AL Dashboard */
-#define KEY_SUSPEND 205
-#define KEY_CLOSE 206 /* AC Close */
-#define KEY_PLAY 207
-#define KEY_FASTFORWARD 208
-#define KEY_BASSBOOST 209
-#define KEY_PRINT 210 /* AC Print */
-#define KEY_HP 211
-#define KEY_CAMERA 212
-#define KEY_SOUND 213
-#define KEY_QUESTION 214
-#define KEY_EMAIL 215
-#define KEY_CHAT 216
-#define KEY_SEARCH 217
-#define KEY_CONNECT 218
-#define KEY_FINANCE 219 /* AL Checkbook/Finance */
-#define KEY_SPORT 220
-#define KEY_SHOP 221
-#define KEY_ALTERASE 222
-#define KEY_CANCEL 223 /* AC Cancel */
-#define KEY_BRIGHTNESSDOWN 224
-#define KEY_BRIGHTNESSUP 225
-#define KEY_MEDIA 226
-
-#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video
- outputs (Monitor/LCD/TV-out/etc) */
-#define KEY_KBDILLUMTOGGLE 228
-#define KEY_KBDILLUMDOWN 229
-#define KEY_KBDILLUMUP 230
-
-#define KEY_SEND 231 /* AC Send */
-#define KEY_REPLY 232 /* AC Reply */
-#define KEY_FORWARDMAIL 233 /* AC Forward Msg */
-#define KEY_SAVE 234 /* AC Save */
-#define KEY_DOCUMENTS 235
-
-#define KEY_BATTERY 236
-
-#define KEY_BLUETOOTH 237
-#define KEY_WLAN 238
-#define KEY_UWB 239
-
-#define KEY_UNKNOWN 240
-
-#define KEY_VIDEO_NEXT 241 /* drive next video source */
-#define KEY_VIDEO_PREV 242 /* drive previous video source */
-#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */
-#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */
-#define KEY_DISPLAY_OFF 245 /* display device to off state */
-
-#define KEY_WIMAX 246
-#define KEY_RFKILL 247 /* Key that controls all radios */
-
-#define KEY_MICMUTE 248 /* Mute / unmute the microphone */
-
-/* Code 255 is reserved for special needs of AT keyboard driver */
-
-#define BTN_MISC 0x100
-#define BTN_0 0x100
-#define BTN_1 0x101
-#define BTN_2 0x102
-#define BTN_3 0x103
-#define BTN_4 0x104
-#define BTN_5 0x105
-#define BTN_6 0x106
-#define BTN_7 0x107
-#define BTN_8 0x108
-#define BTN_9 0x109
-
-#define BTN_MOUSE 0x110
-#define BTN_LEFT 0x110
-#define BTN_RIGHT 0x111
-#define BTN_MIDDLE 0x112
-#define BTN_SIDE 0x113
-#define BTN_EXTRA 0x114
-#define BTN_FORWARD 0x115
-#define BTN_BACK 0x116
-#define BTN_TASK 0x117
-
-#define BTN_JOYSTICK 0x120
-#define BTN_TRIGGER 0x120
-#define BTN_THUMB 0x121
-#define BTN_THUMB2 0x122
-#define BTN_TOP 0x123
-#define BTN_TOP2 0x124
-#define BTN_PINKIE 0x125
-#define BTN_BASE 0x126
-#define BTN_BASE2 0x127
-#define BTN_BASE3 0x128
-#define BTN_BASE4 0x129
-#define BTN_BASE5 0x12a
-#define BTN_BASE6 0x12b
-#define BTN_DEAD 0x12f
-
-#define BTN_GAMEPAD 0x130
-#define BTN_A 0x130
-#define BTN_B 0x131
-#define BTN_C 0x132
-#define BTN_X 0x133
-#define BTN_Y 0x134
-#define BTN_Z 0x135
-#define BTN_TL 0x136
-#define BTN_TR 0x137
-#define BTN_TL2 0x138
-#define BTN_TR2 0x139
-#define BTN_SELECT 0x13a
-#define BTN_START 0x13b
-#define BTN_MODE 0x13c
-#define BTN_THUMBL 0x13d
-#define BTN_THUMBR 0x13e
-
-#define BTN_DIGI 0x140
-#define BTN_TOOL_PEN 0x140
-#define BTN_TOOL_RUBBER 0x141
-#define BTN_TOOL_BRUSH 0x142
-#define BTN_TOOL_PENCIL 0x143
-#define BTN_TOOL_AIRBRUSH 0x144
-#define BTN_TOOL_FINGER 0x145
-#define BTN_TOOL_MOUSE 0x146
-#define BTN_TOOL_LENS 0x147
-#define BTN_TOOL_QUINTTAP 0x148 /* Five fingers on trackpad */
-#define BTN_TOUCH 0x14a
-#define BTN_STYLUS 0x14b
-#define BTN_STYLUS2 0x14c
-#define BTN_TOOL_DOUBLETAP 0x14d
-#define BTN_TOOL_TRIPLETAP 0x14e
-#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */
-
-#define BTN_WHEEL 0x150
-#define BTN_GEAR_DOWN 0x150
-#define BTN_GEAR_UP 0x151
-
-#define KEY_OK 0x160
-#define KEY_SELECT 0x161
-#define KEY_GOTO 0x162
-#define KEY_CLEAR 0x163
-#define KEY_POWER2 0x164
-#define KEY_OPTION 0x165
-#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */
-#define KEY_TIME 0x167
-#define KEY_VENDOR 0x168
-#define KEY_ARCHIVE 0x169
-#define KEY_PROGRAM 0x16a /* Media Select Program Guide */
-#define KEY_CHANNEL 0x16b
-#define KEY_FAVORITES 0x16c
-#define KEY_EPG 0x16d
-#define KEY_PVR 0x16e /* Media Select Home */
-#define KEY_MHP 0x16f
-#define KEY_LANGUAGE 0x170
-#define KEY_TITLE 0x171
-#define KEY_SUBTITLE 0x172
-#define KEY_ANGLE 0x173
-#define KEY_ZOOM 0x174
-#define KEY_MODE 0x175
-#define KEY_KEYBOARD 0x176
-#define KEY_SCREEN 0x177
-#define KEY_PC 0x178 /* Media Select Computer */
-#define KEY_TV 0x179 /* Media Select TV */
-#define KEY_TV2 0x17a /* Media Select Cable */
-#define KEY_VCR 0x17b /* Media Select VCR */
-#define KEY_VCR2 0x17c /* VCR Plus */
-#define KEY_SAT 0x17d /* Media Select Satellite */
-#define KEY_SAT2 0x17e
-#define KEY_CD 0x17f /* Media Select CD */
-#define KEY_TAPE 0x180 /* Media Select Tape */
-#define KEY_RADIO 0x181
-#define KEY_TUNER 0x182 /* Media Select Tuner */
-#define KEY_PLAYER 0x183
-#define KEY_TEXT 0x184
-#define KEY_DVD 0x185 /* Media Select DVD */
-#define KEY_AUX 0x186
-#define KEY_MP3 0x187
-#define KEY_AUDIO 0x188 /* AL Audio Browser */
-#define KEY_VIDEO 0x189 /* AL Movie Browser */
-#define KEY_DIRECTORY 0x18a
-#define KEY_LIST 0x18b
-#define KEY_MEMO 0x18c /* Media Select Messages */
-#define KEY_CALENDAR 0x18d
-#define KEY_RED 0x18e
-#define KEY_GREEN 0x18f
-#define KEY_YELLOW 0x190
-#define KEY_BLUE 0x191
-#define KEY_CHANNELUP 0x192 /* Channel Increment */
-#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */
-#define KEY_FIRST 0x194
-#define KEY_LAST 0x195 /* Recall Last */
-#define KEY_AB 0x196
-#define KEY_NEXT 0x197
-#define KEY_RESTART 0x198
-#define KEY_SLOW 0x199
-#define KEY_SHUFFLE 0x19a
-#define KEY_BREAK 0x19b
-#define KEY_PREVIOUS 0x19c
-#define KEY_DIGITS 0x19d
-#define KEY_TEEN 0x19e
-#define KEY_TWEN 0x19f
-#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */
-#define KEY_GAMES 0x1a1 /* Media Select Games */
-#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */
-#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */
-#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */
-#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */
-#define KEY_EDITOR 0x1a6 /* AL Text Editor */
-#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */
-#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */
-#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */
-#define KEY_DATABASE 0x1aa /* AL Database App */
-#define KEY_NEWS 0x1ab /* AL Newsreader */
-#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */
-#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */
-#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */
-#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */
-#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */
-#define KEY_LOGOFF 0x1b1 /* AL Logoff */
-
-#define KEY_DOLLAR 0x1b2
-#define KEY_EURO 0x1b3
-
-#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */
-#define KEY_FRAMEFORWARD 0x1b5
-#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */
-#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */
-#define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */
-#define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */
-#define KEY_IMAGES 0x1ba /* AL Image Browser */
-
-#define KEY_DEL_EOL 0x1c0
-#define KEY_DEL_EOS 0x1c1
-#define KEY_INS_LINE 0x1c2
-#define KEY_DEL_LINE 0x1c3
-
-#define KEY_FN 0x1d0
-#define KEY_FN_ESC 0x1d1
-#define KEY_FN_F1 0x1d2
-#define KEY_FN_F2 0x1d3
-#define KEY_FN_F3 0x1d4
-#define KEY_FN_F4 0x1d5
-#define KEY_FN_F5 0x1d6
-#define KEY_FN_F6 0x1d7
-#define KEY_FN_F7 0x1d8
-#define KEY_FN_F8 0x1d9
-#define KEY_FN_F9 0x1da
-#define KEY_FN_F10 0x1db
-#define KEY_FN_F11 0x1dc
-#define KEY_FN_F12 0x1dd
-#define KEY_FN_1 0x1de
-#define KEY_FN_2 0x1df
-#define KEY_FN_D 0x1e0
-#define KEY_FN_E 0x1e1
-#define KEY_FN_F 0x1e2
-#define KEY_FN_S 0x1e3
-#define KEY_FN_B 0x1e4
-
-#define KEY_BRL_DOT1 0x1f1
-#define KEY_BRL_DOT2 0x1f2
-#define KEY_BRL_DOT3 0x1f3
-#define KEY_BRL_DOT4 0x1f4
-#define KEY_BRL_DOT5 0x1f5
-#define KEY_BRL_DOT6 0x1f6
-#define KEY_BRL_DOT7 0x1f7
-#define KEY_BRL_DOT8 0x1f8
-#define KEY_BRL_DOT9 0x1f9
-#define KEY_BRL_DOT10 0x1fa
-
-#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */
-#define KEY_NUMERIC_1 0x201 /* and other keypads */
-#define KEY_NUMERIC_2 0x202
-#define KEY_NUMERIC_3 0x203
-#define KEY_NUMERIC_4 0x204
-#define KEY_NUMERIC_5 0x205
-#define KEY_NUMERIC_6 0x206
-#define KEY_NUMERIC_7 0x207
-#define KEY_NUMERIC_8 0x208
-#define KEY_NUMERIC_9 0x209
-#define KEY_NUMERIC_STAR 0x20a
-#define KEY_NUMERIC_POUND 0x20b
-#define KEY_CAMERA_SNAPSHOT 0x2fe
-#define KEY_CAMERA_FOCUS 0x210
-#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
-
-#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */
-#define KEY_TOUCHPAD_ON 0x213
-#define KEY_TOUCHPAD_OFF 0x214
-
-#define KEY_CAMERA_ZOOMIN 0x215
-#define KEY_CAMERA_ZOOMOUT 0x216
-#define KEY_CAMERA_UP 0x217
-#define KEY_CAMERA_DOWN 0x218
-#define KEY_CAMERA_LEFT 0x219
-#define KEY_CAMERA_RIGHT 0x21a
-
-#define BTN_TRIGGER_HAPPY 0x2c0
-#define BTN_TRIGGER_HAPPY1 0x2c0
-#define BTN_TRIGGER_HAPPY2 0x2c1
-#define BTN_TRIGGER_HAPPY3 0x2c2
-#define BTN_TRIGGER_HAPPY4 0x2c3
-#define BTN_TRIGGER_HAPPY5 0x2c4
-#define BTN_TRIGGER_HAPPY6 0x2c5
-#define BTN_TRIGGER_HAPPY7 0x2c6
-#define BTN_TRIGGER_HAPPY8 0x2c7
-#define BTN_TRIGGER_HAPPY9 0x2c8
-#define BTN_TRIGGER_HAPPY10 0x2c9
-#define BTN_TRIGGER_HAPPY11 0x2ca
-#define BTN_TRIGGER_HAPPY12 0x2cb
-#define BTN_TRIGGER_HAPPY13 0x2cc
-#define BTN_TRIGGER_HAPPY14 0x2cd
-#define BTN_TRIGGER_HAPPY15 0x2ce
-#define BTN_TRIGGER_HAPPY16 0x2cf
-#define BTN_TRIGGER_HAPPY17 0x2d0
-#define BTN_TRIGGER_HAPPY18 0x2d1
-#define BTN_TRIGGER_HAPPY19 0x2d2
-#define BTN_TRIGGER_HAPPY20 0x2d3
-#define BTN_TRIGGER_HAPPY21 0x2d4
-#define BTN_TRIGGER_HAPPY22 0x2d5
-#define BTN_TRIGGER_HAPPY23 0x2d6
-#define BTN_TRIGGER_HAPPY24 0x2d7
-#define BTN_TRIGGER_HAPPY25 0x2d8
-#define BTN_TRIGGER_HAPPY26 0x2d9
-#define BTN_TRIGGER_HAPPY27 0x2da
-#define BTN_TRIGGER_HAPPY28 0x2db
-#define BTN_TRIGGER_HAPPY29 0x2dc
-#define BTN_TRIGGER_HAPPY30 0x2dd
-#define BTN_TRIGGER_HAPPY31 0x2de
-#define BTN_TRIGGER_HAPPY32 0x2df
-#define BTN_TRIGGER_HAPPY33 0x2e0
-#define BTN_TRIGGER_HAPPY34 0x2e1
-#define BTN_TRIGGER_HAPPY35 0x2e2
-#define BTN_TRIGGER_HAPPY36 0x2e3
-#define BTN_TRIGGER_HAPPY37 0x2e4
-#define BTN_TRIGGER_HAPPY38 0x2e5
-#define BTN_TRIGGER_HAPPY39 0x2e6
-#define BTN_TRIGGER_HAPPY40 0x2e7
-
-/* We avoid low common keys in module aliases so they don't get huge. */
-#define KEY_MIN_INTERESTING KEY_MUTE
-#define KEY_MAX 0x2ff
-#define KEY_CNT (KEY_MAX+1)
-
-/*
- * Relative axes
- */
-
-#define REL_X 0x00
-#define REL_Y 0x01
-#define REL_Z 0x02
-#define REL_RX 0x03
-#define REL_RY 0x04
-#define REL_RZ 0x05
-#define REL_HWHEEL 0x06
-#define REL_DIAL 0x07
-#define REL_WHEEL 0x08
-#define REL_MISC 0x09
-#define REL_MAX 0x0f
-#define REL_CNT (REL_MAX+1)
-
-/*
- * Absolute axes
- */
-
-#define ABS_X 0x00
-#define ABS_Y 0x01
-#define ABS_Z 0x02
-#define ABS_RX 0x03
-#define ABS_RY 0x04
-#define ABS_RZ 0x05
-#define ABS_THROTTLE 0x06
-#define ABS_RUDDER 0x07
-#define ABS_WHEEL 0x08
-#define ABS_GAS 0x09
-#define ABS_BRAKE 0x0a
-#define ABS_HAT0X 0x10
-#define ABS_HAT0Y 0x11
-#define ABS_HAT1X 0x12
-#define ABS_HAT1Y 0x13
-#define ABS_HAT2X 0x14
-#define ABS_HAT2Y 0x15
-#define ABS_HAT3X 0x16
-#define ABS_HAT3Y 0x17
-#define ABS_PRESSURE 0x18
-#define ABS_DISTANCE 0x19
-#define ABS_TILT_X 0x1a
-#define ABS_TILT_Y 0x1b
-#define ABS_TOOL_WIDTH 0x1c
-
-#define ABS_VOLUME 0x20
-
-#define ABS_MISC 0x28
-
-#define ABS_MT_SLOT 0x2f /* MT slot being modified */
-#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
-#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */
-#define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */
-#define ABS_MT_WIDTH_MINOR 0x33 /* Minor axis (omit if circular) */
-#define ABS_MT_ORIENTATION 0x34 /* Ellipse orientation */
-#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */
-#define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */
-#define ABS_MT_TOOL_TYPE 0x37 /* Type of touching device */
-#define ABS_MT_BLOB_ID 0x38 /* Group a set of packets as a blob */
-#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
-#define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */
-#define ABS_MT_DISTANCE 0x3b /* Contact hover distance */
-
-#ifdef __KERNEL__
-/* Implementation details, userspace should not care about these */
-#define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
-#define ABS_MT_LAST ABS_MT_DISTANCE
-#endif
-
-#define ABS_MAX 0x3f
-#define ABS_CNT (ABS_MAX+1)
-
-/*
- * Switch events
- */
-
-#define SW_LID 0x00 /* set = lid shut */
-#define SW_TABLET_MODE 0x01 /* set = tablet mode */
-#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
-#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
- set = radio enabled */
-#define SW_RADIO SW_RFKILL_ALL /* deprecated */
-#define SW_MICROPHONE_INSERT 0x04 /* set = inserted */
-#define SW_DOCK 0x05 /* set = plugged into dock */
-#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
-#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */
-#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */
-#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */
-#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */
-#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
-#define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */
-#define SW_LINEIN_INSERT 0x0d /* set = inserted */
-#define SW_HPHL_OVERCURRENT 0x0e /* set = over current on left hph */
-#define SW_HPHR_OVERCURRENT 0x0f /* set = over current on right hph */
-#define SW_UNSUPPORT_INSERT 0x10 /* set = unsupported device inserted */
-#define SW_MAX 0x20
-#define SW_CNT (SW_MAX+1)
-
-/*
- * Misc events
- */
-
-#define MSC_SERIAL 0x00
-#define MSC_PULSELED 0x01
-#define MSC_GESTURE 0x02
-#define MSC_RAW 0x03
-#define MSC_SCAN 0x04
-#define MSC_MAX 0x07
-#define MSC_CNT (MSC_MAX+1)
-
-/*
- * LEDs
- */
-
-#define LED_NUML 0x00
-#define LED_CAPSL 0x01
-#define LED_SCROLLL 0x02
-#define LED_COMPOSE 0x03
-#define LED_KANA 0x04
-#define LED_SLEEP 0x05
-#define LED_SUSPEND 0x06
-#define LED_MUTE 0x07
-#define LED_MISC 0x08
-#define LED_MAIL 0x09
-#define LED_CHARGING 0x0a
-#define LED_MAX 0x0f
-#define LED_CNT (LED_MAX+1)
-
-/*
- * Autorepeat values
- */
-
-#define REP_DELAY 0x00
-#define REP_PERIOD 0x01
-#define REP_MAX 0x01
-#define REP_CNT (REP_MAX+1)
-
-/*
- * Sounds
- */
-
-#define SND_CLICK 0x00
-#define SND_BELL 0x01
-#define SND_TONE 0x02
-#define SND_MAX 0x07
-#define SND_CNT (SND_MAX+1)
-
-/*
- * IDs.
- */
-
-#define ID_BUS 0
-#define ID_VENDOR 1
-#define ID_PRODUCT 2
-#define ID_VERSION 3
-
-#define BUS_PCI 0x01
-#define BUS_ISAPNP 0x02
-#define BUS_USB 0x03
-#define BUS_HIL 0x04
-#define BUS_BLUETOOTH 0x05
-#define BUS_VIRTUAL 0x06
-
-#define BUS_ISA 0x10
-#define BUS_I8042 0x11
-#define BUS_XTKBD 0x12
-#define BUS_RS232 0x13
-#define BUS_GAMEPORT 0x14
-#define BUS_PARPORT 0x15
-#define BUS_AMIGA 0x16
-#define BUS_ADB 0x17
-#define BUS_I2C 0x18
-#define BUS_HOST 0x19
-#define BUS_GSC 0x1A
-#define BUS_ATARI 0x1B
-#define BUS_SPI 0x1C
-
-/*
- * MT_TOOL types
- */
-#define MT_TOOL_FINGER 0
-#define MT_TOOL_PEN 1
-#define MT_TOOL_MAX 1
-
-/*
- * Values describing the status of a force-feedback effect
- */
-#define FF_STATUS_STOPPED 0x00
-#define FF_STATUS_PLAYING 0x01
-#define FF_STATUS_MAX 0x01
-
-/*
- * Structures used in ioctls to upload effects to a device
- * They are pieces of a bigger structure (called ff_effect)
- */
-
-/*
- * All duration values are expressed in ms. Values above 32767 ms (0x7fff)
- * should not be used and have unspecified results.
- */
-
-/**
- * struct ff_replay - defines scheduling of the force-feedback effect
- * @length: duration of the effect
- * @delay: delay before effect should start playing
- */
-struct ff_replay {
- __u16 length;
- __u16 delay;
-};
-
-/**
- * struct ff_trigger - defines what triggers the force-feedback effect
- * @button: number of the button triggering the effect
- * @interval: controls how soon the effect can be re-triggered
- */
-struct ff_trigger {
- __u16 button;
- __u16 interval;
-};
-
-/**
- * struct ff_envelope - generic force-feedback effect envelope
- * @attack_length: duration of the attack (ms)
- * @attack_level: level at the beginning of the attack
- * @fade_length: duration of fade (ms)
- * @fade_level: level at the end of fade
- *
- * The @attack_level and @fade_level are absolute values; when applying
- * envelope force-feedback core will convert to positive/negative
- * value based on polarity of the default level of the effect.
- * Valid range for the attack and fade levels is 0x0000 - 0x7fff
- */
-struct ff_envelope {
- __u16 attack_length;
- __u16 attack_level;
- __u16 fade_length;
- __u16 fade_level;
-};
-
-/**
- * struct ff_constant_effect - defines parameters of a constant force-feedback effect
- * @level: strength of the effect; may be negative
- * @envelope: envelope data
- */
-struct ff_constant_effect {
- __s16 level;
- struct ff_envelope envelope;
-};
-
-/**
- * struct ff_ramp_effect - defines parameters of a ramp force-feedback effect
- * @start_level: beginning strength of the effect; may be negative
- * @end_level: final strength of the effect; may be negative
- * @envelope: envelope data
- */
-struct ff_ramp_effect {
- __s16 start_level;
- __s16 end_level;
- struct ff_envelope envelope;
-};
-
-/**
- * struct ff_condition_effect - defines a spring or friction force-feedback effect
- * @right_saturation: maximum level when joystick moved all way to the right
- * @left_saturation: same for the left side
- * @right_coeff: controls how fast the force grows when the joystick moves
- * to the right
- * @left_coeff: same for the left side
- * @deadband: size of the dead zone, where no force is produced
- * @center: position of the dead zone
- */
-struct ff_condition_effect {
- __u16 right_saturation;
- __u16 left_saturation;
-
- __s16 right_coeff;
- __s16 left_coeff;
-
- __u16 deadband;
- __s16 center;
-};
-
-/**
- * struct ff_periodic_effect - defines parameters of a periodic force-feedback effect
- * @waveform: kind of the effect (wave)
- * @period: period of the wave (ms)
- * @magnitude: peak value
- * @offset: mean value of the wave (roughly)
- * @phase: 'horizontal' shift
- * @envelope: envelope data
- * @custom_len: number of samples (FF_CUSTOM only)
- * @custom_data: buffer of samples (FF_CUSTOM only)
- *
- * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP,
- * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined
- * for the time being as no driver supports it yet.
- *
- * Note: the data pointed by custom_data is copied by the driver.
- * You can therefore dispose of the memory after the upload/update.
- */
-struct ff_periodic_effect {
- __u16 waveform;
- __u16 period;
- __s16 magnitude;
- __s16 offset;
- __u16 phase;
-
- struct ff_envelope envelope;
-
- __u32 custom_len;
- __s16 __user *custom_data;
-};
-
-/**
- * struct ff_rumble_effect - defines parameters of a periodic force-feedback effect
- * @strong_magnitude: magnitude of the heavy motor
- * @weak_magnitude: magnitude of the light one
- *
- * Some rumble pads have two motors of different weight. Strong_magnitude
- * represents the magnitude of the vibration generated by the heavy one.
- */
-struct ff_rumble_effect {
- __u16 strong_magnitude;
- __u16 weak_magnitude;
-};
-
-/**
- * struct ff_effect - defines force feedback effect
- * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
- * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM)
- * @id: an unique id assigned to an effect
- * @direction: direction of the effect
- * @trigger: trigger conditions (struct ff_trigger)
- * @replay: scheduling of the effect (struct ff_replay)
- * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect,
- * ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further
- * defining effect parameters
- *
- * This structure is sent through ioctl from the application to the driver.
- * To create a new effect application should set its @id to -1; the kernel
- * will return assigned @id which can later be used to update or delete
- * this effect.
- *
- * Direction of the effect is encoded as follows:
- * 0 deg -> 0x0000 (down)
- * 90 deg -> 0x4000 (left)
- * 180 deg -> 0x8000 (up)
- * 270 deg -> 0xC000 (right)
- */
-struct ff_effect {
- __u16 type;
- __s16 id;
- __u16 direction;
- struct ff_trigger trigger;
- struct ff_replay replay;
-
- union {
- struct ff_constant_effect constant;
- struct ff_ramp_effect ramp;
- struct ff_periodic_effect periodic;
- struct ff_condition_effect condition[2]; /* One for each axis */
- struct ff_rumble_effect rumble;
- } u;
-};
-
-/*
- * Force feedback effect types
- */
-
-#define FF_RUMBLE 0x50
-#define FF_PERIODIC 0x51
-#define FF_CONSTANT 0x52
-#define FF_SPRING 0x53
-#define FF_FRICTION 0x54
-#define FF_DAMPER 0x55
-#define FF_INERTIA 0x56
-#define FF_RAMP 0x57
-
-#define FF_EFFECT_MIN FF_RUMBLE
-#define FF_EFFECT_MAX FF_RAMP
-
-/*
- * Force feedback periodic effect types
- */
-
-#define FF_SQUARE 0x58
-#define FF_TRIANGLE 0x59
-#define FF_SINE 0x5a
-#define FF_SAW_UP 0x5b
-#define FF_SAW_DOWN 0x5c
-#define FF_CUSTOM 0x5d
-
-#define FF_WAVEFORM_MIN FF_SQUARE
-#define FF_WAVEFORM_MAX FF_CUSTOM
-
-/*
- * Set ff device properties
- */
-
-#define FF_GAIN 0x60
-#define FF_AUTOCENTER 0x61
-
-#define FF_MAX 0x7f
-#define FF_CNT (FF_MAX+1)
-
-#ifdef __KERNEL__
-
-/*
- * In-kernel definitions.
- */
-
-#include <linux/device.h>
-#include <linux/fs.h>
-#include <linux/timer.h>
-#include <linux/mod_devicetable.h>
-
-/**
- * struct input_dev - represents an input device
- * @name: name of the device
- * @phys: physical path to the device in the system hierarchy
- * @uniq: unique identification code for the device (if device has it)
- * @id: id of the device (struct input_id)
- * @propbit: bitmap of device properties and quirks
- * @evbit: bitmap of types of events supported by the device (EV_KEY,
- * EV_REL, etc.)
- * @keybit: bitmap of keys/buttons this device has
- * @relbit: bitmap of relative axes for the device
- * @absbit: bitmap of absolute axes for the device
- * @mscbit: bitmap of miscellaneous events supported by the device
- * @ledbit: bitmap of leds present on the device
- * @sndbit: bitmap of sound effects supported by the device
- * @ffbit: bitmap of force feedback effects supported by the device
- * @swbit: bitmap of switches present on the device
- * @hint_events_per_packet: average number of events generated by the
- * device in a packet (between EV_SYN/SYN_REPORT events). Used by
- * event handlers to estimate size of the buffer needed to hold
- * events.
- * @keycodemax: size of keycode table
- * @keycodesize: size of elements in keycode table
- * @keycode: map of scancodes to keycodes for this device
- * @getkeycode: optional legacy method to retrieve current keymap.
- * @setkeycode: optional method to alter current keymap, used to implement
- * sparse keymaps. If not supplied default mechanism will be used.
- * The method is being called while holding event_lock and thus must
- * not sleep
- * @ff: force feedback structure associated with the device if device
- * supports force feedback effects
- * @repeat_key: stores key code of the last key pressed; used to implement
- * software autorepeat
- * @timer: timer for software autorepeat
- * @rep: current values for autorepeat parameters (delay, rate)
- * @mt: pointer to array of struct input_mt_slot holding current values
- * of tracked contacts
- * @mtsize: number of MT slots the device uses
- * @slot: MT slot currently being transmitted
- * @trkid: stores MT tracking ID for the current contact
- * @absinfo: array of &struct input_absinfo elements holding information
- * about absolute axes (current value, min, max, flat, fuzz,
- * resolution)
- * @key: reflects current state of device's keys/buttons
- * @led: reflects current state of device's LEDs
- * @snd: reflects current state of sound effects
- * @sw: reflects current state of device's switches
- * @open: this method is called when the very first user calls
- * input_open_device(). The driver must prepare the device
- * to start generating events (start polling thread,
- * request an IRQ, submit URB, etc.)
- * @close: this method is called when the very last user calls
- * input_close_device().
- * @flush: purges the device. Most commonly used to get rid of force
- * feedback effects loaded into the device when disconnecting
- * from it
- * @event: event handler for events sent _to_ the device, like EV_LED
- * or EV_SND. The device is expected to carry out the requested
- * action (turn on a LED, play sound, etc.) The call is protected
- * by @event_lock and must not sleep
- * @grab: input handle that currently has the device grabbed (via
- * EVIOCGRAB ioctl). When a handle grabs a device it becomes sole
- * recipient for all input events coming from the device
- * @event_lock: this spinlock is is taken when input core receives
- * and processes a new event for the device (in input_event()).
- * Code that accesses and/or modifies parameters of a device
- * (such as keymap or absmin, absmax, absfuzz, etc.) after device
- * has been registered with input core must take this lock.
- * @mutex: serializes calls to open(), close() and flush() methods
- * @users: stores number of users (input handlers) that opened this
- * device. It is used by input_open_device() and input_close_device()
- * to make sure that dev->open() is only called when the first
- * user opens device and dev->close() is called when the very
- * last user closes the device
- * @going_away: marks devices that are in a middle of unregistering and
- * causes input_open_device*() fail with -ENODEV.
- * @sync: set to %true when there were no new events since last EV_SYN
- * @dev: driver model's view of this device
- * @h_list: list of input handles associated with the device. When
- * accessing the list dev->mutex must be held
- * @node: used to place the device onto input_dev_list
- */
-struct input_dev {
- const char *name;
- const char *phys;
- const char *uniq;
- struct input_id id;
-
- unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)];
-
- unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
- unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
- unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
- unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];
- unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];
- unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];
- unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];
- unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
- unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
-
- unsigned int hint_events_per_packet;
-
- unsigned int keycodemax;
- unsigned int keycodesize;
- void *keycode;
-
- int (*setkeycode)(struct input_dev *dev,
- const struct input_keymap_entry *ke,
- unsigned int *old_keycode);
- int (*getkeycode)(struct input_dev *dev,
- struct input_keymap_entry *ke);
-
- struct ff_device *ff;
-
- unsigned int repeat_key;
- struct timer_list timer;
-
- int rep[REP_CNT];
-
- struct input_mt_slot *mt;
- int mtsize;
- int slot;
- int trkid;
-
- struct input_absinfo *absinfo;
-
- unsigned long key[BITS_TO_LONGS(KEY_CNT)];
- unsigned long led[BITS_TO_LONGS(LED_CNT)];
- unsigned long snd[BITS_TO_LONGS(SND_CNT)];
- unsigned long sw[BITS_TO_LONGS(SW_CNT)];
-
- int (*open)(struct input_dev *dev);
- void (*close)(struct input_dev *dev);
- int (*flush)(struct input_dev *dev, struct file *file);
- int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
-
- struct input_handle __rcu *grab;
-
- spinlock_t event_lock;
- struct mutex mutex;
-
- unsigned int users;
- unsigned int users_private;
- bool going_away;
- bool disabled;
-
- bool sync;
-
- struct device dev;
-
- struct list_head h_list;
- struct list_head node;
-};
-#define to_input_dev(d) container_of(d, struct input_dev, dev)
-
-/*
- * Verify that we are in sync with input_device_id mod_devicetable.h #defines
- */
-
-#if EV_MAX != INPUT_DEVICE_ID_EV_MAX
-#error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match"
-#endif
-
-#if KEY_MIN_INTERESTING != INPUT_DEVICE_ID_KEY_MIN_INTERESTING
-#error "KEY_MIN_INTERESTING and INPUT_DEVICE_ID_KEY_MIN_INTERESTING do not match"
-#endif
-
-#if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX
-#error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match"
-#endif
-
-#if REL_MAX != INPUT_DEVICE_ID_REL_MAX
-#error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match"
-#endif
-
-#if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX
-#error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match"
-#endif
-
-#if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX
-#error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match"
-#endif
-
-#if LED_MAX != INPUT_DEVICE_ID_LED_MAX
-#error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match"
-#endif
-
-#if SND_MAX != INPUT_DEVICE_ID_SND_MAX
-#error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match"
-#endif
-
-#if FF_MAX != INPUT_DEVICE_ID_FF_MAX
-#error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match"
-#endif
-
-#if SW_MAX != INPUT_DEVICE_ID_SW_MAX
-#error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match"
-#endif
-
-#define INPUT_DEVICE_ID_MATCH_DEVICE \
- (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT)
-#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
- (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION)
-
-struct input_handle;
-
-/**
- * struct input_handler - implements one of interfaces for input devices
- * @private: driver-specific data
- * @event: event handler. This method is being called by input core with
- * interrupts disabled and dev->event_lock spinlock held and so
- * it may not sleep
- * @filter: similar to @event; separates normal event handlers from
- * "filters".
- * @match: called after comparing device's id with handler's id_table
- * to perform fine-grained matching between device and handler
- * @connect: called when attaching a handler to an input device
- * @disconnect: disconnects a handler from input device
- * @start: starts handler for given handle. This function is called by
- * input core right after connect() method and also when a process
- * that "grabbed" a device releases it
- * @fops: file operations this driver implements
- * @minor: beginning of range of 32 minors for devices this driver
- * can provide
- * @name: name of the handler, to be shown in /proc/bus/input/handlers
- * @id_table: pointer to a table of input_device_ids this driver can
- * handle
- * @h_list: list of input handles associated with the handler
- * @node: for placing the driver onto input_handler_list
- *
- * Input handlers attach to input devices and create input handles. There
- * are likely several handlers attached to any given input device at the
- * same time. All of them will get their copy of input event generated by
- * the device.
- *
- * The very same structure is used to implement input filters. Input core
- * allows filters to run first and will not pass event to regular handlers
- * if any of the filters indicate that the event should be filtered (by
- * returning %true from their filter() method).
- *
- * Note that input core serializes calls to connect() and disconnect()
- * methods.
- */
-struct input_handler {
-
- void *private;
-
- void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
- bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
- bool (*match)(struct input_handler *handler, struct input_dev *dev);
- int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
- void (*disconnect)(struct input_handle *handle);
- void (*start)(struct input_handle *handle);
-
- const struct file_operations *fops;
- int minor;
- const char *name;
-
- const struct input_device_id *id_table;
-
- struct list_head h_list;
- struct list_head node;
-};
-
-/**
- * struct input_handle - links input device with an input handler
- * @private: handler-specific data
- * @open: counter showing whether the handle is 'open', i.e. should deliver
- * events from its device
- * @name: name given to the handle by handler that created it
- * @dev: input device the handle is attached to
- * @handler: handler that works with the device through this handle
- * @d_node: used to put the handle on device's list of attached handles
- * @h_node: used to put the handle on handler's list of handles from which
- * it gets events
- */
-struct input_handle {
-
- void *private;
-
- int open;
- const char *name;
-
- struct input_dev *dev;
- struct input_handler *handler;
-
- struct list_head d_node;
- struct list_head h_node;
-};
-
-struct input_dev *input_allocate_device(void);
-void input_free_device(struct input_dev *dev);
-
-static inline struct input_dev *input_get_device(struct input_dev *dev)
-{
- return dev ? to_input_dev(get_device(&dev->dev)) : NULL;
-}
-
-static inline void input_put_device(struct input_dev *dev)
-{
- if (dev)
- put_device(&dev->dev);
-}
-
-static inline void *input_get_drvdata(struct input_dev *dev)
-{
- return dev_get_drvdata(&dev->dev);
-}
-
-static inline void input_set_drvdata(struct input_dev *dev, void *data)
-{
- dev_set_drvdata(&dev->dev, data);
-}
-
-int __must_check input_register_device(struct input_dev *);
-void input_unregister_device(struct input_dev *);
-
-void input_reset_device(struct input_dev *);
-
-int __must_check input_register_handler(struct input_handler *);
-void input_unregister_handler(struct input_handler *);
-
-int input_handler_for_each_handle(struct input_handler *, void *data,
- int (*fn)(struct input_handle *, void *));
-
-int input_register_handle(struct input_handle *);
-void input_unregister_handle(struct input_handle *);
-
-int input_grab_device(struct input_handle *);
-void input_release_device(struct input_handle *);
-
-int input_open_device(struct input_handle *);
-void input_close_device(struct input_handle *);
-
-int input_flush_device(struct input_handle *handle, struct file *file);
-
-void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
-void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
-
-static inline void input_report_key(struct input_dev *dev, unsigned int code, int value)
-{
- input_event(dev, EV_KEY, code, !!value);
-}
-
-static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value)
-{
- input_event(dev, EV_REL, code, value);
-}
-
-static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value)
-{
- input_event(dev, EV_ABS, code, value);
-}
-
-static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value)
-{
- input_event(dev, EV_FF_STATUS, code, value);
-}
-
-static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value)
-{
- input_event(dev, EV_SW, code, !!value);
-}
-
-static inline void input_sync(struct input_dev *dev)
-{
- input_event(dev, EV_SYN, SYN_REPORT, 0);
-}
-
-static inline void input_mt_sync(struct input_dev *dev)
-{
- input_event(dev, EV_SYN, SYN_MT_REPORT, 0);
-}
-
-void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code);
-
-/**
- * input_set_events_per_packet - tell handlers about the driver event rate
- * @dev: the input device used by the driver
- * @n_events: the average number of events between calls to input_sync()
- *
- * If the event rate sent from a device is unusually large, use this
- * function to set the expected event rate. This will allow handlers
- * to set up an appropriate buffer size for the event stream, in order
- * to minimize information loss.
- */
-static inline void input_set_events_per_packet(struct input_dev *dev, int n_events)
-{
- dev->hint_events_per_packet = n_events;
-}
-
-void input_alloc_absinfo(struct input_dev *dev);
-void input_set_abs_params(struct input_dev *dev, unsigned int axis,
- int min, int max, int fuzz, int flat);
-
-#define INPUT_GENERATE_ABS_ACCESSORS(_suffix, _item) \
-static inline int input_abs_get_##_suffix(struct input_dev *dev, \
- unsigned int axis) \
-{ \
- return dev->absinfo ? dev->absinfo[axis]._item : 0; \
-} \
- \
-static inline void input_abs_set_##_suffix(struct input_dev *dev, \
- unsigned int axis, int val) \
-{ \
- input_alloc_absinfo(dev); \
- if (dev->absinfo) \
- dev->absinfo[axis]._item = val; \
-}
-
-INPUT_GENERATE_ABS_ACCESSORS(val, value)
-INPUT_GENERATE_ABS_ACCESSORS(min, minimum)
-INPUT_GENERATE_ABS_ACCESSORS(max, maximum)
-INPUT_GENERATE_ABS_ACCESSORS(fuzz, fuzz)
-INPUT_GENERATE_ABS_ACCESSORS(flat, flat)
-INPUT_GENERATE_ABS_ACCESSORS(res, resolution)
-
-int input_scancode_to_scalar(const struct input_keymap_entry *ke,
- unsigned int *scancode);
-
-int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke);
-int input_set_keycode(struct input_dev *dev,
- const struct input_keymap_entry *ke);
-
-extern struct class input_class;
-
-/**
- * struct ff_device - force-feedback part of an input device
- * @upload: Called to upload an new effect into device
- * @erase: Called to erase an effect from device
- * @playback: Called to request device to start playing specified effect
- * @set_gain: Called to set specified gain
- * @set_autocenter: Called to auto-center device
- * @destroy: called by input core when parent input device is being
- * destroyed
- * @private: driver-specific data, will be freed automatically
- * @ffbit: bitmap of force feedback capabilities truly supported by
- * device (not emulated like ones in input_dev->ffbit)
- * @mutex: mutex for serializing access to the device
- * @max_effects: maximum number of effects supported by device
- * @effects: pointer to an array of effects currently loaded into device
- * @effect_owners: array of effect owners; when file handle owning
- * an effect gets closed the effect is automatically erased
- *
- * Every force-feedback device must implement upload() and playback()
- * methods; erase() is optional. set_gain() and set_autocenter() need
- * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER
- * bits.
- *
- * Note that playback(), set_gain() and set_autocenter() are called with
- * dev->event_lock spinlock held and interrupts off and thus may not
- * sleep.
- */
-struct ff_device {
- int (*upload)(struct input_dev *dev, struct ff_effect *effect,
- struct ff_effect *old);
- int (*erase)(struct input_dev *dev, int effect_id);
-
- int (*playback)(struct input_dev *dev, int effect_id, int value);
- void (*set_gain)(struct input_dev *dev, u16 gain);
- void (*set_autocenter)(struct input_dev *dev, u16 magnitude);
-
- void (*destroy)(struct ff_device *);
-
- void *private;
-
- unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
-
- struct mutex mutex;
-
- int max_effects;
- struct ff_effect *effects;
- struct file *effect_owners[];
-};
-
-int input_ff_create(struct input_dev *dev, unsigned int max_effects);
-void input_ff_destroy(struct input_dev *dev);
-
-int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
-
-int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
-int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
-
-int input_ff_create_memless(struct input_dev *dev, void *data,
- int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
-
-#endif
-#endif
diff --git a/original/linux/interrupt.h b/original/linux/interrupt.h
deleted file mode 100644
index d5afee9..0000000
--- a/original/linux/interrupt.h
+++ /dev/null
@@ -1,401 +0,0 @@
-/* interrupt.h */
-#ifndef _LINUX_INTERRUPT_H
-#define _LINUX_INTERRUPT_H
-
-#include <linux/kernel.h>
-#include <linux/linkage.h>
-#include <linux/bitops.h>
-#include <linux/preempt.h>
-#include <linux/cpumask.h>
-#include <linux/irqreturn.h>
-#include <linux/hardirq.h>
-#include <linux/sched.h>
-#include <linux/irqflags.h>
-#include <asm/atomic.h>
-#include <asm/ptrace.h>
-#include <asm/system.h>
-
-/*
- * These correspond to the IORESOURCE_IRQ_* defines in
- * linux/ioport.h to select the interrupt line behaviour. When
- * requesting an interrupt without specifying a IRQF_TRIGGER, the
- * setting should be assumed to be "as already configured", which
- * may be as per machine or firmware initialisation.
- */
-#define IRQF_TRIGGER_NONE 0x00000000
-#define IRQF_TRIGGER_RISING 0x00000001
-#define IRQF_TRIGGER_FALLING 0x00000002
-#define IRQF_TRIGGER_HIGH 0x00000004
-#define IRQF_TRIGGER_LOW 0x00000008
-#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
- IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
-#define IRQF_TRIGGER_PROBE 0x00000010
-
-/*
- * These flags used only by the kernel as part of the
- * irq handling routines.
- *
- * IRQF_DISABLED - keep irqs disabled when calling the action handler
- * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
- * IRQF_SHARED - allow sharing the irq among several devices
- * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
- * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
- */
-#define IRQF_DISABLED 0x00000020
-#define IRQF_SAMPLE_RANDOM 0x00000040
-#define IRQF_SHARED 0x00000080
-#define IRQF_PROBE_SHARED 0x00000100
-#define IRQF_TIMER 0x00000200
-#define IRQF_PERCPU 0x00000400
-
-/*
- * Migration helpers. Scheduled for removal in 1/2007
- * Do not use for new code !
- */
-#define SA_INTERRUPT IRQF_DISABLED
-#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
-#define SA_SHIRQ IRQF_SHARED
-#define SA_PROBEIRQ IRQF_PROBE_SHARED
-#define SA_PERCPU IRQF_PERCPU
-
-#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
-#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
-#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
-#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
-#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
-
-struct irqaction {
- irqreturn_t (*handler)(int, void *, struct pt_regs *);
- unsigned long flags;
- cpumask_t mask;
- const char *name;
- void *dev_id;
- struct irqaction *next;
- int irq;
- struct proc_dir_entry *dir;
-};
-
-extern irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs);
-extern int request_irq(unsigned int,
- irqreturn_t (*handler)(int, void *, struct pt_regs *),
- unsigned long, const char *, void *);
-extern void free_irq(unsigned int, void *);
-
-/*
- * On lockdep we dont want to enable hardirqs in hardirq
- * context. Use local_irq_enable_in_hardirq() to annotate
- * kernel code that has to do this nevertheless (pretty much
- * the only valid case is for old/broken hardware that is
- * insanely slow).
- *
- * NOTE: in theory this might break fragile code that relies
- * on hardirq delivery - in practice we dont seem to have such
- * places left. So the only effect should be slightly increased
- * irqs-off latencies.
- */
-#ifdef CONFIG_LOCKDEP
-# define local_irq_enable_in_hardirq() do { } while (0)
-#else
-# define local_irq_enable_in_hardirq() local_irq_enable()
-#endif
-
-#ifdef CONFIG_GENERIC_HARDIRQS
-extern void disable_irq_nosync(unsigned int irq);
-extern void disable_irq(unsigned int irq);
-extern void enable_irq(unsigned int irq);
-
-/*
- * Special lockdep variants of irq disabling/enabling.
- * These should be used for locking constructs that
- * know that a particular irq context which is disabled,
- * and which is the only irq-context user of a lock,
- * that it's safe to take the lock in the irq-disabled
- * section without disabling hardirqs.
- *
- * On !CONFIG_LOCKDEP they are equivalent to the normal
- * irq disable/enable methods.
- */
-static inline void disable_irq_nosync_lockdep(unsigned int irq)
-{
- disable_irq_nosync(irq);
-#ifdef CONFIG_LOCKDEP
- local_irq_disable();
-#endif
-}
-
-static inline void disable_irq_lockdep(unsigned int irq)
-{
- disable_irq(irq);
-#ifdef CONFIG_LOCKDEP
- local_irq_disable();
-#endif
-}
-
-static inline void enable_irq_lockdep(unsigned int irq)
-{
-#ifdef CONFIG_LOCKDEP
- local_irq_enable();
-#endif
- enable_irq(irq);
-}
-
-/* IRQ wakeup (PM) control: */
-extern int set_irq_wake(unsigned int irq, unsigned int on);
-
-static inline int enable_irq_wake(unsigned int irq)
-{
- return set_irq_wake(irq, 1);
-}
-
-static inline int disable_irq_wake(unsigned int irq)
-{
- return set_irq_wake(irq, 0);
-}
-
-#else /* !CONFIG_GENERIC_HARDIRQS */
-/*
- * NOTE: non-genirq architectures, if they want to support the lock
- * validator need to define the methods below in their asm/irq.h
- * files, under an #ifdef CONFIG_LOCKDEP section.
- */
-# ifndef CONFIG_LOCKDEP
-# define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq)
-# define disable_irq_lockdep(irq) disable_irq(irq)
-# define enable_irq_lockdep(irq) enable_irq(irq)
-# endif
-
-#endif /* CONFIG_GENERIC_HARDIRQS */
-
-#ifndef __ARCH_SET_SOFTIRQ_PENDING
-#define set_softirq_pending(x) (local_softirq_pending() = (x))
-#define or_softirq_pending(x) (local_softirq_pending() |= (x))
-#endif
-
-/*
- * Temporary defines for UP kernels, until all code gets fixed.
- */
-#ifndef CONFIG_SMP
-static inline void __deprecated cli(void)
-{
- local_irq_disable();
-}
-static inline void __deprecated sti(void)
-{
- local_irq_enable();
-}
-static inline void __deprecated save_flags(unsigned long *x)
-{
- local_save_flags(*x);
-}
-#define save_flags(x) save_flags(&x)
-static inline void __deprecated restore_flags(unsigned long x)
-{
- local_irq_restore(x);
-}
-
-static inline void __deprecated save_and_cli(unsigned long *x)
-{
- local_irq_save(*x);
-}
-#define save_and_cli(x) save_and_cli(&x)
-#endif /* CONFIG_SMP */
-
-extern void local_bh_disable(void);
-extern void __local_bh_enable(void);
-extern void _local_bh_enable(void);
-extern void local_bh_enable(void);
-extern void local_bh_enable_ip(unsigned long ip);
-
-/* PLEASE, avoid to allocate new softirqs, if you need not _really_ high
- frequency threaded job scheduling. For almost all the purposes
- tasklets are more than enough. F.e. all serial device BHs et
- al. should be converted to tasklets, not to softirqs.
- */
-
-enum
-{
- HI_SOFTIRQ=0,
- TIMER_SOFTIRQ,
- NET_TX_SOFTIRQ,
- NET_RX_SOFTIRQ,
- BLOCK_SOFTIRQ,
- TASKLET_SOFTIRQ
-};
-
-/* softirq mask and active fields moved to irq_cpustat_t in
- * asm/hardirq.h to get better cache usage. KAO
- */
-
-struct softirq_action
-{
- void (*action)(struct softirq_action *);
- void *data;
-};
-
-asmlinkage void do_softirq(void);
-extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data);
-extern void softirq_init(void);
-#define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0)
-extern void FASTCALL(raise_softirq_irqoff(unsigned int nr));
-extern void FASTCALL(raise_softirq(unsigned int nr));
-
-
-/* Tasklets --- multithreaded analogue of BHs.
-
- Main feature differing them of generic softirqs: tasklet
- is running only on one CPU simultaneously.
-
- Main feature differing them of BHs: different tasklets
- may be run simultaneously on different CPUs.
-
- Properties:
- * If tasklet_schedule() is called, then tasklet is guaranteed
- to be executed on some cpu at least once after this.
- * If the tasklet is already scheduled, but its excecution is still not
- started, it will be executed only once.
- * If this tasklet is already running on another CPU (or schedule is called
- from tasklet itself), it is rescheduled for later.
- * Tasklet is strictly serialized wrt itself, but not
- wrt another tasklets. If client needs some intertask synchronization,
- he makes it with spinlocks.
- */
-
-struct tasklet_struct
-{
- struct tasklet_struct *next;
- unsigned long state;
- atomic_t count;
- void (*func)(unsigned long);
- unsigned long data;
-};
-
-#define DECLARE_TASKLET(name, func, data) \
-struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(0), func, data }
-
-#define DECLARE_TASKLET_DISABLED(name, func, data) \
-struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
-
-
-enum
-{
- TASKLET_STATE_SCHED, /* Tasklet is scheduled for execution */
- TASKLET_STATE_RUN /* Tasklet is running (SMP only) */
-};
-
-#ifdef CONFIG_SMP
-static inline int tasklet_trylock(struct tasklet_struct *t)
-{
- return !test_and_set_bit(TASKLET_STATE_RUN, &(t)->state);
-}
-
-static inline void tasklet_unlock(struct tasklet_struct *t)
-{
- smp_mb__before_clear_bit();
- clear_bit(TASKLET_STATE_RUN, &(t)->state);
-}
-
-static inline void tasklet_unlock_wait(struct tasklet_struct *t)
-{
- while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { barrier(); }
-}
-#else
-#define tasklet_trylock(t) 1
-#define tasklet_unlock_wait(t) do { } while (0)
-#define tasklet_unlock(t) do { } while (0)
-#endif
-
-extern void FASTCALL(__tasklet_schedule(struct tasklet_struct *t));
-
-static inline void tasklet_schedule(struct tasklet_struct *t)
-{
- if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
- __tasklet_schedule(t);
-}
-
-extern void FASTCALL(__tasklet_hi_schedule(struct tasklet_struct *t));
-
-static inline void tasklet_hi_schedule(struct tasklet_struct *t)
-{
- if (!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))
- __tasklet_hi_schedule(t);
-}
-
-
-static inline void tasklet_disable_nosync(struct tasklet_struct *t)
-{
- atomic_inc(&t->count);
- smp_mb__after_atomic_inc();
-}
-
-static inline void tasklet_disable(struct tasklet_struct *t)
-{
- tasklet_disable_nosync(t);
- tasklet_unlock_wait(t);
- smp_mb();
-}
-
-static inline void tasklet_enable(struct tasklet_struct *t)
-{
- smp_mb__before_atomic_dec();
- atomic_dec(&t->count);
-}
-
-static inline void tasklet_hi_enable(struct tasklet_struct *t)
-{
- smp_mb__before_atomic_dec();
- atomic_dec(&t->count);
-}
-
-extern void tasklet_kill(struct tasklet_struct *t);
-extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
-extern void tasklet_init(struct tasklet_struct *t,
- void (*func)(unsigned long), unsigned long data);
-
-/*
- * Autoprobing for irqs:
- *
- * probe_irq_on() and probe_irq_off() provide robust primitives
- * for accurate IRQ probing during kernel initialization. They are
- * reasonably simple to use, are not "fooled" by spurious interrupts,
- * and, unlike other attempts at IRQ probing, they do not get hung on
- * stuck interrupts (such as unused PS2 mouse interfaces on ASUS boards).
- *
- * For reasonably foolproof probing, use them as follows:
- *
- * 1. clear and/or mask the device's internal interrupt.
- * 2. sti();
- * 3. irqs = probe_irq_on(); // "take over" all unassigned idle IRQs
- * 4. enable the device and cause it to trigger an interrupt.
- * 5. wait for the device to interrupt, using non-intrusive polling or a delay.
- * 6. irq = probe_irq_off(irqs); // get IRQ number, 0=none, negative=multiple
- * 7. service the device to clear its pending interrupt.
- * 8. loop again if paranoia is required.
- *
- * probe_irq_on() returns a mask of allocated irq's.
- *
- * probe_irq_off() takes the mask as a parameter,
- * and returns the irq number which occurred,
- * or zero if none occurred, or a negative irq number
- * if more than one irq occurred.
- */
-
-#if defined(CONFIG_GENERIC_HARDIRQS) && !defined(CONFIG_GENERIC_IRQ_PROBE)
-static inline unsigned long probe_irq_on(void)
-{
- return 0;
-}
-static inline int probe_irq_off(unsigned long val)
-{
- return 0;
-}
-static inline unsigned int probe_irq_mask(unsigned long val)
-{
- return 0;
-}
-#else
-extern unsigned long probe_irq_on(void); /* returns 0 on failure */
-extern int probe_irq_off(unsigned long); /* returns 0 or negative on failure */
-extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */
-#endif
-
-#endif
diff --git a/original/linux/ioctl.h b/original/linux/ioctl.h
deleted file mode 100644
index aa91eb3..0000000
--- a/original/linux/ioctl.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _LINUX_IOCTL_H
-#define _LINUX_IOCTL_H
-
-#include <asm/ioctl.h>
-
-#endif /* _LINUX_IOCTL_H */
-
diff --git a/original/linux/ion.h b/original/linux/ion.h
deleted file mode 100644
index a7d399c..0000000
--- a/original/linux/ion.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * include/linux/ion.h
- *
- * Copyright (C) 2011 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_ION_H
-#define _LINUX_ION_H
-
-#include <linux/types.h>
-
-struct ion_handle;
-/**
- * enum ion_heap_types - list of all possible types of heaps
- * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc
- * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc
- * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved
- * carveout heap, allocations are physically
- * contiguous
- * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask
- * is used to identify the heaps, so only 32
- * total heap types are supported
- */
-enum ion_heap_type {
- ION_HEAP_TYPE_SYSTEM,
- ION_HEAP_TYPE_SYSTEM_CONTIG,
- ION_HEAP_TYPE_CARVEOUT,
- ION_HEAP_TYPE_CUSTOM, /* must be last so device specific heaps always
- are at the end of this enum */
- ION_NUM_HEAPS = 16,
-};
-
-#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
-#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
-#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
-
-/**
- * heap flags - the lower 16 bits are used by core ion, the upper 16
- * bits are reserved for use by the heaps themselves.
- */
-#define ION_FLAG_CACHED 1 /* mappings of this buffer should be
- cached, ion will do cache
- maintenance when the buffer is
- mapped for dma */
-#define ION_FLAG_CACHED_NEEDS_SYNC 2 /* mappings of this buffer will created
- at mmap time, if this is set
- caches must be managed manually */
-
-#ifdef __KERNEL__
-struct ion_device;
-struct ion_heap;
-struct ion_mapper;
-struct ion_client;
-struct ion_buffer;
-
-/* This should be removed some day when phys_addr_t's are fully
- plumbed in the kernel, and all instances of ion_phys_addr_t should
- be converted to phys_addr_t. For the time being many kernel interfaces
- do not accept phys_addr_t's that would have to */
-#define ion_phys_addr_t unsigned long
-
-/**
- * struct ion_platform_heap - defines a heap in the given platform
- * @type: type of the heap from ion_heap_type enum
- * @id: unique identifier for heap. When allocating (lower numbers
- * will be allocated from first)
- * @name: used for debug purposes
- * @base: base address of heap in physical memory if applicable
- * @size: size of the heap in bytes if applicable
- *
- * Provided by the board file.
- */
-struct ion_platform_heap {
- enum ion_heap_type type;
- unsigned int id;
- const char *name;
- ion_phys_addr_t base;
- size_t size;
-};
-
-/**
- * struct ion_platform_data - array of platform heaps passed from board file
- * @nr: number of structures in the array
- * @heaps: array of platform_heap structions
- *
- * Provided by the board file in the form of platform data to a platform device.
- */
-struct ion_platform_data {
- int nr;
- struct ion_platform_heap heaps[];
-};
-
-/**
- * ion_reserve() - reserve memory for ion heaps if applicable
- * @data: platform data specifying starting physical address and
- * size
- *
- * Calls memblock reserve to set aside memory for heaps that are
- * located at specific memory addresses or of specfic sizes not
- * managed by the kernel
- */
-void ion_reserve(struct ion_platform_data *data);
-
-/**
- * ion_client_create() - allocate a client and returns it
- * @dev: the global ion device
- * @heap_mask: mask of heaps this client can allocate from
- * @name: used for debugging
- */
-struct ion_client *ion_client_create(struct ion_device *dev,
- unsigned int heap_mask, const char *name);
-
-/**
- * ion_client_destroy() - free's a client and all it's handles
- * @client: the client
- *
- * Free the provided client and all it's resources including
- * any handles it is holding.
- */
-void ion_client_destroy(struct ion_client *client);
-
-/**
- * ion_alloc - allocate ion memory
- * @client: the client
- * @len: size of the allocation
- * @align: requested allocation alignment, lots of hardware blocks have
- * alignment requirements of some kind
- * @heap_mask: mask of heaps to allocate from, if multiple bits are set
- * heaps will be tried in order from lowest to highest order bit
- * @flags: heap flags, the low 16 bits are consumed by ion, the high 16
- * bits are passed on to the respective heap and can be heap
- * custom
- *
- * Allocate memory in one of the heaps provided in heap mask and return
- * an opaque handle to it.
- */
-struct ion_handle *ion_alloc(struct ion_client *client, size_t len,
- size_t align, unsigned int heap_mask,
- unsigned int flags);
-
-/**
- * ion_free - free a handle
- * @client: the client
- * @handle: the handle to free
- *
- * Free the provided handle.
- */
-void ion_free(struct ion_client *client, struct ion_handle *handle);
-
-/**
- * ion_phys - returns the physical address and len of a handle
- * @client: the client
- * @handle: the handle
- * @addr: a pointer to put the address in
- * @len: a pointer to put the length in
- *
- * This function queries the heap for a particular handle to get the
- * handle's physical address. It't output is only correct if
- * a heap returns physically contiguous memory -- in other cases
- * this api should not be implemented -- ion_sg_table should be used
- * instead. Returns -EINVAL if the handle is invalid. This has
- * no implications on the reference counting of the handle --
- * the returned value may not be valid if the caller is not
- * holding a reference.
- */
-int ion_phys(struct ion_client *client, struct ion_handle *handle,
- ion_phys_addr_t *addr, size_t *len);
-
-/**
- * ion_map_dma - return an sg_table describing a handle
- * @client: the client
- * @handle: the handle
- *
- * This function returns the sg_table describing
- * a particular ion handle.
- */
-struct sg_table *ion_sg_table(struct ion_client *client,
- struct ion_handle *handle);
-
-/**
- * ion_map_kernel - create mapping for the given handle
- * @client: the client
- * @handle: handle to map
- *
- * Map the given handle into the kernel and return a kernel address that
- * can be used to access this address.
- */
-void *ion_map_kernel(struct ion_client *client, struct ion_handle *handle);
-
-/**
- * ion_unmap_kernel() - destroy a kernel mapping for a handle
- * @client: the client
- * @handle: handle to unmap
- */
-void ion_unmap_kernel(struct ion_client *client, struct ion_handle *handle);
-
-/**
- * ion_share_dma_buf() - given an ion client, create a dma-buf fd
- * @client: the client
- * @handle: the handle
- */
-int ion_share_dma_buf(struct ion_client *client, struct ion_handle *handle);
-
-/**
- * ion_import_dma_buf() - given an dma-buf fd from the ion exporter get handle
- * @client: the client
- * @fd: the dma-buf fd
- *
- * Given an dma-buf fd that was allocated through ion via ion_share_dma_buf,
- * import that fd and return a handle representing it. If a dma-buf from
- * another exporter is passed in this function will return ERR_PTR(-EINVAL)
- */
-struct ion_handle *ion_import_dma_buf(struct ion_client *client, int fd);
-
-#endif /* __KERNEL__ */
-
-/**
- * DOC: Ion Userspace API
- *
- * create a client by opening /dev/ion
- * most operations handled via following ioctls
- *
- */
-
-/**
- * struct ion_allocation_data - metadata passed from userspace for allocations
- * @len: size of the allocation
- * @align: required alignment of the allocation
- * @heap_mask: mask of heaps to allocate from
- * @flags: flags passed to heap
- * @handle: pointer that will be populated with a cookie to use to refer
- * to this allocation
- *
- * Provided by userspace as an argument to the ioctl
- */
-struct ion_allocation_data {
- size_t len;
- size_t align;
- unsigned int heap_mask;
- unsigned int flags;
- struct ion_handle *handle;
-};
-
-/**
- * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair
- * @handle: a handle
- * @fd: a file descriptor representing that handle
- *
- * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with
- * the handle returned from ion alloc, and the kernel returns the file
- * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace
- * provides the file descriptor and the kernel returns the handle.
- */
-struct ion_fd_data {
- struct ion_handle *handle;
- int fd;
-};
-
-/**
- * struct ion_handle_data - a handle passed to/from the kernel
- * @handle: a handle
- */
-struct ion_handle_data {
- struct ion_handle *handle;
-};
-
-/**
- * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl
- * @cmd: the custom ioctl function to call
- * @arg: additional data to pass to the custom ioctl, typically a user
- * pointer to a predefined structure
- *
- * This works just like the regular cmd and arg fields of an ioctl.
- */
-struct ion_custom_data {
- unsigned int cmd;
- unsigned long arg;
-};
-
-#define ION_IOC_MAGIC 'I'
-
-/**
- * DOC: ION_IOC_ALLOC - allocate memory
- *
- * Takes an ion_allocation_data struct and returns it with the handle field
- * populated with the opaque handle for the allocation.
- */
-#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \
- struct ion_allocation_data)
-
-/**
- * DOC: ION_IOC_FREE - free memory
- *
- * Takes an ion_handle_data struct and frees the handle.
- */
-#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
-
-/**
- * DOC: ION_IOC_MAP - get a file descriptor to mmap
- *
- * Takes an ion_fd_data struct with the handle field populated with a valid
- * opaque handle. Returns the struct with the fd field set to a file
- * descriptor open in the current address space. This file descriptor
- * can then be used as an argument to mmap.
- */
-#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
-
-/**
- * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation
- *
- * Takes an ion_fd_data struct with the handle field populated with a valid
- * opaque handle. Returns the struct with the fd field set to a file
- * descriptor open in the current address space. This file descriptor
- * can then be passed to another process. The corresponding opaque handle can
- * be retrieved via ION_IOC_IMPORT.
- */
-#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
-
-/**
- * DOC: ION_IOC_IMPORT - imports a shared file descriptor
- *
- * Takes an ion_fd_data struct with the fd field populated with a valid file
- * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle
- * filed set to the corresponding opaque handle.
- */
-#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
-
-/**
- * DOC: ION_IOC_SYNC - syncs a shared file descriptors to memory
- *
- * Deprecated in favor of using the dma_buf api's correctly (syncing
- * will happend automatically when the buffer is mapped to a device).
- * If necessary should be used after touching a cached buffer from the cpu,
- * this will make the buffer in memory coherent.
- */
-#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
-
-/**
- * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl
- *
- * Takes the argument of the architecture specific ioctl to call and
- * passes appropriate userdata for that ioctl
- */
-#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
-
-#endif /* _LINUX_ION_H */
diff --git a/original/linux/ioport.h b/original/linux/ioport.h
deleted file mode 100644
index d42c833..0000000
--- a/original/linux/ioport.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * ioport.h Definitions of routines for detecting, reserving and
- * allocating system resources.
- *
- * Authors: Linus Torvalds
- */
-
-#ifndef _LINUX_IOPORT_H
-#define _LINUX_IOPORT_H
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-/*
- * Resources are tree-like, allowing
- * nesting etc..
- */
-struct resource {
- resource_size_t start;
- resource_size_t end;
- const char *name;
- unsigned long flags;
- struct resource *parent, *sibling, *child;
-};
-
-struct resource_list {
- struct resource_list *next;
- struct resource *res;
- struct pci_dev *dev;
-};
-
-/*
- * IO resources have these defined flags.
- */
-#define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */
-
-#define IORESOURCE_IO 0x00000100 /* Resource type */
-#define IORESOURCE_MEM 0x00000200
-#define IORESOURCE_IRQ 0x00000400
-#define IORESOURCE_DMA 0x00000800
-
-#define IORESOURCE_PREFETCH 0x00001000 /* No side effects */
-#define IORESOURCE_READONLY 0x00002000
-#define IORESOURCE_CACHEABLE 0x00004000
-#define IORESOURCE_RANGELENGTH 0x00008000
-#define IORESOURCE_SHADOWABLE 0x00010000
-#define IORESOURCE_BUS_HAS_VGA 0x00080000
-
-#define IORESOURCE_DISABLED 0x10000000
-#define IORESOURCE_UNSET 0x20000000
-#define IORESOURCE_AUTO 0x40000000
-#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
-
-/* ISA PnP IRQ specific bits (IORESOURCE_BITS) */
-#define IORESOURCE_IRQ_HIGHEDGE (1<<0)
-#define IORESOURCE_IRQ_LOWEDGE (1<<1)
-#define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
-#define IORESOURCE_IRQ_LOWLEVEL (1<<3)
-#define IORESOURCE_IRQ_SHAREABLE (1<<4)
-
-/* ISA PnP DMA specific bits (IORESOURCE_BITS) */
-#define IORESOURCE_DMA_TYPE_MASK (3<<0)
-#define IORESOURCE_DMA_8BIT (0<<0)
-#define IORESOURCE_DMA_8AND16BIT (1<<0)
-#define IORESOURCE_DMA_16BIT (2<<0)
-
-#define IORESOURCE_DMA_MASTER (1<<2)
-#define IORESOURCE_DMA_BYTE (1<<3)
-#define IORESOURCE_DMA_WORD (1<<4)
-
-#define IORESOURCE_DMA_SPEED_MASK (3<<6)
-#define IORESOURCE_DMA_COMPATIBLE (0<<6)
-#define IORESOURCE_DMA_TYPEA (1<<6)
-#define IORESOURCE_DMA_TYPEB (2<<6)
-#define IORESOURCE_DMA_TYPEF (3<<6)
-
-/* ISA PnP memory I/O specific bits (IORESOURCE_BITS) */
-#define IORESOURCE_MEM_WRITEABLE (1<<0) /* dup: IORESOURCE_READONLY */
-#define IORESOURCE_MEM_CACHEABLE (1<<1) /* dup: IORESOURCE_CACHEABLE */
-#define IORESOURCE_MEM_RANGELENGTH (1<<2) /* dup: IORESOURCE_RANGELENGTH */
-#define IORESOURCE_MEM_TYPE_MASK (3<<3)
-#define IORESOURCE_MEM_8BIT (0<<3)
-#define IORESOURCE_MEM_16BIT (1<<3)
-#define IORESOURCE_MEM_8AND16BIT (2<<3)
-#define IORESOURCE_MEM_32BIT (3<<3)
-#define IORESOURCE_MEM_SHADOWABLE (1<<5) /* dup: IORESOURCE_SHADOWABLE */
-#define IORESOURCE_MEM_EXPANSIONROM (1<<6)
-
-/* PCI ROM control bits (IORESOURCE_BITS) */
-#define IORESOURCE_ROM_ENABLE (1<<0) /* ROM is enabled, same as PCI_ROM_ADDRESS_ENABLE */
-#define IORESOURCE_ROM_SHADOW (1<<1) /* ROM is copy at C000:0 */
-#define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */
-
-/* PC/ISA/whatever - the normal PC address spaces: IO and memory */
-extern struct resource ioport_resource;
-extern struct resource iomem_resource;
-
-extern int request_resource(struct resource *root, struct resource *new);
-extern struct resource * ____request_resource(struct resource *root, struct resource *new);
-extern int release_resource(struct resource *new);
-extern int insert_resource(struct resource *parent, struct resource *new);
-extern int allocate_resource(struct resource *root, struct resource *new,
- resource_size_t size, resource_size_t min,
- resource_size_t max, resource_size_t align,
- void (*alignf)(void *, struct resource *,
- resource_size_t, resource_size_t),
- void *alignf_data);
-int adjust_resource(struct resource *res, resource_size_t start,
- resource_size_t size);
-
-/* get registered SYSTEM_RAM resources in specified area */
-extern int find_next_system_ram(struct resource *res);
-
-/* Convenience shorthand with allocation */
-#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
-#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
-#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
-
-extern struct resource * __request_region(struct resource *,
- resource_size_t start,
- resource_size_t n, const char *name);
-
-/* Compatibility cruft */
-#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
-#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
-#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
-
-extern int __check_region(struct resource *, resource_size_t, resource_size_t);
-extern void __release_region(struct resource *, resource_size_t,
- resource_size_t);
-
-static inline int __deprecated check_region(resource_size_t s,
- resource_size_t n)
-{
- return __check_region(&ioport_resource, s, n);
-}
-#endif /* _LINUX_IOPORT_H */
diff --git a/original/linux/ioprio.h b/original/linux/ioprio.h
deleted file mode 100644
index 8e2042b..0000000
--- a/original/linux/ioprio.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef IOPRIO_H
-#define IOPRIO_H
-
-#include <linux/sched.h>
-
-/*
- * Gives us 8 prio classes with 13-bits of data for each class
- */
-#define IOPRIO_BITS (16)
-#define IOPRIO_CLASS_SHIFT (13)
-#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1)
-
-#define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT)
-#define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK)
-#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data)
-
-#define ioprio_valid(mask) (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
-
-/*
- * These are the io priority groups as implemented by CFQ. RT is the realtime
- * class, it always gets premium service. BE is the best-effort scheduling
- * class, the default for any process. IDLE is the idle scheduling class, it
- * is only served when no one else is using the disk.
- */
-enum {
- IOPRIO_CLASS_NONE,
- IOPRIO_CLASS_RT,
- IOPRIO_CLASS_BE,
- IOPRIO_CLASS_IDLE,
-};
-
-/*
- * 8 best effort priority levels are supported
- */
-#define IOPRIO_BE_NR (8)
-
-enum {
- IOPRIO_WHO_PROCESS = 1,
- IOPRIO_WHO_PGRP,
- IOPRIO_WHO_USER,
-};
-
-/*
- * if process has set io priority explicitly, use that. if not, convert
- * the cpu scheduler nice value to an io priority
- */
-#define IOPRIO_NORM (4)
-static inline int task_ioprio(struct task_struct *task)
-{
- WARN_ON(!ioprio_valid(task->ioprio));
- return IOPRIO_PRIO_DATA(task->ioprio);
-}
-
-static inline int task_nice_ioprio(struct task_struct *task)
-{
- return (task_nice(task) + 20) / 5;
-}
-
-/*
- * For inheritance, return the highest of the two given priorities
- */
-extern int ioprio_best(unsigned short aprio, unsigned short bprio);
-
-#endif
diff --git a/original/linux/ip.h b/original/linux/ip.h
deleted file mode 100644
index 4b55cf1..0000000
--- a/original/linux/ip.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions for the IP protocol.
- *
- * Version: @(#)ip.h 1.0.2 04/28/93
- *
- * Authors: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_IP_H
-#define _LINUX_IP_H
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-#define IPTOS_TOS_MASK 0x1E
-#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
-#define IPTOS_LOWDELAY 0x10
-#define IPTOS_THROUGHPUT 0x08
-#define IPTOS_RELIABILITY 0x04
-#define IPTOS_MINCOST 0x02
-
-#define IPTOS_PREC_MASK 0xE0
-#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK)
-#define IPTOS_PREC_NETCONTROL 0xe0
-#define IPTOS_PREC_INTERNETCONTROL 0xc0
-#define IPTOS_PREC_CRITIC_ECP 0xa0
-#define IPTOS_PREC_FLASHOVERRIDE 0x80
-#define IPTOS_PREC_FLASH 0x60
-#define IPTOS_PREC_IMMEDIATE 0x40
-#define IPTOS_PREC_PRIORITY 0x20
-#define IPTOS_PREC_ROUTINE 0x00
-
-
-/* IP options */
-#define IPOPT_COPY 0x80
-#define IPOPT_CLASS_MASK 0x60
-#define IPOPT_NUMBER_MASK 0x1f
-
-#define IPOPT_COPIED(o) ((o)&IPOPT_COPY)
-#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK)
-#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK)
-
-#define IPOPT_CONTROL 0x00
-#define IPOPT_RESERVED1 0x20
-#define IPOPT_MEASUREMENT 0x40
-#define IPOPT_RESERVED2 0x60
-
-#define IPOPT_END (0 |IPOPT_CONTROL)
-#define IPOPT_NOOP (1 |IPOPT_CONTROL)
-#define IPOPT_SEC (2 |IPOPT_CONTROL|IPOPT_COPY)
-#define IPOPT_LSRR (3 |IPOPT_CONTROL|IPOPT_COPY)
-#define IPOPT_TIMESTAMP (4 |IPOPT_MEASUREMENT)
-#define IPOPT_RR (7 |IPOPT_CONTROL)
-#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
-#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY)
-#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
-
-#define IPVERSION 4
-#define MAXTTL 255
-#define IPDEFTTL 64
-
-#define IPOPT_OPTVAL 0
-#define IPOPT_OLEN 1
-#define IPOPT_OFFSET 2
-#define IPOPT_MINOFF 4
-#define MAX_IPOPTLEN 40
-#define IPOPT_NOP IPOPT_NOOP
-#define IPOPT_EOL IPOPT_END
-#define IPOPT_TS IPOPT_TIMESTAMP
-
-#define IPOPT_TS_TSONLY 0 /* timestamps only */
-#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */
-#define IPOPT_TS_PRESPEC 3 /* specified modules only */
-
-struct iphdr {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 ihl:4,
- version:4;
-#elif defined (__BIG_ENDIAN_BITFIELD)
- __u8 version:4,
- ihl:4;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
- __u8 tos;
- __be16 tot_len;
- __be16 id;
- __be16 frag_off;
- __u8 ttl;
- __u8 protocol;
- __u16 check;
- __be32 saddr;
- __be32 daddr;
- /*The options start here. */
-};
-
-struct ip_auth_hdr {
- __u8 nexthdr;
- __u8 hdrlen; /* This one is measured in 32 bit units! */
- __u16 reserved;
- __u32 spi;
- __u32 seq_no; /* Sequence number */
- __u8 auth_data[0]; /* Variable len but >=4. Mind the 64 bit alignment! */
-};
-
-struct ip_esp_hdr {
- __u32 spi;
- __u32 seq_no; /* Sequence number */
- __u8 enc_data[0]; /* Variable len but >=8. Mind the 64 bit alignment! */
-};
-
-struct ip_comp_hdr {
- __u8 nexthdr;
- __u8 flags;
- __u16 cpi;
-};
-
-#endif /* _LINUX_IP_H */
diff --git a/original/linux/ipc.h b/original/linux/ipc.h
deleted file mode 100644
index b291189..0000000
--- a/original/linux/ipc.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef _LINUX_IPC_H
-#define _LINUX_IPC_H
-
-#include <linux/types.h>
-
-#define IPC_PRIVATE ((__kernel_key_t) 0)
-
-/* Obsolete, used only for backwards compatibility and libc5 compiles */
-struct ipc_perm
-{
- __kernel_key_t key;
- __kernel_uid_t uid;
- __kernel_gid_t gid;
- __kernel_uid_t cuid;
- __kernel_gid_t cgid;
- __kernel_mode_t mode;
- unsigned short seq;
-};
-
-/* Include the definition of ipc64_perm */
-#include <asm/ipcbuf.h>
-
-/* resource get request flags */
-#define IPC_CREAT 00001000 /* create if key is nonexistent */
-#define IPC_EXCL 00002000 /* fail if key exists */
-#define IPC_NOWAIT 00004000 /* return error on wait */
-
-/* these fields are used by the DIPC package so the kernel as standard
- should avoid using them if possible */
-
-#define IPC_DIPC 00010000 /* make it distributed */
-#define IPC_OWN 00020000 /* this machine is the DIPC owner */
-
-/*
- * Control commands used with semctl, msgctl and shmctl
- * see also specific commands in sem.h, msg.h and shm.h
- */
-#define IPC_RMID 0 /* remove resource */
-#define IPC_SET 1 /* set ipc_perm options */
-#define IPC_STAT 2 /* get ipc_perm options */
-#define IPC_INFO 3 /* see ipcs */
-
-/*
- * Version flags for semctl, msgctl, and shmctl commands
- * These are passed as bitflags or-ed with the actual command
- */
-#define IPC_OLD 0 /* Old version (no 32-bit UID support on many
- architectures) */
-#define IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger
- message sizes, etc. */
-
-#ifdef __KERNEL__
-
-#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
-
-/* used by in-kernel data structures */
-struct kern_ipc_perm
-{
- spinlock_t lock;
- int deleted;
- key_t key;
- uid_t uid;
- gid_t gid;
- uid_t cuid;
- gid_t cgid;
- mode_t mode;
- unsigned long seq;
- void *security;
-};
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_IPC_H */
-
-
diff --git a/original/linux/ipmi_msgdefs.h b/original/linux/ipmi_msgdefs.h
deleted file mode 100644
index 22f5e2a..0000000
--- a/original/linux/ipmi_msgdefs.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * ipmi_smi.h
- *
- * MontaVista IPMI system management interface
- *
- * Author: MontaVista Software, Inc.
- * Corey Minyard <minyard@mvista.com>
- * source@mvista.com
- *
- * Copyright 2002 MontaVista Software 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.
- *
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __LINUX_IPMI_MSGDEFS_H
-#define __LINUX_IPMI_MSGDEFS_H
-
-/* Various definitions for IPMI messages used by almost everything in
- the IPMI stack. */
-
-/* NetFNs and commands used inside the IPMI stack. */
-
-#define IPMI_NETFN_SENSOR_EVENT_REQUEST 0x04
-#define IPMI_NETFN_SENSOR_EVENT_RESPONSE 0x05
-#define IPMI_GET_EVENT_RECEIVER_CMD 0x01
-
-#define IPMI_NETFN_APP_REQUEST 0x06
-#define IPMI_NETFN_APP_RESPONSE 0x07
-#define IPMI_GET_DEVICE_ID_CMD 0x01
-#define IPMI_CLEAR_MSG_FLAGS_CMD 0x30
-#define IPMI_GET_DEVICE_GUID_CMD 0x08
-#define IPMI_GET_MSG_FLAGS_CMD 0x31
-#define IPMI_SEND_MSG_CMD 0x34
-#define IPMI_GET_MSG_CMD 0x33
-#define IPMI_SET_BMC_GLOBAL_ENABLES_CMD 0x2e
-#define IPMI_GET_BMC_GLOBAL_ENABLES_CMD 0x2f
-#define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35
-#define IPMI_GET_CHANNEL_INFO_CMD 0x42
-
-#define IPMI_NETFN_STORAGE_REQUEST 0x0a
-#define IPMI_NETFN_STORAGE_RESPONSE 0x0b
-#define IPMI_ADD_SEL_ENTRY_CMD 0x44
-
-/* The default slave address */
-#define IPMI_BMC_SLAVE_ADDR 0x20
-
-/* The BT interface on high-end HP systems supports up to 255 bytes in
- * one transfer. Its "virtual" BMC supports some commands that are longer
- * than 128 bytes. Use the full 256, plus NetFn/LUN, Cmd, cCode, plus
- * some overhead. It would be nice to base this on the "BT Capabilities"
- * but that's too hard to propagate to the rest of the driver. */
-#define IPMI_MAX_MSG_LENGTH 272 /* multiple of 16 */
-
-#define IPMI_CC_NO_ERROR 0x00
-#define IPMI_NODE_BUSY_ERR 0xc0
-#define IPMI_INVALID_COMMAND_ERR 0xc1
-#define IPMI_ERR_MSG_TRUNCATED 0xc6
-#define IPMI_LOST_ARBITRATION_ERR 0x81
-#define IPMI_ERR_UNSPECIFIED 0xff
-
-#define IPMI_CHANNEL_PROTOCOL_IPMB 1
-#define IPMI_CHANNEL_PROTOCOL_ICMB 2
-#define IPMI_CHANNEL_PROTOCOL_SMBUS 4
-#define IPMI_CHANNEL_PROTOCOL_KCS 5
-#define IPMI_CHANNEL_PROTOCOL_SMIC 6
-#define IPMI_CHANNEL_PROTOCOL_BT10 7
-#define IPMI_CHANNEL_PROTOCOL_BT15 8
-#define IPMI_CHANNEL_PROTOCOL_TMODE 9
-
-#define IPMI_CHANNEL_MEDIUM_IPMB 1
-#define IPMI_CHANNEL_MEDIUM_ICMB10 2
-#define IPMI_CHANNEL_MEDIUM_ICMB09 3
-#define IPMI_CHANNEL_MEDIUM_8023LAN 4
-#define IPMI_CHANNEL_MEDIUM_ASYNC 5
-#define IPMI_CHANNEL_MEDIUM_OTHER_LAN 6
-#define IPMI_CHANNEL_MEDIUM_PCI_SMBUS 7
-#define IPMI_CHANNEL_MEDIUM_SMBUS1 8
-#define IPMI_CHANNEL_MEDIUM_SMBUS2 9
-#define IPMI_CHANNEL_MEDIUM_USB1 10
-#define IPMI_CHANNEL_MEDIUM_USB2 11
-#define IPMI_CHANNEL_MEDIUM_SYSINTF 12
-
-#endif /* __LINUX_IPMI_MSGDEFS_H */
diff --git a/original/linux/ipmi_smi.h b/original/linux/ipmi_smi.h
deleted file mode 100644
index 6d9c7e4..0000000
--- a/original/linux/ipmi_smi.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * ipmi_smi.h
- *
- * MontaVista IPMI system management interface
- *
- * Author: MontaVista Software, Inc.
- * Corey Minyard <minyard@mvista.com>
- * source@mvista.com
- *
- * Copyright 2002 MontaVista Software 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.
- *
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __LINUX_IPMI_SMI_H
-#define __LINUX_IPMI_SMI_H
-
-#include <linux/ipmi_msgdefs.h>
-#include <linux/proc_fs.h>
-#include <linux/module.h>
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/ipmi_smi.h>
-
-/* This files describes the interface for IPMI system management interface
- drivers to bind into the IPMI message handler. */
-
-/* Structure for the low-level drivers. */
-typedef struct ipmi_smi *ipmi_smi_t;
-
-/*
- * Messages to/from the lower layer. The smi interface will take one
- * of these to send. After the send has occurred and a response has
- * been received, it will report this same data structure back up to
- * the upper layer. If an error occurs, it should fill in the
- * response with an error code in the completion code location. When
- * asynchronous data is received, one of these is allocated, the
- * data_size is set to zero and the response holds the data from the
- * get message or get event command that the interface initiated.
- * Note that it is the interfaces responsibility to detect
- * asynchronous data and messages and request them from the
- * interface.
- */
-struct ipmi_smi_msg
-{
- struct list_head link;
-
- long msgid;
- void *user_data;
-
- int data_size;
- unsigned char data[IPMI_MAX_MSG_LENGTH];
-
- int rsp_size;
- unsigned char rsp[IPMI_MAX_MSG_LENGTH];
-
- /* Will be called when the system is done with the message
- (presumably to free it). */
- void (*done)(struct ipmi_smi_msg *msg);
-};
-
-struct ipmi_smi_handlers
-{
- struct module *owner;
-
- /* The low-level interface cannot start sending messages to
- the upper layer until this function is called. This may
- not be NULL, the lower layer must take the interface from
- this call. */
- int (*start_processing)(void *send_info,
- ipmi_smi_t new_intf);
-
- /* Called to enqueue an SMI message to be sent. This
- operation is not allowed to fail. If an error occurs, it
- should report back the error in a received message. It may
- do this in the current call context, since no write locks
- are held when this is run. If the priority is > 0, the
- message will go into a high-priority queue and be sent
- first. Otherwise, it goes into a normal-priority queue. */
- void (*sender)(void *send_info,
- struct ipmi_smi_msg *msg,
- int priority);
-
- /* Called by the upper layer to request that we try to get
- events from the BMC we are attached to. */
- void (*request_events)(void *send_info);
-
- /* Called when the interface should go into "run to
- completion" mode. If this call sets the value to true, the
- interface should make sure that all messages are flushed
- out and that none are pending, and any new requests are run
- to completion immediately. */
- void (*set_run_to_completion)(void *send_info, int run_to_completion);
-
- /* Called to poll for work to do. This is so upper layers can
- poll for operations during things like crash dumps. */
- void (*poll)(void *send_info);
-
- /* Tell the handler that we are using it/not using it. The
- message handler get the modules that this handler belongs
- to; this function lets the SMI claim any modules that it
- uses. These may be NULL if this is not required. */
- int (*inc_usecount)(void *send_info);
- void (*dec_usecount)(void *send_info);
-};
-
-struct ipmi_device_id {
- unsigned char device_id;
- unsigned char device_revision;
- unsigned char firmware_revision_1;
- unsigned char firmware_revision_2;
- unsigned char ipmi_version;
- unsigned char additional_device_support;
- unsigned int manufacturer_id;
- unsigned int product_id;
- unsigned char aux_firmware_revision[4];
- unsigned int aux_firmware_revision_set : 1;
-};
-
-#define ipmi_version_major(v) ((v)->ipmi_version & 0xf)
-#define ipmi_version_minor(v) ((v)->ipmi_version >> 4)
-
-/* Take a pointer to a raw data buffer and a length and extract device
- id information from it. The first byte of data must point to the
- byte from the get device id response after the completion code.
- The caller is responsible for making sure the length is at least
- 11 and the command completed without error. */
-static inline void ipmi_demangle_device_id(unsigned char *data,
- unsigned int data_len,
- struct ipmi_device_id *id)
-{
- id->device_id = data[0];
- id->device_revision = data[1];
- id->firmware_revision_1 = data[2];
- id->firmware_revision_2 = data[3];
- id->ipmi_version = data[4];
- id->additional_device_support = data[5];
- id->manufacturer_id = data[6] | (data[7] << 8) | (data[8] << 16);
- id->product_id = data[9] | (data[10] << 8);
- if (data_len >= 15) {
- memcpy(id->aux_firmware_revision, data+11, 4);
- id->aux_firmware_revision_set = 1;
- } else
- id->aux_firmware_revision_set = 0;
-}
-
-/* Add a low-level interface to the IPMI driver. Note that if the
- interface doesn't know its slave address, it should pass in zero.
- The low-level interface should not deliver any messages to the
- upper layer until the start_processing() function in the handlers
- is called, and the lower layer must get the interface from that
- call. */
-int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
- void *send_info,
- struct ipmi_device_id *device_id,
- struct device *dev,
- unsigned char slave_addr);
-
-/*
- * Remove a low-level interface from the IPMI driver. This will
- * return an error if the interface is still in use by a user.
- */
-int ipmi_unregister_smi(ipmi_smi_t intf);
-
-/*
- * The lower layer reports received messages through this interface.
- * The data_size should be zero if this is an asyncronous message. If
- * the lower layer gets an error sending a message, it should format
- * an error response in the message response.
- */
-void ipmi_smi_msg_received(ipmi_smi_t intf,
- struct ipmi_smi_msg *msg);
-
-/* The lower layer received a watchdog pre-timeout on interface. */
-void ipmi_smi_watchdog_pretimeout(ipmi_smi_t intf);
-
-struct ipmi_smi_msg *ipmi_alloc_smi_msg(void);
-static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg)
-{
- msg->done(msg);
-}
-
-/* Allow the lower layer to add things to the proc filesystem
- directory for this interface. Note that the entry will
- automatically be dstroyed when the interface is destroyed. */
-int ipmi_smi_add_proc_entry(ipmi_smi_t smi, char *name,
- read_proc_t *read_proc, write_proc_t *write_proc,
- void *data, struct module *owner);
-
-#endif /* __LINUX_IPMI_SMI_H */
diff --git a/original/linux/ipsec.h b/original/linux/ipsec.h
deleted file mode 100644
index d17a630..0000000
--- a/original/linux/ipsec.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _LINUX_IPSEC_H
-#define _LINUX_IPSEC_H
-
-/* The definitions, required to talk to KAME racoon IKE. */
-
-#include <linux/pfkeyv2.h>
-
-#define IPSEC_PORT_ANY 0
-#define IPSEC_ULPROTO_ANY 255
-#define IPSEC_PROTO_ANY 255
-
-enum {
- IPSEC_MODE_ANY = 0, /* We do not support this for SA */
- IPSEC_MODE_TRANSPORT = 1,
- IPSEC_MODE_TUNNEL = 2,
- IPSEC_MODE_BEET = 3
-};
-
-enum {
- IPSEC_DIR_ANY = 0,
- IPSEC_DIR_INBOUND = 1,
- IPSEC_DIR_OUTBOUND = 2,
- IPSEC_DIR_FWD = 3, /* It is our own */
- IPSEC_DIR_MAX = 4,
- IPSEC_DIR_INVALID = 5
-};
-
-enum {
- IPSEC_POLICY_DISCARD = 0,
- IPSEC_POLICY_NONE = 1,
- IPSEC_POLICY_IPSEC = 2,
- IPSEC_POLICY_ENTRUST = 3,
- IPSEC_POLICY_BYPASS = 4
-};
-
-enum {
- IPSEC_LEVEL_DEFAULT = 0,
- IPSEC_LEVEL_USE = 1,
- IPSEC_LEVEL_REQUIRE = 2,
- IPSEC_LEVEL_UNIQUE = 3
-};
-
-#define IPSEC_MANUAL_REQID_MAX 0x3fff
-
-#define IPSEC_REPLAYWSIZE 32
-
-#endif /* _LINUX_IPSEC_H */
diff --git a/original/linux/ipv6.h b/original/linux/ipv6.h
deleted file mode 100644
index 8e429d0..0000000
--- a/original/linux/ipv6.h
+++ /dev/null
@@ -1,538 +0,0 @@
-#ifndef _IPV6_H
-#define _IPV6_H
-
-#include <linux/types.h>
-#include <linux/in6.h>
-#include <asm/byteorder.h>
-
-/* The latest drafts declared increase in minimal mtu up to 1280. */
-
-#define IPV6_MIN_MTU 1280
-
-/*
- * Advanced API
- * source interface/address selection, source routing, etc...
- * *under construction*
- */
-
-
-struct in6_pktinfo {
- struct in6_addr ipi6_addr;
- int ipi6_ifindex;
-};
-
-struct ip6_mtuinfo {
- struct sockaddr_in6 ip6m_addr;
- __u32 ip6m_mtu;
-};
-
-struct in6_ifreq {
- struct in6_addr ifr6_addr;
- __u32 ifr6_prefixlen;
- int ifr6_ifindex;
-};
-
-#define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */
-#define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */
-#define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */
-
-/*
- * routing header
- */
-struct ipv6_rt_hdr {
- __u8 nexthdr;
- __u8 hdrlen;
- __u8 type;
- __u8 segments_left;
-
- /*
- * type specific data
- * variable length field
- */
-};
-
-
-struct ipv6_opt_hdr {
- __u8 nexthdr;
- __u8 hdrlen;
- /*
- * TLV encoded option data follows.
- */
-} __attribute__((packed)); /* required for some archs */
-
-#define ipv6_destopt_hdr ipv6_opt_hdr
-#define ipv6_hopopt_hdr ipv6_opt_hdr
-
-#ifdef __KERNEL__
-#define ipv6_optlen(p) (((p)->hdrlen+1) << 3)
-#endif
-
-/*
- * routing header type 0 (used in cmsghdr struct)
- */
-
-struct rt0_hdr {
- struct ipv6_rt_hdr rt_hdr;
- __u32 reserved;
- struct in6_addr addr[0];
-
-#define rt0_type rt_hdr.type
-};
-
-/*
- * routing header type 2
- */
-
-struct rt2_hdr {
- struct ipv6_rt_hdr rt_hdr;
- __u32 reserved;
- struct in6_addr addr;
-
-#define rt2_type rt_hdr.type
-};
-
-/*
- * home address option in destination options header
- */
-
-struct ipv6_destopt_hao {
- __u8 type;
- __u8 length;
- struct in6_addr addr;
-} __attribute__((packed));
-
-/*
- * IPv6 fixed header
- *
- * BEWARE, it is incorrect. The first 4 bits of flow_lbl
- * are glued to priority now, forming "class".
- */
-
-struct ipv6hdr {
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 priority:4,
- version:4;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u8 version:4,
- priority:4;
-#else
-#error "Please fix <asm/byteorder.h>"
-#endif
- __u8 flow_lbl[3];
-
- __be16 payload_len;
- __u8 nexthdr;
- __u8 hop_limit;
-
- struct in6_addr saddr;
- struct in6_addr daddr;
-};
-
-#ifdef __KERNEL__
-/*
- * This structure contains configuration options per IPv6 link.
- */
-struct ipv6_devconf {
- __s32 forwarding;
- __s32 hop_limit;
- __s32 mtu6;
- __s32 accept_ra;
- __s32 accept_redirects;
- __s32 autoconf;
- __s32 dad_transmits;
- __s32 rtr_solicits;
- __s32 rtr_solicit_interval;
- __s32 rtr_solicit_delay;
- __s32 force_mld_version;
-#ifdef CONFIG_IPV6_PRIVACY
- __s32 use_tempaddr;
- __s32 temp_valid_lft;
- __s32 temp_prefered_lft;
- __s32 regen_max_retry;
- __s32 max_desync_factor;
-#endif
- __s32 max_addresses;
- __s32 accept_ra_defrtr;
- __s32 accept_ra_pinfo;
-#ifdef CONFIG_IPV6_ROUTER_PREF
- __s32 accept_ra_rtr_pref;
- __s32 rtr_probe_interval;
-#ifdef CONFIG_IPV6_ROUTE_INFO
- __s32 accept_ra_rt_info_max_plen;
-#endif
-#endif
- __s32 proxy_ndp;
- __s32 accept_source_route;
-#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
- __s32 optimistic_dad;
-#endif
-#ifdef CONFIG_IPV6_MROUTE
- __s32 mc_forwarding;
-#endif
- __s32 disable_ipv6;
- __s32 accept_dad;
- __s32 force_tllao;
- void *sysctl;
-};
-
-struct ipv6_params {
- __s32 disable_ipv6;
- __s32 autoconf;
-};
-extern struct ipv6_params ipv6_defaults;
-#endif
-
-/* index values for the variables in ipv6_devconf */
-enum {
- DEVCONF_FORWARDING = 0,
- DEVCONF_HOPLIMIT,
- DEVCONF_MTU6,
- DEVCONF_ACCEPT_RA,
- DEVCONF_ACCEPT_REDIRECTS,
- DEVCONF_AUTOCONF,
- DEVCONF_DAD_TRANSMITS,
- DEVCONF_RTR_SOLICITS,
- DEVCONF_RTR_SOLICIT_INTERVAL,
- DEVCONF_RTR_SOLICIT_DELAY,
- DEVCONF_USE_TEMPADDR,
- DEVCONF_TEMP_VALID_LFT,
- DEVCONF_TEMP_PREFERED_LFT,
- DEVCONF_REGEN_MAX_RETRY,
- DEVCONF_MAX_DESYNC_FACTOR,
- DEVCONF_MAX_ADDRESSES,
- DEVCONF_FORCE_MLD_VERSION,
- DEVCONF_ACCEPT_RA_DEFRTR,
- DEVCONF_ACCEPT_RA_PINFO,
- DEVCONF_ACCEPT_RA_RTR_PREF,
- DEVCONF_RTR_PROBE_INTERVAL,
- DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
- DEVCONF_PROXY_NDP,
- DEVCONF_OPTIMISTIC_DAD,
- DEVCONF_ACCEPT_SOURCE_ROUTE,
- DEVCONF_MC_FORWARDING,
- DEVCONF_DISABLE_IPV6,
- DEVCONF_ACCEPT_DAD,
- DEVCONF_FORCE_TLLAO,
- DEVCONF_MAX
-};
-
-#ifdef __KERNEL__
-#include <linux/icmpv6.h>
-#include <linux/tcp.h>
-#include <linux/udp.h>
-
-#include <net/inet_sock.h>
-
-static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb)
-{
- return (struct ipv6hdr *)skb_network_header(skb);
-}
-
-static inline struct ipv6hdr *ipipv6_hdr(const struct sk_buff *skb)
-{
- return (struct ipv6hdr *)skb_transport_header(skb);
-}
-
-/*
- This structure contains results of exthdrs parsing
- as offsets from skb->nh.
- */
-
-struct inet6_skb_parm {
- int iif;
- __u16 ra;
- __u16 hop;
- __u16 dst0;
- __u16 srcrt;
- __u16 dst1;
- __u16 lastopt;
- __u16 nhoff;
- __u16 flags;
-#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
- __u16 dsthao;
-#endif
-
-#define IP6SKB_XFRM_TRANSFORMED 1
-#define IP6SKB_FORWARDED 2
-#define IP6SKB_REROUTED 4
-};
-
-#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb))
-#define IP6CBMTU(skb) ((struct ip6_mtuinfo *)((skb)->cb))
-
-static inline int inet6_iif(const struct sk_buff *skb)
-{
- return IP6CB(skb)->iif;
-}
-
-struct inet6_request_sock {
- struct in6_addr loc_addr;
- struct in6_addr rmt_addr;
- struct sk_buff *pktopts;
- int iif;
-};
-
-struct tcp6_request_sock {
- struct tcp_request_sock tcp6rsk_tcp;
- struct inet6_request_sock tcp6rsk_inet6;
-};
-
-struct ipv6_mc_socklist;
-struct ipv6_ac_socklist;
-struct ipv6_fl_socklist;
-
-/**
- * struct ipv6_pinfo - ipv6 private area
- *
- * In the struct sock hierarchy (tcp6_sock, upd6_sock, etc)
- * this _must_ be the last member, so that inet6_sk_generic
- * is able to calculate its offset from the base struct sock
- * by using the struct proto->slab_obj_size member. -acme
- */
-struct ipv6_pinfo {
- struct in6_addr saddr;
- struct in6_addr rcv_saddr;
- struct in6_addr daddr;
- struct in6_pktinfo sticky_pktinfo;
- struct in6_addr *daddr_cache;
-#ifdef CONFIG_IPV6_SUBTREES
- struct in6_addr *saddr_cache;
-#endif
-
- __be32 flow_label;
- __u32 frag_size;
-
- /*
- * Packed in 16bits.
- * Omit one shift by by putting the signed field at MSB.
- */
-#if defined(__BIG_ENDIAN_BITFIELD)
- __s16 hop_limit:9;
- __u16 __unused_1:7;
-#else
- __u16 __unused_1:7;
- __s16 hop_limit:9;
-#endif
-
-#if defined(__BIG_ENDIAN_BITFIELD)
- /* Packed in 16bits. */
- __s16 mcast_hops:9;
- __u16 __unused_2:6,
- mc_loop:1;
-#else
- __u16 mc_loop:1,
- __unused_2:6;
- __s16 mcast_hops:9;
-#endif
- int mcast_oif;
-
- /* pktoption flags */
- union {
- struct {
- __u16 srcrt:1,
- osrcrt:1,
- rxinfo:1,
- rxoinfo:1,
- rxhlim:1,
- rxohlim:1,
- hopopts:1,
- ohopopts:1,
- dstopts:1,
- odstopts:1,
- rxflow:1,
- rxtclass:1,
- rxpmtu:1,
- rxorigdstaddr:1;
- /* 2 bits hole */
- } bits;
- __u16 all;
- } rxopt;
-
- /* sockopt flags */
- __u16 recverr:1,
- sndflow:1,
- pmtudisc:2,
- ipv6only:1,
- srcprefs:3, /* 001: prefer temporary address
- * 010: prefer public address
- * 100: prefer care-of address
- */
- dontfrag:1;
- __u8 min_hopcount;
- __u8 tclass;
- __u8 padding;
-
- __u32 dst_cookie;
-
- struct ipv6_mc_socklist *ipv6_mc_list;
- struct ipv6_ac_socklist *ipv6_ac_list;
- struct ipv6_fl_socklist *ipv6_fl_list;
-
- struct ipv6_txoptions *opt;
- struct sk_buff *pktoptions;
- struct sk_buff *rxpmtu;
- struct {
- struct ipv6_txoptions *opt;
- u8 hop_limit;
- u8 tclass;
- } cork;
-};
-
-/* WARNING: don't change the layout of the members in {raw,udp,tcp}6_sock! */
-struct raw6_sock {
- /* inet_sock has to be the first member of raw6_sock */
- struct inet_sock inet;
- __u32 checksum; /* perform checksum */
- __u32 offset; /* checksum offset */
- struct icmp6_filter filter;
- __u32 ip6mr_table;
- /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */
- struct ipv6_pinfo inet6;
-};
-
-struct udp6_sock {
- struct udp_sock udp;
- /* ipv6_pinfo has to be the last member of udp6_sock, see inet6_sk_generic */
- struct ipv6_pinfo inet6;
-};
-
-struct tcp6_sock {
- struct tcp_sock tcp;
- /* ipv6_pinfo has to be the last member of tcp6_sock, see inet6_sk_generic */
- struct ipv6_pinfo inet6;
-};
-
-extern int inet6_sk_rebuild_header(struct sock *sk);
-
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
-static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
-{
- return inet_sk(__sk)->pinet6;
-}
-
-static inline struct inet6_request_sock *
- inet6_rsk(const struct request_sock *rsk)
-{
- return (struct inet6_request_sock *)(((u8 *)rsk) +
- inet_rsk(rsk)->inet6_rsk_offset);
-}
-
-static inline u32 inet6_rsk_offset(struct request_sock *rsk)
-{
- return rsk->rsk_ops->obj_size - sizeof(struct inet6_request_sock);
-}
-
-static inline struct request_sock *inet6_reqsk_alloc(struct request_sock_ops *ops)
-{
- struct request_sock *req = reqsk_alloc(ops);
-
- if (req != NULL) {
- inet_rsk(req)->inet6_rsk_offset = inet6_rsk_offset(req);
- inet6_rsk(req)->pktopts = NULL;
- }
-
- return req;
-}
-
-static inline struct raw6_sock *raw6_sk(const struct sock *sk)
-{
- return (struct raw6_sock *)sk;
-}
-
-static inline void inet_sk_copy_descendant(struct sock *sk_to,
- const struct sock *sk_from)
-{
- int ancestor_size = sizeof(struct inet_sock);
-
- if (sk_from->sk_family == PF_INET6)
- ancestor_size += sizeof(struct ipv6_pinfo);
-
- __inet_sk_copy_descendant(sk_to, sk_from, ancestor_size);
-}
-
-#define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only)
-#define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk))
-
-struct inet6_timewait_sock {
- struct in6_addr tw_v6_daddr;
- struct in6_addr tw_v6_rcv_saddr;
-};
-
-struct tcp6_timewait_sock {
- struct tcp_timewait_sock tcp6tw_tcp;
- struct inet6_timewait_sock tcp6tw_inet6;
-};
-
-static inline u16 inet6_tw_offset(const struct proto *prot)
-{
- return prot->twsk_prot->twsk_obj_size -
- sizeof(struct inet6_timewait_sock);
-}
-
-static inline struct inet6_timewait_sock *inet6_twsk(const struct sock *sk)
-{
- return (struct inet6_timewait_sock *)(((u8 *)sk) +
- inet_twsk(sk)->tw_ipv6_offset);
-}
-
-static inline struct in6_addr *__inet6_rcv_saddr(const struct sock *sk)
-{
- return likely(sk->sk_state != TCP_TIME_WAIT) ?
- &inet6_sk(sk)->rcv_saddr : &inet6_twsk(sk)->tw_v6_rcv_saddr;
-}
-
-static inline struct in6_addr *inet6_rcv_saddr(const struct sock *sk)
-{
- return sk->sk_family == AF_INET6 ? __inet6_rcv_saddr(sk) : NULL;
-}
-
-static inline int inet_v6_ipv6only(const struct sock *sk)
-{
- return likely(sk->sk_state != TCP_TIME_WAIT) ?
- ipv6_only_sock(sk) : inet_twsk(sk)->tw_ipv6only;
-}
-#else
-#define __ipv6_only_sock(sk) 0
-#define ipv6_only_sock(sk) 0
-
-static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk)
-{
- return NULL;
-}
-
-static inline struct inet6_request_sock *
- inet6_rsk(const struct request_sock *rsk)
-{
- return NULL;
-}
-
-static inline struct raw6_sock *raw6_sk(const struct sock *sk)
-{
- return NULL;
-}
-
-#define __inet6_rcv_saddr(__sk) NULL
-#define inet6_rcv_saddr(__sk) NULL
-#define tcp_twsk_ipv6only(__sk) 0
-#define inet_v6_ipv6only(__sk) 0
-#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
-
-#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\
- (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \
- ((*((__portpair *)&(inet_sk(__sk)->inet_dport))) == (__ports)) && \
- ((__sk)->sk_family == AF_INET6) && \
- ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \
- ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \
- (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
-
-#define INET6_TW_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif) \
- (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \
- (*((__portpair *)&(inet_twsk(__sk)->tw_dport)) == (__ports)) && \
- ((__sk)->sk_family == PF_INET6) && \
- (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_daddr, (__saddr))) && \
- (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_rcv_saddr, (__daddr))) && \
- (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
-
-#endif /* __KERNEL__ */
-
-#endif /* _IPV6_H */
diff --git a/original/linux/ipv6_route.h b/original/linux/ipv6_route.h
deleted file mode 100644
index 1e7d8af..0000000
--- a/original/linux/ipv6_route.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Linux INET6 implementation
- *
- * Authors:
- * Pedro Roque <roque@di.fc.ul.pt>
- *
- * 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.
- */
-
-#ifndef _LINUX_IPV6_ROUTE_H
-#define _LINUX_IPV6_ROUTE_H
-
-#include <linux/types.h>
-
-#define RTF_DEFAULT 0x00010000 /* default - learned via ND */
-#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed)
- fallback, no routers on link */
-#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */
-#define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */
-#define RTF_ANYCAST 0x00100000 /* Anycast */
-
-#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */
-#define RTF_EXPIRES 0x00400000
-
-#define RTF_ROUTEINFO 0x00800000 /* route information - RA */
-
-#define RTF_CACHE 0x01000000 /* cache entry */
-#define RTF_FLOW 0x02000000 /* flow significant route */
-#define RTF_POLICY 0x04000000 /* policy route */
-
-#define RTF_PREF(pref) ((pref) << 27)
-#define RTF_PREF_MASK 0x18000000
-
-#define RTF_LOCAL 0x80000000
-
-#ifdef __KERNEL__
-#define IPV6_EXTRACT_PREF(flag) (((flag) & RTF_PREF_MASK) >> 27)
-#define IPV6_DECODE_PREF(pref) ((pref) ^ 2) /* 1:low,2:med,3:high */
-#endif
-
-struct in6_rtmsg {
- struct in6_addr rtmsg_dst;
- struct in6_addr rtmsg_src;
- struct in6_addr rtmsg_gateway;
- __u32 rtmsg_type;
- __u16 rtmsg_dst_len;
- __u16 rtmsg_src_len;
- __u32 rtmsg_metric;
- unsigned long rtmsg_info;
- __u32 rtmsg_flags;
- int rtmsg_ifindex;
-};
-
-#define RTMSG_NEWDEVICE 0x11
-#define RTMSG_DELDEVICE 0x12
-#define RTMSG_NEWROUTE 0x21
-#define RTMSG_DELROUTE 0x22
-
-#endif
diff --git a/original/linux/ipx.h b/original/linux/ipx.h
deleted file mode 100644
index 4f29c60..0000000
--- a/original/linux/ipx.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef _IPX_H_
-#define _IPX_H_
-#include <linux/sockios.h>
-#include <linux/socket.h>
-#define IPX_NODE_LEN 6
-#define IPX_MTU 576
-
-struct sockaddr_ipx {
- sa_family_t sipx_family;
- __u16 sipx_port;
- __u32 sipx_network;
- unsigned char sipx_node[IPX_NODE_LEN];
- __u8 sipx_type;
- unsigned char sipx_zero; /* 16 byte fill */
-};
-
-/*
- * So we can fit the extra info for SIOCSIFADDR into the address nicely
- */
-#define sipx_special sipx_port
-#define sipx_action sipx_zero
-#define IPX_DLTITF 0
-#define IPX_CRTITF 1
-
-struct ipx_route_definition {
- __u32 ipx_network;
- __u32 ipx_router_network;
- unsigned char ipx_router_node[IPX_NODE_LEN];
-};
-
-struct ipx_interface_definition {
- __u32 ipx_network;
- unsigned char ipx_device[16];
- unsigned char ipx_dlink_type;
-#define IPX_FRAME_NONE 0
-#define IPX_FRAME_SNAP 1
-#define IPX_FRAME_8022 2
-#define IPX_FRAME_ETHERII 3
-#define IPX_FRAME_8023 4
-#define IPX_FRAME_TR_8022 5 /* obsolete */
- unsigned char ipx_special;
-#define IPX_SPECIAL_NONE 0
-#define IPX_PRIMARY 1
-#define IPX_INTERNAL 2
- unsigned char ipx_node[IPX_NODE_LEN];
-};
-
-struct ipx_config_data {
- unsigned char ipxcfg_auto_select_primary;
- unsigned char ipxcfg_auto_create_interfaces;
-};
-
-/*
- * OLD Route Definition for backward compatibility.
- */
-
-struct ipx_route_def {
- __u32 ipx_network;
- __u32 ipx_router_network;
-#define IPX_ROUTE_NO_ROUTER 0
- unsigned char ipx_router_node[IPX_NODE_LEN];
- unsigned char ipx_device[16];
- unsigned short ipx_flags;
-#define IPX_RT_SNAP 8
-#define IPX_RT_8022 4
-#define IPX_RT_BLUEBOOK 2
-#define IPX_RT_ROUTED 1
-};
-
-#define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
-#define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1)
-#define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2)
-#define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3)
-#endif /* _IPX_H_ */
diff --git a/original/linux/irq.h b/original/linux/irq.h
deleted file mode 100644
index fbf6d90..0000000
--- a/original/linux/irq.h
+++ /dev/null
@@ -1,411 +0,0 @@
-#ifndef _LINUX_IRQ_H
-#define _LINUX_IRQ_H
-
-/*
- * Please do not include this file in generic code. There is currently
- * no requirement for any architecture to implement anything held
- * within this file.
- *
- * Thanks. --rmk
- */
-
-#include <linux/smp.h>
-
-#ifndef CONFIG_S390
-
-#include <linux/linkage.h>
-#include <linux/cache.h>
-#include <linux/spinlock.h>
-#include <linux/cpumask.h>
-#include <linux/irqreturn.h>
-
-#include <asm/irq.h>
-#include <asm/ptrace.h>
-
-/*
- * IRQ line status.
- *
- * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h
- *
- * IRQ types
- */
-#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */
-#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */
-#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */
-#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
-#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */
-#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */
-#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */
-#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */
-
-/* Internal flags */
-#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */
-#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */
-#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */
-#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */
-#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */
-#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */
-#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */
-#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */
-#define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */
-#ifdef CONFIG_IRQ_PER_CPU
-# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
-#else
-# define CHECK_IRQ_PER_CPU(var) 0
-#endif
-
-#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */
-#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */
-#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */
-#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */
-#define IRQ_WAKEUP 0x20000000 /* IRQ triggers system wakeup */
-
-struct proc_dir_entry;
-
-/**
- * struct irq_chip - hardware interrupt chip descriptor
- *
- * @name: name for /proc/interrupts
- * @startup: start up the interrupt (defaults to ->enable if NULL)
- * @shutdown: shut down the interrupt (defaults to ->disable if NULL)
- * @enable: enable the interrupt (defaults to chip->unmask if NULL)
- * @disable: disable the interrupt (defaults to chip->mask if NULL)
- * @ack: start of a new interrupt
- * @mask: mask an interrupt source
- * @mask_ack: ack and mask an interrupt source
- * @unmask: unmask an interrupt source
- * @eoi: end of interrupt - chip level
- * @end: end of interrupt - flow level
- * @set_affinity: set the CPU affinity on SMP machines
- * @retrigger: resend an IRQ to the CPU
- * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ
- * @set_wake: enable/disable power-management wake-on of an IRQ
- *
- * @release: release function solely used by UML
- * @typename: obsoleted by name, kept as migration helper
- */
-struct irq_chip {
- const char *name;
- unsigned int (*startup)(unsigned int irq);
- void (*shutdown)(unsigned int irq);
- void (*enable)(unsigned int irq);
- void (*disable)(unsigned int irq);
-
- void (*ack)(unsigned int irq);
- void (*mask)(unsigned int irq);
- void (*mask_ack)(unsigned int irq);
- void (*unmask)(unsigned int irq);
- void (*eoi)(unsigned int irq);
-
- void (*end)(unsigned int irq);
- void (*set_affinity)(unsigned int irq, cpumask_t dest);
- int (*retrigger)(unsigned int irq);
- int (*set_type)(unsigned int irq, unsigned int flow_type);
- int (*set_wake)(unsigned int irq, unsigned int on);
-
- /* Currently used only by UML, might disappear one day.*/
-#ifdef CONFIG_IRQ_RELEASE_METHOD
- void (*release)(unsigned int irq, void *dev_id);
-#endif
- /*
- * For compatibility, ->typename is copied into ->name.
- * Will disappear.
- */
- const char *typename;
-};
-
-/**
- * struct irq_desc - interrupt descriptor
- *
- * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()]
- * @chip: low level interrupt hardware access
- * @handler_data: per-IRQ data for the irq_chip methods
- * @chip_data: platform-specific per-chip private data for the chip
- * methods, to allow shared chip implementations
- * @action: the irq action chain
- * @status: status information
- * @depth: disable-depth, for nested irq_disable() calls
- * @wake_depth: enable depth, for multiple set_irq_wake() callers
- * @irq_count: stats field to detect stalled irqs
- * @irqs_unhandled: stats field for spurious unhandled interrupts
- * @lock: locking for SMP
- * @affinity: IRQ affinity on SMP
- * @cpu: cpu index useful for balancing
- * @pending_mask: pending rebalanced interrupts
- * @move_irq: need to re-target IRQ destination
- * @dir: /proc/irq/ procfs entry
- * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP
- *
- * Pad this out to 32 bytes for cache and indexing reasons.
- */
-struct irq_desc {
- void fastcall (*handle_irq)(unsigned int irq,
- struct irq_desc *desc,
- struct pt_regs *regs);
- struct irq_chip *chip;
- void *handler_data;
- void *chip_data;
- struct irqaction *action; /* IRQ action list */
- unsigned int status; /* IRQ status */
-
- unsigned int depth; /* nested irq disables */
- unsigned int wake_depth; /* nested wake enables */
- unsigned int irq_count; /* For detecting broken IRQs */
- unsigned int irqs_unhandled;
- spinlock_t lock;
-#ifdef CONFIG_SMP
- cpumask_t affinity;
- unsigned int cpu;
-#endif
-#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
- cpumask_t pending_mask;
- unsigned int move_irq; /* need to re-target IRQ dest */
-#endif
-#ifdef CONFIG_PROC_FS
- struct proc_dir_entry *dir;
-#endif
-} ____cacheline_aligned;
-
-extern struct irq_desc irq_desc[NR_IRQS];
-
-/*
- * Migration helpers for obsolete names, they will go away:
- */
-#define hw_interrupt_type irq_chip
-typedef struct irq_chip hw_irq_controller;
-#define no_irq_type no_irq_chip
-typedef struct irq_desc irq_desc_t;
-
-/*
- * Pick up the arch-dependent methods:
- */
-#include <asm/hw_irq.h>
-
-extern int setup_irq(unsigned int irq, struct irqaction *new);
-
-#ifdef CONFIG_GENERIC_HARDIRQS
-
-#ifndef handle_dynamic_tick
-# define handle_dynamic_tick(a) do { } while (0)
-#endif
-
-#ifdef CONFIG_SMP
-static inline void set_native_irq_info(int irq, cpumask_t mask)
-{
- irq_desc[irq].affinity = mask;
-}
-#else
-static inline void set_native_irq_info(int irq, cpumask_t mask)
-{
-}
-#endif
-
-#ifdef CONFIG_SMP
-
-#if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE)
-
-void set_pending_irq(unsigned int irq, cpumask_t mask);
-void move_native_irq(int irq);
-
-#ifdef CONFIG_PCI_MSI
-/*
- * Wonder why these are dummies?
- * For e.g the set_ioapic_affinity_vector() calls the set_ioapic_affinity_irq()
- * counter part after translating the vector to irq info. We need to perform
- * this operation on the real irq, when we dont use vector, i.e when
- * pci_use_vector() is false.
- */
-static inline void move_irq(int irq)
-{
-}
-
-static inline void set_irq_info(int irq, cpumask_t mask)
-{
-}
-
-#else /* CONFIG_PCI_MSI */
-
-static inline void move_irq(int irq)
-{
- move_native_irq(irq);
-}
-
-static inline void set_irq_info(int irq, cpumask_t mask)
-{
- set_native_irq_info(irq, mask);
-}
-
-#endif /* CONFIG_PCI_MSI */
-
-#else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */
-
-static inline void move_irq(int irq)
-{
-}
-
-static inline void move_native_irq(int irq)
-{
-}
-
-static inline void set_pending_irq(unsigned int irq, cpumask_t mask)
-{
-}
-
-static inline void set_irq_info(int irq, cpumask_t mask)
-{
- set_native_irq_info(irq, mask);
-}
-
-#endif /* CONFIG_GENERIC_PENDING_IRQ */
-
-#else /* CONFIG_SMP */
-
-#define move_irq(x)
-#define move_native_irq(x)
-
-#endif /* CONFIG_SMP */
-
-#ifdef CONFIG_IRQBALANCE
-extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask);
-#else
-static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask)
-{
-}
-#endif
-
-#ifdef CONFIG_AUTO_IRQ_AFFINITY
-extern int select_smp_affinity(unsigned int irq);
-#else
-static inline int select_smp_affinity(unsigned int irq)
-{
- return 1;
-}
-#endif
-
-extern int no_irq_affinity;
-
-/* Handle irq action chains: */
-extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
- struct irqaction *action);
-
-/*
- * Built-in IRQ handlers for various IRQ types,
- * callable via desc->chip->handle_irq()
- */
-extern void fastcall
-handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
-extern void fastcall
-handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs);
-extern void fastcall
-handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
-extern void fastcall
-handle_simple_irq(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs);
-extern void fastcall
-handle_percpu_irq(unsigned int irq, struct irq_desc *desc,
- struct pt_regs *regs);
-extern void fastcall
-handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs);
-
-/*
- * Get a descriptive string for the highlevel handler, for
- * /proc/interrupts output:
- */
-extern const char *
-handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *,
- struct pt_regs *));
-
-/*
- * Monolithic do_IRQ implementation.
- * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly)
- */
-extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs);
-
-/*
- * Architectures call this to let the generic IRQ layer
- * handle an interrupt. If the descriptor is attached to an
- * irqchip-style controller then we call the ->handle_irq() handler,
- * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
- */
-static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs)
-{
- struct irq_desc *desc = irq_desc + irq;
-
- if (likely(desc->handle_irq))
- desc->handle_irq(irq, desc, regs);
- else
- __do_IRQ(irq, regs);
-}
-
-/* Handling of unhandled and spurious interrupts: */
-extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
- int action_ret, struct pt_regs *regs);
-
-/* Resending of interrupts :*/
-void check_irq_resend(struct irq_desc *desc, unsigned int irq);
-
-/* Initialize /proc/irq/ */
-extern void init_irq_proc(void);
-
-/* Enable/disable irq debugging output: */
-extern int noirqdebug_setup(char *str);
-
-/* Checks whether the interrupt can be requested by request_irq(): */
-extern int can_request_irq(unsigned int irq, unsigned long irqflags);
-
-/* Dummy irq-chip implementations: */
-extern struct irq_chip no_irq_chip;
-extern struct irq_chip dummy_irq_chip;
-
-extern void
-set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
- void fastcall (*handle)(unsigned int,
- struct irq_desc *,
- struct pt_regs *));
-extern void
-__set_irq_handler(unsigned int irq,
- void fastcall (*handle)(unsigned int, struct irq_desc *,
- struct pt_regs *),
- int is_chained);
-
-/*
- * Set a highlevel flow handler for a given IRQ:
- */
-static inline void
-set_irq_handler(unsigned int irq,
- void fastcall (*handle)(unsigned int, struct irq_desc *,
- struct pt_regs *))
-{
- __set_irq_handler(irq, handle, 0);
-}
-
-/*
- * Set a highlevel chained flow handler for a given IRQ.
- * (a chained handler is automatically enabled and set to
- * IRQ_NOREQUEST and IRQ_NOPROBE)
- */
-static inline void
-set_irq_chained_handler(unsigned int irq,
- void fastcall (*handle)(unsigned int, struct irq_desc *,
- struct pt_regs *))
-{
- __set_irq_handler(irq, handle, 1);
-}
-
-/* Set/get chip/data for an IRQ: */
-
-extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
-extern int set_irq_data(unsigned int irq, void *data);
-extern int set_irq_chip_data(unsigned int irq, void *data);
-extern int set_irq_type(unsigned int irq, unsigned int type);
-
-#define get_irq_chip(irq) (irq_desc[irq].chip)
-#define get_irq_chip_data(irq) (irq_desc[irq].chip_data)
-#define get_irq_data(irq) (irq_desc[irq].handler_data)
-
-#endif /* CONFIG_GENERIC_HARDIRQS */
-
-#endif /* !CONFIG_S390 */
-
-#endif /* _LINUX_IRQ_H */
diff --git a/original/linux/irq_cpustat.h b/original/linux/irq_cpustat.h
deleted file mode 100644
index 77e4bac..0000000
--- a/original/linux/irq_cpustat.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __irq_cpustat_h
-#define __irq_cpustat_h
-
-/*
- * Contains default mappings for irq_cpustat_t, used by almost every
- * architecture. Some arch (like s390) have per cpu hardware pages and
- * they define their own mappings for irq_stat.
- *
- * Keith Owens <kaos@ocs.com.au> July 2000.
- */
-
-
-/*
- * Simple wrappers reducing source bloat. Define all irq_stat fields
- * here, even ones that are arch dependent. That way we get common
- * definitions instead of differing sets for each arch.
- */
-
-#ifndef __ARCH_IRQ_STAT
-extern irq_cpustat_t irq_stat[]; /* defined in asm/hardirq.h */
-#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
-#endif
-
- /* arch independent irq_stat fields */
-#define local_softirq_pending() \
- __IRQ_STAT(smp_processor_id(), __softirq_pending)
-
- /* arch dependent irq_stat fields */
-#define nmi_count(cpu) __IRQ_STAT((cpu), __nmi_count) /* i386 */
-
-#endif /* __irq_cpustat_h */
diff --git a/original/linux/irqflags.h b/original/linux/irqflags.h
deleted file mode 100644
index 412e025..0000000
--- a/original/linux/irqflags.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * include/linux/irqflags.h
- *
- * IRQ flags tracing: follow the state of the hardirq and softirq flags and
- * provide callbacks for transitions between ON and OFF states.
- *
- * This file gets included from lowlevel asm headers too, to provide
- * wrapped versions of the local_irq_*() APIs, based on the
- * raw_local_irq_*() macros from the lowlevel headers.
- */
-#ifndef _LINUX_TRACE_IRQFLAGS_H
-#define _LINUX_TRACE_IRQFLAGS_H
-
-#ifdef CONFIG_TRACE_IRQFLAGS
- extern void trace_hardirqs_on(void);
- extern void trace_hardirqs_off(void);
- extern void trace_softirqs_on(unsigned long ip);
- extern void trace_softirqs_off(unsigned long ip);
-# define trace_hardirq_context(p) ((p)->hardirq_context)
-# define trace_softirq_context(p) ((p)->softirq_context)
-# define trace_hardirqs_enabled(p) ((p)->hardirqs_enabled)
-# define trace_softirqs_enabled(p) ((p)->softirqs_enabled)
-# define trace_hardirq_enter() do { current->hardirq_context++; } while (0)
-# define trace_hardirq_exit() do { current->hardirq_context--; } while (0)
-# define trace_softirq_enter() do { current->softirq_context++; } while (0)
-# define trace_softirq_exit() do { current->softirq_context--; } while (0)
-# define INIT_TRACE_IRQFLAGS .softirqs_enabled = 1,
-#else
-# define trace_hardirqs_on() do { } while (0)
-# define trace_hardirqs_off() do { } while (0)
-# define trace_softirqs_on(ip) do { } while (0)
-# define trace_softirqs_off(ip) do { } while (0)
-# define trace_hardirq_context(p) 0
-# define trace_softirq_context(p) 0
-# define trace_hardirqs_enabled(p) 0
-# define trace_softirqs_enabled(p) 0
-# define trace_hardirq_enter() do { } while (0)
-# define trace_hardirq_exit() do { } while (0)
-# define trace_softirq_enter() do { } while (0)
-# define trace_softirq_exit() do { } while (0)
-# define INIT_TRACE_IRQFLAGS
-#endif
-
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
-
-#include <asm/irqflags.h>
-
-#define local_irq_enable() \
- do { trace_hardirqs_on(); raw_local_irq_enable(); } while (0)
-#define local_irq_disable() \
- do { raw_local_irq_disable(); trace_hardirqs_off(); } while (0)
-#define local_irq_save(flags) \
- do { raw_local_irq_save(flags); trace_hardirqs_off(); } while (0)
-
-#define local_irq_restore(flags) \
- do { \
- if (raw_irqs_disabled_flags(flags)) { \
- raw_local_irq_restore(flags); \
- trace_hardirqs_off(); \
- } else { \
- trace_hardirqs_on(); \
- raw_local_irq_restore(flags); \
- } \
- } while (0)
-#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
-/*
- * The local_irq_*() APIs are equal to the raw_local_irq*()
- * if !TRACE_IRQFLAGS.
- */
-# define raw_local_irq_disable() local_irq_disable()
-# define raw_local_irq_enable() local_irq_enable()
-# define raw_local_irq_save(flags) local_irq_save(flags)
-# define raw_local_irq_restore(flags) local_irq_restore(flags)
-#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
-
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
-#define safe_halt() \
- do { \
- trace_hardirqs_on(); \
- raw_safe_halt(); \
- } while (0)
-
-#define local_save_flags(flags) raw_local_save_flags(flags)
-
-#define irqs_disabled() \
-({ \
- unsigned long flags; \
- \
- raw_local_save_flags(flags); \
- raw_irqs_disabled_flags(flags); \
-})
-
-#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
-#endif /* CONFIG_X86 */
-
-#endif
diff --git a/original/linux/irqreturn.h b/original/linux/irqreturn.h
deleted file mode 100644
index 881883c..0000000
--- a/original/linux/irqreturn.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* irqreturn.h */
-#ifndef _LINUX_IRQRETURN_H
-#define _LINUX_IRQRETURN_H
-
-/*
- * For 2.4.x compatibility, 2.4.x can use
- *
- * typedef void irqreturn_t;
- * #define IRQ_NONE
- * #define IRQ_HANDLED
- * #define IRQ_RETVAL(x)
- *
- * To mix old-style and new-style irq handler returns.
- *
- * IRQ_NONE means we didn't handle it.
- * IRQ_HANDLED means that we did have a valid interrupt and handled it.
- * IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
- */
-typedef int irqreturn_t;
-
-#define IRQ_NONE (0)
-#define IRQ_HANDLED (1)
-#define IRQ_RETVAL(x) ((x) != 0)
-
-#endif
diff --git a/original/linux/jbd.h b/original/linux/jbd.h
deleted file mode 100644
index a04c154..0000000
--- a/original/linux/jbd.h
+++ /dev/null
@@ -1,1099 +0,0 @@
-/*
- * linux/include/linux/jbd.h
- *
- * Written by Stephen C. Tweedie <sct@redhat.com>
- *
- * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved
- *
- * This file is part of the Linux kernel and is made available under
- * the terms of the GNU General Public License, version 2, or at your
- * option, any later version, incorporated herein by reference.
- *
- * Definitions for transaction data structures for the buffer cache
- * filesystem journaling support.
- */
-
-#ifndef _LINUX_JBD_H
-#define _LINUX_JBD_H
-
-/* Allow this file to be included directly into e2fsprogs */
-#ifndef __KERNEL__
-#include "jfs_compat.h"
-#define JFS_DEBUG
-#define jfs_debug jbd_debug
-#else
-
-#include <linux/types.h>
-#include <linux/buffer_head.h>
-#include <linux/journal-head.h>
-#include <linux/stddef.h>
-#include <linux/bit_spinlock.h>
-#include <linux/mutex.h>
-#include <linux/timer.h>
-
-#include <asm/semaphore.h>
-#endif
-
-#define journal_oom_retry 1
-
-/*
- * Define JBD_PARANIOD_IOFAIL to cause a kernel BUG() if ext3 finds
- * certain classes of error which can occur due to failed IOs. Under
- * normal use we want ext3 to continue after such errors, because
- * hardware _can_ fail, but for debugging purposes when running tests on
- * known-good hardware we may want to trap these errors.
- */
-#undef JBD_PARANOID_IOFAIL
-
-/*
- * The default maximum commit age, in seconds.
- */
-#define JBD_DEFAULT_MAX_COMMIT_AGE 5
-
-#ifdef CONFIG_JBD_DEBUG
-/*
- * Define JBD_EXPENSIVE_CHECKING to enable more expensive internal
- * consistency checks. By default we don't do this unless
- * CONFIG_JBD_DEBUG is on.
- */
-#define JBD_EXPENSIVE_CHECKING
-extern int journal_enable_debug;
-
-#define jbd_debug(n, f, a...) \
- do { \
- if ((n) <= journal_enable_debug) { \
- printk (KERN_DEBUG "(%s, %d): %s: ", \
- __FILE__, __LINE__, __FUNCTION__); \
- printk (f, ## a); \
- } \
- } while (0)
-#else
-#define jbd_debug(f, a...) /**/
-#endif
-
-extern void * __jbd_kmalloc (const char *where, size_t size, gfp_t flags, int retry);
-extern void * jbd_slab_alloc(size_t size, gfp_t flags);
-extern void jbd_slab_free(void *ptr, size_t size);
-
-#define jbd_kmalloc(size, flags) \
- __jbd_kmalloc(__FUNCTION__, (size), (flags), journal_oom_retry)
-#define jbd_rep_kmalloc(size, flags) \
- __jbd_kmalloc(__FUNCTION__, (size), (flags), 1)
-
-#define JFS_MIN_JOURNAL_BLOCKS 1024
-
-#ifdef __KERNEL__
-
-/**
- * typedef handle_t - The handle_t type represents a single atomic update being performed by some process.
- *
- * All filesystem modifications made by the process go
- * through this handle. Recursive operations (such as quota operations)
- * are gathered into a single update.
- *
- * The buffer credits field is used to account for journaled buffers
- * being modified by the running process. To ensure that there is
- * enough log space for all outstanding operations, we need to limit the
- * number of outstanding buffers possible at any time. When the
- * operation completes, any buffer credits not used are credited back to
- * the transaction, so that at all times we know how many buffers the
- * outstanding updates on a transaction might possibly touch.
- *
- * This is an opaque datatype.
- **/
-typedef struct handle_s handle_t; /* Atomic operation type */
-
-
-/**
- * typedef journal_t - The journal_t maintains all of the journaling state information for a single filesystem.
- *
- * journal_t is linked to from the fs superblock structure.
- *
- * We use the journal_t to keep track of all outstanding transaction
- * activity on the filesystem, and to manage the state of the log
- * writing process.
- *
- * This is an opaque datatype.
- **/
-typedef struct journal_s journal_t; /* Journal control structure */
-#endif
-
-/*
- * Internal structures used by the logging mechanism:
- */
-
-#define JFS_MAGIC_NUMBER 0xc03b3998U /* The first 4 bytes of /dev/random! */
-
-/*
- * On-disk structures
- */
-
-/*
- * Descriptor block types:
- */
-
-#define JFS_DESCRIPTOR_BLOCK 1
-#define JFS_COMMIT_BLOCK 2
-#define JFS_SUPERBLOCK_V1 3
-#define JFS_SUPERBLOCK_V2 4
-#define JFS_REVOKE_BLOCK 5
-
-/*
- * Standard header for all descriptor blocks:
- */
-typedef struct journal_header_s
-{
- __be32 h_magic;
- __be32 h_blocktype;
- __be32 h_sequence;
-} journal_header_t;
-
-
-/*
- * The block tag: used to describe a single buffer in the journal
- */
-typedef struct journal_block_tag_s
-{
- __be32 t_blocknr; /* The on-disk block number */
- __be32 t_flags; /* See below */
-} journal_block_tag_t;
-
-/*
- * The revoke descriptor: used on disk to describe a series of blocks to
- * be revoked from the log
- */
-typedef struct journal_revoke_header_s
-{
- journal_header_t r_header;
- __be32 r_count; /* Count of bytes used in the block */
-} journal_revoke_header_t;
-
-
-/* Definitions for the journal tag flags word: */
-#define JFS_FLAG_ESCAPE 1 /* on-disk block is escaped */
-#define JFS_FLAG_SAME_UUID 2 /* block has same uuid as previous */
-#define JFS_FLAG_DELETED 4 /* block deleted by this transaction */
-#define JFS_FLAG_LAST_TAG 8 /* last tag in this descriptor block */
-
-
-/*
- * The journal superblock. All fields are in big-endian byte order.
- */
-typedef struct journal_superblock_s
-{
-/* 0x0000 */
- journal_header_t s_header;
-
-/* 0x000C */
- /* Static information describing the journal */
- __be32 s_blocksize; /* journal device blocksize */
- __be32 s_maxlen; /* total blocks in journal file */
- __be32 s_first; /* first block of log information */
-
-/* 0x0018 */
- /* Dynamic information describing the current state of the log */
- __be32 s_sequence; /* first commit ID expected in log */
- __be32 s_start; /* blocknr of start of log */
-
-/* 0x0020 */
- /* Error value, as set by journal_abort(). */
- __be32 s_errno;
-
-/* 0x0024 */
- /* Remaining fields are only valid in a version-2 superblock */
- __be32 s_feature_compat; /* compatible feature set */
- __be32 s_feature_incompat; /* incompatible feature set */
- __be32 s_feature_ro_compat; /* readonly-compatible feature set */
-/* 0x0030 */
- __u8 s_uuid[16]; /* 128-bit uuid for journal */
-
-/* 0x0040 */
- __be32 s_nr_users; /* Nr of filesystems sharing log */
-
- __be32 s_dynsuper; /* Blocknr of dynamic superblock copy*/
-
-/* 0x0048 */
- __be32 s_max_transaction; /* Limit of journal blocks per trans.*/
- __be32 s_max_trans_data; /* Limit of data blocks per trans. */
-
-/* 0x0050 */
- __u32 s_padding[44];
-
-/* 0x0100 */
- __u8 s_users[16*48]; /* ids of all fs'es sharing the log */
-/* 0x0400 */
-} journal_superblock_t;
-
-#define JFS_HAS_COMPAT_FEATURE(j,mask) \
- ((j)->j_format_version >= 2 && \
- ((j)->j_superblock->s_feature_compat & cpu_to_be32((mask))))
-#define JFS_HAS_RO_COMPAT_FEATURE(j,mask) \
- ((j)->j_format_version >= 2 && \
- ((j)->j_superblock->s_feature_ro_compat & cpu_to_be32((mask))))
-#define JFS_HAS_INCOMPAT_FEATURE(j,mask) \
- ((j)->j_format_version >= 2 && \
- ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
-
-#define JFS_FEATURE_INCOMPAT_REVOKE 0x00000001
-
-/* Features known to this kernel version: */
-#define JFS_KNOWN_COMPAT_FEATURES 0
-#define JFS_KNOWN_ROCOMPAT_FEATURES 0
-#define JFS_KNOWN_INCOMPAT_FEATURES JFS_FEATURE_INCOMPAT_REVOKE
-
-#ifdef __KERNEL__
-
-#include <linux/fs.h>
-#include <linux/sched.h>
-
-#define JBD_ASSERTIONS
-#ifdef JBD_ASSERTIONS
-#define J_ASSERT(assert) \
-do { \
- if (!(assert)) { \
- printk (KERN_EMERG \
- "Assertion failure in %s() at %s:%d: \"%s\"\n", \
- __FUNCTION__, __FILE__, __LINE__, # assert); \
- BUG(); \
- } \
-} while (0)
-
-#if defined(CONFIG_BUFFER_DEBUG)
-void buffer_assertion_failure(struct buffer_head *bh);
-#define J_ASSERT_BH(bh, expr) \
- do { \
- if (!(expr)) \
- buffer_assertion_failure(bh); \
- J_ASSERT(expr); \
- } while (0)
-#define J_ASSERT_JH(jh, expr) J_ASSERT_BH(jh2bh(jh), expr)
-#else
-#define J_ASSERT_BH(bh, expr) J_ASSERT(expr)
-#define J_ASSERT_JH(jh, expr) J_ASSERT(expr)
-#endif
-
-#else
-#define J_ASSERT(assert) do { } while (0)
-#endif /* JBD_ASSERTIONS */
-
-#if defined(JBD_PARANOID_IOFAIL)
-#define J_EXPECT(expr, why...) J_ASSERT(expr)
-#define J_EXPECT_BH(bh, expr, why...) J_ASSERT_BH(bh, expr)
-#define J_EXPECT_JH(jh, expr, why...) J_ASSERT_JH(jh, expr)
-#else
-#define __journal_expect(expr, why...) \
- ({ \
- int val = (expr); \
- if (!val) { \
- printk(KERN_ERR \
- "EXT3-fs unexpected failure: %s;\n",# expr); \
- printk(KERN_ERR why "\n"); \
- } \
- val; \
- })
-#define J_EXPECT(expr, why...) __journal_expect(expr, ## why)
-#define J_EXPECT_BH(bh, expr, why...) __journal_expect(expr, ## why)
-#define J_EXPECT_JH(jh, expr, why...) __journal_expect(expr, ## why)
-#endif
-
-enum jbd_state_bits {
- BH_JBD /* Has an attached ext3 journal_head */
- = BH_PrivateStart,
- BH_JWrite, /* Being written to log (@@@ DEBUGGING) */
- BH_Freed, /* Has been freed (truncated) */
- BH_Revoked, /* Has been revoked from the log */
- BH_RevokeValid, /* Revoked flag is valid */
- BH_JBDDirty, /* Is dirty but journaled */
- BH_State, /* Pins most journal_head state */
- BH_JournalHead, /* Pins bh->b_private and jh->b_bh */
- BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */
-};
-
-BUFFER_FNS(JBD, jbd)
-BUFFER_FNS(JWrite, jwrite)
-BUFFER_FNS(JBDDirty, jbddirty)
-TAS_BUFFER_FNS(JBDDirty, jbddirty)
-BUFFER_FNS(Revoked, revoked)
-TAS_BUFFER_FNS(Revoked, revoked)
-BUFFER_FNS(RevokeValid, revokevalid)
-TAS_BUFFER_FNS(RevokeValid, revokevalid)
-BUFFER_FNS(Freed, freed)
-
-static inline struct buffer_head *jh2bh(struct journal_head *jh)
-{
- return jh->b_bh;
-}
-
-static inline struct journal_head *bh2jh(struct buffer_head *bh)
-{
- return bh->b_private;
-}
-
-static inline void jbd_lock_bh_state(struct buffer_head *bh)
-{
- bit_spin_lock(BH_State, &bh->b_state);
-}
-
-static inline int jbd_trylock_bh_state(struct buffer_head *bh)
-{
- return bit_spin_trylock(BH_State, &bh->b_state);
-}
-
-static inline int jbd_is_locked_bh_state(struct buffer_head *bh)
-{
- return bit_spin_is_locked(BH_State, &bh->b_state);
-}
-
-static inline void jbd_unlock_bh_state(struct buffer_head *bh)
-{
- bit_spin_unlock(BH_State, &bh->b_state);
-}
-
-static inline void jbd_lock_bh_journal_head(struct buffer_head *bh)
-{
- bit_spin_lock(BH_JournalHead, &bh->b_state);
-}
-
-static inline void jbd_unlock_bh_journal_head(struct buffer_head *bh)
-{
- bit_spin_unlock(BH_JournalHead, &bh->b_state);
-}
-
-struct jbd_revoke_table_s;
-
-/**
- * struct handle_s - The handle_s type is the concrete type associated with
- * handle_t.
- * @h_transaction: Which compound transaction is this update a part of?
- * @h_buffer_credits: Number of remaining buffers we are allowed to dirty.
- * @h_ref: Reference count on this handle
- * @h_err: Field for caller's use to track errors through large fs operations
- * @h_sync: flag for sync-on-close
- * @h_jdata: flag to force data journaling
- * @h_aborted: flag indicating fatal error on handle
- **/
-
-/* Docbook can't yet cope with the bit fields, but will leave the documentation
- * in so it can be fixed later.
- */
-
-struct handle_s
-{
- /* Which compound transaction is this update a part of? */
- transaction_t *h_transaction;
-
- /* Number of remaining buffers we are allowed to dirty: */
- int h_buffer_credits;
-
- /* Reference count on this handle */
- int h_ref;
-
- /* Field for caller's use to track errors through large fs */
- /* operations */
- int h_err;
-
- /* Flags [no locking] */
- unsigned int h_sync: 1; /* sync-on-close */
- unsigned int h_jdata: 1; /* force data journaling */
- unsigned int h_aborted: 1; /* fatal error on handle */
-};
-
-
-/* The transaction_t type is the guts of the journaling mechanism. It
- * tracks a compound transaction through its various states:
- *
- * RUNNING: accepting new updates
- * LOCKED: Updates still running but we don't accept new ones
- * RUNDOWN: Updates are tidying up but have finished requesting
- * new buffers to modify (state not used for now)
- * FLUSH: All updates complete, but we are still writing to disk
- * COMMIT: All data on disk, writing commit record
- * FINISHED: We still have to keep the transaction for checkpointing.
- *
- * The transaction keeps track of all of the buffers modified by a
- * running transaction, and all of the buffers committed but not yet
- * flushed to home for finished transactions.
- */
-
-/*
- * Lock ranking:
- *
- * j_list_lock
- * ->jbd_lock_bh_journal_head() (This is "innermost")
- *
- * j_state_lock
- * ->jbd_lock_bh_state()
- *
- * jbd_lock_bh_state()
- * ->j_list_lock
- *
- * j_state_lock
- * ->t_handle_lock
- *
- * j_state_lock
- * ->j_list_lock (journal_unmap_buffer)
- *
- */
-
-struct transaction_s
-{
- /* Pointer to the journal for this transaction. [no locking] */
- journal_t *t_journal;
-
- /* Sequence number for this transaction [no locking] */
- tid_t t_tid;
-
- /*
- * Transaction's current state
- * [no locking - only kjournald alters this]
- * FIXME: needs barriers
- * KLUDGE: [use j_state_lock]
- */
- enum {
- T_RUNNING,
- T_LOCKED,
- T_RUNDOWN,
- T_FLUSH,
- T_COMMIT,
- T_FINISHED
- } t_state;
-
- /*
- * Where in the log does this transaction's commit start? [no locking]
- */
- unsigned long t_log_start;
-
- /* Number of buffers on the t_buffers list [j_list_lock] */
- int t_nr_buffers;
-
- /*
- * Doubly-linked circular list of all buffers reserved but not yet
- * modified by this transaction [j_list_lock]
- */
- struct journal_head *t_reserved_list;
-
- /*
- * Doubly-linked circular list of all buffers under writeout during
- * commit [j_list_lock]
- */
- struct journal_head *t_locked_list;
-
- /*
- * Doubly-linked circular list of all metadata buffers owned by this
- * transaction [j_list_lock]
- */
- struct journal_head *t_buffers;
-
- /*
- * Doubly-linked circular list of all data buffers still to be
- * flushed before this transaction can be committed [j_list_lock]
- */
- struct journal_head *t_sync_datalist;
-
- /*
- * Doubly-linked circular list of all forget buffers (superseded
- * buffers which we can un-checkpoint once this transaction commits)
- * [j_list_lock]
- */
- struct journal_head *t_forget;
-
- /*
- * Doubly-linked circular list of all buffers still to be flushed before
- * this transaction can be checkpointed. [j_list_lock]
- */
- struct journal_head *t_checkpoint_list;
-
- /*
- * Doubly-linked circular list of all buffers submitted for IO while
- * checkpointing. [j_list_lock]
- */
- struct journal_head *t_checkpoint_io_list;
-
- /*
- * Doubly-linked circular list of temporary buffers currently undergoing
- * IO in the log [j_list_lock]
- */
- struct journal_head *t_iobuf_list;
-
- /*
- * Doubly-linked circular list of metadata buffers being shadowed by log
- * IO. The IO buffers on the iobuf list and the shadow buffers on this
- * list match each other one for one at all times. [j_list_lock]
- */
- struct journal_head *t_shadow_list;
-
- /*
- * Doubly-linked circular list of control buffers being written to the
- * log. [j_list_lock]
- */
- struct journal_head *t_log_list;
-
- /*
- * Protects info related to handles
- */
- spinlock_t t_handle_lock;
-
- /*
- * Number of outstanding updates running on this transaction
- * [t_handle_lock]
- */
- int t_updates;
-
- /*
- * Number of buffers reserved for use by all handles in this transaction
- * handle but not yet modified. [t_handle_lock]
- */
- int t_outstanding_credits;
-
- /*
- * Forward and backward links for the circular list of all transactions
- * awaiting checkpoint. [j_list_lock]
- */
- transaction_t *t_cpnext, *t_cpprev;
-
- /*
- * When will the transaction expire (become due for commit), in jiffies?
- * [no locking]
- */
- unsigned long t_expires;
-
- /*
- * How many handles used this transaction? [t_handle_lock]
- */
- int t_handle_count;
-
-};
-
-/**
- * struct journal_s - The journal_s type is the concrete type associated with
- * journal_t.
- * @j_flags: General journaling state flags
- * @j_errno: Is there an outstanding uncleared error on the journal (from a
- * prior abort)?
- * @j_sb_buffer: First part of superblock buffer
- * @j_superblock: Second part of superblock buffer
- * @j_format_version: Version of the superblock format
- * @j_state_lock: Protect the various scalars in the journal
- * @j_barrier_count: Number of processes waiting to create a barrier lock
- * @j_barrier: The barrier lock itself
- * @j_running_transaction: The current running transaction..
- * @j_committing_transaction: the transaction we are pushing to disk
- * @j_checkpoint_transactions: a linked circular list of all transactions
- * waiting for checkpointing
- * @j_wait_transaction_locked: Wait queue for waiting for a locked transaction
- * to start committing, or for a barrier lock to be released
- * @j_wait_logspace: Wait queue for waiting for checkpointing to complete
- * @j_wait_done_commit: Wait queue for waiting for commit to complete
- * @j_wait_checkpoint: Wait queue to trigger checkpointing
- * @j_wait_commit: Wait queue to trigger commit
- * @j_wait_updates: Wait queue to wait for updates to complete
- * @j_checkpoint_mutex: Mutex for locking against concurrent checkpoints
- * @j_head: Journal head - identifies the first unused block in the journal
- * @j_tail: Journal tail - identifies the oldest still-used block in the
- * journal.
- * @j_free: Journal free - how many free blocks are there in the journal?
- * @j_first: The block number of the first usable block
- * @j_last: The block number one beyond the last usable block
- * @j_dev: Device where we store the journal
- * @j_blocksize: blocksize for the location where we store the journal.
- * @j_blk_offset: starting block offset for into the device where we store the
- * journal
- * @j_fs_dev: Device which holds the client fs. For internal journal this will
- * be equal to j_dev
- * @j_maxlen: Total maximum capacity of the journal region on disk.
- * @j_list_lock: Protects the buffer lists and internal buffer state.
- * @j_inode: Optional inode where we store the journal. If present, all journal
- * block numbers are mapped into this inode via bmap().
- * @j_tail_sequence: Sequence number of the oldest transaction in the log
- * @j_transaction_sequence: Sequence number of the next transaction to grant
- * @j_commit_sequence: Sequence number of the most recently committed
- * transaction
- * @j_commit_request: Sequence number of the most recent transaction wanting
- * commit
- * @j_uuid: Uuid of client object.
- * @j_task: Pointer to the current commit thread for this journal
- * @j_max_transaction_buffers: Maximum number of metadata buffers to allow in a
- * single compound commit transaction
- * @j_commit_interval: What is the maximum transaction lifetime before we begin
- * a commit?
- * @j_commit_timer: The timer used to wakeup the commit thread
- * @j_revoke_lock: Protect the revoke table
- * @j_revoke: The revoke table - maintains the list of revoked blocks in the
- * current transaction.
- * @j_revoke_table: alternate revoke tables for j_revoke
- * @j_wbuf: array of buffer_heads for journal_commit_transaction
- * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the
- * number that will fit in j_blocksize
- * @j_last_sync_writer: most recent pid which did a synchronous write
- * @j_private: An opaque pointer to fs-private information.
- */
-
-struct journal_s
-{
- /* General journaling state flags [j_state_lock] */
- unsigned long j_flags;
-
- /*
- * Is there an outstanding uncleared error on the journal (from a prior
- * abort)? [j_state_lock]
- */
- int j_errno;
-
- /* The superblock buffer */
- struct buffer_head *j_sb_buffer;
- journal_superblock_t *j_superblock;
-
- /* Version of the superblock format */
- int j_format_version;
-
- /*
- * Protect the various scalars in the journal
- */
- spinlock_t j_state_lock;
-
- /*
- * Number of processes waiting to create a barrier lock [j_state_lock]
- */
- int j_barrier_count;
-
- /* The barrier lock itself */
- struct mutex j_barrier;
-
- /*
- * Transactions: The current running transaction...
- * [j_state_lock] [caller holding open handle]
- */
- transaction_t *j_running_transaction;
-
- /*
- * the transaction we are pushing to disk
- * [j_state_lock] [caller holding open handle]
- */
- transaction_t *j_committing_transaction;
-
- /*
- * ... and a linked circular list of all transactions waiting for
- * checkpointing. [j_list_lock]
- */
- transaction_t *j_checkpoint_transactions;
-
- /*
- * Wait queue for waiting for a locked transaction to start committing,
- * or for a barrier lock to be released
- */
- wait_queue_head_t j_wait_transaction_locked;
-
- /* Wait queue for waiting for checkpointing to complete */
- wait_queue_head_t j_wait_logspace;
-
- /* Wait queue for waiting for commit to complete */
- wait_queue_head_t j_wait_done_commit;
-
- /* Wait queue to trigger checkpointing */
- wait_queue_head_t j_wait_checkpoint;
-
- /* Wait queue to trigger commit */
- wait_queue_head_t j_wait_commit;
-
- /* Wait queue to wait for updates to complete */
- wait_queue_head_t j_wait_updates;
-
- /* Semaphore for locking against concurrent checkpoints */
- struct mutex j_checkpoint_mutex;
-
- /*
- * Journal head: identifies the first unused block in the journal.
- * [j_state_lock]
- */
- unsigned long j_head;
-
- /*
- * Journal tail: identifies the oldest still-used block in the journal.
- * [j_state_lock]
- */
- unsigned long j_tail;
-
- /*
- * Journal free: how many free blocks are there in the journal?
- * [j_state_lock]
- */
- unsigned long j_free;
-
- /*
- * Journal start and end: the block numbers of the first usable block
- * and one beyond the last usable block in the journal. [j_state_lock]
- */
- unsigned long j_first;
- unsigned long j_last;
-
- /*
- * Device, blocksize and starting block offset for the location where we
- * store the journal.
- */
- struct block_device *j_dev;
- int j_blocksize;
- unsigned int j_blk_offset;
-
- /*
- * Device which holds the client fs. For internal journal this will be
- * equal to j_dev.
- */
- struct block_device *j_fs_dev;
-
- /* Total maximum capacity of the journal region on disk. */
- unsigned int j_maxlen;
-
- /*
- * Protects the buffer lists and internal buffer state.
- */
- spinlock_t j_list_lock;
-
- /* Optional inode where we store the journal. If present, all */
- /* journal block numbers are mapped into this inode via */
- /* bmap(). */
- struct inode *j_inode;
-
- /*
- * Sequence number of the oldest transaction in the log [j_state_lock]
- */
- tid_t j_tail_sequence;
-
- /*
- * Sequence number of the next transaction to grant [j_state_lock]
- */
- tid_t j_transaction_sequence;
-
- /*
- * Sequence number of the most recently committed transaction
- * [j_state_lock].
- */
- tid_t j_commit_sequence;
-
- /*
- * Sequence number of the most recent transaction wanting commit
- * [j_state_lock]
- */
- tid_t j_commit_request;
-
- /*
- * Journal uuid: identifies the object (filesystem, LVM volume etc)
- * backed by this journal. This will eventually be replaced by an array
- * of uuids, allowing us to index multiple devices within a single
- * journal and to perform atomic updates across them.
- */
- __u8 j_uuid[16];
-
- /* Pointer to the current commit thread for this journal */
- struct task_struct *j_task;
-
- /*
- * Maximum number of metadata buffers to allow in a single compound
- * commit transaction
- */
- int j_max_transaction_buffers;
-
- /*
- * What is the maximum transaction lifetime before we begin a commit?
- */
- unsigned long j_commit_interval;
-
- /* The timer used to wakeup the commit thread: */
- struct timer_list j_commit_timer;
-
- /*
- * The revoke table: maintains the list of revoked blocks in the
- * current transaction. [j_revoke_lock]
- */
- spinlock_t j_revoke_lock;
- struct jbd_revoke_table_s *j_revoke;
- struct jbd_revoke_table_s *j_revoke_table[2];
-
- /*
- * array of bhs for journal_commit_transaction
- */
- struct buffer_head **j_wbuf;
- int j_wbufsize;
-
- pid_t j_last_sync_writer;
-
- /*
- * An opaque pointer to fs-private information. ext3 puts its
- * superblock pointer here
- */
- void *j_private;
-};
-
-/*
- * Journal flag definitions
- */
-#define JFS_UNMOUNT 0x001 /* Journal thread is being destroyed */
-#define JFS_ABORT 0x002 /* Journaling has been aborted for errors. */
-#define JFS_ACK_ERR 0x004 /* The errno in the sb has been acked */
-#define JFS_FLUSHED 0x008 /* The journal superblock has been flushed */
-#define JFS_LOADED 0x010 /* The journal superblock has been loaded */
-#define JFS_BARRIER 0x020 /* Use IDE barriers */
-
-/*
- * Function declarations for the journaling transaction and buffer
- * management
- */
-
-/* Filing buffers */
-extern void __journal_temp_unlink_buffer(struct journal_head *jh);
-extern void journal_unfile_buffer(journal_t *, struct journal_head *);
-extern void __journal_unfile_buffer(struct journal_head *);
-extern void __journal_refile_buffer(struct journal_head *);
-extern void journal_refile_buffer(journal_t *, struct journal_head *);
-extern void __journal_file_buffer(struct journal_head *, transaction_t *, int);
-extern void __journal_free_buffer(struct journal_head *bh);
-extern void journal_file_buffer(struct journal_head *, transaction_t *, int);
-extern void __journal_clean_data_list(transaction_t *transaction);
-
-/* Log buffer allocation */
-extern struct journal_head * journal_get_descriptor_buffer(journal_t *);
-int journal_next_log_block(journal_t *, unsigned long *);
-
-/* Commit management */
-extern void journal_commit_transaction(journal_t *);
-
-/* Checkpoint list management */
-int __journal_clean_checkpoint_list(journal_t *journal);
-int __journal_remove_checkpoint(struct journal_head *);
-void __journal_insert_checkpoint(struct journal_head *, transaction_t *);
-
-/* Buffer IO */
-extern int
-journal_write_metadata_buffer(transaction_t *transaction,
- struct journal_head *jh_in,
- struct journal_head **jh_out,
- int blocknr);
-
-/* Transaction locking */
-extern void __wait_on_journal (journal_t *);
-
-/*
- * Journal locking.
- *
- * We need to lock the journal during transaction state changes so that nobody
- * ever tries to take a handle on the running transaction while we are in the
- * middle of moving it to the commit phase. j_state_lock does this.
- *
- * Note that the locking is completely interrupt unsafe. We never touch
- * journal structures from interrupts.
- */
-
-static inline handle_t *journal_current_handle(void)
-{
- return current->journal_info;
-}
-
-/* The journaling code user interface:
- *
- * Create and destroy handles
- * Register buffer modifications against the current transaction.
- */
-
-extern handle_t *journal_start(journal_t *, int nblocks);
-extern int journal_restart (handle_t *, int nblocks);
-extern int journal_extend (handle_t *, int nblocks);
-extern int journal_get_write_access(handle_t *, struct buffer_head *);
-extern int journal_get_create_access (handle_t *, struct buffer_head *);
-extern int journal_get_undo_access(handle_t *, struct buffer_head *);
-extern int journal_dirty_data (handle_t *, struct buffer_head *);
-extern int journal_dirty_metadata (handle_t *, struct buffer_head *);
-extern void journal_release_buffer (handle_t *, struct buffer_head *);
-extern int journal_forget (handle_t *, struct buffer_head *);
-extern void journal_sync_buffer (struct buffer_head *);
-extern void journal_invalidatepage(journal_t *,
- struct page *, unsigned long);
-extern int journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
-extern int journal_stop(handle_t *);
-extern int journal_flush (journal_t *);
-extern void journal_lock_updates (journal_t *);
-extern void journal_unlock_updates (journal_t *);
-
-extern journal_t * journal_init_dev(struct block_device *bdev,
- struct block_device *fs_dev,
- int start, int len, int bsize);
-extern journal_t * journal_init_inode (struct inode *);
-extern int journal_update_format (journal_t *);
-extern int journal_check_used_features
- (journal_t *, unsigned long, unsigned long, unsigned long);
-extern int journal_check_available_features
- (journal_t *, unsigned long, unsigned long, unsigned long);
-extern int journal_set_features
- (journal_t *, unsigned long, unsigned long, unsigned long);
-extern int journal_create (journal_t *);
-extern int journal_load (journal_t *journal);
-extern void journal_destroy (journal_t *);
-extern int journal_recover (journal_t *journal);
-extern int journal_wipe (journal_t *, int);
-extern int journal_skip_recovery (journal_t *);
-extern void journal_update_superblock (journal_t *, int);
-extern void __journal_abort_hard (journal_t *);
-extern void journal_abort (journal_t *, int);
-extern int journal_errno (journal_t *);
-extern void journal_ack_err (journal_t *);
-extern int journal_clear_err (journal_t *);
-extern int journal_bmap(journal_t *, unsigned long, unsigned long *);
-extern int journal_force_commit(journal_t *);
-
-/*
- * journal_head management
- */
-struct journal_head *journal_add_journal_head(struct buffer_head *bh);
-struct journal_head *journal_grab_journal_head(struct buffer_head *bh);
-void journal_remove_journal_head(struct buffer_head *bh);
-void journal_put_journal_head(struct journal_head *jh);
-
-/*
- * handle management
- */
-extern kmem_cache_t *jbd_handle_cache;
-
-static inline handle_t *jbd_alloc_handle(gfp_t gfp_flags)
-{
- return kmem_cache_alloc(jbd_handle_cache, gfp_flags);
-}
-
-static inline void jbd_free_handle(handle_t *handle)
-{
- kmem_cache_free(jbd_handle_cache, handle);
-}
-
-/* Primary revoke support */
-#define JOURNAL_REVOKE_DEFAULT_HASH 256
-extern int journal_init_revoke(journal_t *, int);
-extern void journal_destroy_revoke_caches(void);
-extern int journal_init_revoke_caches(void);
-
-extern void journal_destroy_revoke(journal_t *);
-extern int journal_revoke (handle_t *,
- unsigned long, struct buffer_head *);
-extern int journal_cancel_revoke(handle_t *, struct journal_head *);
-extern void journal_write_revoke_records(journal_t *, transaction_t *);
-
-/* Recovery revoke support */
-extern int journal_set_revoke(journal_t *, unsigned long, tid_t);
-extern int journal_test_revoke(journal_t *, unsigned long, tid_t);
-extern void journal_clear_revoke(journal_t *);
-extern void journal_brelse_array(struct buffer_head *b[], int n);
-extern void journal_switch_revoke_table(journal_t *journal);
-
-/*
- * The log thread user interface:
- *
- * Request space in the current transaction, and force transaction commit
- * transitions on demand.
- */
-
-int __log_space_left(journal_t *); /* Called with journal locked */
-int log_start_commit(journal_t *journal, tid_t tid);
-int __log_start_commit(journal_t *journal, tid_t tid);
-int journal_start_commit(journal_t *journal, tid_t *tid);
-int journal_force_commit_nested(journal_t *journal);
-int log_wait_commit(journal_t *journal, tid_t tid);
-int log_do_checkpoint(journal_t *journal);
-
-void __log_wait_for_space(journal_t *journal);
-extern void __journal_drop_transaction(journal_t *, transaction_t *);
-extern int cleanup_journal_tail(journal_t *);
-
-/* Debugging code only: */
-
-#define jbd_ENOSYS() \
-do { \
- printk (KERN_ERR "JBD unimplemented function %s\n", __FUNCTION__); \
- current->state = TASK_UNINTERRUPTIBLE; \
- schedule(); \
-} while (1)
-
-/*
- * is_journal_abort
- *
- * Simple test wrapper function to test the JFS_ABORT state flag. This
- * bit, when set, indicates that we have had a fatal error somewhere,
- * either inside the journaling layer or indicated to us by the client
- * (eg. ext3), and that we and should not commit any further
- * transactions.
- */
-
-static inline int is_journal_aborted(journal_t *journal)
-{
- return journal->j_flags & JFS_ABORT;
-}
-
-static inline int is_handle_aborted(handle_t *handle)
-{
- if (handle->h_aborted)
- return 1;
- return is_journal_aborted(handle->h_transaction->t_journal);
-}
-
-static inline void journal_abort_handle(handle_t *handle)
-{
- handle->h_aborted = 1;
-}
-
-#endif /* __KERNEL__ */
-
-/* Comparison functions for transaction IDs: perform comparisons using
- * modulo arithmetic so that they work over sequence number wraps. */
-
-static inline int tid_gt(tid_t x, tid_t y)
-{
- int difference = (x - y);
- return (difference > 0);
-}
-
-static inline int tid_geq(tid_t x, tid_t y)
-{
- int difference = (x - y);
- return (difference >= 0);
-}
-
-extern int journal_blocks_per_page(struct inode *inode);
-
-/*
- * Return the minimum number of blocks which must be free in the journal
- * before a new transaction may be started. Must be called under j_state_lock.
- */
-static inline int jbd_space_needed(journal_t *journal)
-{
- int nblocks = journal->j_max_transaction_buffers;
- if (journal->j_committing_transaction)
- nblocks += journal->j_committing_transaction->
- t_outstanding_credits;
- return nblocks;
-}
-
-/*
- * Definitions which augment the buffer_head layer
- */
-
-/* journaling buffer types */
-#define BJ_None 0 /* Not journaled */
-#define BJ_SyncData 1 /* Normal data: flush before commit */
-#define BJ_Metadata 2 /* Normal journaled metadata */
-#define BJ_Forget 3 /* Buffer superseded by this transaction */
-#define BJ_IO 4 /* Buffer is for temporary IO use */
-#define BJ_Shadow 5 /* Buffer contents being shadowed to the log */
-#define BJ_LogCtl 6 /* Buffer contains log descriptors */
-#define BJ_Reserved 7 /* Buffer is reserved for access by journal */
-#define BJ_Locked 8 /* Locked for I/O during commit */
-#define BJ_Types 9
-
-extern int jbd_blocks_per_page(struct inode *inode);
-
-#ifdef __KERNEL__
-
-#define buffer_trace_init(bh) do {} while (0)
-#define print_buffer_fields(bh) do {} while (0)
-#define print_buffer_trace(bh) do {} while (0)
-#define BUFFER_TRACE(bh, info) do {} while (0)
-#define BUFFER_TRACE2(bh, bh2, info) do {} while (0)
-#define JBUFFER_TRACE(jh, info) do {} while (0)
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_JBD_H */
diff --git a/original/linux/jiffies.h b/original/linux/jiffies.h
deleted file mode 100644
index 329ebcf..0000000
--- a/original/linux/jiffies.h
+++ /dev/null
@@ -1,450 +0,0 @@
-#ifndef _LINUX_JIFFIES_H
-#define _LINUX_JIFFIES_H
-
-#include <linux/calc64.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/time.h>
-#include <linux/timex.h>
-#include <asm/param.h> /* for HZ */
-
-/*
- * The following defines establish the engineering parameters of the PLL
- * model. The HZ variable establishes the timer interrupt frequency, 100 Hz
- * for the SunOS kernel, 256 Hz for the Ultrix kernel and 1024 Hz for the
- * OSF/1 kernel. The SHIFT_HZ define expresses the same value as the
- * nearest power of two in order to avoid hardware multiply operations.
- */
-#if HZ >= 12 && HZ < 24
-# define SHIFT_HZ 4
-#elif HZ >= 24 && HZ < 48
-# define SHIFT_HZ 5
-#elif HZ >= 48 && HZ < 96
-# define SHIFT_HZ 6
-#elif HZ >= 96 && HZ < 192
-# define SHIFT_HZ 7
-#elif HZ >= 192 && HZ < 384
-# define SHIFT_HZ 8
-#elif HZ >= 384 && HZ < 768
-# define SHIFT_HZ 9
-#elif HZ >= 768 && HZ < 1536
-# define SHIFT_HZ 10
-#else
-# error You lose.
-#endif
-
-/* LATCH is used in the interval timer and ftape setup. */
-#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */
-
-#define LATCH_HPET ((HPET_TICK_RATE + HZ/2) / HZ)
-
-/* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, the we can
- * improve accuracy by shifting LSH bits, hence calculating:
- * (NOM << LSH) / DEN
- * This however means trouble for large NOM, because (NOM << LSH) may no
- * longer fit in 32 bits. The following way of calculating this gives us
- * some slack, under the following conditions:
- * - (NOM / DEN) fits in (32 - LSH) bits.
- * - (NOM % DEN) fits in (32 - LSH) bits.
- */
-#define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \
- + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN))
-
-/* HZ is the requested value. ACTHZ is actual HZ ("<< 8" is for accuracy) */
-#define ACTHZ (SH_DIV (CLOCK_TICK_RATE, LATCH, 8))
-
-#define ACTHZ_HPET (SH_DIV (HPET_TICK_RATE, LATCH_HPET, 8))
-
-/* TICK_NSEC is the time between ticks in nsec assuming real ACTHZ */
-#define TICK_NSEC (SH_DIV (1000000UL * 1000, ACTHZ, 8))
-
-#define TICK_NSEC_HPET (SH_DIV(1000000UL * 1000, ACTHZ_HPET, 8))
-
-/* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */
-#define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ)
-
-/* TICK_USEC_TO_NSEC is the time between ticks in nsec assuming real ACTHZ and */
-/* a value TUSEC for TICK_USEC (can be set bij adjtimex) */
-#define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV (TUSEC * USER_HZ * 1000, ACTHZ, 8))
-
-/* some arch's have a small-data section that can be accessed register-relative
- * but that can only take up to, say, 4-byte variables. jiffies being part of
- * an 8-byte variable may not be correctly accessed unless we force the issue
- */
-#define __jiffy_data __attribute__((section(".data")))
-
-/*
- * The 64-bit value is not volatile - you MUST NOT read it
- * without sampling the sequence number in xtime_lock.
- * get_jiffies_64() will do this for you as appropriate.
- */
-extern u64 __jiffy_data jiffies_64;
-extern unsigned long volatile __jiffy_data jiffies;
-
-#if (BITS_PER_LONG < 64)
-u64 get_jiffies_64(void);
-#else
-static inline u64 get_jiffies_64(void)
-{
- return (u64)jiffies;
-}
-#endif
-
-/*
- * These inlines deal with timer wrapping correctly. You are
- * strongly encouraged to use them
- * 1. Because people otherwise forget
- * 2. Because if the timer wrap changes in future you won't have to
- * alter your driver code.
- *
- * time_after(a,b) returns true if the time a is after time b.
- *
- * Do this with "<0" and ">=0" to only test the sign of the result. A
- * good compiler would generate better code (and a really good compiler
- * wouldn't care). Gcc is currently neither.
- */
-#define time_after(a,b) \
- (typecheck(unsigned long, a) && \
- typecheck(unsigned long, b) && \
- ((long)(b) - (long)(a) < 0))
-#define time_before(a,b) time_after(b,a)
-
-#define time_after_eq(a,b) \
- (typecheck(unsigned long, a) && \
- typecheck(unsigned long, b) && \
- ((long)(a) - (long)(b) >= 0))
-#define time_before_eq(a,b) time_after_eq(b,a)
-
-/*
- * Have the 32 bit jiffies value wrap 5 minutes after boot
- * so jiffies wrap bugs show up earlier.
- */
-#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
-
-/*
- * Change timeval to jiffies, trying to avoid the
- * most obvious overflows..
- *
- * And some not so obvious.
- *
- * Note that we don't want to return MAX_LONG, because
- * for various timeout reasons we often end up having
- * to wait "jiffies+1" in order to guarantee that we wait
- * at _least_ "jiffies" - so "jiffies+1" had better still
- * be positive.
- */
-#define MAX_JIFFY_OFFSET ((~0UL >> 1)-1)
-
-/*
- * We want to do realistic conversions of time so we need to use the same
- * values the update wall clock code uses as the jiffies size. This value
- * is: TICK_NSEC (which is defined in timex.h). This
- * is a constant and is in nanoseconds. We will used scaled math
- * with a set of scales defined here as SEC_JIFFIE_SC, USEC_JIFFIE_SC and
- * NSEC_JIFFIE_SC. Note that these defines contain nothing but
- * constants and so are computed at compile time. SHIFT_HZ (computed in
- * timex.h) adjusts the scaling for different HZ values.
-
- * Scaled math??? What is that?
- *
- * Scaled math is a way to do integer math on values that would,
- * otherwise, either overflow, underflow, or cause undesired div
- * instructions to appear in the execution path. In short, we "scale"
- * up the operands so they take more bits (more precision, less
- * underflow), do the desired operation and then "scale" the result back
- * by the same amount. If we do the scaling by shifting we avoid the
- * costly mpy and the dastardly div instructions.
-
- * Suppose, for example, we want to convert from seconds to jiffies
- * where jiffies is defined in nanoseconds as NSEC_PER_JIFFIE. The
- * simple math is: jiff = (sec * NSEC_PER_SEC) / NSEC_PER_JIFFIE; We
- * observe that (NSEC_PER_SEC / NSEC_PER_JIFFIE) is a constant which we
- * might calculate at compile time, however, the result will only have
- * about 3-4 bits of precision (less for smaller values of HZ).
- *
- * So, we scale as follows:
- * jiff = (sec) * (NSEC_PER_SEC / NSEC_PER_JIFFIE);
- * jiff = ((sec) * ((NSEC_PER_SEC * SCALE)/ NSEC_PER_JIFFIE)) / SCALE;
- * Then we make SCALE a power of two so:
- * jiff = ((sec) * ((NSEC_PER_SEC << SCALE)/ NSEC_PER_JIFFIE)) >> SCALE;
- * Now we define:
- * #define SEC_CONV = ((NSEC_PER_SEC << SCALE)/ NSEC_PER_JIFFIE))
- * jiff = (sec * SEC_CONV) >> SCALE;
- *
- * Often the math we use will expand beyond 32-bits so we tell C how to
- * do this and pass the 64-bit result of the mpy through the ">> SCALE"
- * which should take the result back to 32-bits. We want this expansion
- * to capture as much precision as possible. At the same time we don't
- * want to overflow so we pick the SCALE to avoid this. In this file,
- * that means using a different scale for each range of HZ values (as
- * defined in timex.h).
- *
- * For those who want to know, gcc will give a 64-bit result from a "*"
- * operator if the result is a long long AND at least one of the
- * operands is cast to long long (usually just prior to the "*" so as
- * not to confuse it into thinking it really has a 64-bit operand,
- * which, buy the way, it can do, but it take more code and at least 2
- * mpys).
-
- * We also need to be aware that one second in nanoseconds is only a
- * couple of bits away from overflowing a 32-bit word, so we MUST use
- * 64-bits to get the full range time in nanoseconds.
-
- */
-
-/*
- * Here are the scales we will use. One for seconds, nanoseconds and
- * microseconds.
- *
- * Within the limits of cpp we do a rough cut at the SEC_JIFFIE_SC and
- * check if the sign bit is set. If not, we bump the shift count by 1.
- * (Gets an extra bit of precision where we can use it.)
- * We know it is set for HZ = 1024 and HZ = 100 not for 1000.
- * Haven't tested others.
-
- * Limits of cpp (for #if expressions) only long (no long long), but
- * then we only need the most signicant bit.
- */
-
-#define SEC_JIFFIE_SC (31 - SHIFT_HZ)
-#if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000)
-#undef SEC_JIFFIE_SC
-#define SEC_JIFFIE_SC (32 - SHIFT_HZ)
-#endif
-#define NSEC_JIFFIE_SC (SEC_JIFFIE_SC + 29)
-#define USEC_JIFFIE_SC (SEC_JIFFIE_SC + 19)
-#define SEC_CONVERSION ((unsigned long)((((u64)NSEC_PER_SEC << SEC_JIFFIE_SC) +\
- TICK_NSEC -1) / (u64)TICK_NSEC))
-
-#define NSEC_CONVERSION ((unsigned long)((((u64)1 << NSEC_JIFFIE_SC) +\
- TICK_NSEC -1) / (u64)TICK_NSEC))
-#define USEC_CONVERSION \
- ((unsigned long)((((u64)NSEC_PER_USEC << USEC_JIFFIE_SC) +\
- TICK_NSEC -1) / (u64)TICK_NSEC))
-/*
- * USEC_ROUND is used in the timeval to jiffie conversion. See there
- * for more details. It is the scaled resolution rounding value. Note
- * that it is a 64-bit value. Since, when it is applied, we are already
- * in jiffies (albit scaled), it is nothing but the bits we will shift
- * off.
- */
-#define USEC_ROUND (u64)(((u64)1 << USEC_JIFFIE_SC) - 1)
-/*
- * The maximum jiffie value is (MAX_INT >> 1). Here we translate that
- * into seconds. The 64-bit case will overflow if we are not careful,
- * so use the messy SH_DIV macro to do it. Still all constants.
- */
-#if BITS_PER_LONG < 64
-# define MAX_SEC_IN_JIFFIES \
- (long)((u64)((u64)MAX_JIFFY_OFFSET * TICK_NSEC) / NSEC_PER_SEC)
-#else /* take care of overflow on 64 bits machines */
-# define MAX_SEC_IN_JIFFIES \
- (SH_DIV((MAX_JIFFY_OFFSET >> SEC_JIFFIE_SC) * TICK_NSEC, NSEC_PER_SEC, 1) - 1)
-
-#endif
-
-/*
- * Convert jiffies to milliseconds and back.
- *
- * Avoid unnecessary multiplications/divisions in the
- * two most common HZ cases:
- */
-static inline unsigned int jiffies_to_msecs(const unsigned long j)
-{
-#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
- return (MSEC_PER_SEC / HZ) * j;
-#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
- return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC);
-#else
- return (j * MSEC_PER_SEC) / HZ;
-#endif
-}
-
-static inline unsigned int jiffies_to_usecs(const unsigned long j)
-{
-#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
- return (USEC_PER_SEC / HZ) * j;
-#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
- return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC);
-#else
- return (j * USEC_PER_SEC) / HZ;
-#endif
-}
-
-static inline unsigned long msecs_to_jiffies(const unsigned int m)
-{
- if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
- return MAX_JIFFY_OFFSET;
-#if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ)
- return (m + (MSEC_PER_SEC / HZ) - 1) / (MSEC_PER_SEC / HZ);
-#elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC)
- return m * (HZ / MSEC_PER_SEC);
-#else
- return (m * HZ + MSEC_PER_SEC - 1) / MSEC_PER_SEC;
-#endif
-}
-
-static inline unsigned long usecs_to_jiffies(const unsigned int u)
-{
- if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET))
- return MAX_JIFFY_OFFSET;
-#if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ)
- return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ);
-#elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC)
- return u * (HZ / USEC_PER_SEC);
-#else
- return (u * HZ + USEC_PER_SEC - 1) / USEC_PER_SEC;
-#endif
-}
-
-/*
- * The TICK_NSEC - 1 rounds up the value to the next resolution. Note
- * that a remainder subtract here would not do the right thing as the
- * resolution values don't fall on second boundries. I.e. the line:
- * nsec -= nsec % TICK_NSEC; is NOT a correct resolution rounding.
- *
- * Rather, we just shift the bits off the right.
- *
- * The >> (NSEC_JIFFIE_SC - SEC_JIFFIE_SC) converts the scaled nsec
- * value to a scaled second value.
- */
-static __inline__ unsigned long
-timespec_to_jiffies(const struct timespec *value)
-{
- unsigned long sec = value->tv_sec;
- long nsec = value->tv_nsec + TICK_NSEC - 1;
-
- if (sec >= MAX_SEC_IN_JIFFIES){
- sec = MAX_SEC_IN_JIFFIES;
- nsec = 0;
- }
- return (((u64)sec * SEC_CONVERSION) +
- (((u64)nsec * NSEC_CONVERSION) >>
- (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC;
-
-}
-
-static __inline__ void
-jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
-{
- /*
- * Convert jiffies to nanoseconds and separate with
- * one divide.
- */
- u64 nsec = (u64)jiffies * TICK_NSEC;
- value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_nsec);
-}
-
-/* Same for "timeval"
- *
- * Well, almost. The problem here is that the real system resolution is
- * in nanoseconds and the value being converted is in micro seconds.
- * Also for some machines (those that use HZ = 1024, in-particular),
- * there is a LARGE error in the tick size in microseconds.
-
- * The solution we use is to do the rounding AFTER we convert the
- * microsecond part. Thus the USEC_ROUND, the bits to be shifted off.
- * Instruction wise, this should cost only an additional add with carry
- * instruction above the way it was done above.
- */
-static __inline__ unsigned long
-timeval_to_jiffies(const struct timeval *value)
-{
- unsigned long sec = value->tv_sec;
- long usec = value->tv_usec;
-
- if (sec >= MAX_SEC_IN_JIFFIES){
- sec = MAX_SEC_IN_JIFFIES;
- usec = 0;
- }
- return (((u64)sec * SEC_CONVERSION) +
- (((u64)usec * USEC_CONVERSION + USEC_ROUND) >>
- (USEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC;
-}
-
-static __inline__ void
-jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
-{
- /*
- * Convert jiffies to nanoseconds and separate with
- * one divide.
- */
- u64 nsec = (u64)jiffies * TICK_NSEC;
- long tv_usec;
-
- value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &tv_usec);
- tv_usec /= NSEC_PER_USEC;
- value->tv_usec = tv_usec;
-}
-
-/*
- * Convert jiffies/jiffies_64 to clock_t and back.
- */
-static inline clock_t jiffies_to_clock_t(long x)
-{
-#if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
- return x / (HZ / USER_HZ);
-#else
- u64 tmp = (u64)x * TICK_NSEC;
- do_div(tmp, (NSEC_PER_SEC / USER_HZ));
- return (long)tmp;
-#endif
-}
-
-static inline unsigned long clock_t_to_jiffies(unsigned long x)
-{
-#if (HZ % USER_HZ)==0
- if (x >= ~0UL / (HZ / USER_HZ))
- return ~0UL;
- return x * (HZ / USER_HZ);
-#else
- u64 jif;
-
- /* Don't worry about loss of precision here .. */
- if (x >= ~0UL / HZ * USER_HZ)
- return ~0UL;
-
- /* .. but do try to contain it here */
- jif = x * (u64) HZ;
- do_div(jif, USER_HZ);
- return jif;
-#endif
-}
-
-static inline u64 jiffies_64_to_clock_t(u64 x)
-{
-#if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
- do_div(x, HZ / USER_HZ);
-#else
- /*
- * There are better ways that don't overflow early,
- * but even this doesn't overflow in hundreds of years
- * in 64 bits, so..
- */
- x *= TICK_NSEC;
- do_div(x, (NSEC_PER_SEC / USER_HZ));
-#endif
- return x;
-}
-
-static inline u64 nsec_to_clock_t(u64 x)
-{
-#if (NSEC_PER_SEC % USER_HZ) == 0
- do_div(x, (NSEC_PER_SEC / USER_HZ));
-#elif (USER_HZ % 512) == 0
- x *= USER_HZ/512;
- do_div(x, (NSEC_PER_SEC / 512));
-#else
- /*
- * max relative error 5.7e-8 (1.8s per year) for USER_HZ <= 1024,
- * overflow after 64.99 years.
- * exact for HZ=60, 72, 90, 120, 144, 180, 300, 600, 900, ...
- */
- x *= 9;
- do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (USER_HZ/2))
- / USER_HZ));
-#endif
- return x;
-}
-
-#endif
diff --git a/original/linux/kd.h b/original/linux/kd.h
deleted file mode 100644
index 28be4fb..0000000
--- a/original/linux/kd.h
+++ /dev/null
@@ -1,175 +0,0 @@
-#ifndef _LINUX_KD_H
-#define _LINUX_KD_H
-#include <linux/types.h>
-#include <linux/compiler.h>
-
-/* 0x4B is 'K', to avoid collision with termios and vt */
-
-#define GIO_FONT 0x4B60 /* gets font in expanded form */
-#define PIO_FONT 0x4B61 /* use font in expanded form */
-
-#define GIO_FONTX 0x4B6B /* get font using struct consolefontdesc */
-#define PIO_FONTX 0x4B6C /* set font using struct consolefontdesc */
-struct consolefontdesc {
- unsigned short charcount; /* characters in font (256 or 512) */
- unsigned short charheight; /* scan lines per character (1-32) */
- char __user *chardata; /* font data in expanded form */
-};
-
-#define PIO_FONTRESET 0x4B6D /* reset to default font */
-
-#define GIO_CMAP 0x4B70 /* gets colour palette on VGA+ */
-#define PIO_CMAP 0x4B71 /* sets colour palette on VGA+ */
-
-#define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */
-#define KDMKTONE 0x4B30 /* generate tone */
-
-#define KDGETLED 0x4B31 /* return current led state */
-#define KDSETLED 0x4B32 /* set led state [lights, not flags] */
-#define LED_SCR 0x01 /* scroll lock led */
-#define LED_NUM 0x02 /* num lock led */
-#define LED_CAP 0x04 /* caps lock led */
-
-#define KDGKBTYPE 0x4B33 /* get keyboard type */
-#define KB_84 0x01
-#define KB_101 0x02 /* this is what we always answer */
-#define KB_OTHER 0x03
-
-#define KDADDIO 0x4B34 /* add i/o port as valid */
-#define KDDELIO 0x4B35 /* del i/o port as valid */
-#define KDENABIO 0x4B36 /* enable i/o to video board */
-#define KDDISABIO 0x4B37 /* disable i/o to video board */
-
-#define KDSETMODE 0x4B3A /* set text/graphics mode */
-#define KD_TEXT 0x00
-#define KD_GRAPHICS 0x01
-#define KD_TEXT0 0x02 /* obsolete */
-#define KD_TEXT1 0x03 /* obsolete */
-#define KDGETMODE 0x4B3B /* get current mode */
-
-#define KDMAPDISP 0x4B3C /* map display into address space */
-#define KDUNMAPDISP 0x4B3D /* unmap display from address space */
-
-typedef char scrnmap_t;
-#define E_TABSZ 256
-#define GIO_SCRNMAP 0x4B40 /* get screen mapping from kernel */
-#define PIO_SCRNMAP 0x4B41 /* put screen mapping table in kernel */
-#define GIO_UNISCRNMAP 0x4B69 /* get full Unicode screen mapping */
-#define PIO_UNISCRNMAP 0x4B6A /* set full Unicode screen mapping */
-
-#define GIO_UNIMAP 0x4B66 /* get unicode-to-font mapping from kernel */
-struct unipair {
- unsigned short unicode;
- unsigned short fontpos;
-};
-struct unimapdesc {
- unsigned short entry_ct;
- struct unipair __user *entries;
-};
-#define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */
-#define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hash algorithm */
-struct unimapinit {
- unsigned short advised_hashsize; /* 0 if no opinion */
- unsigned short advised_hashstep; /* 0 if no opinion */
- unsigned short advised_hashlevel; /* 0 if no opinion */
-};
-
-#define UNI_DIRECT_BASE 0xF000 /* start of Direct Font Region */
-#define UNI_DIRECT_MASK 0x01FF /* Direct Font Region bitmask */
-
-#define K_RAW 0x00
-#define K_XLATE 0x01
-#define K_MEDIUMRAW 0x02
-#define K_UNICODE 0x03
-#define KDGKBMODE 0x4B44 /* gets current keyboard mode */
-#define KDSKBMODE 0x4B45 /* sets current keyboard mode */
-
-#define K_METABIT 0x03
-#define K_ESCPREFIX 0x04
-#define KDGKBMETA 0x4B62 /* gets meta key handling mode */
-#define KDSKBMETA 0x4B63 /* sets meta key handling mode */
-
-#define K_SCROLLLOCK 0x01
-#define K_NUMLOCK 0x02
-#define K_CAPSLOCK 0x04
-#define KDGKBLED 0x4B64 /* get led flags (not lights) */
-#define KDSKBLED 0x4B65 /* set led flags (not lights) */
-
-struct kbentry {
- unsigned char kb_table;
- unsigned char kb_index;
- unsigned short kb_value;
-};
-#define K_NORMTAB 0x00
-#define K_SHIFTTAB 0x01
-#define K_ALTTAB 0x02
-#define K_ALTSHIFTTAB 0x03
-
-#define KDGKBENT 0x4B46 /* gets one entry in translation table */
-#define KDSKBENT 0x4B47 /* sets one entry in translation table */
-
-struct kbsentry {
- unsigned char kb_func;
- unsigned char kb_string[512];
-};
-#define KDGKBSENT 0x4B48 /* gets one function key string entry */
-#define KDSKBSENT 0x4B49 /* sets one function key string entry */
-
-struct kbdiacr {
- unsigned char diacr, base, result;
-};
-struct kbdiacrs {
- unsigned int kb_cnt; /* number of entries in following array */
- struct kbdiacr kbdiacr[256]; /* MAX_DIACR from keyboard.h */
-};
-#define KDGKBDIACR 0x4B4A /* read kernel accent table */
-#define KDSKBDIACR 0x4B4B /* write kernel accent table */
-
-struct kbkeycode {
- unsigned int scancode, keycode;
-};
-#define KDGETKEYCODE 0x4B4C /* read kernel keycode table entry */
-#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */
-
-#define KDSIGACCEPT 0x4B4E /* accept kbd generated signals */
-
-struct kbd_repeat {
- int delay; /* in msec; <= 0: don't change */
- int period; /* in msec; <= 0: don't change */
- /* earlier this field was misnamed "rate" */
-};
-
-#define KDKBDREP 0x4B52 /* set keyboard delay/repeat rate;
- * actually used values are returned */
-
-#define KDFONTOP 0x4B72 /* font operations */
-
-struct console_font_op {
- unsigned int op; /* operation code KD_FONT_OP_* */
- unsigned int flags; /* KD_FONT_FLAG_* */
- unsigned int width, height; /* font size */
- unsigned int charcount;
- unsigned char __user *data; /* font data with height fixed to 32 */
-};
-
-struct console_font {
- unsigned int width, height; /* font size */
- unsigned int charcount;
- unsigned char *data; /* font data with height fixed to 32 */
-};
-
-#define KD_FONT_OP_SET 0 /* Set font */
-#define KD_FONT_OP_GET 1 /* Get font */
-#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */
-#define KD_FONT_OP_COPY 3 /* Copy from another console */
-
-#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */
-#ifdef __KERNEL__
-#define KD_FONT_FLAG_OLD 0x80000000 /* Invoked via old interface [compat] */
-#endif
-
-/* note: 0x4B00-0x4B4E all have had a value at some time;
- don't reuse for the time being */
-/* note: 0x4B60-0x4B6D, 0x4B70-0x4B72 used above */
-
-#endif /* _LINUX_KD_H */
diff --git a/original/linux/kdev_t.h b/original/linux/kdev_t.h
deleted file mode 100644
index bceea52..0000000
--- a/original/linux/kdev_t.h
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef _LINUX_KDEV_T_H
-#define _LINUX_KDEV_T_H
-#ifdef __KERNEL__
-#define MINORBITS 20
-#define MINORMASK ((1U << MINORBITS) - 1)
-
-#define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS))
-#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
-#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
-
-#define print_dev_t(buffer, dev) \
- sprintf((buffer), "%u:%u\n", MAJOR(dev), MINOR(dev))
-
-#define format_dev_t(buffer, dev) \
- ({ \
- sprintf(buffer, "%u:%u", MAJOR(dev), MINOR(dev)); \
- buffer; \
- })
-
-/* acceptable for old filesystems */
-static inline int old_valid_dev(dev_t dev)
-{
- return MAJOR(dev) < 256 && MINOR(dev) < 256;
-}
-
-static inline u16 old_encode_dev(dev_t dev)
-{
- return (MAJOR(dev) << 8) | MINOR(dev);
-}
-
-static inline dev_t old_decode_dev(u16 val)
-{
- return MKDEV((val >> 8) & 255, val & 255);
-}
-
-static inline int new_valid_dev(dev_t dev)
-{
- return 1;
-}
-
-static inline u32 new_encode_dev(dev_t dev)
-{
- unsigned major = MAJOR(dev);
- unsigned minor = MINOR(dev);
- return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
-}
-
-static inline dev_t new_decode_dev(u32 dev)
-{
- unsigned major = (dev & 0xfff00) >> 8;
- unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00);
- return MKDEV(major, minor);
-}
-
-static inline int huge_valid_dev(dev_t dev)
-{
- return 1;
-}
-
-static inline u64 huge_encode_dev(dev_t dev)
-{
- return new_encode_dev(dev);
-}
-
-static inline dev_t huge_decode_dev(u64 dev)
-{
- return new_decode_dev(dev);
-}
-
-static inline int sysv_valid_dev(dev_t dev)
-{
- return MAJOR(dev) < (1<<14) && MINOR(dev) < (1<<18);
-}
-
-static inline u32 sysv_encode_dev(dev_t dev)
-{
- return MINOR(dev) | (MAJOR(dev) << 18);
-}
-
-static inline unsigned sysv_major(u32 dev)
-{
- return (dev >> 18) & 0x3fff;
-}
-
-static inline unsigned sysv_minor(u32 dev)
-{
- return dev & 0x3ffff;
-}
-
-
-#else /* __KERNEL__ */
-
-/*
-Some programs want their definitions of MAJOR and MINOR and MKDEV
-from the kernel sources. These must be the externally visible ones.
-*/
-#define MAJOR(dev) ((dev)>>8)
-#define MINOR(dev) ((dev) & 0xff)
-#define MKDEV(ma,mi) ((ma)<<8 | (mi))
-#endif /* __KERNEL__ */
-#endif
diff --git a/original/linux/kernel.h b/original/linux/kernel.h
deleted file mode 100644
index 851aa1b..0000000
--- a/original/linux/kernel.h
+++ /dev/null
@@ -1,351 +0,0 @@
-#ifndef _LINUX_KERNEL_H
-#define _LINUX_KERNEL_H
-
-/*
- * 'kernel.h' contains some often-used function prototypes etc
- */
-
-#ifdef __KERNEL__
-
-#include <stdarg.h>
-#include <linux/linkage.h>
-#include <linux/stddef.h>
-#include <linux/types.h>
-#include <linux/compiler.h>
-#include <linux/bitops.h>
-#include <asm/byteorder.h>
-#include <asm/bug.h>
-
-extern const char linux_banner[];
-
-#define INT_MAX ((int)(~0U>>1))
-#define INT_MIN (-INT_MAX - 1)
-#define UINT_MAX (~0U)
-#define LONG_MAX ((long)(~0UL>>1))
-#define LONG_MIN (-LONG_MAX - 1)
-#define ULONG_MAX (~0UL)
-#define LLONG_MAX ((long long)(~0ULL>>1))
-#define LLONG_MIN (-LLONG_MAX - 1)
-#define ULLONG_MAX (~0ULL)
-
-#define STACK_MAGIC 0xdeadbeef
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
-#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
-
-#define KERN_EMERG "<0>" /* system is unusable */
-#define KERN_ALERT "<1>" /* action must be taken immediately */
-#define KERN_CRIT "<2>" /* critical conditions */
-#define KERN_ERR "<3>" /* error conditions */
-#define KERN_WARNING "<4>" /* warning conditions */
-#define KERN_NOTICE "<5>" /* normal but significant condition */
-#define KERN_INFO "<6>" /* informational */
-#define KERN_DEBUG "<7>" /* debug-level messages */
-
-extern int console_printk[];
-
-#define console_loglevel (console_printk[0])
-#define default_message_loglevel (console_printk[1])
-#define minimum_console_loglevel (console_printk[2])
-#define default_console_loglevel (console_printk[3])
-
-struct completion;
-struct pt_regs;
-struct user;
-
-/**
- * might_sleep - annotation for functions that can sleep
- *
- * this macro will print a stack trace if it is executed in an atomic
- * context (spinlock, irq-handler, ...).
- *
- * This is a useful debugging help to be able to catch problems early and not
- * be biten later when the calling function happens to sleep when it is not
- * supposed to.
- */
-#ifdef CONFIG_PREEMPT_VOLUNTARY
-extern int cond_resched(void);
-# define might_resched() cond_resched()
-#else
-# define might_resched() do { } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
- void __might_sleep(char *file, int line);
-# define might_sleep() \
- do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
-#else
-# define might_sleep() do { might_resched(); } while (0)
-#endif
-
-#define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0)
-
-#define abs(x) ({ \
- int __x = (x); \
- (__x < 0) ? -__x : __x; \
- })
-
-#define labs(x) ({ \
- long __x = (x); \
- (__x < 0) ? -__x : __x; \
- })
-
-extern struct atomic_notifier_head panic_notifier_list;
-extern long (*panic_blink)(long time);
-NORET_TYPE void panic(const char * fmt, ...)
- __attribute__ ((NORET_AND format (printf, 1, 2)));
-extern void oops_enter(void);
-extern void oops_exit(void);
-extern int oops_may_print(void);
-fastcall NORET_TYPE void do_exit(long error_code)
- ATTRIB_NORET;
-NORET_TYPE void complete_and_exit(struct completion *, long)
- ATTRIB_NORET;
-extern unsigned long simple_strtoul(const char *,char **,unsigned int);
-extern long simple_strtol(const char *,char **,unsigned int);
-extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
-extern long long simple_strtoll(const char *,char **,unsigned int);
-extern int sprintf(char * buf, const char * fmt, ...)
- __attribute__ ((format (printf, 2, 3)));
-extern int vsprintf(char *buf, const char *, va_list)
- __attribute__ ((format (printf, 2, 0)));
-extern int snprintf(char * buf, size_t size, const char * fmt, ...)
- __attribute__ ((format (printf, 3, 4)));
-extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
- __attribute__ ((format (printf, 3, 0)));
-extern int scnprintf(char * buf, size_t size, const char * fmt, ...)
- __attribute__ ((format (printf, 3, 4)));
-extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
- __attribute__ ((format (printf, 3, 0)));
-extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
- __attribute__ ((format (printf, 2, 3)));
-
-extern int sscanf(const char *, const char *, ...)
- __attribute__ ((format (scanf, 2, 3)));
-extern int vsscanf(const char *, const char *, va_list)
- __attribute__ ((format (scanf, 2, 0)));
-
-extern int get_option(char **str, int *pint);
-extern char *get_options(const char *str, int nints, int *ints);
-extern unsigned long long memparse(char *ptr, char **retptr);
-
-extern int core_kernel_text(unsigned long addr);
-extern int __kernel_text_address(unsigned long addr);
-extern int kernel_text_address(unsigned long addr);
-extern int session_of_pgrp(int pgrp);
-
-extern void dump_thread(struct pt_regs *regs, struct user *dump);
-
-#ifdef CONFIG_PRINTK
-asmlinkage int vprintk(const char *fmt, va_list args)
- __attribute__ ((format (printf, 1, 0)));
-asmlinkage int printk(const char * fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-#else
-static inline int vprintk(const char *s, va_list args)
- __attribute__ ((format (printf, 1, 0)));
-static inline int vprintk(const char *s, va_list args) { return 0; }
-static inline int printk(const char *s, ...)
- __attribute__ ((format (printf, 1, 2)));
-static inline int printk(const char *s, ...) { return 0; }
-#endif
-
-unsigned long int_sqrt(unsigned long);
-
-static inline int __attribute_pure__ long_log2(unsigned long x)
-{
- int r = 0;
- for (x >>= 1; x > 0; x >>= 1)
- r++;
- return r;
-}
-
-static inline unsigned long
-__attribute_const__ roundup_pow_of_two(unsigned long x)
-{
- return 1UL << fls_long(x - 1);
-}
-
-extern int printk_ratelimit(void);
-extern int __printk_ratelimit(int ratelimit_jiffies, int ratelimit_burst);
-
-static inline void console_silent(void)
-{
- console_loglevel = 0;
-}
-
-static inline void console_verbose(void)
-{
- if (console_loglevel)
- console_loglevel = 15;
-}
-
-extern void bust_spinlocks(int yes);
-extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
-extern int panic_timeout;
-extern int panic_on_oops;
-extern int tainted;
-extern const char *print_tainted(void);
-extern void add_taint(unsigned);
-
-/* Values used for system_state */
-extern enum system_states {
- SYSTEM_BOOTING,
- SYSTEM_RUNNING,
- SYSTEM_HALT,
- SYSTEM_POWER_OFF,
- SYSTEM_RESTART,
- SYSTEM_SUSPEND_DISK,
-} system_state;
-
-#define TAINT_PROPRIETARY_MODULE (1<<0)
-#define TAINT_FORCED_MODULE (1<<1)
-#define TAINT_UNSAFE_SMP (1<<2)
-#define TAINT_FORCED_RMMOD (1<<3)
-#define TAINT_MACHINE_CHECK (1<<4)
-#define TAINT_BAD_PAGE (1<<5)
-
-extern void dump_stack(void);
-
-#ifdef DEBUG
-/* If you are writing a driver, please use dev_dbg instead */
-#define pr_debug(fmt,arg...) \
- printk(KERN_DEBUG fmt,##arg)
-#else
-#define pr_debug(fmt,arg...) \
- do { } while (0)
-#endif
-
-#define pr_info(fmt,arg...) \
- printk(KERN_INFO fmt,##arg)
-
-/*
- * Display an IP address in readable format.
- */
-
-#define NIPQUAD(addr) \
- ((unsigned char *)&addr)[0], \
- ((unsigned char *)&addr)[1], \
- ((unsigned char *)&addr)[2], \
- ((unsigned char *)&addr)[3]
-#define NIPQUAD_FMT "%u.%u.%u.%u"
-
-#define NIP6(addr) \
- ntohs((addr).s6_addr16[0]), \
- ntohs((addr).s6_addr16[1]), \
- ntohs((addr).s6_addr16[2]), \
- ntohs((addr).s6_addr16[3]), \
- ntohs((addr).s6_addr16[4]), \
- ntohs((addr).s6_addr16[5]), \
- ntohs((addr).s6_addr16[6]), \
- ntohs((addr).s6_addr16[7])
-#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
-#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x"
-
-#if defined(__LITTLE_ENDIAN)
-#define HIPQUAD(addr) \
- ((unsigned char *)&addr)[3], \
- ((unsigned char *)&addr)[2], \
- ((unsigned char *)&addr)[1], \
- ((unsigned char *)&addr)[0]
-#elif defined(__BIG_ENDIAN)
-#define HIPQUAD NIPQUAD
-#else
-#error "Please fix asm/byteorder.h"
-#endif /* __LITTLE_ENDIAN */
-
-/*
- * min()/max() macros that also do
- * strict type-checking.. See the
- * "unnecessary" pointer comparison.
- */
-#define min(x,y) ({ \
- typeof(x) _x = (x); \
- typeof(y) _y = (y); \
- (void) (&_x == &_y); \
- _x < _y ? _x : _y; })
-
-#define max(x,y) ({ \
- typeof(x) _x = (x); \
- typeof(y) _y = (y); \
- (void) (&_x == &_y); \
- _x > _y ? _x : _y; })
-
-/*
- * ..and if you can't take the strict
- * types, you can specify one yourself.
- *
- * Or not use min/max at all, of course.
- */
-#define min_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#define max_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
-
-
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
-/*
- * Check at compile time that something is of a particular type.
- * Always evaluates to 1 so you may use it easily in comparisons.
- */
-#define typecheck(type,x) \
-({ type __dummy; \
- typeof(x) __dummy2; \
- (void)(&__dummy == &__dummy2); \
- 1; \
-})
-
-/*
- * Check at compile time that 'function' is a certain type, or is a pointer
- * to that type (needs to use typedef for the function type.)
- */
-#define typecheck_fn(type,function) \
-({ typeof(type) __tmp = function; \
- (void)__tmp; \
-})
-
-#endif /* __KERNEL__ */
-
-#define SI_LOAD_SHIFT 16
-struct sysinfo {
- long uptime; /* Seconds since boot */
- unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
- unsigned long totalram; /* Total usable main memory size */
- unsigned long freeram; /* Available memory size */
- unsigned long sharedram; /* Amount of shared memory */
- unsigned long bufferram; /* Memory used by buffers */
- unsigned long totalswap; /* Total swap space size */
- unsigned long freeswap; /* swap space still available */
- unsigned short procs; /* Number of current processes */
- unsigned short pad; /* explicit padding for m68k */
- unsigned long totalhigh; /* Total high memory size */
- unsigned long freehigh; /* Available high memory size */
- unsigned int mem_unit; /* Memory unit size in bytes */
- char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
-};
-
-/* Force a compilation error if condition is true */
-#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
-
-/* Force a compilation error if condition is true, but also produce a
- result (of value 0 and type size_t), so the expression can be used
- e.g. in a structure initializer (or where-ever else comma expressions
- aren't permitted). */
-#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
-
-/* Trap pasters of __FUNCTION__ at compile-time */
-#define __FUNCTION__ (__func__)
-
-#endif
diff --git a/original/linux/kernel_stat.h b/original/linux/kernel_stat.h
deleted file mode 100644
index 43e895f..0000000
--- a/original/linux/kernel_stat.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef _LINUX_KERNEL_STAT_H
-#define _LINUX_KERNEL_STAT_H
-
-#include <asm/irq.h>
-#include <linux/smp.h>
-#include <linux/threads.h>
-#include <linux/percpu.h>
-#include <linux/cpumask.h>
-#include <asm/cputime.h>
-
-/*
- * 'kernel_stat.h' contains the definitions needed for doing
- * some kernel statistics (CPU usage, context switches ...),
- * used by rstatd/perfmeter
- */
-
-struct cpu_usage_stat {
- cputime64_t user;
- cputime64_t nice;
- cputime64_t system;
- cputime64_t softirq;
- cputime64_t irq;
- cputime64_t idle;
- cputime64_t iowait;
- cputime64_t steal;
-};
-
-struct kernel_stat {
- struct cpu_usage_stat cpustat;
- unsigned int irqs[NR_IRQS];
-};
-
-DECLARE_PER_CPU(struct kernel_stat, kstat);
-
-#define kstat_cpu(cpu) per_cpu(kstat, cpu)
-/* Must have preemption disabled for this to be meaningful. */
-#define kstat_this_cpu __get_cpu_var(kstat)
-
-extern unsigned long long nr_context_switches(void);
-
-/*
- * Number of interrupts per specific IRQ source, since bootup
- */
-static inline int kstat_irqs(int irq)
-{
- int cpu, sum = 0;
-
- for_each_possible_cpu(cpu)
- sum += kstat_cpu(cpu).irqs[irq];
-
- return sum;
-}
-
-extern void account_user_time(struct task_struct *, cputime_t);
-extern void account_system_time(struct task_struct *, int, cputime_t);
-extern void account_steal_time(struct task_struct *, cputime_t);
-
-#endif /* _LINUX_KERNEL_STAT_H */
diff --git a/original/linux/kernelcapi.h b/original/linux/kernelcapi.h
deleted file mode 100644
index 891bb2c..0000000
--- a/original/linux/kernelcapi.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:31:31 kai Exp $
- *
- * Kernel CAPI 2.0 Interface for Linux
- *
- * (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
- *
- */
-
-#ifndef __KERNELCAPI_H__
-#define __KERNELCAPI_H__
-
-#define CAPI_MAXAPPL 240 /* maximum number of applications */
-#define CAPI_MAXCONTR 32 /* maximum number of controller */
-#define CAPI_MAXDATAWINDOW 8
-
-
-typedef struct kcapi_flagdef {
- int contr;
- int flag;
-} kcapi_flagdef;
-
-typedef struct kcapi_carddef {
- char driver[32];
- unsigned int port;
- unsigned irq;
- unsigned int membase;
- int cardnr;
-} kcapi_carddef;
-
-/* new ioctls >= 10 */
-#define KCAPI_CMD_TRACE 10
-#define KCAPI_CMD_ADDCARD 11 /* OBSOLETE */
-
-/*
- * flag > 2 => trace also data
- * flag & 1 => show trace
- */
-#define KCAPI_TRACE_OFF 0
-#define KCAPI_TRACE_SHORT_NO_DATA 1
-#define KCAPI_TRACE_FULL_NO_DATA 2
-#define KCAPI_TRACE_SHORT 3
-#define KCAPI_TRACE_FULL 4
-
-
-#ifdef __KERNEL__
-
-#include <linux/list.h>
-#include <linux/skbuff.h>
-
-#define KCI_CONTRUP 0 /* arg: struct capi_profile */
-#define KCI_CONTRDOWN 1 /* arg: NULL */
-
-struct capi20_appl {
- u16 applid;
- capi_register_params rparam;
- void (*recv_message)(struct capi20_appl *ap, struct sk_buff *skb);
- void *private;
-
- /* internal to kernelcapi.o */
- unsigned long nrecvctlpkt;
- unsigned long nrecvdatapkt;
- unsigned long nsentctlpkt;
- unsigned long nsentdatapkt;
- struct semaphore recv_sem;
- struct sk_buff_head recv_queue;
- struct work_struct recv_work;
- int release_in_progress;
-
- /* ugly hack to allow for notification of added/removed
- * controllers. The Right Way (tm) is known. XXX
- */
- void (*callback) (unsigned int cmd, __u32 contr, void *data);
-};
-
-u16 capi20_isinstalled(void);
-u16 capi20_register(struct capi20_appl *ap);
-u16 capi20_release(struct capi20_appl *ap);
-u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb);
-u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN]);
-u16 capi20_get_version(u32 contr, struct capi_version *verp);
-u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN]);
-u16 capi20_get_profile(u32 contr, struct capi_profile *profp);
-int capi20_manufacturer(unsigned int cmd, void __user *data);
-
-/* temporary hack XXX */
-void capi20_set_callback(struct capi20_appl *ap,
- void (*callback) (unsigned int cmd, __u32 contr, void *data));
-
-
-
-#define CAPI_NOERROR 0x0000
-
-#define CAPI_TOOMANYAPPLS 0x1001
-#define CAPI_LOGBLKSIZETOSMALL 0x1002
-#define CAPI_BUFFEXECEEDS64K 0x1003
-#define CAPI_MSGBUFSIZETOOSMALL 0x1004
-#define CAPI_ANZLOGCONNNOTSUPPORTED 0x1005
-#define CAPI_REGRESERVED 0x1006
-#define CAPI_REGBUSY 0x1007
-#define CAPI_REGOSRESOURCEERR 0x1008
-#define CAPI_REGNOTINSTALLED 0x1009
-#define CAPI_REGCTRLERNOTSUPPORTEXTEQUIP 0x100a
-#define CAPI_REGCTRLERONLYSUPPORTEXTEQUIP 0x100b
-
-#define CAPI_ILLAPPNR 0x1101
-#define CAPI_ILLCMDORSUBCMDORMSGTOSMALL 0x1102
-#define CAPI_SENDQUEUEFULL 0x1103
-#define CAPI_RECEIVEQUEUEEMPTY 0x1104
-#define CAPI_RECEIVEOVERFLOW 0x1105
-#define CAPI_UNKNOWNNOTPAR 0x1106
-#define CAPI_MSGBUSY 0x1107
-#define CAPI_MSGOSRESOURCEERR 0x1108
-#define CAPI_MSGNOTINSTALLED 0x1109
-#define CAPI_MSGCTRLERNOTSUPPORTEXTEQUIP 0x110a
-#define CAPI_MSGCTRLERONLYSUPPORTEXTEQUIP 0x110b
-
-typedef enum {
- CapiMessageNotSupportedInCurrentState = 0x2001,
- CapiIllContrPlciNcci = 0x2002,
- CapiNoPlciAvailable = 0x2003,
- CapiNoNcciAvailable = 0x2004,
- CapiNoListenResourcesAvailable = 0x2005,
- CapiNoFaxResourcesAvailable = 0x2006,
- CapiIllMessageParmCoding = 0x2007,
-} RESOURCE_CODING_PROBLEM;
-
-typedef enum {
- CapiB1ProtocolNotSupported = 0x3001,
- CapiB2ProtocolNotSupported = 0x3002,
- CapiB3ProtocolNotSupported = 0x3003,
- CapiB1ProtocolParameterNotSupported = 0x3004,
- CapiB2ProtocolParameterNotSupported = 0x3005,
- CapiB3ProtocolParameterNotSupported = 0x3006,
- CapiBProtocolCombinationNotSupported = 0x3007,
- CapiNcpiNotSupported = 0x3008,
- CapiCipValueUnknown = 0x3009,
- CapiFlagsNotSupported = 0x300a,
- CapiFacilityNotSupported = 0x300b,
- CapiDataLengthNotSupportedByCurrentProtocol = 0x300c,
- CapiResetProcedureNotSupportedByCurrentProtocol = 0x300d,
- CapiTeiAssignmentFailed = 0x300e,
-} REQUESTED_SERVICES_PROBLEM;
-
-typedef enum {
- CapiSuccess = 0x0000,
- CapiSupplementaryServiceNotSupported = 0x300e,
- CapiRequestNotAllowedInThisState = 0x3010,
-} SUPPLEMENTARY_SERVICE_INFO;
-
-typedef enum {
- CapiProtocolErrorLayer1 = 0x3301,
- CapiProtocolErrorLayer2 = 0x3302,
- CapiProtocolErrorLayer3 = 0x3303,
- CapiTimeOut = 0x3303, // SuppServiceReason
- CapiCallGivenToOtherApplication = 0x3304,
-} CAPI_REASON;
-
-#endif /* __KERNEL__ */
-
-#endif /* __KERNELCAPI_H__ */
diff --git a/original/linux/key.h b/original/linux/key.h
deleted file mode 100644
index 169f05e..0000000
--- a/original/linux/key.h
+++ /dev/null
@@ -1,386 +0,0 @@
-/* key.h: authentication token and access key management
- *
- * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * 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.
- *
- *
- * See Documentation/keys.txt for information on keys/keyrings.
- */
-
-#ifndef _LINUX_KEY_H
-#define _LINUX_KEY_H
-
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/rbtree.h>
-#include <linux/rcupdate.h>
-#include <asm/atomic.h>
-
-#ifdef __KERNEL__
-
-/* key handle serial number */
-typedef int32_t key_serial_t;
-
-/* key handle permissions mask */
-typedef uint32_t key_perm_t;
-
-struct key;
-
-#ifdef CONFIG_KEYS
-
-#undef KEY_DEBUGGING
-
-#define KEY_POS_VIEW 0x01000000 /* possessor can view a key's attributes */
-#define KEY_POS_READ 0x02000000 /* possessor can read key payload / view keyring */
-#define KEY_POS_WRITE 0x04000000 /* possessor can update key payload / add link to keyring */
-#define KEY_POS_SEARCH 0x08000000 /* possessor can find a key in search / search a keyring */
-#define KEY_POS_LINK 0x10000000 /* possessor can create a link to a key/keyring */
-#define KEY_POS_SETATTR 0x20000000 /* possessor can set key attributes */
-#define KEY_POS_ALL 0x3f000000
-
-#define KEY_USR_VIEW 0x00010000 /* user permissions... */
-#define KEY_USR_READ 0x00020000
-#define KEY_USR_WRITE 0x00040000
-#define KEY_USR_SEARCH 0x00080000
-#define KEY_USR_LINK 0x00100000
-#define KEY_USR_SETATTR 0x00200000
-#define KEY_USR_ALL 0x003f0000
-
-#define KEY_GRP_VIEW 0x00000100 /* group permissions... */
-#define KEY_GRP_READ 0x00000200
-#define KEY_GRP_WRITE 0x00000400
-#define KEY_GRP_SEARCH 0x00000800
-#define KEY_GRP_LINK 0x00001000
-#define KEY_GRP_SETATTR 0x00002000
-#define KEY_GRP_ALL 0x00003f00
-
-#define KEY_OTH_VIEW 0x00000001 /* third party permissions... */
-#define KEY_OTH_READ 0x00000002
-#define KEY_OTH_WRITE 0x00000004
-#define KEY_OTH_SEARCH 0x00000008
-#define KEY_OTH_LINK 0x00000010
-#define KEY_OTH_SETATTR 0x00000020
-#define KEY_OTH_ALL 0x0000003f
-
-struct seq_file;
-struct user_struct;
-struct signal_struct;
-
-struct key_type;
-struct key_owner;
-struct keyring_list;
-struct keyring_name;
-
-/*****************************************************************************/
-/*
- * key reference with possession attribute handling
- *
- * NOTE! key_ref_t is a typedef'd pointer to a type that is not actually
- * defined. This is because we abuse the bottom bit of the reference to carry a
- * flag to indicate whether the calling process possesses that key in one of
- * its keyrings.
- *
- * the key_ref_t has been made a separate type so that the compiler can reject
- * attempts to dereference it without proper conversion.
- *
- * the three functions are used to assemble and disassemble references
- */
-typedef struct __key_reference_with_attributes *key_ref_t;
-
-static inline key_ref_t make_key_ref(const struct key *key,
- unsigned long possession)
-{
- return (key_ref_t) ((unsigned long) key | possession);
-}
-
-static inline struct key *key_ref_to_ptr(const key_ref_t key_ref)
-{
- return (struct key *) ((unsigned long) key_ref & ~1UL);
-}
-
-static inline unsigned long is_key_possessed(const key_ref_t key_ref)
-{
- return (unsigned long) key_ref & 1UL;
-}
-
-/*****************************************************************************/
-/*
- * authentication token / access credential / keyring
- * - types of key include:
- * - keyrings
- * - disk encryption IDs
- * - Kerberos TGTs and tickets
- */
-struct key {
- atomic_t usage; /* number of references */
- key_serial_t serial; /* key serial number */
- struct rb_node serial_node;
- struct key_type *type; /* type of key */
- struct rw_semaphore sem; /* change vs change sem */
- struct key_user *user; /* owner of this key */
- void *security; /* security data for this key */
- time_t expiry; /* time at which key expires (or 0) */
- uid_t uid;
- gid_t gid;
- key_perm_t perm; /* access permissions */
- unsigned short quotalen; /* length added to quota */
- unsigned short datalen; /* payload data length
- * - may not match RCU dereferenced payload
- * - payload should contain own length
- */
-
-#ifdef KEY_DEBUGGING
- unsigned magic;
-#define KEY_DEBUG_MAGIC 0x18273645u
-#define KEY_DEBUG_MAGIC_X 0xf8e9dacbu
-#endif
-
- unsigned long flags; /* status flags (change with bitops) */
-#define KEY_FLAG_INSTANTIATED 0 /* set if key has been instantiated */
-#define KEY_FLAG_DEAD 1 /* set if key type has been deleted */
-#define KEY_FLAG_REVOKED 2 /* set if key had been revoked */
-#define KEY_FLAG_IN_QUOTA 3 /* set if key consumes quota */
-#define KEY_FLAG_USER_CONSTRUCT 4 /* set if key is being constructed in userspace */
-#define KEY_FLAG_NEGATIVE 5 /* set if key is negative */
-
- /* the description string
- * - this is used to match a key against search criteria
- * - this should be a printable string
- * - eg: for krb5 AFS, this might be "afs@REDHAT.COM"
- */
- char *description;
-
- /* type specific data
- * - this is used by the keyring type to index the name
- */
- union {
- struct list_head link;
- } type_data;
-
- /* key data
- * - this is used to hold the data actually used in cryptography or
- * whatever
- */
- union {
- unsigned long value;
- void *data;
- struct keyring_list *subscriptions;
- } payload;
-};
-
-/*****************************************************************************/
-/*
- * kernel managed key type definition
- */
-typedef int (*request_key_actor_t)(struct key *key, struct key *authkey,
- const char *op, void *aux);
-
-struct key_type {
- /* name of the type */
- const char *name;
-
- /* default payload length for quota precalculation (optional)
- * - this can be used instead of calling key_payload_reserve(), that
- * function only needs to be called if the real datalen is different
- */
- size_t def_datalen;
-
- /* instantiate a key of this type
- * - this method should call key_payload_reserve() to determine if the
- * user's quota will hold the payload
- */
- int (*instantiate)(struct key *key, const void *data, size_t datalen);
-
- /* update a key of this type (optional)
- * - this method should call key_payload_reserve() to recalculate the
- * quota consumption
- * - the key must be locked against read when modifying
- */
- int (*update)(struct key *key, const void *data, size_t datalen);
-
- /* match a key against a description */
- int (*match)(const struct key *key, const void *desc);
-
- /* clear some of the data from a key on revokation (optional)
- * - the key's semaphore will be write-locked by the caller
- */
- void (*revoke)(struct key *key);
-
- /* clear the data from a key (optional) */
- void (*destroy)(struct key *key);
-
- /* describe a key */
- void (*describe)(const struct key *key, struct seq_file *p);
-
- /* read a key's data (optional)
- * - permission checks will be done by the caller
- * - the key's semaphore will be readlocked by the caller
- * - should return the amount of data that could be read, no matter how
- * much is copied into the buffer
- * - shouldn't do the copy if the buffer is NULL
- */
- long (*read)(const struct key *key, char __user *buffer, size_t buflen);
-
- /* handle request_key() for this type instead of invoking
- * /sbin/request-key (optional)
- * - key is the key to instantiate
- * - authkey is the authority to assume when instantiating this key
- * - op is the operation to be done, usually "create"
- * - the call must not return until the instantiation process has run
- * its course
- */
- request_key_actor_t request_key;
-
- /* internal fields */
- struct list_head link; /* link in types list */
-};
-
-extern struct key_type key_type_keyring;
-
-extern int register_key_type(struct key_type *ktype);
-extern void unregister_key_type(struct key_type *ktype);
-
-extern struct key *key_alloc(struct key_type *type,
- const char *desc,
- uid_t uid, gid_t gid,
- struct task_struct *ctx,
- key_perm_t perm,
- unsigned long flags);
-
-
-#define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */
-#define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */
-#define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */
-
-extern int key_payload_reserve(struct key *key, size_t datalen);
-extern int key_instantiate_and_link(struct key *key,
- const void *data,
- size_t datalen,
- struct key *keyring,
- struct key *instkey);
-extern int key_negate_and_link(struct key *key,
- unsigned timeout,
- struct key *keyring,
- struct key *instkey);
-extern void key_revoke(struct key *key);
-extern void key_put(struct key *key);
-
-static inline struct key *key_get(struct key *key)
-{
- if (key)
- atomic_inc(&key->usage);
- return key;
-}
-
-static inline void key_ref_put(key_ref_t key_ref)
-{
- key_put(key_ref_to_ptr(key_ref));
-}
-
-extern struct key *request_key(struct key_type *type,
- const char *description,
- const char *callout_info);
-
-extern struct key *request_key_with_auxdata(struct key_type *type,
- const char *description,
- const char *callout_info,
- void *aux);
-
-extern int key_validate(struct key *key);
-
-extern key_ref_t key_create_or_update(key_ref_t keyring,
- const char *type,
- const char *description,
- const void *payload,
- size_t plen,
- unsigned long flags);
-
-extern int key_update(key_ref_t key,
- const void *payload,
- size_t plen);
-
-extern int key_link(struct key *keyring,
- struct key *key);
-
-extern int key_unlink(struct key *keyring,
- struct key *key);
-
-extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
- struct task_struct *ctx,
- unsigned long flags,
- struct key *dest);
-
-extern int keyring_clear(struct key *keyring);
-
-extern key_ref_t keyring_search(key_ref_t keyring,
- struct key_type *type,
- const char *description);
-
-extern int keyring_add_key(struct key *keyring,
- struct key *key);
-
-extern struct key *key_lookup(key_serial_t id);
-
-extern void keyring_replace_payload(struct key *key, void *replacement);
-
-#define key_serial(key) ((key) ? (key)->serial : 0)
-
-/*
- * the userspace interface
- */
-extern struct key root_user_keyring, root_session_keyring;
-extern int alloc_uid_keyring(struct user_struct *user,
- struct task_struct *ctx);
-extern void switch_uid_keyring(struct user_struct *new_user);
-extern int copy_keys(unsigned long clone_flags, struct task_struct *tsk);
-extern int copy_thread_group_keys(struct task_struct *tsk);
-extern void exit_keys(struct task_struct *tsk);
-extern void exit_thread_group_keys(struct signal_struct *tg);
-extern int suid_keys(struct task_struct *tsk);
-extern int exec_keys(struct task_struct *tsk);
-extern void key_fsuid_changed(struct task_struct *tsk);
-extern void key_fsgid_changed(struct task_struct *tsk);
-extern void key_init(void);
-
-#define __install_session_keyring(tsk, keyring) \
-({ \
- struct key *old_session = tsk->signal->session_keyring; \
- tsk->signal->session_keyring = keyring; \
- old_session; \
-})
-
-#else /* CONFIG_KEYS */
-
-#define key_validate(k) 0
-#define key_serial(k) 0
-#define key_get(k) ({ NULL; })
-#define key_put(k) do { } while(0)
-#define key_ref_put(k) do { } while(0)
-#define make_key_ref(k) ({ NULL; })
-#define key_ref_to_ptr(k) ({ NULL; })
-#define is_key_possessed(k) 0
-#define alloc_uid_keyring(u,c) 0
-#define switch_uid_keyring(u) do { } while(0)
-#define __install_session_keyring(t, k) ({ NULL; })
-#define copy_keys(f,t) 0
-#define copy_thread_group_keys(t) 0
-#define exit_keys(t) do { } while(0)
-#define exit_thread_group_keys(tg) do { } while(0)
-#define suid_keys(t) do { } while(0)
-#define exec_keys(t) do { } while(0)
-#define key_fsuid_changed(t) do { } while(0)
-#define key_fsgid_changed(t) do { } while(0)
-#define key_init() do { } while(0)
-
-/* Initial keyrings */
-extern struct key root_user_keyring;
-extern struct key root_session_keyring;
-
-#endif /* CONFIG_KEYS */
-#endif /* __KERNEL__ */
-#endif /* _LINUX_KEY_H */
diff --git a/original/linux/keyboard.h b/original/linux/keyboard.h
deleted file mode 100644
index de76843..0000000
--- a/original/linux/keyboard.h
+++ /dev/null
@@ -1,444 +0,0 @@
-#ifndef __LINUX_KEYBOARD_H
-#define __LINUX_KEYBOARD_H
-
-#include <linux/wait.h>
-
-#define KG_SHIFT 0
-#define KG_CTRL 2
-#define KG_ALT 3
-#define KG_ALTGR 1
-#define KG_SHIFTL 4
-#define KG_KANASHIFT 4
-#define KG_SHIFTR 5
-#define KG_CTRLL 6
-#define KG_CTRLR 7
-#define KG_CAPSSHIFT 8
-
-#define NR_SHIFT 9
-
-#define NR_KEYS 256
-#define MAX_NR_KEYMAPS 256
-/* This means 128Kb if all keymaps are allocated. Only the superuser
- may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */
-#define MAX_NR_OF_USER_KEYMAPS 256 /* should be at least 7 */
-
-#ifdef __KERNEL__
-extern const int NR_TYPES;
-extern const int max_vals[];
-extern unsigned short *key_maps[MAX_NR_KEYMAPS];
-extern unsigned short plain_map[NR_KEYS];
-#endif
-
-#define MAX_NR_FUNC 256 /* max nr of strings assigned to keys */
-
-#define KT_LATIN 0 /* we depend on this being zero */
-#define KT_LETTER 11 /* symbol that can be acted upon by CapsLock */
-#define KT_FN 1
-#define KT_SPEC 2
-#define KT_PAD 3
-#define KT_DEAD 4
-#define KT_CONS 5
-#define KT_CUR 6
-#define KT_SHIFT 7
-#define KT_META 8
-#define KT_ASCII 9
-#define KT_LOCK 10
-#define KT_SLOCK 12
-#define KT_BRL 14
-
-#define K(t,v) (((t)<<8)|(v))
-#define KTYP(x) ((x) >> 8)
-#define KVAL(x) ((x) & 0xff)
-
-#define K_F1 K(KT_FN,0)
-#define K_F2 K(KT_FN,1)
-#define K_F3 K(KT_FN,2)
-#define K_F4 K(KT_FN,3)
-#define K_F5 K(KT_FN,4)
-#define K_F6 K(KT_FN,5)
-#define K_F7 K(KT_FN,6)
-#define K_F8 K(KT_FN,7)
-#define K_F9 K(KT_FN,8)
-#define K_F10 K(KT_FN,9)
-#define K_F11 K(KT_FN,10)
-#define K_F12 K(KT_FN,11)
-#define K_F13 K(KT_FN,12)
-#define K_F14 K(KT_FN,13)
-#define K_F15 K(KT_FN,14)
-#define K_F16 K(KT_FN,15)
-#define K_F17 K(KT_FN,16)
-#define K_F18 K(KT_FN,17)
-#define K_F19 K(KT_FN,18)
-#define K_F20 K(KT_FN,19)
-#define K_FIND K(KT_FN,20)
-#define K_INSERT K(KT_FN,21)
-#define K_REMOVE K(KT_FN,22)
-#define K_SELECT K(KT_FN,23)
-#define K_PGUP K(KT_FN,24) /* PGUP is a synonym for PRIOR */
-#define K_PGDN K(KT_FN,25) /* PGDN is a synonym for NEXT */
-#define K_MACRO K(KT_FN,26)
-#define K_HELP K(KT_FN,27)
-#define K_DO K(KT_FN,28)
-#define K_PAUSE K(KT_FN,29)
-#define K_F21 K(KT_FN,30)
-#define K_F22 K(KT_FN,31)
-#define K_F23 K(KT_FN,32)
-#define K_F24 K(KT_FN,33)
-#define K_F25 K(KT_FN,34)
-#define K_F26 K(KT_FN,35)
-#define K_F27 K(KT_FN,36)
-#define K_F28 K(KT_FN,37)
-#define K_F29 K(KT_FN,38)
-#define K_F30 K(KT_FN,39)
-#define K_F31 K(KT_FN,40)
-#define K_F32 K(KT_FN,41)
-#define K_F33 K(KT_FN,42)
-#define K_F34 K(KT_FN,43)
-#define K_F35 K(KT_FN,44)
-#define K_F36 K(KT_FN,45)
-#define K_F37 K(KT_FN,46)
-#define K_F38 K(KT_FN,47)
-#define K_F39 K(KT_FN,48)
-#define K_F40 K(KT_FN,49)
-#define K_F41 K(KT_FN,50)
-#define K_F42 K(KT_FN,51)
-#define K_F43 K(KT_FN,52)
-#define K_F44 K(KT_FN,53)
-#define K_F45 K(KT_FN,54)
-#define K_F46 K(KT_FN,55)
-#define K_F47 K(KT_FN,56)
-#define K_F48 K(KT_FN,57)
-#define K_F49 K(KT_FN,58)
-#define K_F50 K(KT_FN,59)
-#define K_F51 K(KT_FN,60)
-#define K_F52 K(KT_FN,61)
-#define K_F53 K(KT_FN,62)
-#define K_F54 K(KT_FN,63)
-#define K_F55 K(KT_FN,64)
-#define K_F56 K(KT_FN,65)
-#define K_F57 K(KT_FN,66)
-#define K_F58 K(KT_FN,67)
-#define K_F59 K(KT_FN,68)
-#define K_F60 K(KT_FN,69)
-#define K_F61 K(KT_FN,70)
-#define K_F62 K(KT_FN,71)
-#define K_F63 K(KT_FN,72)
-#define K_F64 K(KT_FN,73)
-#define K_F65 K(KT_FN,74)
-#define K_F66 K(KT_FN,75)
-#define K_F67 K(KT_FN,76)
-#define K_F68 K(KT_FN,77)
-#define K_F69 K(KT_FN,78)
-#define K_F70 K(KT_FN,79)
-#define K_F71 K(KT_FN,80)
-#define K_F72 K(KT_FN,81)
-#define K_F73 K(KT_FN,82)
-#define K_F74 K(KT_FN,83)
-#define K_F75 K(KT_FN,84)
-#define K_F76 K(KT_FN,85)
-#define K_F77 K(KT_FN,86)
-#define K_F78 K(KT_FN,87)
-#define K_F79 K(KT_FN,88)
-#define K_F80 K(KT_FN,89)
-#define K_F81 K(KT_FN,90)
-#define K_F82 K(KT_FN,91)
-#define K_F83 K(KT_FN,92)
-#define K_F84 K(KT_FN,93)
-#define K_F85 K(KT_FN,94)
-#define K_F86 K(KT_FN,95)
-#define K_F87 K(KT_FN,96)
-#define K_F88 K(KT_FN,97)
-#define K_F89 K(KT_FN,98)
-#define K_F90 K(KT_FN,99)
-#define K_F91 K(KT_FN,100)
-#define K_F92 K(KT_FN,101)
-#define K_F93 K(KT_FN,102)
-#define K_F94 K(KT_FN,103)
-#define K_F95 K(KT_FN,104)
-#define K_F96 K(KT_FN,105)
-#define K_F97 K(KT_FN,106)
-#define K_F98 K(KT_FN,107)
-#define K_F99 K(KT_FN,108)
-#define K_F100 K(KT_FN,109)
-#define K_F101 K(KT_FN,110)
-#define K_F102 K(KT_FN,111)
-#define K_F103 K(KT_FN,112)
-#define K_F104 K(KT_FN,113)
-#define K_F105 K(KT_FN,114)
-#define K_F106 K(KT_FN,115)
-#define K_F107 K(KT_FN,116)
-#define K_F108 K(KT_FN,117)
-#define K_F109 K(KT_FN,118)
-#define K_F110 K(KT_FN,119)
-#define K_F111 K(KT_FN,120)
-#define K_F112 K(KT_FN,121)
-#define K_F113 K(KT_FN,122)
-#define K_F114 K(KT_FN,123)
-#define K_F115 K(KT_FN,124)
-#define K_F116 K(KT_FN,125)
-#define K_F117 K(KT_FN,126)
-#define K_F118 K(KT_FN,127)
-#define K_F119 K(KT_FN,128)
-#define K_F120 K(KT_FN,129)
-#define K_F121 K(KT_FN,130)
-#define K_F122 K(KT_FN,131)
-#define K_F123 K(KT_FN,132)
-#define K_F124 K(KT_FN,133)
-#define K_F125 K(KT_FN,134)
-#define K_F126 K(KT_FN,135)
-#define K_F127 K(KT_FN,136)
-#define K_F128 K(KT_FN,137)
-#define K_F129 K(KT_FN,138)
-#define K_F130 K(KT_FN,139)
-#define K_F131 K(KT_FN,140)
-#define K_F132 K(KT_FN,141)
-#define K_F133 K(KT_FN,142)
-#define K_F134 K(KT_FN,143)
-#define K_F135 K(KT_FN,144)
-#define K_F136 K(KT_FN,145)
-#define K_F137 K(KT_FN,146)
-#define K_F138 K(KT_FN,147)
-#define K_F139 K(KT_FN,148)
-#define K_F140 K(KT_FN,149)
-#define K_F141 K(KT_FN,150)
-#define K_F142 K(KT_FN,151)
-#define K_F143 K(KT_FN,152)
-#define K_F144 K(KT_FN,153)
-#define K_F145 K(KT_FN,154)
-#define K_F146 K(KT_FN,155)
-#define K_F147 K(KT_FN,156)
-#define K_F148 K(KT_FN,157)
-#define K_F149 K(KT_FN,158)
-#define K_F150 K(KT_FN,159)
-#define K_F151 K(KT_FN,160)
-#define K_F152 K(KT_FN,161)
-#define K_F153 K(KT_FN,162)
-#define K_F154 K(KT_FN,163)
-#define K_F155 K(KT_FN,164)
-#define K_F156 K(KT_FN,165)
-#define K_F157 K(KT_FN,166)
-#define K_F158 K(KT_FN,167)
-#define K_F159 K(KT_FN,168)
-#define K_F160 K(KT_FN,169)
-#define K_F161 K(KT_FN,170)
-#define K_F162 K(KT_FN,171)
-#define K_F163 K(KT_FN,172)
-#define K_F164 K(KT_FN,173)
-#define K_F165 K(KT_FN,174)
-#define K_F166 K(KT_FN,175)
-#define K_F167 K(KT_FN,176)
-#define K_F168 K(KT_FN,177)
-#define K_F169 K(KT_FN,178)
-#define K_F170 K(KT_FN,179)
-#define K_F171 K(KT_FN,180)
-#define K_F172 K(KT_FN,181)
-#define K_F173 K(KT_FN,182)
-#define K_F174 K(KT_FN,183)
-#define K_F175 K(KT_FN,184)
-#define K_F176 K(KT_FN,185)
-#define K_F177 K(KT_FN,186)
-#define K_F178 K(KT_FN,187)
-#define K_F179 K(KT_FN,188)
-#define K_F180 K(KT_FN,189)
-#define K_F181 K(KT_FN,190)
-#define K_F182 K(KT_FN,191)
-#define K_F183 K(KT_FN,192)
-#define K_F184 K(KT_FN,193)
-#define K_F185 K(KT_FN,194)
-#define K_F186 K(KT_FN,195)
-#define K_F187 K(KT_FN,196)
-#define K_F188 K(KT_FN,197)
-#define K_F189 K(KT_FN,198)
-#define K_F190 K(KT_FN,199)
-#define K_F191 K(KT_FN,200)
-#define K_F192 K(KT_FN,201)
-#define K_F193 K(KT_FN,202)
-#define K_F194 K(KT_FN,203)
-#define K_F195 K(KT_FN,204)
-#define K_F196 K(KT_FN,205)
-#define K_F197 K(KT_FN,206)
-#define K_F198 K(KT_FN,207)
-#define K_F199 K(KT_FN,208)
-#define K_F200 K(KT_FN,209)
-#define K_F201 K(KT_FN,210)
-#define K_F202 K(KT_FN,211)
-#define K_F203 K(KT_FN,212)
-#define K_F204 K(KT_FN,213)
-#define K_F205 K(KT_FN,214)
-#define K_F206 K(KT_FN,215)
-#define K_F207 K(KT_FN,216)
-#define K_F208 K(KT_FN,217)
-#define K_F209 K(KT_FN,218)
-#define K_F210 K(KT_FN,219)
-#define K_F211 K(KT_FN,220)
-#define K_F212 K(KT_FN,221)
-#define K_F213 K(KT_FN,222)
-#define K_F214 K(KT_FN,223)
-#define K_F215 K(KT_FN,224)
-#define K_F216 K(KT_FN,225)
-#define K_F217 K(KT_FN,226)
-#define K_F218 K(KT_FN,227)
-#define K_F219 K(KT_FN,228)
-#define K_F220 K(KT_FN,229)
-#define K_F221 K(KT_FN,230)
-#define K_F222 K(KT_FN,231)
-#define K_F223 K(KT_FN,232)
-#define K_F224 K(KT_FN,233)
-#define K_F225 K(KT_FN,234)
-#define K_F226 K(KT_FN,235)
-#define K_F227 K(KT_FN,236)
-#define K_F228 K(KT_FN,237)
-#define K_F229 K(KT_FN,238)
-#define K_F230 K(KT_FN,239)
-#define K_F231 K(KT_FN,240)
-#define K_F232 K(KT_FN,241)
-#define K_F233 K(KT_FN,242)
-#define K_F234 K(KT_FN,243)
-#define K_F235 K(KT_FN,244)
-#define K_F236 K(KT_FN,245)
-#define K_F237 K(KT_FN,246)
-#define K_F238 K(KT_FN,247)
-#define K_F239 K(KT_FN,248)
-#define K_F240 K(KT_FN,249)
-#define K_F241 K(KT_FN,250)
-#define K_F242 K(KT_FN,251)
-#define K_F243 K(KT_FN,252)
-#define K_F244 K(KT_FN,253)
-#define K_F245 K(KT_FN,254)
-#define K_UNDO K(KT_FN,255)
-
-
-#define K_HOLE K(KT_SPEC,0)
-#define K_ENTER K(KT_SPEC,1)
-#define K_SH_REGS K(KT_SPEC,2)
-#define K_SH_MEM K(KT_SPEC,3)
-#define K_SH_STAT K(KT_SPEC,4)
-#define K_BREAK K(KT_SPEC,5)
-#define K_CONS K(KT_SPEC,6)
-#define K_CAPS K(KT_SPEC,7)
-#define K_NUM K(KT_SPEC,8)
-#define K_HOLD K(KT_SPEC,9)
-#define K_SCROLLFORW K(KT_SPEC,10)
-#define K_SCROLLBACK K(KT_SPEC,11)
-#define K_BOOT K(KT_SPEC,12)
-#define K_CAPSON K(KT_SPEC,13)
-#define K_COMPOSE K(KT_SPEC,14)
-#define K_SAK K(KT_SPEC,15)
-#define K_DECRCONSOLE K(KT_SPEC,16)
-#define K_INCRCONSOLE K(KT_SPEC,17)
-#define K_SPAWNCONSOLE K(KT_SPEC,18)
-#define K_BARENUMLOCK K(KT_SPEC,19)
-
-#define K_ALLOCATED K(KT_SPEC,126) /* dynamically allocated keymap */
-#define K_NOSUCHMAP K(KT_SPEC,127) /* returned by KDGKBENT */
-
-#define K_P0 K(KT_PAD,0)
-#define K_P1 K(KT_PAD,1)
-#define K_P2 K(KT_PAD,2)
-#define K_P3 K(KT_PAD,3)
-#define K_P4 K(KT_PAD,4)
-#define K_P5 K(KT_PAD,5)
-#define K_P6 K(KT_PAD,6)
-#define K_P7 K(KT_PAD,7)
-#define K_P8 K(KT_PAD,8)
-#define K_P9 K(KT_PAD,9)
-#define K_PPLUS K(KT_PAD,10) /* key-pad plus */
-#define K_PMINUS K(KT_PAD,11) /* key-pad minus */
-#define K_PSTAR K(KT_PAD,12) /* key-pad asterisk (star) */
-#define K_PSLASH K(KT_PAD,13) /* key-pad slash */
-#define K_PENTER K(KT_PAD,14) /* key-pad enter */
-#define K_PCOMMA K(KT_PAD,15) /* key-pad comma: kludge... */
-#define K_PDOT K(KT_PAD,16) /* key-pad dot (period): kludge... */
-#define K_PPLUSMINUS K(KT_PAD,17) /* key-pad plus/minus */
-#define K_PPARENL K(KT_PAD,18) /* key-pad left parenthesis */
-#define K_PPARENR K(KT_PAD,19) /* key-pad right parenthesis */
-
-#define NR_PAD 20
-
-#define K_DGRAVE K(KT_DEAD,0)
-#define K_DACUTE K(KT_DEAD,1)
-#define K_DCIRCM K(KT_DEAD,2)
-#define K_DTILDE K(KT_DEAD,3)
-#define K_DDIERE K(KT_DEAD,4)
-#define K_DCEDIL K(KT_DEAD,5)
-
-#define NR_DEAD 6
-
-#define K_DOWN K(KT_CUR,0)
-#define K_LEFT K(KT_CUR,1)
-#define K_RIGHT K(KT_CUR,2)
-#define K_UP K(KT_CUR,3)
-
-#define K_SHIFT K(KT_SHIFT,KG_SHIFT)
-#define K_CTRL K(KT_SHIFT,KG_CTRL)
-#define K_ALT K(KT_SHIFT,KG_ALT)
-#define K_ALTGR K(KT_SHIFT,KG_ALTGR)
-#define K_SHIFTL K(KT_SHIFT,KG_SHIFTL)
-#define K_SHIFTR K(KT_SHIFT,KG_SHIFTR)
-#define K_CTRLL K(KT_SHIFT,KG_CTRLL)
-#define K_CTRLR K(KT_SHIFT,KG_CTRLR)
-#define K_CAPSSHIFT K(KT_SHIFT,KG_CAPSSHIFT)
-
-#define K_ASC0 K(KT_ASCII,0)
-#define K_ASC1 K(KT_ASCII,1)
-#define K_ASC2 K(KT_ASCII,2)
-#define K_ASC3 K(KT_ASCII,3)
-#define K_ASC4 K(KT_ASCII,4)
-#define K_ASC5 K(KT_ASCII,5)
-#define K_ASC6 K(KT_ASCII,6)
-#define K_ASC7 K(KT_ASCII,7)
-#define K_ASC8 K(KT_ASCII,8)
-#define K_ASC9 K(KT_ASCII,9)
-#define K_HEX0 K(KT_ASCII,10)
-#define K_HEX1 K(KT_ASCII,11)
-#define K_HEX2 K(KT_ASCII,12)
-#define K_HEX3 K(KT_ASCII,13)
-#define K_HEX4 K(KT_ASCII,14)
-#define K_HEX5 K(KT_ASCII,15)
-#define K_HEX6 K(KT_ASCII,16)
-#define K_HEX7 K(KT_ASCII,17)
-#define K_HEX8 K(KT_ASCII,18)
-#define K_HEX9 K(KT_ASCII,19)
-#define K_HEXa K(KT_ASCII,20)
-#define K_HEXb K(KT_ASCII,21)
-#define K_HEXc K(KT_ASCII,22)
-#define K_HEXd K(KT_ASCII,23)
-#define K_HEXe K(KT_ASCII,24)
-#define K_HEXf K(KT_ASCII,25)
-
-#define NR_ASCII 26
-
-#define K_SHIFTLOCK K(KT_LOCK,KG_SHIFT)
-#define K_CTRLLOCK K(KT_LOCK,KG_CTRL)
-#define K_ALTLOCK K(KT_LOCK,KG_ALT)
-#define K_ALTGRLOCK K(KT_LOCK,KG_ALTGR)
-#define K_SHIFTLLOCK K(KT_LOCK,KG_SHIFTL)
-#define K_SHIFTRLOCK K(KT_LOCK,KG_SHIFTR)
-#define K_CTRLLLOCK K(KT_LOCK,KG_CTRLL)
-#define K_CTRLRLOCK K(KT_LOCK,KG_CTRLR)
-
-#define K_SHIFT_SLOCK K(KT_SLOCK,KG_SHIFT)
-#define K_CTRL_SLOCK K(KT_SLOCK,KG_CTRL)
-#define K_ALT_SLOCK K(KT_SLOCK,KG_ALT)
-#define K_ALTGR_SLOCK K(KT_SLOCK,KG_ALTGR)
-#define K_SHIFTL_SLOCK K(KT_SLOCK,KG_SHIFTL)
-#define K_SHIFTR_SLOCK K(KT_SLOCK,KG_SHIFTR)
-#define K_CTRLL_SLOCK K(KT_SLOCK,KG_CTRLL)
-#define K_CTRLR_SLOCK K(KT_SLOCK,KG_CTRLR)
-
-#define NR_LOCK 8
-
-#define K_BRL_BLANK K(KT_BRL, 0)
-#define K_BRL_DOT1 K(KT_BRL, 1)
-#define K_BRL_DOT2 K(KT_BRL, 2)
-#define K_BRL_DOT3 K(KT_BRL, 3)
-#define K_BRL_DOT4 K(KT_BRL, 4)
-#define K_BRL_DOT5 K(KT_BRL, 5)
-#define K_BRL_DOT6 K(KT_BRL, 6)
-#define K_BRL_DOT7 K(KT_BRL, 7)
-#define K_BRL_DOT8 K(KT_BRL, 8)
-
-#define NR_BRL 9
-
-#define MAX_DIACR 256
-#endif
diff --git a/original/linux/keychord.h b/original/linux/keychord.h
deleted file mode 100644
index 856a585..0000000
--- a/original/linux/keychord.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Key chord input driver
- *
- * Copyright (C) 2008 Google, Inc.
- * Author: Mike Lockwood <lockwood@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
-*/
-
-#ifndef __LINUX_KEYCHORD_H_
-#define __LINUX_KEYCHORD_H_
-
-#include <linux/input.h>
-
-#define KEYCHORD_VERSION 1
-
-/*
- * One or more input_keychord structs are written to /dev/keychord
- * at once to specify the list of keychords to monitor.
- * Reading /dev/keychord returns the id of a keychord when the
- * keychord combination is pressed. A keychord is signalled when
- * all of the keys in the keycode list are in the pressed state.
- * The order in which the keys are pressed does not matter.
- * The keychord will not be signalled if keys not in the keycode
- * list are pressed.
- * Keychords will not be signalled on key release events.
- */
-struct input_keychord {
- /* should be KEYCHORD_VERSION */
- __u16 version;
- /*
- * client specified ID, returned from read()
- * when this keychord is pressed.
- */
- __u16 id;
-
- /* number of keycodes in this keychord */
- __u16 count;
-
- /* variable length array of keycodes */
- __u16 keycodes[];
-};
-
-#endif /* __LINUX_KEYCHORD_H_ */
diff --git a/original/linux/klist.h b/original/linux/klist.h
deleted file mode 100644
index 7407125..0000000
--- a/original/linux/klist.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * klist.h - Some generic list helpers, extending struct list_head a bit.
- *
- * Implementations are found in lib/klist.c
- *
- *
- * Copyright (C) 2005 Patrick Mochel
- *
- * This file is rleased under the GPL v2.
- */
-
-#ifndef _LINUX_KLIST_H
-#define _LINUX_KLIST_H
-
-#include <linux/spinlock.h>
-#include <linux/completion.h>
-#include <linux/kref.h>
-#include <linux/list.h>
-
-struct klist_node;
-struct klist {
- spinlock_t k_lock;
- struct list_head k_list;
- void (*get)(struct klist_node *);
- void (*put)(struct klist_node *);
-};
-
-
-extern void klist_init(struct klist * k, void (*get)(struct klist_node *),
- void (*put)(struct klist_node *));
-
-struct klist_node {
- struct klist * n_klist;
- struct list_head n_node;
- struct kref n_ref;
- struct completion n_removed;
-};
-
-extern void klist_add_tail(struct klist_node * n, struct klist * k);
-extern void klist_add_head(struct klist_node * n, struct klist * k);
-
-extern void klist_del(struct klist_node * n);
-extern void klist_remove(struct klist_node * n);
-
-extern int klist_node_attached(struct klist_node * n);
-
-
-struct klist_iter {
- struct klist * i_klist;
- struct list_head * i_head;
- struct klist_node * i_cur;
-};
-
-
-extern void klist_iter_init(struct klist * k, struct klist_iter * i);
-extern void klist_iter_init_node(struct klist * k, struct klist_iter * i,
- struct klist_node * n);
-extern void klist_iter_exit(struct klist_iter * i);
-extern struct klist_node * klist_next(struct klist_iter * i);
-
-#endif
diff --git a/original/linux/kmod.h b/original/linux/kmod.h
deleted file mode 100644
index 0db22a1..0000000
--- a/original/linux/kmod.h
+++ /dev/null
@@ -1,50 +0,0 @@
-#ifndef __LINUX_KMOD_H__
-#define __LINUX_KMOD_H__
-
-/*
- * include/linux/kmod.h
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/stddef.h>
-#include <linux/errno.h>
-#include <linux/compiler.h>
-
-#define KMOD_PATH_LEN 256
-
-#ifdef CONFIG_KMOD
-/* modprobe exit status on success, -ve on error. Return value
- * usually useless though. */
-extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
-#else
-static inline int request_module(const char * name, ...) { return -ENOSYS; }
-#endif
-
-#define try_then_request_module(x, mod...) ((x) ?: (request_module(mod), (x)))
-
-struct key;
-extern int call_usermodehelper_keys(char *path, char *argv[], char *envp[],
- struct key *session_keyring, int wait);
-
-static inline int
-call_usermodehelper(char *path, char **argv, char **envp, int wait)
-{
- return call_usermodehelper_keys(path, argv, envp, NULL, wait);
-}
-
-extern void usermodehelper_init(void);
-
-#endif /* __LINUX_KMOD_H__ */
diff --git a/original/linux/kobject.h b/original/linux/kobject.h
deleted file mode 100644
index 2d22932..0000000
--- a/original/linux/kobject.h
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * kobject.h - generic kernel object infrastructure.
- *
- * Copyright (c) 2002-2003 Patrick Mochel
- * Copyright (c) 2002-2003 Open Source Development Labs
- *
- * This file is released under the GPLv2.
- *
- *
- * Please read Documentation/kobject.txt before using the kobject
- * interface, ESPECIALLY the parts about reference counts and object
- * destructors.
- */
-
-#ifndef _KOBJECT_H_
-#define _KOBJECT_H_
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/sysfs.h>
-#include <linux/spinlock.h>
-#include <linux/rwsem.h>
-#include <linux/kref.h>
-#include <linux/kernel.h>
-#include <linux/wait.h>
-#include <asm/atomic.h>
-
-#define KOBJ_NAME_LEN 20
-#define UEVENT_HELPER_PATH_LEN 256
-
-/* path to the userspace helper executed on an event */
-extern char uevent_helper[];
-
-/* counter to tag the uevent, read only except for the kobject core */
-extern u64 uevent_seqnum;
-
-/* the actions here must match the proper string in lib/kobject_uevent.c */
-typedef int __bitwise kobject_action_t;
-enum kobject_action {
- KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */
- KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */
- KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */
- KOBJ_MOUNT = (__force kobject_action_t) 0x04, /* mount event for block devices (broken) */
- KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
- KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
- KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
-};
-
-struct kobject {
- const char * k_name;
- char name[KOBJ_NAME_LEN];
- struct kref kref;
- struct list_head entry;
- struct kobject * parent;
- struct kset * kset;
- struct kobj_type * ktype;
- struct dentry * dentry;
- wait_queue_head_t poll;
-};
-
-extern int kobject_set_name(struct kobject *, const char *, ...)
- __attribute__((format(printf,2,3)));
-
-static inline const char * kobject_name(const struct kobject * kobj)
-{
- return kobj->k_name;
-}
-
-extern void kobject_init(struct kobject *);
-extern void kobject_cleanup(struct kobject *);
-
-extern int kobject_add(struct kobject *);
-extern void kobject_del(struct kobject *);
-
-extern int kobject_rename(struct kobject *, const char *new_name);
-
-extern int kobject_register(struct kobject *);
-extern void kobject_unregister(struct kobject *);
-
-extern struct kobject * kobject_get(struct kobject *);
-extern void kobject_put(struct kobject *);
-
-extern struct kobject *kobject_add_dir(struct kobject *, const char *);
-
-extern char * kobject_get_path(struct kobject *, gfp_t);
-
-struct kobj_type {
- void (*release)(struct kobject *);
- struct sysfs_ops * sysfs_ops;
- struct attribute ** default_attrs;
-};
-
-
-/**
- * kset - a set of kobjects of a specific type, belonging
- * to a specific subsystem.
- *
- * All kobjects of a kset should be embedded in an identical
- * type. This type may have a descriptor, which the kset points
- * to. This allows there to exist sets of objects of the same
- * type in different subsystems.
- *
- * A subsystem does not have to be a list of only one type
- * of object; multiple ksets can belong to one subsystem. All
- * ksets of a subsystem share the subsystem's lock.
- *
- * Each kset can support specific event variables; it can
- * supress the event generation or add subsystem specific
- * variables carried with the event.
- */
-struct kset_uevent_ops {
- int (*filter)(struct kset *kset, struct kobject *kobj);
- const char *(*name)(struct kset *kset, struct kobject *kobj);
- int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp,
- int num_envp, char *buffer, int buffer_size);
-};
-
-struct kset {
- struct subsystem * subsys;
- struct kobj_type * ktype;
- struct list_head list;
- spinlock_t list_lock;
- struct kobject kobj;
- struct kset_uevent_ops * uevent_ops;
-};
-
-
-extern void kset_init(struct kset * k);
-extern int kset_add(struct kset * k);
-extern int kset_register(struct kset * k);
-extern void kset_unregister(struct kset * k);
-
-static inline struct kset * to_kset(struct kobject * kobj)
-{
- return kobj ? container_of(kobj,struct kset,kobj) : NULL;
-}
-
-static inline struct kset * kset_get(struct kset * k)
-{
- return k ? to_kset(kobject_get(&k->kobj)) : NULL;
-}
-
-static inline void kset_put(struct kset * k)
-{
- kobject_put(&k->kobj);
-}
-
-static inline struct kobj_type * get_ktype(struct kobject * k)
-{
- if (k->kset && k->kset->ktype)
- return k->kset->ktype;
- else
- return k->ktype;
-}
-
-extern struct kobject * kset_find_obj(struct kset *, const char *);
-
-
-/**
- * Use this when initializing an embedded kset with no other
- * fields to initialize.
- */
-#define set_kset_name(str) .kset = { .kobj = { .name = str } }
-
-
-
-struct subsystem {
- struct kset kset;
- struct rw_semaphore rwsem;
-};
-
-#define decl_subsys(_name,_type,_uevent_ops) \
-struct subsystem _name##_subsys = { \
- .kset = { \
- .kobj = { .name = __stringify(_name) }, \
- .ktype = _type, \
- .uevent_ops =_uevent_ops, \
- } \
-}
-#define decl_subsys_name(_varname,_name,_type,_uevent_ops) \
-struct subsystem _varname##_subsys = { \
- .kset = { \
- .kobj = { .name = __stringify(_name) }, \
- .ktype = _type, \
- .uevent_ops =_uevent_ops, \
- } \
-}
-
-/* The global /sys/kernel/ subsystem for people to chain off of */
-extern struct subsystem kernel_subsys;
-/* The global /sys/hypervisor/ subsystem */
-extern struct subsystem hypervisor_subsys;
-
-/**
- * Helpers for setting the kset of registered objects.
- * Often, a registered object belongs to a kset embedded in a
- * subsystem. These do no magic, just make the resulting code
- * easier to follow.
- */
-
-/**
- * kobj_set_kset_s(obj,subsys) - set kset for embedded kobject.
- * @obj: ptr to some object type.
- * @subsys: a subsystem object (not a ptr).
- *
- * Can be used for any object type with an embedded ->kobj.
- */
-
-#define kobj_set_kset_s(obj,subsys) \
- (obj)->kobj.kset = &(subsys).kset
-
-/**
- * kset_set_kset_s(obj,subsys) - set kset for embedded kset.
- * @obj: ptr to some object type.
- * @subsys: a subsystem object (not a ptr).
- *
- * Can be used for any object type with an embedded ->kset.
- * Sets the kset of @obj's embedded kobject (via its embedded
- * kset) to @subsys.kset. This makes @obj a member of that
- * kset.
- */
-
-#define kset_set_kset_s(obj,subsys) \
- (obj)->kset.kobj.kset = &(subsys).kset
-
-/**
- * subsys_set_kset(obj,subsys) - set kset for subsystem
- * @obj: ptr to some object type.
- * @subsys: a subsystem object (not a ptr).
- *
- * Can be used for any object type with an embedded ->subsys.
- * Sets the kset of @obj's kobject to @subsys.kset. This makes
- * the object a member of that kset.
- */
-
-#define subsys_set_kset(obj,_subsys) \
- (obj)->subsys.kset.kobj.kset = &(_subsys).kset
-
-extern void subsystem_init(struct subsystem *);
-extern int subsystem_register(struct subsystem *);
-extern void subsystem_unregister(struct subsystem *);
-
-static inline struct subsystem * subsys_get(struct subsystem * s)
-{
- return s ? container_of(kset_get(&s->kset),struct subsystem,kset) : NULL;
-}
-
-static inline void subsys_put(struct subsystem * s)
-{
- kset_put(&s->kset);
-}
-
-struct subsys_attribute {
- struct attribute attr;
- ssize_t (*show)(struct subsystem *, char *);
- ssize_t (*store)(struct subsystem *, const char *, size_t);
-};
-
-extern int subsys_create_file(struct subsystem * , struct subsys_attribute *);
-
-#if defined(CONFIG_HOTPLUG)
-void kobject_uevent(struct kobject *kobj, enum kobject_action action);
-
-int add_uevent_var(char **envp, int num_envp, int *cur_index,
- char *buffer, int buffer_size, int *cur_len,
- const char *format, ...)
- __attribute__((format (printf, 7, 8)));
-#else
-static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
-
-static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
- char *buffer, int buffer_size, int *cur_len,
- const char *format, ...)
-{ return 0; }
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _KOBJECT_H_ */
diff --git a/original/linux/kref.h b/original/linux/kref.h
deleted file mode 100644
index 6fee353..0000000
--- a/original/linux/kref.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * kref.c - library routines for handling generic reference counted objects
- *
- * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
- * Copyright (C) 2004 IBM Corp.
- *
- * based on kobject.h which was:
- * Copyright (C) 2002-2003 Patrick Mochel <mochel@osdl.org>
- * Copyright (C) 2002-2003 Open Source Development Labs
- *
- * This file is released under the GPLv2.
- *
- */
-
-#ifndef _KREF_H_
-#define _KREF_H_
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <asm/atomic.h>
-
-struct kref {
- atomic_t refcount;
-};
-
-void kref_init(struct kref *kref);
-void kref_get(struct kref *kref);
-int kref_put(struct kref *kref, void (*release) (struct kref *kref));
-
-#endif /* __KERNEL__ */
-#endif /* _KREF_H_ */
diff --git a/original/linux/ktime.h b/original/linux/ktime.h
deleted file mode 100644
index 84eeecd..0000000
--- a/original/linux/ktime.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * include/linux/ktime.h
- *
- * ktime_t - nanosecond-resolution time format.
- *
- * Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de>
- * Copyright(C) 2005, Red Hat, Inc., Ingo Molnar
- *
- * data type definitions, declarations, prototypes and macros.
- *
- * Started by: Thomas Gleixner and Ingo Molnar
- *
- * Credits:
- *
- * Roman Zippel provided the ideas and primary code snippets of
- * the ktime_t union and further simplifications of the original
- * code.
- *
- * For licencing details see kernel-base/COPYING
- */
-#ifndef _LINUX_KTIME_H
-#define _LINUX_KTIME_H
-
-#include <linux/time.h>
-#include <linux/jiffies.h>
-
-/*
- * ktime_t:
- *
- * On 64-bit CPUs a single 64-bit variable is used to store the hrtimers
- * internal representation of time values in scalar nanoseconds. The
- * design plays out best on 64-bit CPUs, where most conversions are
- * NOPs and most arithmetic ktime_t operations are plain arithmetic
- * operations.
- *
- * On 32-bit CPUs an optimized representation of the timespec structure
- * is used to avoid expensive conversions from and to timespecs. The
- * endian-aware order of the tv struct members is choosen to allow
- * mathematical operations on the tv64 member of the union too, which
- * for certain operations produces better code.
- *
- * For architectures with efficient support for 64/32-bit conversions the
- * plain scalar nanosecond based representation can be selected by the
- * config switch CONFIG_KTIME_SCALAR.
- */
-typedef union {
- s64 tv64;
-#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
- struct {
-# ifdef __BIG_ENDIAN
- s32 sec, nsec;
-# else
- s32 nsec, sec;
-# endif
- } tv;
-#endif
-} ktime_t;
-
-#define KTIME_MAX ((s64)~((u64)1 << 63))
-#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
-
-/*
- * ktime_t definitions when using the 64-bit scalar representation:
- */
-
-#if (BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)
-
-/**
- * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
- * @secs: seconds to set
- * @nsecs: nanoseconds to set
- *
- * Return the ktime_t representation of the value
- */
-static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
-{
-#if (BITS_PER_LONG == 64)
- if (unlikely(secs >= KTIME_SEC_MAX))
- return (ktime_t){ .tv64 = KTIME_MAX };
-#endif
- return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
-}
-
-/* Subtract two ktime_t variables. rem = lhs -rhs: */
-#define ktime_sub(lhs, rhs) \
- ({ (ktime_t){ .tv64 = (lhs).tv64 - (rhs).tv64 }; })
-
-/* Add two ktime_t variables. res = lhs + rhs: */
-#define ktime_add(lhs, rhs) \
- ({ (ktime_t){ .tv64 = (lhs).tv64 + (rhs).tv64 }; })
-
-/*
- * Add a ktime_t variable and a scalar nanosecond value.
- * res = kt + nsval:
- */
-#define ktime_add_ns(kt, nsval) \
- ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; })
-
-/* convert a timespec to ktime_t format: */
-static inline ktime_t timespec_to_ktime(struct timespec ts)
-{
- return ktime_set(ts.tv_sec, ts.tv_nsec);
-}
-
-/* convert a timeval to ktime_t format: */
-static inline ktime_t timeval_to_ktime(struct timeval tv)
-{
- return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC);
-}
-
-/* Map the ktime_t to timespec conversion to ns_to_timespec function */
-#define ktime_to_timespec(kt) ns_to_timespec((kt).tv64)
-
-/* Map the ktime_t to timeval conversion to ns_to_timeval function */
-#define ktime_to_timeval(kt) ns_to_timeval((kt).tv64)
-
-/* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
-#define ktime_to_ns(kt) ((kt).tv64)
-
-#else
-
-/*
- * Helper macros/inlines to get the ktime_t math right in the timespec
- * representation. The macros are sometimes ugly - their actual use is
- * pretty okay-ish, given the circumstances. We do all this for
- * performance reasons. The pure scalar nsec_t based code was nice and
- * simple, but created too many 64-bit / 32-bit conversions and divisions.
- *
- * Be especially aware that negative values are represented in a way
- * that the tv.sec field is negative and the tv.nsec field is greater
- * or equal to zero but less than nanoseconds per second. This is the
- * same representation which is used by timespecs.
- *
- * tv.sec < 0 and 0 >= tv.nsec < NSEC_PER_SEC
- */
-
-/* Set a ktime_t variable to a value in sec/nsec representation: */
-static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
-{
- return (ktime_t) { .tv = { .sec = secs, .nsec = nsecs } };
-}
-
-/**
- * ktime_sub - subtract two ktime_t variables
- * @lhs: minuend
- * @rhs: subtrahend
- *
- * Returns the remainder of the substraction
- */
-static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
-{
- ktime_t res;
-
- res.tv64 = lhs.tv64 - rhs.tv64;
- if (res.tv.nsec < 0)
- res.tv.nsec += NSEC_PER_SEC;
-
- return res;
-}
-
-/**
- * ktime_add - add two ktime_t variables
- * @add1: addend1
- * @add2: addend2
- *
- * Returns the sum of addend1 and addend2
- */
-static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
-{
- ktime_t res;
-
- res.tv64 = add1.tv64 + add2.tv64;
- /*
- * performance trick: the (u32) -NSEC gives 0x00000000Fxxxxxxx
- * so we subtract NSEC_PER_SEC and add 1 to the upper 32 bit.
- *
- * it's equivalent to:
- * tv.nsec -= NSEC_PER_SEC
- * tv.sec ++;
- */
- if (res.tv.nsec >= NSEC_PER_SEC)
- res.tv64 += (u32)-NSEC_PER_SEC;
-
- return res;
-}
-
-/**
- * ktime_add_ns - Add a scalar nanoseconds value to a ktime_t variable
- * @kt: addend
- * @nsec: the scalar nsec value to add
- *
- * Returns the sum of kt and nsec in ktime_t format
- */
-extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
-
-/**
- * timespec_to_ktime - convert a timespec to ktime_t format
- * @ts: the timespec variable to convert
- *
- * Returns a ktime_t variable with the converted timespec value
- */
-static inline ktime_t timespec_to_ktime(const struct timespec ts)
-{
- return (ktime_t) { .tv = { .sec = (s32)ts.tv_sec,
- .nsec = (s32)ts.tv_nsec } };
-}
-
-/**
- * timeval_to_ktime - convert a timeval to ktime_t format
- * @tv: the timeval variable to convert
- *
- * Returns a ktime_t variable with the converted timeval value
- */
-static inline ktime_t timeval_to_ktime(const struct timeval tv)
-{
- return (ktime_t) { .tv = { .sec = (s32)tv.tv_sec,
- .nsec = (s32)tv.tv_usec * 1000 } };
-}
-
-/**
- * ktime_to_timespec - convert a ktime_t variable to timespec format
- * @kt: the ktime_t variable to convert
- *
- * Returns the timespec representation of the ktime value
- */
-static inline struct timespec ktime_to_timespec(const ktime_t kt)
-{
- return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
- .tv_nsec = (long) kt.tv.nsec };
-}
-
-/**
- * ktime_to_timeval - convert a ktime_t variable to timeval format
- * @kt: the ktime_t variable to convert
- *
- * Returns the timeval representation of the ktime value
- */
-static inline struct timeval ktime_to_timeval(const ktime_t kt)
-{
- return (struct timeval) {
- .tv_sec = (time_t) kt.tv.sec,
- .tv_usec = (suseconds_t) (kt.tv.nsec / NSEC_PER_USEC) };
-}
-
-/**
- * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
- * @kt: the ktime_t variable to convert
- *
- * Returns the scalar nanoseconds representation of kt
- */
-static inline u64 ktime_to_ns(const ktime_t kt)
-{
- return (u64) kt.tv.sec * NSEC_PER_SEC + kt.tv.nsec;
-}
-
-#endif
-
-/*
- * The resolution of the clocks. The resolution value is returned in
- * the clock_getres() system call to give application programmers an
- * idea of the (in)accuracy of timers. Timer values are rounded up to
- * this resolution values.
- */
-#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC }
-#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC }
-
-/* Get the monotonic time in timespec format: */
-extern void ktime_get_ts(struct timespec *ts);
-
-/* Get the real (wall-) time in timespec format: */
-#define ktime_get_real_ts(ts) getnstimeofday(ts)
-
-#endif
diff --git a/original/linux/kxtf9.h b/original/linux/kxtf9.h
deleted file mode 100755
index 67baef8..0000000
--- a/original/linux/kxtf9.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2008-2009, Kionix, Inc. All Rights Reserved.
- *
- * 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 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef __KXTF9_H__
-#define __KXTF9_H__
-
-#include <linux/ioctl.h> /* For IOCTL macros */
-
-/** This define controls compilation of the master device interface */
-/*#define KXTF9_MASTER_DEVICE*/
-
-#define KXTF9_IOCTL_BASE 77
-/** The following define the IOCTL command values via the ioctl macros */
-#define KXTF9_IOCTL_SET_DELAY _IOW(KXTF9_IOCTL_BASE, 0, int)
-#define KXTF9_IOCTL_GET_DELAY _IOR(KXTF9_IOCTL_BASE, 1, int)
-#define KXTF9_IOCTL_SET_ENABLE _IOW(KXTF9_IOCTL_BASE, 2, int)
-#define KXTF9_IOCTL_GET_ENABLE _IOR(KXTF9_IOCTL_BASE, 3, int)
-#define KXTF9_IOCTL_SET_G_RANGE _IOW(KXTF9_IOCTL_BASE, 4, int)
-
-#define KXTF9_IOCTL_SET_TILT_ENABLE _IOW(KXTF9_IOCTL_BASE, 5, int)
-#define KXTF9_IOCTL_SET_TAP_ENABLE _IOW(KXTF9_IOCTL_BASE, 6, int)
-#define KXTF9_IOCTL_SET_WAKE_ENABLE _IOW(KXTF9_IOCTL_BASE, 7, int)
-#define KXTF9_IOCTL_SET_PM_MODE _IOW(KXTF9_IOCTL_BASE, 8, int)
-#define KXTF9_IOCTL_SELF_TEST _IOW(KXTF9_IOCTL_BASE, 9, int)
-#define KXTF9_IOCTL_SET_SENSITIVITY _IOW(KXTF9_IOCTL_BASE, 10, int)
-
-/* CONTROL REGISTER 1 BITS */
-#define RES_12BIT 0x40
-#define KXTF9_G_2G 0x00
-#define KXTF9_G_4G 0x08
-#define KXTF9_G_8G 0x10
-#define TPE 0x01 /* tilt position function enable bit */
-#define WUFE 0x02 /* wake-up function enable bit */
-#define TDTE 0x04 /* tap/double-tap function enable bit */
-/* CONTROL REGISTER 3 BITS */
-#define OTP1_6 0x00 /* tilt ODR masks */
-#define OTP6_3 0x20
-#define OTP12_5 0x40
-#define OTP50 0x60
-#define OWUF25 0x00 /* wuf ODR masks */
-#define OWUF50 0x01
-#define OWUF100 0x02
-#define OWUF200 0x03
-#define OTDT50 0x00 /* tdt ODR masks */
-#define OTDT100 0x04
-#define OTDT200 0x08
-#define OTDT400 0x0C
-/* INTERRUPT CONTROL REGISTER 1 BITS */
-#define IEN 0x20 /* interrupt enable */
-#define IEA 0x10 /* interrupt polarity */
-#define IEL 0x08 /* interrupt response */
-#define IEU 0x04 /* alternate unlatched response */
-/* DATA CONTROL REGISTER BITS */
-#define ODR800 0x06 /* lpf output ODR masks */
-#define ODR400 0x05
-#define ODR200 0x04
-#define ODR100 0x03
-#define ODR50 0x02
-#define ODR25 0x01
-#define ODR12_5 0x00
-
-#define SENSITIVITY_REGS 0x07
-
-#ifdef __KERNEL__
-struct kxtf9_platform_data {
- int poll_interval;
- int min_interval;
-
- u8 g_range;
-
- u8 axis_map_x;
- u8 axis_map_y;
- u8 axis_map_z;
-
- u8 negate_x;
- u8 negate_y;
- u8 negate_z;
-
- u8 data_odr_init;
- u8 ctrl_reg1_init;
- u8 int_ctrl_init;
- u8 tilt_timer_init;
- u8 engine_odr_init;
- u8 wuf_timer_init;
- u8 wuf_thresh_init;
- u8 tdt_timer_init;
- u8 tdt_h_thresh_init;
- u8 tdt_l_thresh_init;
- u8 tdt_tap_timer_init;
- u8 tdt_total_timer_init;
- u8 tdt_latency_timer_init;
- u8 tdt_window_timer_init;
-
- int (*init)(void);
- void (*exit)(void);
- int (*power_on)(void);
- int (*power_off)(void);
-
- int (*gpio)(void);
-
- u8 gesture;
- u8 sensitivity_low[SENSITIVITY_REGS];
- u8 sensitivity_medium[SENSITIVITY_REGS];
- u8 sensitivity_high[SENSITIVITY_REGS];
-};
-
-#endif /* __KERNEL__ */
-
-#endif /* __KXTF9_H__ */
-
diff --git a/original/linux/l3g4200d.h b/original/linux/l3g4200d.h
deleted file mode 100644
index e6d5faa..0000000
--- a/original/linux/l3g4200d.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2010 Motorola, Inc.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-#ifndef __L3G4200D_H__
-#define __L3G4200D_H__
-
-#include <linux/ioctl.h> /* For IOCTL macros */
-
-#define L3G4200D_NAME "l3g4200d"
-
-#define L3G4200D_IOCTL_BASE 77
-/** The following define the IOCTL command values via the ioctl macros */
-#define L3G4200D_IOCTL_SET_DELAY _IOW(L3G4200D_IOCTL_BASE, 0, int)
-#define L3G4200D_IOCTL_GET_DELAY _IOR(L3G4200D_IOCTL_BASE, 1, int)
-#define L3G4200D_IOCTL_SET_ENABLE _IOW(L3G4200D_IOCTL_BASE, 2, int)
-#define L3G4200D_IOCTL_GET_ENABLE _IOR(L3G4200D_IOCTL_BASE, 3, int)
-
-#ifdef __KERNEL__
-
-struct l3g4200d_platform_data {
- int poll_interval;
- int min_interval;
-
- u8 ctrl_reg_1;
- u8 ctrl_reg_2;
- u8 ctrl_reg_3;
- u8 ctrl_reg_4;
- u8 ctrl_reg_5;
-
- u8 int_config;
- u8 int_source;
-
- u8 int_th_x_h;
- u8 int_th_x_l;
- u8 int_th_y_h;
- u8 int_th_y_l;
- u8 int_th_z_h;
- u8 int_th_z_l;
- u8 int_duration;
-
- u8 g_range;
-
- u8 axis_map_x;
- u8 axis_map_y;
- u8 axis_map_z;
-
- u8 negate_x;
- u8 negate_y;
- u8 negate_z;
-
- void (*exit)(void);
- int (*power_on)(void);
- int (*power_off)(void);
-
-};
-#endif /* __KERNEL__ */
-
-#endif /* __L3G4200D_H__ */
-
diff --git a/original/linux/leds-an30259a.h b/original/linux/leds-an30259a.h
deleted file mode 100644
index 7a97efa..0000000
--- a/original/linux/leds-an30259a.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2011 Samsung Electronics Co. Ltd. All Rights Reserved.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LEDS_AN30259A_H
-#define _LEDS_AN30259A_H
-
-#include <linux/ioctl.h>
-#include <linux/types.h>
-
-#define LED_LIGHT_OFF 0
-#define LED_LIGHT_ON 1
-#define LED_LIGHT_PULSE 2
-#define LED_LIGHT_SLOPE 3
-
-/*
- * This struct gets passed to the ioctl call.
- * If only one of struct gets passed to the ioctl then it is assumed to define
- * the behavior for all 3 color components: R, G and B.
- * If 3 structs are passed, then each one is assumed to describe a single color:
- * R first, then G, then B.
- *
- * Requesting a color value of 0 is equivalent to requesting LED_LIGHT_OFF
- *
- * If only describing a single color (ie passing a single struct), then
- * start_delay will get ignored
- *
- * Other parameters may get ignored depending on the requested state:
- * LIGHT_ON only requires color
- * LIGHT_PULSE requires color, time_on and time_off
- *
- * Total time for time_slope_up_1 + time_slope_up_2 + time_on as well as for
- * time_slope_down_1 + time_slope_down_2 + time_off will be rounded up to the
- * nearest .5 seconds.
- *
- * Each of the time_slope_* values will get rounded up to the nearest multiple
- * of 4ms up to 7680ms
- */
-
-struct an30259a_pr_control {
- /* LED color in RGB format */
- __u32 color;
- /* see defines above */
- __u32 state;
- /* initial delay in ms */
- __u16 start_delay;
- /* time to reach mid_brightness_up from off in ms */
- __u16 time_slope_up_1;
- /* time to reach color from mid_brightness_up in ms */
- __u16 time_slope_up_2;
- /* time at max brightness in ms */
- __u16 time_on;
- /* time to reach mid_brightness_down from max brightness in ms */
- __u16 time_slope_down_1;
- /* time to reach off from mid_brightness_down in ms */
- __u16 time_slope_down_2;
- /* time off in ms */
- __u16 time_off;
- /* mid point brightness in 1/128 increments of color */
- __u8 mid_brightness;
-} __packed;
-
-#define AN30259A_PR_SET_LED _IOW('S', 42, struct an30259a_pr_control)
-#define AN30259A_PR_SET_LEDS _IOW('S', 43, struct an30259a_pr_control[3])
-#define AN30259A_PR_SET_IMAX _IOW('S', 44, __u8)
-#endif /* _LEDS_AN30259A_H */
diff --git a/original/linux/lightsensor.h b/original/linux/lightsensor.h
deleted file mode 100644
index 501074f..0000000
--- a/original/linux/lightsensor.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* include/linux/lightsensor.h
- *
- * Copyright (C) 2009 Google, Inc.
- * Author: Iliyan Malchev <malchev@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_LIGHTSENSOR_H
-#define __LINUX_LIGHTSENSOR_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#define LIGHTSENSOR_IOCTL_MAGIC 'l'
-
-#define LIGHTSENSOR_IOCTL_GET_ENABLED _IOR(LIGHTSENSOR_IOCTL_MAGIC, 1, int *)
-#define LIGHTSENSOR_IOCTL_ENABLE _IOW(LIGHTSENSOR_IOCTL_MAGIC, 2, int *)
-
-#endif
diff --git a/original/linux/limits.h b/original/linux/limits.h
deleted file mode 100644
index eaf2e09..0000000
--- a/original/linux/limits.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _LINUX_LIMITS_H
-#define _LINUX_LIMITS_H
-
-#define NR_OPEN 1024
-
-#define NGROUPS_MAX 65536 /* supplemental group IDs are available */
-#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
-#define CHILD_MAX 999 /* no limit :-) */
-#define OPEN_MAX 256 /* # open files a process may have */
-#define LINK_MAX 127 /* # links a file may have */
-#define MAX_CANON 255 /* size of the canonical input queue */
-#define MAX_INPUT 255 /* size of the type-ahead buffer */
-#define NAME_MAX 255 /* # chars in a file name */
-#define PATH_MAX 4096 /* # chars in a path name including nul */
-#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */
-#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
-#define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */
-#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
-
-#define RTSIG_MAX 32
-
-#endif
diff --git a/original/linux/linkage.h b/original/linux/linkage.h
deleted file mode 100644
index 932021f..0000000
--- a/original/linux/linkage.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _LINUX_LINKAGE_H
-#define _LINUX_LINKAGE_H
-
-#include <asm/linkage.h>
-
-#ifdef __cplusplus
-#define CPP_ASMLINKAGE extern "C"
-#else
-#define CPP_ASMLINKAGE
-#endif
-
-#ifndef asmlinkage
-#define asmlinkage CPP_ASMLINKAGE
-#endif
-
-#ifndef prevent_tail_call
-# define prevent_tail_call(ret) do { } while (0)
-#endif
-
-#ifndef __ALIGN
-#define __ALIGN .align 4,0x90
-#define __ALIGN_STR ".align 4,0x90"
-#endif
-
-#ifdef __ASSEMBLY__
-
-#define ALIGN __ALIGN
-#define ALIGN_STR __ALIGN_STR
-
-#ifndef ENTRY
-#define ENTRY(name) \
- .globl name; \
- ALIGN; \
- name:
-#endif
-
-#define KPROBE_ENTRY(name) \
- .section .kprobes.text, "ax"; \
- ENTRY(name)
-
-#ifndef END
-#define END(name) \
- .size name, .-name
-#endif
-
-#ifndef ENDPROC
-#define ENDPROC(name) \
- .type name, @function; \
- END(name)
-#endif
-
-#endif
-
-#define NORET_TYPE /**/
-#define ATTRIB_NORET __attribute__((noreturn))
-#define NORET_AND noreturn,
-
-#ifndef FASTCALL
-#define FASTCALL(x) x
-#define fastcall
-#endif
-
-#endif
diff --git a/original/linux/lis331dlh.h b/original/linux/lis331dlh.h
deleted file mode 100644
index a105ac9..0000000
--- a/original/linux/lis331dlh.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2008-2009, Motorola, All Rights Reserved.
- *
- * 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 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef __LIS331DLH_H__
-#define __LIS331DLH_H__
-
-#include <linux/ioctl.h> /* For IOCTL macros */
-
-/** This define controls compilation of the master device interface */
-/*#define LIS331DLH_MASTER_DEVICE*/
-
-#define LIS331DLH_IOCTL_BASE 77
-/** The following define the IOCTL command values via the ioctl macros */
-#define LIS331DLH_IOCTL_SET_DELAY _IOW(LIS331DLH_IOCTL_BASE, 0, int)
-#define LIS331DLH_IOCTL_GET_DELAY _IOR(LIS331DLH_IOCTL_BASE, 1, int)
-#define LIS331DLH_IOCTL_SET_ENABLE _IOW(LIS331DLH_IOCTL_BASE, 2, int)
-#define LIS331DLH_IOCTL_GET_ENABLE _IOR(LIS331DLH_IOCTL_BASE, 3, int)
-#define LIS331DLH_IOCTL_SET_G_RANGE _IOW(LIS331DLH_IOCTL_BASE, 4, int)
-
-#define LIS331DLH_G_2G 0x00
-#define LIS331DLH_G_4G 0x10
-#define LIS331DLH_G_8G 0x30
-
-#ifdef __KERNEL__
-struct lis331dlh_platform_data {
- int poll_interval;
- int min_interval;
-
- u8 g_range;
-
- u8 axis_map_x;
- u8 axis_map_y;
- u8 axis_map_z;
-
- u8 negate_x;
- u8 negate_y;
- u8 negate_z;
-
- int (*init)(void);
- void (*exit)(void);
- int (*power_on)(void);
- int (*power_off)(void);
-
-};
-#endif /* __KERNEL__ */
-
-#endif /* __LIS331DLH_H__ */
-
diff --git a/original/linux/list.h b/original/linux/list.h
deleted file mode 100644
index 65a5b5c..0000000
--- a/original/linux/list.h
+++ /dev/null
@@ -1,889 +0,0 @@
-#ifndef _LINUX_LIST_H
-#define _LINUX_LIST_H
-
-#ifdef __KERNEL__
-
-#include <linux/stddef.h>
-#include <linux/poison.h>
-#include <linux/prefetch.h>
-#include <asm/system.h>
-
-/*
- * Simple doubly linked list implementation.
- *
- * Some of the internal functions ("__xxx") are useful when
- * manipulating whole lists rather than single entries, as
- * sometimes we already know the next/prev entries and we can
- * generate better code by using them directly rather than
- * using the generic single-entry routines.
- */
-
-struct list_head {
- struct list_head *next, *prev;
-};
-
-#define LIST_HEAD_INIT(name) { &(name), &(name) }
-
-#define LIST_HEAD(name) \
- struct list_head name = LIST_HEAD_INIT(name)
-
-static inline void INIT_LIST_HEAD(struct list_head *list)
-{
- list->next = list;
- list->prev = list;
-}
-
-/*
- * Insert a new entry between two known consecutive entries.
- *
- * This is only for internal list manipulation where we know
- * the prev/next entries already!
- */
-static inline void __list_add(struct list_head *new,
- struct list_head *prev,
- struct list_head *next)
-{
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
-}
-
-/**
- * list_add - add a new entry
- * @new: new entry to be added
- * @head: list head to add it after
- *
- * Insert a new entry after the specified head.
- * This is good for implementing stacks.
- */
-static inline void list_add(struct list_head *new, struct list_head *head)
-{
- __list_add(new, head, head->next);
-}
-
-/**
- * list_add_tail - add a new entry
- * @new: new entry to be added
- * @head: list head to add it before
- *
- * Insert a new entry before the specified head.
- * This is useful for implementing queues.
- */
-static inline void list_add_tail(struct list_head *new, struct list_head *head)
-{
- __list_add(new, head->prev, head);
-}
-
-/*
- * Insert a new entry between two known consecutive entries.
- *
- * This is only for internal list manipulation where we know
- * the prev/next entries already!
- */
-static inline void __list_add_rcu(struct list_head * new,
- struct list_head * prev, struct list_head * next)
-{
- new->next = next;
- new->prev = prev;
- smp_wmb();
- next->prev = new;
- prev->next = new;
-}
-
-/**
- * list_add_rcu - add a new entry to rcu-protected list
- * @new: new entry to be added
- * @head: list head to add it after
- *
- * Insert a new entry after the specified head.
- * This is good for implementing stacks.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as list_add_rcu()
- * or list_del_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * list_for_each_entry_rcu().
- */
-static inline void list_add_rcu(struct list_head *new, struct list_head *head)
-{
- __list_add_rcu(new, head, head->next);
-}
-
-/**
- * list_add_tail_rcu - add a new entry to rcu-protected list
- * @new: new entry to be added
- * @head: list head to add it before
- *
- * Insert a new entry before the specified head.
- * This is useful for implementing queues.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as list_add_tail_rcu()
- * or list_del_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * list_for_each_entry_rcu().
- */
-static inline void list_add_tail_rcu(struct list_head *new,
- struct list_head *head)
-{
- __list_add_rcu(new, head->prev, head);
-}
-
-/*
- * Delete a list entry by making the prev/next entries
- * point to each other.
- *
- * This is only for internal list manipulation where we know
- * the prev/next entries already!
- */
-static inline void __list_del(struct list_head * prev, struct list_head * next)
-{
- next->prev = prev;
- prev->next = next;
-}
-
-/**
- * list_del - deletes entry from list.
- * @entry: the element to delete from the list.
- * Note: list_empty on entry does not return true after this, the entry is
- * in an undefined state.
- */
-static inline void list_del(struct list_head *entry)
-{
- __list_del(entry->prev, entry->next);
- entry->next = LIST_POISON1;
- entry->prev = LIST_POISON2;
-}
-
-/**
- * list_del_rcu - deletes entry from list without re-initialization
- * @entry: the element to delete from the list.
- *
- * Note: list_empty on entry does not return true after this,
- * the entry is in an undefined state. It is useful for RCU based
- * lockfree traversal.
- *
- * In particular, it means that we can not poison the forward
- * pointers that may still be used for walking the list.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as list_del_rcu()
- * or list_add_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * list_for_each_entry_rcu().
- *
- * Note that the caller is not permitted to immediately free
- * the newly deleted entry. Instead, either synchronize_rcu()
- * or call_rcu() must be used to defer freeing until an RCU
- * grace period has elapsed.
- */
-static inline void list_del_rcu(struct list_head *entry)
-{
- __list_del(entry->prev, entry->next);
- entry->prev = LIST_POISON2;
-}
-
-/**
- * list_replace - replace old entry by new one
- * @old : the element to be replaced
- * @new : the new element to insert
- * Note: if 'old' was empty, it will be overwritten.
- */
-static inline void list_replace(struct list_head *old,
- struct list_head *new)
-{
- new->next = old->next;
- new->next->prev = new;
- new->prev = old->prev;
- new->prev->next = new;
-}
-
-static inline void list_replace_init(struct list_head *old,
- struct list_head *new)
-{
- list_replace(old, new);
- INIT_LIST_HEAD(old);
-}
-
-/*
- * list_replace_rcu - replace old entry by new one
- * @old : the element to be replaced
- * @new : the new element to insert
- *
- * The old entry will be replaced with the new entry atomically.
- * Note: 'old' should not be empty.
- */
-static inline void list_replace_rcu(struct list_head *old,
- struct list_head *new)
-{
- new->next = old->next;
- new->prev = old->prev;
- smp_wmb();
- new->next->prev = new;
- new->prev->next = new;
- old->prev = LIST_POISON2;
-}
-
-/**
- * list_del_init - deletes entry from list and reinitialize it.
- * @entry: the element to delete from the list.
- */
-static inline void list_del_init(struct list_head *entry)
-{
- __list_del(entry->prev, entry->next);
- INIT_LIST_HEAD(entry);
-}
-
-/**
- * list_move - delete from one list and add as another's head
- * @list: the entry to move
- * @head: the head that will precede our entry
- */
-static inline void list_move(struct list_head *list, struct list_head *head)
-{
- __list_del(list->prev, list->next);
- list_add(list, head);
-}
-
-/**
- * list_move_tail - delete from one list and add as another's tail
- * @list: the entry to move
- * @head: the head that will follow our entry
- */
-static inline void list_move_tail(struct list_head *list,
- struct list_head *head)
-{
- __list_del(list->prev, list->next);
- list_add_tail(list, head);
-}
-
-/**
- * list_is_last - tests whether @list is the last entry in list @head
- * @list: the entry to test
- * @head: the head of the list
- */
-static inline int list_is_last(const struct list_head *list,
- const struct list_head *head)
-{
- return list->next == head;
-}
-
-/**
- * list_empty - tests whether a list is empty
- * @head: the list to test.
- */
-static inline int list_empty(const struct list_head *head)
-{
- return head->next == head;
-}
-
-/**
- * list_empty_careful - tests whether a list is empty and not being modified
- * @head: the list to test
- *
- * Description:
- * tests whether a list is empty _and_ checks that no other CPU might be
- * in the process of modifying either member (next or prev)
- *
- * NOTE: using list_empty_careful() without synchronization
- * can only be safe if the only activity that can happen
- * to the list entry is list_del_init(). Eg. it cannot be used
- * if another CPU could re-list_add() it.
- */
-static inline int list_empty_careful(const struct list_head *head)
-{
- struct list_head *next = head->next;
- return (next == head) && (next == head->prev);
-}
-
-static inline void __list_splice(struct list_head *list,
- struct list_head *head)
-{
- struct list_head *first = list->next;
- struct list_head *last = list->prev;
- struct list_head *at = head->next;
-
- first->prev = head;
- head->next = first;
-
- last->next = at;
- at->prev = last;
-}
-
-/**
- * list_splice - join two lists
- * @list: the new list to add.
- * @head: the place to add it in the first list.
- */
-static inline void list_splice(struct list_head *list, struct list_head *head)
-{
- if (!list_empty(list))
- __list_splice(list, head);
-}
-
-/**
- * list_splice_init - join two lists and reinitialise the emptied list.
- * @list: the new list to add.
- * @head: the place to add it in the first list.
- *
- * The list at @list is reinitialised
- */
-static inline void list_splice_init(struct list_head *list,
- struct list_head *head)
-{
- if (!list_empty(list)) {
- __list_splice(list, head);
- INIT_LIST_HEAD(list);
- }
-}
-
-/**
- * list_entry - get the struct for this entry
- * @ptr: the &struct list_head pointer.
- * @type: the type of the struct this is embedded in.
- * @member: the name of the list_struct within the struct.
- */
-#define list_entry(ptr, type, member) \
- container_of(ptr, type, member)
-
-/**
- * list_for_each - iterate over a list
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
- */
-#define list_for_each(pos, head) \
- for (pos = (head)->next; prefetch(pos->next), pos != (head); \
- pos = pos->next)
-
-/**
- * __list_for_each - iterate over a list
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
- *
- * This variant differs from list_for_each() in that it's the
- * simplest possible list iteration code, no prefetching is done.
- * Use this for code that knows the list to be very short (empty
- * or 1 entry) most of the time.
- */
-#define __list_for_each(pos, head) \
- for (pos = (head)->next; pos != (head); pos = pos->next)
-
-/**
- * list_for_each_prev - iterate over a list backwards
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
- */
-#define list_for_each_prev(pos, head) \
- for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \
- pos = pos->prev)
-
-/**
- * list_for_each_safe - iterate over a list safe against removal of list entry
- * @pos: the &struct list_head to use as a loop cursor.
- * @n: another &struct list_head to use as temporary storage
- * @head: the head for your list.
- */
-#define list_for_each_safe(pos, n, head) \
- for (pos = (head)->next, n = pos->next; pos != (head); \
- pos = n, n = pos->next)
-
-/**
- * list_for_each_entry - iterate over list of given type
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- */
-#define list_for_each_entry(pos, head, member) \
- for (pos = list_entry((head)->next, typeof(*pos), member); \
- prefetch(pos->member.next), &pos->member != (head); \
- pos = list_entry(pos->member.next, typeof(*pos), member))
-
-/**
- * list_for_each_entry_reverse - iterate backwards over list of given type.
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- */
-#define list_for_each_entry_reverse(pos, head, member) \
- for (pos = list_entry((head)->prev, typeof(*pos), member); \
- prefetch(pos->member.prev), &pos->member != (head); \
- pos = list_entry(pos->member.prev, typeof(*pos), member))
-
-/**
- * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue
- * @pos: the type * to use as a start point
- * @head: the head of the list
- * @member: the name of the list_struct within the struct.
- *
- * Prepares a pos entry for use as a start point in list_for_each_entry_continue.
- */
-#define list_prepare_entry(pos, head, member) \
- ((pos) ? : list_entry(head, typeof(*pos), member))
-
-/**
- * list_for_each_entry_continue - continue iteration over list of given type
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- *
- * Continue to iterate over list of given type, continuing after
- * the current position.
- */
-#define list_for_each_entry_continue(pos, head, member) \
- for (pos = list_entry(pos->member.next, typeof(*pos), member); \
- prefetch(pos->member.next), &pos->member != (head); \
- pos = list_entry(pos->member.next, typeof(*pos), member))
-
-/**
- * list_for_each_entry_from - iterate over list of given type from the current point
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- *
- * Iterate over list of given type, continuing from current position.
- */
-#define list_for_each_entry_from(pos, head, member) \
- for (; prefetch(pos->member.next), &pos->member != (head); \
- pos = list_entry(pos->member.next, typeof(*pos), member))
-
-/**
- * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- */
-#define list_for_each_entry_safe(pos, n, head, member) \
- for (pos = list_entry((head)->next, typeof(*pos), member), \
- n = list_entry(pos->member.next, typeof(*pos), member); \
- &pos->member != (head); \
- pos = n, n = list_entry(n->member.next, typeof(*n), member))
-
-/**
- * list_for_each_entry_safe_continue
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- *
- * Iterate over list of given type, continuing after current point,
- * safe against removal of list entry.
- */
-#define list_for_each_entry_safe_continue(pos, n, head, member) \
- for (pos = list_entry(pos->member.next, typeof(*pos), member), \
- n = list_entry(pos->member.next, typeof(*pos), member); \
- &pos->member != (head); \
- pos = n, n = list_entry(n->member.next, typeof(*n), member))
-
-/**
- * list_for_each_entry_safe_from
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- *
- * Iterate over list of given type from current point, safe against
- * removal of list entry.
- */
-#define list_for_each_entry_safe_from(pos, n, head, member) \
- for (n = list_entry(pos->member.next, typeof(*pos), member); \
- &pos->member != (head); \
- pos = n, n = list_entry(n->member.next, typeof(*n), member))
-
-/**
- * list_for_each_entry_safe_reverse
- * @pos: the type * to use as a loop cursor.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- *
- * Iterate backwards over list of given type, safe against removal
- * of list entry.
- */
-#define list_for_each_entry_safe_reverse(pos, n, head, member) \
- for (pos = list_entry((head)->prev, typeof(*pos), member), \
- n = list_entry(pos->member.prev, typeof(*pos), member); \
- &pos->member != (head); \
- pos = n, n = list_entry(n->member.prev, typeof(*n), member))
-
-/**
- * list_for_each_rcu - iterate over an rcu-protected list
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
- *
- * This list-traversal primitive may safely run concurrently with
- * the _rcu list-mutation primitives such as list_add_rcu()
- * as long as the traversal is guarded by rcu_read_lock().
- */
-#define list_for_each_rcu(pos, head) \
- for (pos = (head)->next; \
- prefetch(rcu_dereference(pos)->next), pos != (head); \
- pos = pos->next)
-
-#define __list_for_each_rcu(pos, head) \
- for (pos = (head)->next; \
- rcu_dereference(pos) != (head); \
- pos = pos->next)
-
-/**
- * list_for_each_safe_rcu
- * @pos: the &struct list_head to use as a loop cursor.
- * @n: another &struct list_head to use as temporary storage
- * @head: the head for your list.
- *
- * Iterate over an rcu-protected list, safe against removal of list entry.
- *
- * This list-traversal primitive may safely run concurrently with
- * the _rcu list-mutation primitives such as list_add_rcu()
- * as long as the traversal is guarded by rcu_read_lock().
- */
-#define list_for_each_safe_rcu(pos, n, head) \
- for (pos = (head)->next; \
- n = rcu_dereference(pos)->next, pos != (head); \
- pos = n)
-
-/**
- * list_for_each_entry_rcu - iterate over rcu list of given type
- * @pos: the type * to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- *
- * This list-traversal primitive may safely run concurrently with
- * the _rcu list-mutation primitives such as list_add_rcu()
- * as long as the traversal is guarded by rcu_read_lock().
- */
-#define list_for_each_entry_rcu(pos, head, member) \
- for (pos = list_entry((head)->next, typeof(*pos), member); \
- prefetch(rcu_dereference(pos)->member.next), \
- &pos->member != (head); \
- pos = list_entry(pos->member.next, typeof(*pos), member))
-
-
-/**
- * list_for_each_continue_rcu
- * @pos: the &struct list_head to use as a loop cursor.
- * @head: the head for your list.
- *
- * Iterate over an rcu-protected list, continuing after current point.
- *
- * This list-traversal primitive may safely run concurrently with
- * the _rcu list-mutation primitives such as list_add_rcu()
- * as long as the traversal is guarded by rcu_read_lock().
- */
-#define list_for_each_continue_rcu(pos, head) \
- for ((pos) = (pos)->next; \
- prefetch(rcu_dereference((pos))->next), (pos) != (head); \
- (pos) = (pos)->next)
-
-/*
- * Double linked lists with a single pointer list head.
- * Mostly useful for hash tables where the two pointer list head is
- * too wasteful.
- * You lose the ability to access the tail in O(1).
- */
-
-struct hlist_head {
- struct hlist_node *first;
-};
-
-struct hlist_node {
- struct hlist_node *next, **pprev;
-};
-
-#define HLIST_HEAD_INIT { .first = NULL }
-#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL }
-#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
-static inline void INIT_HLIST_NODE(struct hlist_node *h)
-{
- h->next = NULL;
- h->pprev = NULL;
-}
-
-static inline int hlist_unhashed(const struct hlist_node *h)
-{
- return !h->pprev;
-}
-
-static inline int hlist_empty(const struct hlist_head *h)
-{
- return !h->first;
-}
-
-static inline void __hlist_del(struct hlist_node *n)
-{
- struct hlist_node *next = n->next;
- struct hlist_node **pprev = n->pprev;
- *pprev = next;
- if (next)
- next->pprev = pprev;
-}
-
-static inline void hlist_del(struct hlist_node *n)
-{
- __hlist_del(n);
- n->next = LIST_POISON1;
- n->pprev = LIST_POISON2;
-}
-
-/**
- * hlist_del_rcu - deletes entry from hash list without re-initialization
- * @n: the element to delete from the hash list.
- *
- * Note: list_unhashed() on entry does not return true after this,
- * the entry is in an undefined state. It is useful for RCU based
- * lockfree traversal.
- *
- * In particular, it means that we can not poison the forward
- * pointers that may still be used for walking the hash list.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as hlist_add_head_rcu()
- * or hlist_del_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * hlist_for_each_entry().
- */
-static inline void hlist_del_rcu(struct hlist_node *n)
-{
- __hlist_del(n);
- n->pprev = LIST_POISON2;
-}
-
-static inline void hlist_del_init(struct hlist_node *n)
-{
- if (!hlist_unhashed(n)) {
- __hlist_del(n);
- INIT_HLIST_NODE(n);
- }
-}
-
-/*
- * hlist_replace_rcu - replace old entry by new one
- * @old : the element to be replaced
- * @new : the new element to insert
- *
- * The old entry will be replaced with the new entry atomically.
- */
-static inline void hlist_replace_rcu(struct hlist_node *old,
- struct hlist_node *new)
-{
- struct hlist_node *next = old->next;
-
- new->next = next;
- new->pprev = old->pprev;
- smp_wmb();
- if (next)
- new->next->pprev = &new->next;
- *new->pprev = new;
- old->pprev = LIST_POISON2;
-}
-
-static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
-{
- struct hlist_node *first = h->first;
- n->next = first;
- if (first)
- first->pprev = &n->next;
- h->first = n;
- n->pprev = &h->first;
-}
-
-
-/**
- * hlist_add_head_rcu
- * @n: the element to add to the hash list.
- * @h: the list to add to.
- *
- * Description:
- * Adds the specified element to the specified hlist,
- * while permitting racing traversals.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as hlist_add_head_rcu()
- * or hlist_del_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * hlist_for_each_entry_rcu(), used to prevent memory-consistency
- * problems on Alpha CPUs. Regardless of the type of CPU, the
- * list-traversal primitive must be guarded by rcu_read_lock().
- */
-static inline void hlist_add_head_rcu(struct hlist_node *n,
- struct hlist_head *h)
-{
- struct hlist_node *first = h->first;
- n->next = first;
- n->pprev = &h->first;
- smp_wmb();
- if (first)
- first->pprev = &n->next;
- h->first = n;
-}
-
-/* next must be != NULL */
-static inline void hlist_add_before(struct hlist_node *n,
- struct hlist_node *next)
-{
- n->pprev = next->pprev;
- n->next = next;
- next->pprev = &n->next;
- *(n->pprev) = n;
-}
-
-static inline void hlist_add_after(struct hlist_node *n,
- struct hlist_node *next)
-{
- next->next = n->next;
- n->next = next;
- next->pprev = &n->next;
-
- if(next->next)
- next->next->pprev = &next->next;
-}
-
-/**
- * hlist_add_before_rcu
- * @n: the new element to add to the hash list.
- * @next: the existing element to add the new element before.
- *
- * Description:
- * Adds the specified element to the specified hlist
- * before the specified node while permitting racing traversals.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as hlist_add_head_rcu()
- * or hlist_del_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * hlist_for_each_entry_rcu(), used to prevent memory-consistency
- * problems on Alpha CPUs.
- */
-static inline void hlist_add_before_rcu(struct hlist_node *n,
- struct hlist_node *next)
-{
- n->pprev = next->pprev;
- n->next = next;
- smp_wmb();
- next->pprev = &n->next;
- *(n->pprev) = n;
-}
-
-/**
- * hlist_add_after_rcu
- * @prev: the existing element to add the new element after.
- * @n: the new element to add to the hash list.
- *
- * Description:
- * Adds the specified element to the specified hlist
- * after the specified node while permitting racing traversals.
- *
- * The caller must take whatever precautions are necessary
- * (such as holding appropriate locks) to avoid racing
- * with another list-mutation primitive, such as hlist_add_head_rcu()
- * or hlist_del_rcu(), running on this same list.
- * However, it is perfectly legal to run concurrently with
- * the _rcu list-traversal primitives, such as
- * hlist_for_each_entry_rcu(), used to prevent memory-consistency
- * problems on Alpha CPUs.
- */
-static inline void hlist_add_after_rcu(struct hlist_node *prev,
- struct hlist_node *n)
-{
- n->next = prev->next;
- n->pprev = &prev->next;
- smp_wmb();
- prev->next = n;
- if (n->next)
- n->next->pprev = &n->next;
-}
-
-#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
-
-#define hlist_for_each(pos, head) \
- for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
- pos = pos->next)
-
-#define hlist_for_each_safe(pos, n, head) \
- for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
- pos = n)
-
-/**
- * hlist_for_each_entry - iterate over list of given type
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the hlist_node within the struct.
- */
-#define hlist_for_each_entry(tpos, pos, head, member) \
- for (pos = (head)->first; \
- pos && ({ prefetch(pos->next); 1;}) && \
- ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
- pos = pos->next)
-
-/**
- * hlist_for_each_entry_continue - iterate over a hlist continuing after current point
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @member: the name of the hlist_node within the struct.
- */
-#define hlist_for_each_entry_continue(tpos, pos, member) \
- for (pos = (pos)->next; \
- pos && ({ prefetch(pos->next); 1;}) && \
- ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
- pos = pos->next)
-
-/**
- * hlist_for_each_entry_from - iterate over a hlist continuing from current point
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @member: the name of the hlist_node within the struct.
- */
-#define hlist_for_each_entry_from(tpos, pos, member) \
- for (; pos && ({ prefetch(pos->next); 1;}) && \
- ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
- pos = pos->next)
-
-/**
- * hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @n: another &struct hlist_node to use as temporary storage
- * @head: the head for your list.
- * @member: the name of the hlist_node within the struct.
- */
-#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
- for (pos = (head)->first; \
- pos && ({ n = pos->next; 1; }) && \
- ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
- pos = n)
-
-/**
- * hlist_for_each_entry_rcu - iterate over rcu list of given type
- * @tpos: the type * to use as a loop cursor.
- * @pos: the &struct hlist_node to use as a loop cursor.
- * @head: the head for your list.
- * @member: the name of the hlist_node within the struct.
- *
- * This list-traversal primitive may safely run concurrently with
- * the _rcu list-mutation primitives such as hlist_add_head_rcu()
- * as long as the traversal is guarded by rcu_read_lock().
- */
-#define hlist_for_each_entry_rcu(tpos, pos, head, member) \
- for (pos = (head)->first; \
- rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && \
- ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
- pos = pos->next)
-
-#else
-#warning "don't include kernel headers in userspace"
-#endif /* __KERNEL__ */
-#endif
diff --git a/original/linux/lockd/nlm.h b/original/linux/lockd/nlm.h
deleted file mode 100644
index d9d46e4..0000000
--- a/original/linux/lockd/nlm.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * linux/include/linux/lockd/nlm.h
- *
- * Declarations for the Network Lock Manager protocol.
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef LINUX_LOCKD_NLM_H
-#define LINUX_LOCKD_NLM_H
-
-
-/* Maximum file offset in file_lock.fl_end */
-# define NLM_OFFSET_MAX ((s32) 0x7fffffff)
-# define NLM4_OFFSET_MAX ((s64) ((~(u64)0) >> 1))
-
-/* Return states for NLM */
-enum {
- NLM_LCK_GRANTED = 0,
- NLM_LCK_DENIED = 1,
- NLM_LCK_DENIED_NOLOCKS = 2,
- NLM_LCK_BLOCKED = 3,
- NLM_LCK_DENIED_GRACE_PERIOD = 4,
-#ifdef CONFIG_LOCKD_V4
- NLM_DEADLCK = 5,
- NLM_ROFS = 6,
- NLM_STALE_FH = 7,
- NLM_FBIG = 8,
- NLM_FAILED = 9,
-#endif
-};
-
-#define NLM_PROGRAM 100021
-
-#define NLMPROC_NULL 0
-#define NLMPROC_TEST 1
-#define NLMPROC_LOCK 2
-#define NLMPROC_CANCEL 3
-#define NLMPROC_UNLOCK 4
-#define NLMPROC_GRANTED 5
-#define NLMPROC_TEST_MSG 6
-#define NLMPROC_LOCK_MSG 7
-#define NLMPROC_CANCEL_MSG 8
-#define NLMPROC_UNLOCK_MSG 9
-#define NLMPROC_GRANTED_MSG 10
-#define NLMPROC_TEST_RES 11
-#define NLMPROC_LOCK_RES 12
-#define NLMPROC_CANCEL_RES 13
-#define NLMPROC_UNLOCK_RES 14
-#define NLMPROC_GRANTED_RES 15
-#define NLMPROC_NSM_NOTIFY 16 /* statd callback */
-#define NLMPROC_SHARE 20
-#define NLMPROC_UNSHARE 21
-#define NLMPROC_NM_LOCK 22
-#define NLMPROC_FREE_ALL 23
-
-#endif /* LINUX_LOCKD_NLM_H */
diff --git a/original/linux/lockd/xdr.h b/original/linux/lockd/xdr.h
deleted file mode 100644
index bb0a0f1..0000000
--- a/original/linux/lockd/xdr.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * linux/include/linux/lockd/xdr.h
- *
- * XDR types for the NLM protocol
- *
- * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef LOCKD_XDR_H
-#define LOCKD_XDR_H
-
-#include <linux/fs.h>
-#include <linux/nfs.h>
-#include <linux/sunrpc/xdr.h>
-
-#define NLM_MAXCOOKIELEN 32
-#define NLM_MAXSTRLEN 1024
-
-#define nlm_granted __constant_htonl(NLM_LCK_GRANTED)
-#define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED)
-#define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS)
-#define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED)
-#define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD)
-
-/* Lock info passed via NLM */
-struct nlm_lock {
- char * caller;
- int len; /* length of "caller" */
- struct nfs_fh fh;
- struct xdr_netobj oh;
- u32 svid;
- struct file_lock fl;
-};
-
-/*
- * NLM cookies. Technically they can be 1K, but Linux only uses 8 bytes.
- * FreeBSD uses 16, Apple Mac OS X 10.3 uses 20. Therefore we set it to
- * 32 bytes.
- */
-
-struct nlm_cookie
-{
- unsigned char data[NLM_MAXCOOKIELEN];
- unsigned int len;
-};
-
-/*
- * Generic lockd arguments for all but sm_notify
- */
-struct nlm_args {
- struct nlm_cookie cookie;
- struct nlm_lock lock;
- u32 block;
- u32 reclaim;
- u32 state;
- u32 monitor;
- u32 fsm_access;
- u32 fsm_mode;
-};
-
-typedef struct nlm_args nlm_args;
-
-/*
- * Generic lockd result
- */
-struct nlm_res {
- struct nlm_cookie cookie;
- u32 status;
- struct nlm_lock lock;
-};
-
-/*
- * statd callback when client has rebooted
- */
-struct nlm_reboot {
- char * mon;
- int len;
- u32 state;
- u32 addr;
- u32 vers;
- u32 proto;
-};
-
-/*
- * Contents of statd callback when monitored host rebooted
- */
-#define NLMSVC_XDRSIZE sizeof(struct nlm_args)
-
-int nlmsvc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *);
-int nlmsvc_encode_testres(struct svc_rqst *, u32 *, struct nlm_res *);
-int nlmsvc_decode_lockargs(struct svc_rqst *, u32 *, struct nlm_args *);
-int nlmsvc_decode_cancargs(struct svc_rqst *, u32 *, struct nlm_args *);
-int nlmsvc_decode_unlockargs(struct svc_rqst *, u32 *, struct nlm_args *);
-int nlmsvc_encode_res(struct svc_rqst *, u32 *, struct nlm_res *);
-int nlmsvc_decode_res(struct svc_rqst *, u32 *, struct nlm_res *);
-int nlmsvc_encode_void(struct svc_rqst *, u32 *, void *);
-int nlmsvc_decode_void(struct svc_rqst *, u32 *, void *);
-int nlmsvc_decode_shareargs(struct svc_rqst *, u32 *, struct nlm_args *);
-int nlmsvc_encode_shareres(struct svc_rqst *, u32 *, struct nlm_res *);
-int nlmsvc_decode_notify(struct svc_rqst *, u32 *, struct nlm_args *);
-int nlmsvc_decode_reboot(struct svc_rqst *, u32 *, struct nlm_reboot *);
-/*
-int nlmclt_encode_testargs(struct rpc_rqst *, u32 *, struct nlm_args *);
-int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
-int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
-int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
- */
-
-#endif /* LOCKD_XDR_H */
diff --git a/original/linux/lockdep.h b/original/linux/lockdep.h
deleted file mode 100644
index c040a8c..0000000
--- a/original/linux/lockdep.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Runtime locking correctness validator
- *
- * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
- *
- * see Documentation/lockdep-design.txt for more details.
- */
-#ifndef __LINUX_LOCKDEP_H
-#define __LINUX_LOCKDEP_H
-
-#include <linux/linkage.h>
-#include <linux/list.h>
-#include <linux/debug_locks.h>
-#include <linux/stacktrace.h>
-
-#ifdef CONFIG_LOCKDEP
-
-/*
- * Lock-class usage-state bits:
- */
-enum lock_usage_bit
-{
- LOCK_USED = 0,
- LOCK_USED_IN_HARDIRQ,
- LOCK_USED_IN_SOFTIRQ,
- LOCK_ENABLED_SOFTIRQS,
- LOCK_ENABLED_HARDIRQS,
- LOCK_USED_IN_HARDIRQ_READ,
- LOCK_USED_IN_SOFTIRQ_READ,
- LOCK_ENABLED_SOFTIRQS_READ,
- LOCK_ENABLED_HARDIRQS_READ,
- LOCK_USAGE_STATES
-};
-
-/*
- * Usage-state bitmasks:
- */
-#define LOCKF_USED (1 << LOCK_USED)
-#define LOCKF_USED_IN_HARDIRQ (1 << LOCK_USED_IN_HARDIRQ)
-#define LOCKF_USED_IN_SOFTIRQ (1 << LOCK_USED_IN_SOFTIRQ)
-#define LOCKF_ENABLED_HARDIRQS (1 << LOCK_ENABLED_HARDIRQS)
-#define LOCKF_ENABLED_SOFTIRQS (1 << LOCK_ENABLED_SOFTIRQS)
-
-#define LOCKF_ENABLED_IRQS (LOCKF_ENABLED_HARDIRQS | LOCKF_ENABLED_SOFTIRQS)
-#define LOCKF_USED_IN_IRQ (LOCKF_USED_IN_HARDIRQ | LOCKF_USED_IN_SOFTIRQ)
-
-#define LOCKF_USED_IN_HARDIRQ_READ (1 << LOCK_USED_IN_HARDIRQ_READ)
-#define LOCKF_USED_IN_SOFTIRQ_READ (1 << LOCK_USED_IN_SOFTIRQ_READ)
-#define LOCKF_ENABLED_HARDIRQS_READ (1 << LOCK_ENABLED_HARDIRQS_READ)
-#define LOCKF_ENABLED_SOFTIRQS_READ (1 << LOCK_ENABLED_SOFTIRQS_READ)
-
-#define LOCKF_ENABLED_IRQS_READ \
- (LOCKF_ENABLED_HARDIRQS_READ | LOCKF_ENABLED_SOFTIRQS_READ)
-#define LOCKF_USED_IN_IRQ_READ \
- (LOCKF_USED_IN_HARDIRQ_READ | LOCKF_USED_IN_SOFTIRQ_READ)
-
-#define MAX_LOCKDEP_SUBCLASSES 8UL
-
-/*
- * Lock-classes are keyed via unique addresses, by embedding the
- * lockclass-key into the kernel (or module) .data section. (For
- * static locks we use the lock address itself as the key.)
- */
-struct lockdep_subclass_key {
- char __one_byte;
-} __attribute__ ((__packed__));
-
-struct lock_class_key {
- struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES];
-};
-
-/*
- * The lock-class itself:
- */
-struct lock_class {
- /*
- * class-hash:
- */
- struct list_head hash_entry;
-
- /*
- * global list of all lock-classes:
- */
- struct list_head lock_entry;
-
- struct lockdep_subclass_key *key;
- unsigned int subclass;
-
- /*
- * IRQ/softirq usage tracking bits:
- */
- unsigned long usage_mask;
- struct stack_trace usage_traces[LOCK_USAGE_STATES];
-
- /*
- * These fields represent a directed graph of lock dependencies,
- * to every node we attach a list of "forward" and a list of
- * "backward" graph nodes.
- */
- struct list_head locks_after, locks_before;
-
- /*
- * Generation counter, when doing certain classes of graph walking,
- * to ensure that we check one node only once:
- */
- unsigned int version;
-
- /*
- * Statistics counter:
- */
- unsigned long ops;
-
- const char *name;
- int name_version;
-};
-
-/*
- * Map the lock object (the lock instance) to the lock-class object.
- * This is embedded into specific lock instances:
- */
-struct lockdep_map {
- struct lock_class_key *key;
- struct lock_class *class_cache;
- const char *name;
-};
-
-/*
- * Every lock has a list of other locks that were taken after it.
- * We only grow the list, never remove from it:
- */
-struct lock_list {
- struct list_head entry;
- struct lock_class *class;
- struct stack_trace trace;
-};
-
-/*
- * We record lock dependency chains, so that we can cache them:
- */
-struct lock_chain {
- struct list_head entry;
- u64 chain_key;
-};
-
-struct held_lock {
- /*
- * One-way hash of the dependency chain up to this point. We
- * hash the hashes step by step as the dependency chain grows.
- *
- * We use it for dependency-caching and we skip detection
- * passes and dependency-updates if there is a cache-hit, so
- * it is absolutely critical for 100% coverage of the validator
- * to have a unique key value for every unique dependency path
- * that can occur in the system, to make a unique hash value
- * as likely as possible - hence the 64-bit width.
- *
- * The task struct holds the current hash value (initialized
- * with zero), here we store the previous hash value:
- */
- u64 prev_chain_key;
- struct lock_class *class;
- unsigned long acquire_ip;
- struct lockdep_map *instance;
-
- /*
- * The lock-stack is unified in that the lock chains of interrupt
- * contexts nest ontop of process context chains, but we 'separate'
- * the hashes by starting with 0 if we cross into an interrupt
- * context, and we also keep do not add cross-context lock
- * dependencies - the lock usage graph walking covers that area
- * anyway, and we'd just unnecessarily increase the number of
- * dependencies otherwise. [Note: hardirq and softirq contexts
- * are separated from each other too.]
- *
- * The following field is used to detect when we cross into an
- * interrupt context:
- */
- int irq_context;
- int trylock;
- int read;
- int check;
- int hardirqs_off;
-};
-
-/*
- * Initialization, self-test and debugging-output methods:
- */
-extern void lockdep_init(void);
-extern void lockdep_info(void);
-extern void lockdep_reset(void);
-extern void lockdep_reset_lock(struct lockdep_map *lock);
-extern void lockdep_free_key_range(void *start, unsigned long size);
-
-extern void lockdep_off(void);
-extern void lockdep_on(void);
-extern int lockdep_internal(void);
-
-/*
- * These methods are used by specific locking variants (spinlocks,
- * rwlocks, mutexes and rwsems) to pass init/acquire/release events
- * to lockdep:
- */
-
-extern void lockdep_init_map(struct lockdep_map *lock, const char *name,
- struct lock_class_key *key);
-
-/*
- * Reinitialize a lock key - for cases where there is special locking or
- * special initialization of locks so that the validator gets the scope
- * of dependencies wrong: they are either too broad (they need a class-split)
- * or they are too narrow (they suffer from a false class-split):
- */
-#define lockdep_set_class(lock, key) \
- lockdep_init_map(&(lock)->dep_map, #key, key)
-#define lockdep_set_class_and_name(lock, key, name) \
- lockdep_init_map(&(lock)->dep_map, name, key)
-
-/*
- * Acquire a lock.
- *
- * Values for "read":
- *
- * 0: exclusive (write) acquire
- * 1: read-acquire (no recursion allowed)
- * 2: read-acquire with same-instance recursion allowed
- *
- * Values for check:
- *
- * 0: disabled
- * 1: simple checks (freeing, held-at-exit-time, etc.)
- * 2: full validation
- */
-extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
- int trylock, int read, int check, unsigned long ip);
-
-extern void lock_release(struct lockdep_map *lock, int nested,
- unsigned long ip);
-
-# define INIT_LOCKDEP .lockdep_recursion = 0,
-
-#else /* !LOCKDEP */
-
-static inline void lockdep_off(void)
-{
-}
-
-static inline void lockdep_on(void)
-{
-}
-
-static inline int lockdep_internal(void)
-{
- return 0;
-}
-
-# define lock_acquire(l, s, t, r, c, i) do { } while (0)
-# define lock_release(l, n, i) do { } while (0)
-# define lockdep_init() do { } while (0)
-# define lockdep_info() do { } while (0)
-# define lockdep_init_map(lock, name, key) do { (void)(key); } while (0)
-# define lockdep_set_class(lock, key) do { (void)(key); } while (0)
-# define lockdep_set_class_and_name(lock, key, name) \
- do { (void)(key); } while (0)
-# define INIT_LOCKDEP
-# define lockdep_reset() do { debug_locks = 1; } while (0)
-# define lockdep_free_key_range(start, size) do { } while (0)
-/*
- * The class key takes no space if lockdep is disabled:
- */
-struct lock_class_key { };
-#endif /* !LOCKDEP */
-
-#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS)
-extern void early_init_irq_lock_class(void);
-#else
-# define early_init_irq_lock_class() do { } while (0)
-#endif
-
-#ifdef CONFIG_TRACE_IRQFLAGS
-extern void early_boot_irqs_off(void);
-extern void early_boot_irqs_on(void);
-#else
-# define early_boot_irqs_off() do { } while (0)
-# define early_boot_irqs_on() do { } while (0)
-#endif
-
-/*
- * For trivial one-depth nesting of a lock-class, the following
- * global define can be used. (Subsystems with multiple levels
- * of nesting should define their own lock-nesting subclasses.)
- */
-#define SINGLE_DEPTH_NESTING 1
-
-/*
- * Map the dependency ops to NOP or to real lockdep ops, depending
- * on the per lock-class debug mode:
- */
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# ifdef CONFIG_PROVE_LOCKING
-# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i)
-# else
-# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i)
-# endif
-# define spin_release(l, n, i) lock_release(l, n, i)
-#else
-# define spin_acquire(l, s, t, i) do { } while (0)
-# define spin_release(l, n, i) do { } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# ifdef CONFIG_PROVE_LOCKING
-# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i)
-# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i)
-# else
-# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i)
-# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, i)
-# endif
-# define rwlock_release(l, n, i) lock_release(l, n, i)
-#else
-# define rwlock_acquire(l, s, t, i) do { } while (0)
-# define rwlock_acquire_read(l, s, t, i) do { } while (0)
-# define rwlock_release(l, n, i) do { } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# ifdef CONFIG_PROVE_LOCKING
-# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i)
-# else
-# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i)
-# endif
-# define mutex_release(l, n, i) lock_release(l, n, i)
-#else
-# define mutex_acquire(l, s, t, i) do { } while (0)
-# define mutex_release(l, n, i) do { } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# ifdef CONFIG_PROVE_LOCKING
-# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i)
-# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, i)
-# else
-# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i)
-# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, i)
-# endif
-# define rwsem_release(l, n, i) lock_release(l, n, i)
-#else
-# define rwsem_acquire(l, s, t, i) do { } while (0)
-# define rwsem_acquire_read(l, s, t, i) do { } while (0)
-# define rwsem_release(l, n, i) do { } while (0)
-#endif
-
-#endif /* __LINUX_LOCKDEP_H */
diff --git a/original/linux/loop.h b/original/linux/loop.h
deleted file mode 100644
index e76c761..0000000
--- a/original/linux/loop.h
+++ /dev/null
@@ -1,162 +0,0 @@
-#ifndef _LINUX_LOOP_H
-#define _LINUX_LOOP_H
-
-/*
- * include/linux/loop.h
- *
- * Written by Theodore Ts'o, 3/29/93.
- *
- * Copyright 1993 by Theodore Ts'o. Redistribution of this file is
- * permitted under the GNU General Public License.
- */
-
-#define LO_NAME_SIZE 64
-#define LO_KEY_SIZE 32
-
-#ifdef __KERNEL__
-#include <linux/bio.h>
-#include <linux/blkdev.h>
-#include <linux/spinlock.h>
-#include <linux/mutex.h>
-
-/* Possible states of device */
-enum {
- Lo_unbound,
- Lo_bound,
- Lo_rundown,
-};
-
-struct loop_func_table;
-
-struct loop_device {
- int lo_number;
- int lo_refcnt;
- loff_t lo_offset;
- loff_t lo_sizelimit;
- int lo_flags;
- int (*transfer)(struct loop_device *, int cmd,
- struct page *raw_page, unsigned raw_off,
- struct page *loop_page, unsigned loop_off,
- int size, sector_t real_block);
- char lo_file_name[LO_NAME_SIZE];
- char lo_crypt_name[LO_NAME_SIZE];
- char lo_encrypt_key[LO_KEY_SIZE];
- int lo_encrypt_key_size;
- struct loop_func_table *lo_encryption;
- __u32 lo_init[2];
- uid_t lo_key_owner; /* Who set the key */
- int (*ioctl)(struct loop_device *, int cmd,
- unsigned long arg);
-
- struct file * lo_backing_file;
- struct block_device *lo_device;
- unsigned lo_blocksize;
- void *key_data;
-
- gfp_t old_gfp_mask;
-
- spinlock_t lo_lock;
- struct bio *lo_bio;
- struct bio *lo_biotail;
- int lo_state;
- struct completion lo_done;
- struct completion lo_bh_done;
- struct mutex lo_ctl_mutex;
- int lo_pending;
-
- request_queue_t *lo_queue;
-};
-
-#endif /* __KERNEL__ */
-
-/*
- * Loop flags
- */
-enum {
- LO_FLAGS_READ_ONLY = 1,
- LO_FLAGS_USE_AOPS = 2,
-};
-
-#include <asm/posix_types.h> /* for __kernel_old_dev_t */
-#include <asm/types.h> /* for __u64 */
-
-/* Backwards compatibility version */
-struct loop_info {
- int lo_number; /* ioctl r/o */
- __kernel_old_dev_t lo_device; /* ioctl r/o */
- unsigned long lo_inode; /* ioctl r/o */
- __kernel_old_dev_t lo_rdevice; /* ioctl r/o */
- int lo_offset;
- int lo_encrypt_type;
- int lo_encrypt_key_size; /* ioctl w/o */
- int lo_flags; /* ioctl r/o */
- char lo_name[LO_NAME_SIZE];
- unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
- unsigned long lo_init[2];
- char reserved[4];
-};
-
-struct loop_info64 {
- __u64 lo_device; /* ioctl r/o */
- __u64 lo_inode; /* ioctl r/o */
- __u64 lo_rdevice; /* ioctl r/o */
- __u64 lo_offset;
- __u64 lo_sizelimit;/* bytes, 0 == max available */
- __u32 lo_number; /* ioctl r/o */
- __u32 lo_encrypt_type;
- __u32 lo_encrypt_key_size; /* ioctl w/o */
- __u32 lo_flags; /* ioctl r/o */
- __u8 lo_file_name[LO_NAME_SIZE];
- __u8 lo_crypt_name[LO_NAME_SIZE];
- __u8 lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
- __u64 lo_init[2];
-};
-
-/*
- * Loop filter types
- */
-
-#define LO_CRYPT_NONE 0
-#define LO_CRYPT_XOR 1
-#define LO_CRYPT_DES 2
-#define LO_CRYPT_FISH2 3 /* Twofish encryption */
-#define LO_CRYPT_BLOW 4
-#define LO_CRYPT_CAST128 5
-#define LO_CRYPT_IDEA 6
-#define LO_CRYPT_DUMMY 9
-#define LO_CRYPT_SKIPJACK 10
-#define LO_CRYPT_CRYPTOAPI 18
-#define MAX_LO_CRYPT 20
-
-#ifdef __KERNEL__
-/* Support for loadable transfer modules */
-struct loop_func_table {
- int number; /* filter type */
- int (*transfer)(struct loop_device *lo, int cmd,
- struct page *raw_page, unsigned raw_off,
- struct page *loop_page, unsigned loop_off,
- int size, sector_t real_block);
- int (*init)(struct loop_device *, const struct loop_info64 *);
- /* release is called from loop_unregister_transfer or clr_fd */
- int (*release)(struct loop_device *);
- int (*ioctl)(struct loop_device *, int cmd, unsigned long arg);
- struct module *owner;
-};
-
-int loop_register_transfer(struct loop_func_table *funcs);
-int loop_unregister_transfer(int number);
-
-#endif
-/*
- * IOCTL commands --- we will commandeer 0x4C ('L')
- */
-
-#define LOOP_SET_FD 0x4C00
-#define LOOP_CLR_FD 0x4C01
-#define LOOP_SET_STATUS 0x4C02
-#define LOOP_GET_STATUS 0x4C03
-#define LOOP_SET_STATUS64 0x4C04
-#define LOOP_GET_STATUS64 0x4C05
-#define LOOP_CHANGE_FD 0x4C06
-
-#endif
diff --git a/original/linux/magic.h b/original/linux/magic.h
deleted file mode 100644
index 34d0ba1..0000000
--- a/original/linux/magic.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef __LINUX_MAGIC_H__
-#define __LINUX_MAGIC_H__
-
-#define ADFS_SUPER_MAGIC 0xadf5
-#define AFFS_SUPER_MAGIC 0xadff
-#define AFS_SUPER_MAGIC 0x5346414F
-#define AUTOFS_SUPER_MAGIC 0x0187
-#define CODA_SUPER_MAGIC 0x73757245
-#define DEBUGFS_MAGIC 0x64626720
-#define EFS_SUPER_MAGIC 0x414A53
-#define EXT2_SUPER_MAGIC 0xEF53
-#define EXT3_SUPER_MAGIC 0xEF53
-#define EXT4_SUPER_MAGIC 0xEF53
-#define HPFS_SUPER_MAGIC 0xf995e849
-#define ISOFS_SUPER_MAGIC 0x9660
-#define JFFS2_SUPER_MAGIC 0x72b6
-#define ANON_INODE_FS_MAGIC 0x09041934
-
-#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
-#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
-#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
-#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
-#define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */
-
-#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
-#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */
-#define NFS_SUPER_MAGIC 0x6969
-#define OPENPROM_SUPER_MAGIC 0x9fa1
-#define PROC_SUPER_MAGIC 0x9fa0
-#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
-
-#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */
- /* used by file system utilities that
- look at the superblock, etc. */
-#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
-#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
-#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
-
-#define SMB_SUPER_MAGIC 0x517B
-#define USBDEVICE_SUPER_MAGIC 0x9fa2
-#define CGROUP_SUPER_MAGIC 0x27e0eb
-
-#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
-#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
-
-#endif /* __LINUX_MAGIC_H__ */
diff --git a/original/linux/major.h b/original/linux/major.h
deleted file mode 100644
index 0a74c52..0000000
--- a/original/linux/major.h
+++ /dev/null
@@ -1,169 +0,0 @@
-#ifndef _LINUX_MAJOR_H
-#define _LINUX_MAJOR_H
-
-/*
- * This file has definitions for major device numbers.
- * For the device number assignments, see Documentation/devices.txt.
- */
-
-#define UNNAMED_MAJOR 0
-#define MEM_MAJOR 1
-#define RAMDISK_MAJOR 1
-#define FLOPPY_MAJOR 2
-#define PTY_MASTER_MAJOR 2
-#define IDE0_MAJOR 3
-#define HD_MAJOR IDE0_MAJOR
-#define PTY_SLAVE_MAJOR 3
-#define TTY_MAJOR 4
-#define TTYAUX_MAJOR 5
-#define LP_MAJOR 6
-#define VCS_MAJOR 7
-#define LOOP_MAJOR 7
-#define SCSI_DISK0_MAJOR 8
-#define SCSI_TAPE_MAJOR 9
-#define MD_MAJOR 9
-#define MISC_MAJOR 10
-#define SCSI_CDROM_MAJOR 11
-#define MUX_MAJOR 11 /* PA-RISC only */
-#define XT_DISK_MAJOR 13
-#define INPUT_MAJOR 13
-#define SOUND_MAJOR 14
-#define CDU31A_CDROM_MAJOR 15
-#define JOYSTICK_MAJOR 15
-#define GOLDSTAR_CDROM_MAJOR 16
-#define OPTICS_CDROM_MAJOR 17
-#define SANYO_CDROM_MAJOR 18
-#define CYCLADES_MAJOR 19
-#define CYCLADESAUX_MAJOR 20
-#define MITSUMI_X_CDROM_MAJOR 20
-#define MFM_ACORN_MAJOR 21 /* ARM Linux /dev/mfm */
-#define SCSI_GENERIC_MAJOR 21
-#define IDE1_MAJOR 22
-#define DIGICU_MAJOR 22
-#define DIGI_MAJOR 23
-#define MITSUMI_CDROM_MAJOR 23
-#define CDU535_CDROM_MAJOR 24
-#define STL_SERIALMAJOR 24
-#define MATSUSHITA_CDROM_MAJOR 25
-#define STL_CALLOUTMAJOR 25
-#define MATSUSHITA_CDROM2_MAJOR 26
-#define QIC117_TAPE_MAJOR 27
-#define MATSUSHITA_CDROM3_MAJOR 27
-#define MATSUSHITA_CDROM4_MAJOR 28
-#define STL_SIOMEMMAJOR 28
-#define ACSI_MAJOR 28
-#define AZTECH_CDROM_MAJOR 29
-#define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */
-#define CM206_CDROM_MAJOR 32
-#define IDE2_MAJOR 33
-#define IDE3_MAJOR 34
-#define Z8530_MAJOR 34
-#define XPRAM_MAJOR 35 /* Expanded storage on S/390: "slow ram"*/
-#define NETLINK_MAJOR 36
-#define PS2ESDI_MAJOR 36
-#define IDETAPE_MAJOR 37
-#define Z2RAM_MAJOR 37
-#define APBLOCK_MAJOR 38 /* AP1000 Block device */
-#define DDV_MAJOR 39 /* AP1000 DDV block device */
-#define NBD_MAJOR 43 /* Network block device */
-#define RISCOM8_NORMAL_MAJOR 48
-#define DAC960_MAJOR 48 /* 48..55 */
-#define RISCOM8_CALLOUT_MAJOR 49
-#define MKISS_MAJOR 55
-#define DSP56K_MAJOR 55 /* DSP56001 processor device */
-
-#define IDE4_MAJOR 56
-#define IDE5_MAJOR 57
-
-#define SCSI_DISK1_MAJOR 65
-#define SCSI_DISK2_MAJOR 66
-#define SCSI_DISK3_MAJOR 67
-#define SCSI_DISK4_MAJOR 68
-#define SCSI_DISK5_MAJOR 69
-#define SCSI_DISK6_MAJOR 70
-#define SCSI_DISK7_MAJOR 71
-
-#define COMPAQ_SMART2_MAJOR 72
-#define COMPAQ_SMART2_MAJOR1 73
-#define COMPAQ_SMART2_MAJOR2 74
-#define COMPAQ_SMART2_MAJOR3 75
-#define COMPAQ_SMART2_MAJOR4 76
-#define COMPAQ_SMART2_MAJOR5 77
-#define COMPAQ_SMART2_MAJOR6 78
-#define COMPAQ_SMART2_MAJOR7 79
-
-#define SPECIALIX_NORMAL_MAJOR 75
-#define SPECIALIX_CALLOUT_MAJOR 76
-
-#define AURORA_MAJOR 79
-
-#define I2O_MAJOR 80 /* 80->87 */
-
-#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */
-#define SCSI_CHANGER_MAJOR 86
-
-#define IDE6_MAJOR 88
-#define IDE7_MAJOR 89
-#define IDE8_MAJOR 90
-#define IDE9_MAJOR 91
-
-#define DASD_MAJOR 94
-
-#define MDISK_MAJOR 95
-
-#define UBD_MAJOR 98
-
-#define PP_MAJOR 99
-#define JSFD_MAJOR 99
-
-#define PHONE_MAJOR 100
-
-#define COMPAQ_CISS_MAJOR 104
-#define COMPAQ_CISS_MAJOR1 105
-#define COMPAQ_CISS_MAJOR2 106
-#define COMPAQ_CISS_MAJOR3 107
-#define COMPAQ_CISS_MAJOR4 108
-#define COMPAQ_CISS_MAJOR5 109
-#define COMPAQ_CISS_MAJOR6 110
-#define COMPAQ_CISS_MAJOR7 111
-
-#define VIODASD_MAJOR 112
-#define VIOCD_MAJOR 113
-
-#define ATARAID_MAJOR 114
-
-#define SCSI_DISK8_MAJOR 128
-#define SCSI_DISK9_MAJOR 129
-#define SCSI_DISK10_MAJOR 130
-#define SCSI_DISK11_MAJOR 131
-#define SCSI_DISK12_MAJOR 132
-#define SCSI_DISK13_MAJOR 133
-#define SCSI_DISK14_MAJOR 134
-#define SCSI_DISK15_MAJOR 135
-
-#define UNIX98_PTY_MASTER_MAJOR 128
-#define UNIX98_PTY_MAJOR_COUNT 8
-#define UNIX98_PTY_SLAVE_MAJOR (UNIX98_PTY_MASTER_MAJOR+UNIX98_PTY_MAJOR_COUNT)
-
-#define RTF_MAJOR 150
-#define RAW_MAJOR 162
-
-#define USB_ACM_MAJOR 166
-#define USB_ACM_AUX_MAJOR 167
-#define USB_CHAR_MAJOR 180
-
-#define VXVM_MAJOR 199 /* VERITAS volume i/o driver */
-#define VXSPEC_MAJOR 200 /* VERITAS volume config driver */
-#define VXDMP_MAJOR 201 /* VERITAS volume multipath driver */
-
-#define MSR_MAJOR 202
-#define CPUID_MAJOR 203
-
-#define OSST_MAJOR 206 /* OnStream-SCx0 SCSI tape */
-
-#define IBM_TTY3270_MAJOR 227
-#define IBM_FS3270_MAJOR 228
-
-#define VIOTAPE_MAJOR 230
-
-#endif
diff --git a/original/linux/max9635.h b/original/linux/max9635.h
deleted file mode 100644
index f49bfc4..0000000
--- a/original/linux/max9635.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2010 Motorola, Inc.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-#ifndef _LINUX_MAX9635_H__
-#define _LINUX_MAX9635_H__
-
-#define MAX9635_NAME "MAX9635_als"
-#define FOPS_MAX9635_NAME "MAX9635"
-
-
-#ifdef __KERNEL__
-
-struct max9635_als_zone_data {
- int als_lower_threshold;
- int als_higher_threshold;
-};
-
-struct max9635_platform_data {
- u8 configure;
- u8 threshold_timer;
- u8 def_low_threshold;
- u8 def_high_threshold;
- u32 lens_percent_t;
- struct max9635_als_zone_data *als_lux_table;
- u8 num_of_zones;
- int (*power_on)(void);
- int (*power_off)(void);
-};
-
-#endif /* __KERNEL__ */
-
-#define MAX9635_IO 0xA3
-
-#define MAX9635_IOCTL_GET_ENABLE _IOR(MAX9635_IO, 0x00, char)
-#define MAX9635_IOCTL_SET_ENABLE _IOW(MAX9635_IO, 0x01, char)
-
-#endif /* _LINUX_MAX9635_H__ */
diff --git a/original/linux/mc146818rtc.h b/original/linux/mc146818rtc.h
deleted file mode 100644
index 432b2fa..0000000
--- a/original/linux/mc146818rtc.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* mc146818rtc.h - register definitions for the Real-Time-Clock / CMOS RAM
- * Copyright Torsten Duwe <duwe@informatik.uni-erlangen.de> 1993
- * derived from Data Sheet, Copyright Motorola 1984 (!).
- * It was written to be part of the Linux operating system.
- */
-/* permission is hereby granted to copy, modify and redistribute this code
- * in terms of the GNU Library General Public License, Version 2 or later,
- * at your option.
- */
-
-#ifndef _MC146818RTC_H
-#define _MC146818RTC_H
-
-#include <asm/io.h>
-#include <linux/rtc.h> /* get the user-level API */
-#include <asm/mc146818rtc.h> /* register access macros */
-
-#ifdef __KERNEL__
-#include <linux/spinlock.h> /* spinlock_t */
-extern spinlock_t rtc_lock; /* serialize CMOS RAM access */
-#endif
-
-/**********************************************************************
- * register summary
- **********************************************************************/
-#define RTC_SECONDS 0
-#define RTC_SECONDS_ALARM 1
-#define RTC_MINUTES 2
-#define RTC_MINUTES_ALARM 3
-#define RTC_HOURS 4
-#define RTC_HOURS_ALARM 5
-/* RTC_*_alarm is always true if 2 MSBs are set */
-# define RTC_ALARM_DONT_CARE 0xC0
-
-#define RTC_DAY_OF_WEEK 6
-#define RTC_DAY_OF_MONTH 7
-#define RTC_MONTH 8
-#define RTC_YEAR 9
-
-/* control registers - Moto names
- */
-#define RTC_REG_A 10
-#define RTC_REG_B 11
-#define RTC_REG_C 12
-#define RTC_REG_D 13
-
-/**********************************************************************
- * register details
- **********************************************************************/
-#define RTC_FREQ_SELECT RTC_REG_A
-
-/* update-in-progress - set to "1" 244 microsecs before RTC goes off the bus,
- * reset after update (may take 1.984ms @ 32768Hz RefClock) is complete,
- * totalling to a max high interval of 2.228 ms.
- */
-# define RTC_UIP 0x80
-# define RTC_DIV_CTL 0x70
- /* divider control: refclock values 4.194 / 1.049 MHz / 32.768 kHz */
-# define RTC_REF_CLCK_4MHZ 0x00
-# define RTC_REF_CLCK_1MHZ 0x10
-# define RTC_REF_CLCK_32KHZ 0x20
- /* 2 values for divider stage reset, others for "testing purposes only" */
-# define RTC_DIV_RESET1 0x60
-# define RTC_DIV_RESET2 0x70
- /* Periodic intr. / Square wave rate select. 0=none, 1=32.8kHz,... 15=2Hz */
-# define RTC_RATE_SELECT 0x0F
-
-/**********************************************************************/
-#define RTC_CONTROL RTC_REG_B
-# define RTC_SET 0x80 /* disable updates for clock setting */
-# define RTC_PIE 0x40 /* periodic interrupt enable */
-# define RTC_AIE 0x20 /* alarm interrupt enable */
-# define RTC_UIE 0x10 /* update-finished interrupt enable */
-# define RTC_SQWE 0x08 /* enable square-wave output */
-# define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
-# define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
-# define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
-
-/**********************************************************************/
-#define RTC_INTR_FLAGS RTC_REG_C
-/* caution - cleared by read */
-# define RTC_IRQF 0x80 /* any of the following 3 is active */
-# define RTC_PF 0x40
-# define RTC_AF 0x20
-# define RTC_UF 0x10
-
-/**********************************************************************/
-#define RTC_VALID RTC_REG_D
-# define RTC_VRT 0x80 /* valid RAM and time */
-/**********************************************************************/
-
-#ifndef ARCH_RTC_LOCATION /* Override by <asm/mc146818rtc.h>? */
-
-#define RTC_IO_EXTENT 0x8
-#define RTC_IOMAPPED 1 /* Default to I/O mapping. */
-
-#endif /* ARCH_RTC_LOCATION */
-
-#endif /* _MC146818RTC_H */
diff --git a/original/linux/mca.h b/original/linux/mca.h
deleted file mode 100644
index 5cff292..0000000
--- a/original/linux/mca.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Header for Microchannel Architecture Bus
- * Written by Martin Kolinek, February 1996
- */
-
-#ifndef _LINUX_MCA_H
-#define _LINUX_MCA_H
-
-#include <linux/device.h>
-
-#ifdef CONFIG_MCA
-#include <asm/mca.h>
-
-extern int MCA_bus;
-#else
-#define MCA_bus 0
-#endif
-
-/* This sets up an information callback for /proc/mca/slot?. The
- * function is called with the buffer, slot, and device pointer (or
- * some equally informative context information, or nothing, if you
- * prefer), and is expected to put useful information into the
- * buffer. The adapter name, id, and POS registers get printed
- * before this is called though, so don't do it again.
- *
- * This should be called with a NULL procfn when a module
- * unregisters, thus preventing kernel crashes and other such
- * nastiness.
- */
-typedef int (*MCA_ProcFn)(char* buf, int slot, void* dev);
-
-/* Should only be called by the NMI interrupt handler, this will do some
- * fancy stuff to figure out what might have generated a NMI.
- */
-extern void mca_handle_nmi(void);
-
-enum MCA_AdapterStatus {
- MCA_ADAPTER_NORMAL = 0,
- MCA_ADAPTER_NONE = 1,
- MCA_ADAPTER_DISABLED = 2,
- MCA_ADAPTER_ERROR = 3
-};
-
-struct mca_device {
- u64 dma_mask;
- int pos_id;
- int slot;
-
- /* index into id_table, set by the bus match routine */
- int index;
-
- /* is there a driver installed? 0 - No, 1 - Yes */
- int driver_loaded;
- /* POS registers */
- unsigned char pos[8];
- /* if a pseudo adapter of the motherboard, this is the motherboard
- * register value to use for setup cycles */
- short pos_register;
-
- enum MCA_AdapterStatus status;
-#ifdef CONFIG_MCA_PROC_FS
- /* name of the proc/mca file */
- char procname[8];
- /* /proc info callback */
- MCA_ProcFn procfn;
- /* device/context info for proc callback */
- void *proc_dev;
-#endif
- struct device dev;
- char name[32];
-};
-#define to_mca_device(mdev) container_of(mdev, struct mca_device, dev)
-
-struct mca_bus_accessor_functions {
- unsigned char (*mca_read_pos)(struct mca_device *, int reg);
- void (*mca_write_pos)(struct mca_device *, int reg,
- unsigned char byte);
- int (*mca_transform_irq)(struct mca_device *, int irq);
- int (*mca_transform_ioport)(struct mca_device *,
- int region);
- void * (*mca_transform_memory)(struct mca_device *,
- void *memory);
-};
-
-struct mca_bus {
- u64 default_dma_mask;
- int number;
- struct mca_bus_accessor_functions f;
- struct device dev;
- char name[32];
-};
-#define to_mca_bus(mdev) container_of(mdev, struct mca_bus, dev)
-
-struct mca_driver {
- const short *id_table;
- void *driver_data;
- struct device_driver driver;
-};
-#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver)
-
-/* Ongoing supported API functions */
-extern struct mca_device *mca_find_device_by_slot(int slot);
-extern int mca_system_init(void);
-extern struct mca_bus *mca_attach_bus(int);
-
-extern unsigned char mca_device_read_stored_pos(struct mca_device *mca_dev,
- int reg);
-extern unsigned char mca_device_read_pos(struct mca_device *mca_dev, int reg);
-extern void mca_device_write_pos(struct mca_device *mca_dev, int reg,
- unsigned char byte);
-extern int mca_device_transform_irq(struct mca_device *mca_dev, int irq);
-extern int mca_device_transform_ioport(struct mca_device *mca_dev, int port);
-extern void *mca_device_transform_memory(struct mca_device *mca_dev,
- void *mem);
-extern int mca_device_claimed(struct mca_device *mca_dev);
-extern void mca_device_set_claim(struct mca_device *mca_dev, int val);
-extern void mca_device_set_name(struct mca_device *mca_dev, const char *name);
-static inline char *mca_device_get_name(struct mca_device *mca_dev)
-{
- return mca_dev ? mca_dev->name : NULL;
-}
-
-extern enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev);
-
-extern struct bus_type mca_bus_type;
-
-extern int mca_register_driver(struct mca_driver *drv);
-extern void mca_unregister_driver(struct mca_driver *drv);
-
-/* WARNING: only called by the boot time device setup */
-extern int mca_register_device(int bus, struct mca_device *mca_dev);
-
-#ifdef CONFIG_MCA_PROC_FS
-extern void mca_do_proc_init(void);
-extern void mca_set_adapter_procfn(int slot, MCA_ProcFn, void* dev);
-#else
-static inline void mca_do_proc_init(void)
-{
-}
-
-static inline void mca_set_adapter_procfn(int slot, MCA_ProcFn fn, void* dev)
-{
-}
-#endif
-
-#endif /* _LINUX_MCA_H */
diff --git a/original/linux/media.h b/original/linux/media.h
deleted file mode 100644
index 0ef8833..0000000
--- a/original/linux/media.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Multimedia device API
- *
- * Copyright (C) 2010 Nokia Corporation
- *
- * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
- * Sakari Ailus <sakari.ailus@iki.fi>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __LINUX_MEDIA_H
-#define __LINUX_MEDIA_H
-
-#include <linux/ioctl.h>
-#include <linux/types.h>
-#include <linux/version.h>
-
-#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0)
-
-struct media_device_info {
- char driver[16];
- char model[32];
- char serial[40];
- char bus_info[32];
- __u32 media_version;
- __u32 hw_revision;
- __u32 driver_version;
- __u32 reserved[31];
-};
-
-#define MEDIA_ENT_ID_FLAG_NEXT (1 << 31)
-
-#define MEDIA_ENT_TYPE_SHIFT 16
-#define MEDIA_ENT_TYPE_MASK 0x00ff0000
-#define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff
-
-#define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT)
-#define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1)
-#define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2)
-#define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3)
-#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4)
-
-#define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT)
-#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1)
-#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2)
-#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3)
-
-#define MEDIA_ENT_FL_DEFAULT (1 << 0)
-
-struct media_entity_desc {
- __u32 id;
- char name[32];
- __u32 type;
- __u32 revision;
- __u32 flags;
- __u32 group_id;
- __u16 pads;
- __u16 links;
-
- __u32 reserved[4];
-
- union {
- /* Node specifications */
- struct {
- __u32 major;
- __u32 minor;
- } v4l;
- struct {
- __u32 major;
- __u32 minor;
- } fb;
- struct {
- __u32 card;
- __u32 device;
- __u32 subdevice;
- } alsa;
- int dvb;
-
- /* Sub-device specifications */
- /* Nothing needed yet */
- __u8 raw[184];
- };
-};
-
-#define MEDIA_PAD_FL_SINK (1 << 0)
-#define MEDIA_PAD_FL_SOURCE (1 << 1)
-
-struct media_pad_desc {
- __u32 entity; /* entity ID */
- __u16 index; /* pad index */
- __u32 flags; /* pad flags */
- __u32 reserved[2];
-};
-
-#define MEDIA_LNK_FL_ENABLED (1 << 0)
-#define MEDIA_LNK_FL_IMMUTABLE (1 << 1)
-#define MEDIA_LNK_FL_DYNAMIC (1 << 2)
-
-struct media_link_desc {
- struct media_pad_desc source;
- struct media_pad_desc sink;
- __u32 flags;
- __u32 reserved[2];
-};
-
-struct media_links_enum {
- __u32 entity;
- /* Should have enough room for pads elements */
- struct media_pad_desc __user *pads;
- /* Should have enough room for links elements */
- struct media_link_desc __user *links;
- __u32 reserved[4];
-};
-
-#define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info)
-#define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc)
-#define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
-#define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
-
-#endif /* __LINUX_MEDIA_H */
diff --git a/original/linux/mempolicy.h b/original/linux/mempolicy.h
deleted file mode 100644
index 72440f0..0000000
--- a/original/linux/mempolicy.h
+++ /dev/null
@@ -1,277 +0,0 @@
-#ifndef _LINUX_MEMPOLICY_H
-#define _LINUX_MEMPOLICY_H 1
-
-#include <linux/errno.h>
-
-/*
- * NUMA memory policies for Linux.
- * Copyright 2003,2004 Andi Kleen SuSE Labs
- */
-
-/* Policies */
-#define MPOL_DEFAULT 0
-#define MPOL_PREFERRED 1
-#define MPOL_BIND 2
-#define MPOL_INTERLEAVE 3
-
-#define MPOL_MAX MPOL_INTERLEAVE
-
-/* Flags for get_mem_policy */
-#define MPOL_F_NODE (1<<0) /* return next IL mode instead of node mask */
-#define MPOL_F_ADDR (1<<1) /* look up vma using address */
-
-/* Flags for mbind */
-#define MPOL_MF_STRICT (1<<0) /* Verify existing pages in the mapping */
-#define MPOL_MF_MOVE (1<<1) /* Move pages owned by this process to conform to mapping */
-#define MPOL_MF_MOVE_ALL (1<<2) /* Move every page to conform to mapping */
-#define MPOL_MF_INTERNAL (1<<3) /* Internal flags start here */
-
-#ifdef __KERNEL__
-
-#include <linux/mmzone.h>
-#include <linux/slab.h>
-#include <linux/rbtree.h>
-#include <linux/spinlock.h>
-#include <linux/nodemask.h>
-
-struct vm_area_struct;
-struct mm_struct;
-
-#ifdef CONFIG_NUMA
-
-/*
- * Describe a memory policy.
- *
- * A mempolicy can be either associated with a process or with a VMA.
- * For VMA related allocations the VMA policy is preferred, otherwise
- * the process policy is used. Interrupts ignore the memory policy
- * of the current process.
- *
- * Locking policy for interlave:
- * In process context there is no locking because only the process accesses
- * its own state. All vma manipulation is somewhat protected by a down_read on
- * mmap_sem.
- *
- * Freeing policy:
- * When policy is MPOL_BIND v.zonelist is kmalloc'ed and must be kfree'd.
- * All other policies don't have any external state. mpol_free() handles this.
- *
- * Copying policy objects:
- * For MPOL_BIND the zonelist must be always duplicated. mpol_clone() does this.
- */
-struct mempolicy {
- atomic_t refcnt;
- short policy; /* See MPOL_* above */
- union {
- struct zonelist *zonelist; /* bind */
- short preferred_node; /* preferred */
- nodemask_t nodes; /* interleave */
- /* undefined for default */
- } v;
- nodemask_t cpuset_mems_allowed; /* mempolicy relative to these nodes */
-};
-
-/*
- * Support for managing mempolicy data objects (clone, copy, destroy)
- * The default fast path of a NULL MPOL_DEFAULT policy is always inlined.
- */
-
-extern void __mpol_free(struct mempolicy *pol);
-static inline void mpol_free(struct mempolicy *pol)
-{
- if (pol)
- __mpol_free(pol);
-}
-
-extern struct mempolicy *__mpol_copy(struct mempolicy *pol);
-static inline struct mempolicy *mpol_copy(struct mempolicy *pol)
-{
- if (pol)
- pol = __mpol_copy(pol);
- return pol;
-}
-
-#define vma_policy(vma) ((vma)->vm_policy)
-#define vma_set_policy(vma, pol) ((vma)->vm_policy = (pol))
-
-static inline void mpol_get(struct mempolicy *pol)
-{
- if (pol)
- atomic_inc(&pol->refcnt);
-}
-
-extern int __mpol_equal(struct mempolicy *a, struct mempolicy *b);
-static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b)
-{
- if (a == b)
- return 1;
- return __mpol_equal(a, b);
-}
-#define vma_mpol_equal(a,b) mpol_equal(vma_policy(a), vma_policy(b))
-
-/* Could later add inheritance of the process policy here. */
-
-#define mpol_set_vma_default(vma) ((vma)->vm_policy = NULL)
-
-/*
- * Tree of shared policies for a shared memory region.
- * Maintain the policies in a pseudo mm that contains vmas. The vmas
- * carry the policy. As a special twist the pseudo mm is indexed in pages, not
- * bytes, so that we can work with shared memory segments bigger than
- * unsigned long.
- */
-
-struct sp_node {
- struct rb_node nd;
- unsigned long start, end;
- struct mempolicy *policy;
-};
-
-struct shared_policy {
- struct rb_root root;
- spinlock_t lock;
-};
-
-void mpol_shared_policy_init(struct shared_policy *info, int policy,
- nodemask_t *nodes);
-int mpol_set_shared_policy(struct shared_policy *info,
- struct vm_area_struct *vma,
- struct mempolicy *new);
-void mpol_free_shared_policy(struct shared_policy *p);
-struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp,
- unsigned long idx);
-
-extern void numa_default_policy(void);
-extern void numa_policy_init(void);
-extern void mpol_rebind_policy(struct mempolicy *pol, const nodemask_t *new);
-extern void mpol_rebind_task(struct task_struct *tsk,
- const nodemask_t *new);
-extern void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new);
-extern void mpol_fix_fork_child_flag(struct task_struct *p);
-#define set_cpuset_being_rebound(x) (cpuset_being_rebound = (x))
-
-#ifdef CONFIG_CPUSET
-#define current_cpuset_is_being_rebound() \
- (cpuset_being_rebound == current->cpuset)
-#else
-#define current_cpuset_is_being_rebound() 0
-#endif
-
-extern struct mempolicy default_policy;
-extern struct zonelist *huge_zonelist(struct vm_area_struct *vma,
- unsigned long addr);
-extern unsigned slab_node(struct mempolicy *policy);
-
-extern int policy_zone;
-
-static inline void check_highest_zone(int k)
-{
- if (k > policy_zone)
- policy_zone = k;
-}
-
-int do_migrate_pages(struct mm_struct *mm,
- const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags);
-
-extern void *cpuset_being_rebound; /* Trigger mpol_copy vma rebind */
-
-#else
-
-struct mempolicy {};
-
-static inline int mpol_equal(struct mempolicy *a, struct mempolicy *b)
-{
- return 1;
-}
-#define vma_mpol_equal(a,b) 1
-
-#define mpol_set_vma_default(vma) do {} while(0)
-
-static inline void mpol_free(struct mempolicy *p)
-{
-}
-
-static inline void mpol_get(struct mempolicy *pol)
-{
-}
-
-static inline struct mempolicy *mpol_copy(struct mempolicy *old)
-{
- return NULL;
-}
-
-struct shared_policy {};
-
-static inline int mpol_set_shared_policy(struct shared_policy *info,
- struct vm_area_struct *vma,
- struct mempolicy *new)
-{
- return -EINVAL;
-}
-
-static inline void mpol_shared_policy_init(struct shared_policy *info,
- int policy, nodemask_t *nodes)
-{
-}
-
-static inline void mpol_free_shared_policy(struct shared_policy *p)
-{
-}
-
-static inline struct mempolicy *
-mpol_shared_policy_lookup(struct shared_policy *sp, unsigned long idx)
-{
- return NULL;
-}
-
-#define vma_policy(vma) NULL
-#define vma_set_policy(vma, pol) do {} while(0)
-
-static inline void numa_policy_init(void)
-{
-}
-
-static inline void numa_default_policy(void)
-{
-}
-
-static inline void mpol_rebind_policy(struct mempolicy *pol,
- const nodemask_t *new)
-{
-}
-
-static inline void mpol_rebind_task(struct task_struct *tsk,
- const nodemask_t *new)
-{
-}
-
-static inline void mpol_rebind_mm(struct mm_struct *mm, nodemask_t *new)
-{
-}
-
-static inline void mpol_fix_fork_child_flag(struct task_struct *p)
-{
-}
-
-#define set_cpuset_being_rebound(x) do {} while (0)
-
-static inline struct zonelist *huge_zonelist(struct vm_area_struct *vma,
- unsigned long addr)
-{
- return NODE_DATA(0)->node_zonelists + gfp_zone(GFP_HIGHUSER);
-}
-
-static inline int do_migrate_pages(struct mm_struct *mm,
- const nodemask_t *from_nodes,
- const nodemask_t *to_nodes, int flags)
-{
- return 0;
-}
-
-static inline void check_highest_zone(int k)
-{
-}
-#endif /* CONFIG_NUMA */
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/mempool.h b/original/linux/mempool.h
deleted file mode 100644
index 9be484d..0000000
--- a/original/linux/mempool.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * memory buffer pool support
- */
-#ifndef _LINUX_MEMPOOL_H
-#define _LINUX_MEMPOOL_H
-
-#include <linux/wait.h>
-
-struct kmem_cache;
-
-typedef void * (mempool_alloc_t)(gfp_t gfp_mask, void *pool_data);
-typedef void (mempool_free_t)(void *element, void *pool_data);
-
-typedef struct mempool_s {
- spinlock_t lock;
- int min_nr; /* nr of elements at *elements */
- int curr_nr; /* Current nr of elements at *elements */
- void **elements;
-
- void *pool_data;
- mempool_alloc_t *alloc;
- mempool_free_t *free;
- wait_queue_head_t wait;
-} mempool_t;
-
-extern mempool_t *mempool_create(int min_nr, mempool_alloc_t *alloc_fn,
- mempool_free_t *free_fn, void *pool_data);
-extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
- mempool_free_t *free_fn, void *pool_data, int nid);
-
-extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
-extern void mempool_destroy(mempool_t *pool);
-extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
-extern void mempool_free(void *element, mempool_t *pool);
-
-/*
- * A mempool_alloc_t and mempool_free_t that get the memory from
- * a slab that is passed in through pool_data.
- */
-void *mempool_alloc_slab(gfp_t gfp_mask, void *pool_data);
-void mempool_free_slab(void *element, void *pool_data);
-static inline mempool_t *
-mempool_create_slab_pool(int min_nr, struct kmem_cache *kc)
-{
- return mempool_create(min_nr, mempool_alloc_slab, mempool_free_slab,
- (void *) kc);
-}
-
-/*
- * 2 mempool_alloc_t's and a mempool_free_t to kmalloc/kzalloc and kfree
- * the amount of memory specified by pool_data
- */
-void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data);
-void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data);
-void mempool_kfree(void *element, void *pool_data);
-static inline mempool_t *mempool_create_kmalloc_pool(int min_nr, size_t size)
-{
- return mempool_create(min_nr, mempool_kmalloc, mempool_kfree,
- (void *) size);
-}
-static inline mempool_t *mempool_create_kzalloc_pool(int min_nr, size_t size)
-{
- return mempool_create(min_nr, mempool_kzalloc, mempool_kfree,
- (void *) size);
-}
-
-/*
- * A mempool_alloc_t and mempool_free_t for a simple page allocator that
- * allocates pages of the order specified by pool_data
- */
-void *mempool_alloc_pages(gfp_t gfp_mask, void *pool_data);
-void mempool_free_pages(void *element, void *pool_data);
-static inline mempool_t *mempool_create_page_pool(int min_nr, int order)
-{
- return mempool_create(min_nr, mempool_alloc_pages, mempool_free_pages,
- (void *)(long)order);
-}
-
-#endif /* _LINUX_MEMPOOL_H */
diff --git a/original/linux/mfd/timpani-audio.h b/original/linux/mfd/timpani-audio.h
deleted file mode 100644
index 49fd49b..0000000
--- a/original/linux/mfd/timpani-audio.h
+++ /dev/null
@@ -1,5016 +0,0 @@
-#ifndef __LINUX_MFD_TIMPANI_AUDIO_H
-#define __LINUX_MFD_TIMPANI_AUDIO_H
-
-/*
- * MREF
- */
-#define TIMPANI_A_MREF (0x3)
-#define TIMPANI_MREF_RWC "RW"
-#define TIMPANI_MREF_POR 0xe2
-#define TIMPANI_MREF_S 0
-#define TIMPANI_MREF_M 0xFF
-
-#define TIMPANI_MREF_MREF_BG_EN_S 7
-#define TIMPANI_MREF_MREF_BG_EN_M 0x80
-#define TIMPANI_MREF_MREF_BG_EN_ENABLE 0x0
-#define TIMPANI_MREF_MREF_BG_EN_DISABLE 0x1
-
-#define TIMPANI_MREF_MREF_BG_REF_CUR_EN_S 6
-#define TIMPANI_MREF_MREF_BG_REF_CUR_EN_M 0x40
-#define TIMPANI_MREF_MREF_BG_REF_CUR_EN_ENABLE_NORMAL_OP 0x0
-#define TIMPANI_MREF_MREF_BG_REF_CUR_EN_DISABLE 0x1
-
-#define TIMPANI_MREF_MREF_200K_MODE_EN_S 5
-#define TIMPANI_MREF_MREF_200K_MODE_EN_M 0x20
-#define TIMPANI_MREF_MREF_200K_MODE_EN_ENABLE 0x0
-#define TIMPANI_MREF_MREF_200K_MODE_EN_DISABLE 0x1
-
-#define TIMPANI_MREF_MREF_PRE_CHARGE_EN_S 4
-#define TIMPANI_MREF_MREF_PRE_CHARGE_EN_M 0x10
-#define TIMPANI_MREF_MREF_PRE_CHARGE_EN_DISABLE 0x0
-#define TIMPANI_MREF_MREF_PRE_CHARGE_EN_ENABLE 0x1
-
-#define TIMPANI_MREF_MREF_100UA_CUR_CONN_S 3
-#define TIMPANI_MREF_MREF_100UA_CUR_CONN_M 0x8
-#define TIMPANI_MREF_MREF_100UA_CUR_CONN_ON_CHIP_RESISTOR_NORMAL_OP 0x0
-#define TIMPANI_MREF_MREF_100UA_CUR_CONN_ATEST 0x1
-
-#define TIMPANI_MREF_MREF_PTAT_CURRENT_S 2
-#define TIMPANI_MREF_MREF_PTAT_CURRENT_M 0x4
-#define TIMPANI_MREF_MREF_PTAT_CURRENT_V_10UA_PTAT_NORMAL_OP 0x0
-#define TIMPANI_MREF_MREF_PTAT_CURRENT_V_5UA_PTAT_BIAS_CURRENT 0x1
-
-#define TIMPANI_MREF_MREF_400K_MODE_EN_S 1
-#define TIMPANI_MREF_MREF_400K_MODE_EN_M 0x2
-#define TIMPANI_MREF_MREF_400K_MODE_EN_ENABLE 0x0
-#define TIMPANI_MREF_MREF_400K_MODE_EN_DISABLE 0x1
-
-#define TIMPANI_MREF_RESERVED_S 0
-#define TIMPANI_MREF_RESERVED_M 0x1
-
-
-/* For CDAC_IDAC_REF_CUR */
-#define TIMPANI_A_CDAC_IDAC_REF_CUR (0x4)
-#define TIMPANI_CDAC_IDAC_REF_CUR_RWC "RW"
-#define TIMPANI_CDAC_IDAC_REF_CUR_POR 0x8c
-#define TIMPANI_CDAC_IDAC_REF_CUR_S 0
-#define TIMPANI_CDAC_IDAC_REF_CUR_M 0xFF
-
-
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_S 5
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_M 0xE0
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_4UA 0x0
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_6UA 0x1
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_8UA 0x2
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_9UA 0x3
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_10UA_NORMAL_OP 0x4
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_11UA 0x5
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_13UA 0x6
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_REF_BUFF_CUR_V_15UA 0x7
-
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_S 2
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_M 0x1C
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_8_5UA 0x0
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_9_0UA 0x1
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_9_5UA 0x2
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_10_0UA_NORMAL_OP 0x3
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_10_5UA 0x4
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_11_0UA 0x5
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_11_5UA 0x6
-#define TIMPANI_CDAC_IDAC_REF_CUR_CDAC_BIAS_CUR_V_12_0UA 0x7
-
-#define TIMPANI_CDAC_IDAC_REF_CUR_IDAC_REF_CUR_S 0
-#define TIMPANI_CDAC_IDAC_REF_CUR_IDAC_REF_CUR_M 0x3
-#define TIMPANI_CDAC_IDAC_REF_CUR_IDAC_REF_CUR_V_2UA 0x0
-#define TIMPANI_CDAC_IDAC_REF_CUR_IDAC_REF_CUR_V_3UA 0x1
-#define TIMPANI_CDAC_IDAC_REF_CUR_IDAC_REF_CUR_V_5UA_NORMAL_OP 0x2
-#define TIMPANI_CDAC_IDAC_REF_CUR_IDAC_REF_CUR_V_8UA 0x3
-
-
-/* -- For TXADC12_REF_CURR */
-#define TIMPANI_A_TXADC12_REF_CURR (0x5)
-#define TIMPANI_TXADC12_REF_CURR_RWC "RW"
-#define TIMPANI_TXADC12_REF_CURR_POR 0xa0
-#define TIMPANI_TXADC12_REF_CURR_S 0
-#define TIMPANI_TXADC12_REF_CURR_M 0xFF
-
-
-#define TIMPANI_TXADC12_REF_CURR_TXADC1_REF_BUFF_CUR_S 6
-#define TIMPANI_TXADC12_REF_CURR_TXADC1_REF_BUFF_CUR_M 0xC0
-#define TIMPANI_TXADC12_REF_CURR_TXADC1_REF_BUFF_CUR_V_50UA 0x0
-#define TIMPANI_TXADC12_REF_CURR_TXADC1_REF_BUFF_CUR_V_45UA 0x1
-#define TIMPANI_TXADC12_REF_CURR_TXADC1_REF_BUFF_CUR_V_40UA_NORMAL_OP 0x2
-#define TIMPANI_TXADC12_REF_CURR_TXADC1_REF_BUFF_CUR_V_35UA 0x3
-
-#define TIMPANI_TXADC12_REF_CURR_TXADC2_REF_BUFF_CUR_S 4
-#define TIMPANI_TXADC12_REF_CURR_TXADC2_REF_BUFF_CUR_M 0x30
-#define TIMPANI_TXADC12_REF_CURR_TXADC2_REF_BUFF_CUR_V_50UA 0x0
-#define TIMPANI_TXADC12_REF_CURR_TXADC2_REF_BUFF_CUR_V_45UA 0x1
-#define TIMPANI_TXADC12_REF_CURR_TXADC2_REF_BUFF_CUR_V_40UA_NORMAL_OP 0x2
-#define TIMPANI_TXADC12_REF_CURR_TXADC2_REF_BUFF_CUR_V_35UA 0x3
-
-#define TIMPANI_TXADC12_REF_CURR_RESERVED_S 0
-#define TIMPANI_TXADC12_REF_CURR_RESERVED_M 0xF
-
-
-/* -- For TXADC3_EN */
-#define TIMPANI_A_TXADC3_EN (0x9)
-#define TIMPANI_TXADC3_EN_RWC "RW"
-#define TIMPANI_TXADC3_EN_POR 0
-#define TIMPANI_TXADC3_EN_S 0
-#define TIMPANI_TXADC3_EN_M 0xFF
-
-
-#define TIMPANI_TXADC3_EN_TXADC3_REF_EN_S 7
-#define TIMPANI_TXADC3_EN_TXADC3_REF_EN_M 0x80
-#define TIMPANI_TXADC3_EN_TXADC3_REF_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_REF_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_TXADC3_DAC_REF_CUR_COMPENSATION_EN_S 6
-#define TIMPANI_TXADC3_EN_TXADC3_DAC_REF_CUR_COMPENSATION_EN_M 0x40
-#define TIMPANI_TXADC3_EN_TXADC3_DAC_REF_CUR_COMPENSATION_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_DAC_REF_CUR_COMPENSATION_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_TXADC3_OTA1_EN_S 5
-#define TIMPANI_TXADC3_EN_TXADC3_OTA1_EN_M 0x20
-#define TIMPANI_TXADC3_EN_TXADC3_OTA1_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_OTA1_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_TXADC3_OTA2_EN_S 4
-#define TIMPANI_TXADC3_EN_TXADC3_OTA2_EN_M 0x10
-#define TIMPANI_TXADC3_EN_TXADC3_OTA2_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_OTA2_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_TXADC3_COMP_EN_S 3
-#define TIMPANI_TXADC3_EN_TXADC3_COMP_EN_M 0x8
-#define TIMPANI_TXADC3_EN_TXADC3_COMP_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_COMP_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_EN_S 2
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_EN_M 0x4
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_ERROR_DET_EN_S 1
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_ERROR_DET_EN_M 0x2
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_ERROR_DET_EN_DISABLE 0x0
-#define TIMPANI_TXADC3_EN_TXADC3_DEM_ERROR_DET_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC3_EN_RESERVED_S 0
-#define TIMPANI_TXADC3_EN_RESERVED_M 0x1
-
-
-/* -- For TXADC4_EN */
-#define TIMPANI_A_TXADC4_EN (0xA)
-#define TIMPANI_TXADC4_EN_RWC "RW"
-#define TIMPANI_TXADC4_EN_POR 0
-#define TIMPANI_TXADC4_EN_S 0
-#define TIMPANI_TXADC4_EN_M 0xFF
-
-
-#define TIMPANI_TXADC4_EN_TXADC4_REF_EN_S 7
-#define TIMPANI_TXADC4_EN_TXADC4_REF_EN_M 0x80
-#define TIMPANI_TXADC4_EN_TXADC4_REF_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_REF_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_TXADC4_DAC_REF_CUR_COMPENSATION_EN_S 6
-#define TIMPANI_TXADC4_EN_TXADC4_DAC_REF_CUR_COMPENSATION_EN_M 0x40
-#define TIMPANI_TXADC4_EN_TXADC4_DAC_REF_CUR_COMPENSATION_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_DAC_REF_CUR_COMPENSATION_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_TXADC4_OTA1_EN_S 5
-#define TIMPANI_TXADC4_EN_TXADC4_OTA1_EN_M 0x20
-#define TIMPANI_TXADC4_EN_TXADC4_OTA1_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_OTA1_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_TXADC4_OTA2_EN_S 4
-#define TIMPANI_TXADC4_EN_TXADC4_OTA2_EN_M 0x10
-#define TIMPANI_TXADC4_EN_TXADC4_OTA2_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_OTA2_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_TXADC4_COMP_EN_S 3
-#define TIMPANI_TXADC4_EN_TXADC4_COMP_EN_M 0x8
-#define TIMPANI_TXADC4_EN_TXADC4_COMP_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_COMP_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_EN_S 2
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_EN_M 0x4
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_ERROR_DET_EN_S 1
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_ERROR_DET_EN_M 0x2
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_ERROR_DET_EN_DISABLE 0x0
-#define TIMPANI_TXADC4_EN_TXADC4_DEM_ERROR_DET_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC4_EN_RESERVED_S 0
-#define TIMPANI_TXADC4_EN_RESERVED_M 0x1
-
-
-/* -- For CODEC_TXADC_STATUS_REGISTER_1 */
-#define TIMPANI_A_CODEC_TXADC_STATUS_REGISTER_1 (0xB)
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_RWC "R"
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_POR 0
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_S 0
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_M 0xFF
-
-
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC1_DEM_ERROR_S 7
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC1_DEM_ERROR_M 0x80
-
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC2_DEM_ERROR_S 6
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC2_DEM_ERROR_M 0x40
-
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC3_DEM_ERROR_S 5
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC3_DEM_ERROR_M 0x20
-
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC4_DEM_ERROR_S 4
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_TXADC4_DEM_ERROR_M 0x10
-
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_RESERVED_S 0
-#define TIMPANI_CODEC_TXADC_STATUS_REGISTER_1_RESERVED_M 0xF
-
-
-/* -- For TXFE1 */
-#define TIMPANI_A_TXFE1 (0xD)
-#define TIMPANI_TXFE1_RWC "RW"
-#define TIMPANI_TXFE1_POR 0
-#define TIMPANI_TXFE1_S 0
-#define TIMPANI_TXFE1_M 0xFF
-
-
-#define TIMPANI_TXFE1_TXFE1_EN_S 7
-#define TIMPANI_TXFE1_TXFE1_EN_M 0x80
-#define TIMPANI_TXFE1_TXFE1_EN_DISABLE 0x0
-#define TIMPANI_TXFE1_TXFE1_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE1_TXFE1_GAIN_S 5
-#define TIMPANI_TXFE1_TXFE1_GAIN_M 0x60
-#define TIMPANI_TXFE1_TXFE1_GAIN_V_0DB 0x0
-#define TIMPANI_TXFE1_TXFE1_GAIN_V_4_5DB 0x1
-#define TIMPANI_TXFE1_TXFE1_GAIN_V_24DB_1 0x2
-#define TIMPANI_TXFE1_TXFE1_GAIN_V_24DB_2 0x3
-
-#define TIMPANI_TXFE1_TXFE1_IN_MIC1_CONN_S 4
-#define TIMPANI_TXFE1_TXFE1_IN_MIC1_CONN_M 0x10
-#define TIMPANI_TXFE1_TXFE1_IN_MIC1_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE1_TXFE1_IN_MIC1_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE1_TXFE1_IN_MIC2_CONN_S 3
-#define TIMPANI_TXFE1_TXFE1_IN_MIC2_CONN_M 0x8
-#define TIMPANI_TXFE1_TXFE1_IN_MIC2_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE1_TXFE1_IN_MIC2_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_L_CONN_S 2
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_L_CONN_M 0x4
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_L_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_R_CONN_S 1
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_R_CONN_M 0x2
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE1_TXFE1_IN_LINE_I_R_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE1_TXFE1_IN_AUXI_CONN_S 0
-#define TIMPANI_TXFE1_TXFE1_IN_AUXI_CONN_M 0x1
-#define TIMPANI_TXFE1_TXFE1_IN_AUXI_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE1_TXFE1_IN_AUXI_CONN_CONNECT 0x1
-
-
-/* -- For TXFE2 */
-#define TIMPANI_A_TXFE2 (0xE)
-#define TIMPANI_TXFE2_RWC "RW"
-#define TIMPANI_TXFE2_POR 0
-#define TIMPANI_TXFE2_S 0
-#define TIMPANI_TXFE2_M 0xFF
-
-
-#define TIMPANI_TXFE2_TXFE2_EN_S 7
-#define TIMPANI_TXFE2_TXFE2_EN_M 0x80
-#define TIMPANI_TXFE2_TXFE2_EN_DISABLE 0x0
-#define TIMPANI_TXFE2_TXFE2_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE2_TXFE2_GAIN_S 5
-#define TIMPANI_TXFE2_TXFE2_GAIN_M 0x60
-#define TIMPANI_TXFE2_TXFE2_GAIN_V_0DB 0x0
-#define TIMPANI_TXFE2_TXFE2_GAIN_V_4_5DB 0x1
-#define TIMPANI_TXFE2_TXFE2_GAIN_V_24DB_1 0x2
-#define TIMPANI_TXFE2_TXFE2_GAIN_V_24DB_2 0x3
-
-#define TIMPANI_TXFE2_TXFE2_IN_MIC1_CONN_S 4
-#define TIMPANI_TXFE2_TXFE2_IN_MIC1_CONN_M 0x10
-#define TIMPANI_TXFE2_TXFE2_IN_MIC1_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE2_TXFE2_IN_MIC1_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE2_TXFE2_IN_MIC2_CONN_S 3
-#define TIMPANI_TXFE2_TXFE2_IN_MIC2_CONN_M 0x8
-#define TIMPANI_TXFE2_TXFE2_IN_MIC2_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE2_TXFE2_IN_MIC2_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_L_CONN_S 2
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_L_CONN_M 0x4
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_L_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_R_CONN_S 1
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_R_CONN_M 0x2
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE2_TXFE2_IN_LINE_I_R_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE2_TXFE2_IN_AUXI_CONN_S 0
-#define TIMPANI_TXFE2_TXFE2_IN_AUXI_CONN_M 0x1
-#define TIMPANI_TXFE2_TXFE2_IN_AUXI_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE2_TXFE2_IN_AUXI_CONN_CONNECT 0x1
-
-
-/* -- For TXFE12_ATEST */
-#define TIMPANI_A_TXFE12_ATEST (0xF)
-#define TIMPANI_TXFE12_ATEST_RWC "RW"
-#define TIMPANI_TXFE12_ATEST_POR 0
-#define TIMPANI_TXFE12_ATEST_S 0
-#define TIMPANI_TXFE12_ATEST_M 0xFF
-
-
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_SHORT_TO_VICM_EN_S 7
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_SHORT_TO_VICM_EN_M 0x80
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_SHORT_TO_VICM_EN_DISABLE 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_SHORT_TO_VICM_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE1_BYPASS_EN_S 6
-#define TIMPANI_TXFE12_ATEST_TXFE1_BYPASS_EN_M 0x40
-#define TIMPANI_TXFE12_ATEST_TXFE1_BYPASS_EN_DISABLE 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE1_BYPASS_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE1_CMOUT_ATEST_CONN_S 5
-#define TIMPANI_TXFE12_ATEST_TXFE1_CMOUT_ATEST_CONN_M 0x20
-#define TIMPANI_TXFE12_ATEST_TXFE1_CMOUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE1_CMOUT_ATEST_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_ATEST_CONN_S 4
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_ATEST_CONN_M 0x10
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE1_OUT_ATEST_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_SHORT_TO_VICM_EN_S 3
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_SHORT_TO_VICM_EN_M 0x8
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_SHORT_TO_VICM_EN_DISABLE 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_SHORT_TO_VICM_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE2_BYPASS_EN_S 2
-#define TIMPANI_TXFE12_ATEST_TXFE2_BYPASS_EN_M 0x4
-#define TIMPANI_TXFE12_ATEST_TXFE2_BYPASS_EN_DISABLE 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE2_BYPASS_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE2_CMOUT_ATEST_CONN_S 1
-#define TIMPANI_TXFE12_ATEST_TXFE2_CMOUT_ATEST_CONN_M 0x2
-#define TIMPANI_TXFE12_ATEST_TXFE2_CMOUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE2_CMOUT_ATEST_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_ATEST_CONN_S 0
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_ATEST_CONN_M 0x1
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE12_ATEST_TXFE2_OUT_ATEST_CONN_CONNECT 0x1
-
-
-/* -- For TXFE_CLT */
-#define TIMPANI_A_TXFE_CLT (0x10)
-#define TIMPANI_TXFE_CLT_RWC "RW"
-#define TIMPANI_TXFE_CLT_POR 0x68
-#define TIMPANI_TXFE_CLT_S 0
-#define TIMPANI_TXFE_CLT_M 0xFF
-
-
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_S 5
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_M 0xE0
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_1_125V 0x0
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_1_100V 0x1
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_1_075V 0x2
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_1_050V_NORMAL_OP 0x3
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_1_025V 0x4
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_1_000V 0x5
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_0_975V 0x6
-#define TIMPANI_TXFE_CLT_TXFE_OUT_CM_VOLT_V_0_950V 0x7
-
-#define TIMPANI_TXFE_CLT_TXFE_BIAS_CUR_S 3
-#define TIMPANI_TXFE_CLT_TXFE_BIAS_CUR_M 0x18
-#define TIMPANI_TXFE_CLT_TXFE_BIAS_CUR_V_3UA 0x0
-#define TIMPANI_TXFE_CLT_TXFE_BIAS_CUR_V_4UA_NORMAL_OP 0x1
-#define TIMPANI_TXFE_CLT_TXFE_BIAS_CUR_V_6UA 0x2
-#define TIMPANI_TXFE_CLT_TXFE_BIAS_CUR_V_8UA 0x3
-
-#define TIMPANI_TXFE_CLT_RESERVED_S 0
-#define TIMPANI_TXFE_CLT_RESERVED_M 0x7
-
-
-/* -- For TXADC1_EN */
-#define TIMPANI_A_TXADC1_EN (0x11)
-#define TIMPANI_TXADC1_EN_RWC "RW"
-#define TIMPANI_TXADC1_EN_POR 0
-#define TIMPANI_TXADC1_EN_S 0
-#define TIMPANI_TXADC1_EN_M 0xFF
-
-
-#define TIMPANI_TXADC1_EN_TXADC1_REF_EN_S 7
-#define TIMPANI_TXADC1_EN_TXADC1_REF_EN_M 0x80
-#define TIMPANI_TXADC1_EN_TXADC1_REF_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_REF_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_TXADC1_DAC_REF_CUR_COMPENSATION_EN_S 6
-#define TIMPANI_TXADC1_EN_TXADC1_DAC_REF_CUR_COMPENSATION_EN_M 0x40
-#define TIMPANI_TXADC1_EN_TXADC1_DAC_REF_CUR_COMPENSATION_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_DAC_REF_CUR_COMPENSATION_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_TXADC1_OTA1_EN_S 5
-#define TIMPANI_TXADC1_EN_TXADC1_OTA1_EN_M 0x20
-#define TIMPANI_TXADC1_EN_TXADC1_OTA1_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_OTA1_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_TXADC1_OTA2_EN_S 4
-#define TIMPANI_TXADC1_EN_TXADC1_OTA2_EN_M 0x10
-#define TIMPANI_TXADC1_EN_TXADC1_OTA2_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_OTA2_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_TXADC1_COMP_EN_S 3
-#define TIMPANI_TXADC1_EN_TXADC1_COMP_EN_M 0x8
-#define TIMPANI_TXADC1_EN_TXADC1_COMP_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_COMP_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_EN_S 2
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_EN_M 0x4
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_ERROR_DET_EN_S 1
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_ERROR_DET_EN_M 0x2
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_ERROR_DET_EN_DISABLE 0x0
-#define TIMPANI_TXADC1_EN_TXADC1_DEM_ERROR_DET_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC1_EN_RESERVED_S 0
-#define TIMPANI_TXADC1_EN_RESERVED_M 0x1
-
-
-/* -- For TXADC2_EN */
-#define TIMPANI_A_TXADC2_EN (0x12)
-#define TIMPANI_TXADC2_EN_RWC "RW"
-#define TIMPANI_TXADC2_EN_POR 0
-#define TIMPANI_TXADC2_EN_S 0
-#define TIMPANI_TXADC2_EN_M 0xFF
-
-
-#define TIMPANI_TXADC2_EN_TXADC2_REF_EN_S 7
-#define TIMPANI_TXADC2_EN_TXADC2_REF_EN_M 0x80
-#define TIMPANI_TXADC2_EN_TXADC2_REF_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_REF_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_TXADC2_DAC_REF_CUR_COMPENSATION_EN_S 6
-#define TIMPANI_TXADC2_EN_TXADC2_DAC_REF_CUR_COMPENSATION_EN_M 0x40
-#define TIMPANI_TXADC2_EN_TXADC2_DAC_REF_CUR_COMPENSATION_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_DAC_REF_CUR_COMPENSATION_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_TXADC2_OTA1_EN_S 5
-#define TIMPANI_TXADC2_EN_TXADC2_OTA1_EN_M 0x20
-#define TIMPANI_TXADC2_EN_TXADC2_OTA1_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_OTA1_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_TXADC2_OTA2_EN_S 4
-#define TIMPANI_TXADC2_EN_TXADC2_OTA2_EN_M 0x10
-#define TIMPANI_TXADC2_EN_TXADC2_OTA2_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_OTA2_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_TXADC2_COMP_EN_S 3
-#define TIMPANI_TXADC2_EN_TXADC2_COMP_EN_M 0x8
-#define TIMPANI_TXADC2_EN_TXADC2_COMP_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_COMP_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_EN_S 2
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_EN_M 0x4
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_ERROR_DET_EN_S 1
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_ERROR_DET_EN_M 0x2
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_ERROR_DET_EN_DISABLE 0x0
-#define TIMPANI_TXADC2_EN_TXADC2_DEM_ERROR_DET_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC2_EN_RESERVED_S 0
-#define TIMPANI_TXADC2_EN_RESERVED_M 0x1
-
-
-/* -- For TXADC_CTL */
-#define TIMPANI_A_TXADC_CTL (0x13)
-#define TIMPANI_TXADC_CTL_RWC "RW"
-#define TIMPANI_TXADC_CTL_POR 0x58
-#define TIMPANI_TXADC_CTL_S 0
-#define TIMPANI_TXADC_CTL_M 0xFF
-
-
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_DDA_AMP_BIAS_CUR_S 6
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_DDA_AMP_BIAS_CUR_M 0xC0
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_DDA_AMP_BIAS_CUR_V_5UA 0x0
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_DDA_AMP_BIAS_CUR_V_10UA_NORMAL_OP 0x1
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_DDA_AMP_BIAS_CUR_V_15UA 0x2
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_DDA_AMP_BIAS_CUR_V_20UA 0x3
-
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_SRC_FOLLOWER_BIAS_CUR_S 4
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_SRC_FOLLOWER_BIAS_CUR_M 0x30
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_SRC_FOLLOWER_BIAS_CUR_V_40UA 0x0
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_SRC_FOLLOWER_BIAS_CUR_V_80UA 0x1
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_SRC_FOLLOWER_BIAS_CUR_V_120UA 0x2
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_SRC_FOLLOWER_BIAS_CUR_V_160UA 0x3
-
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_VOLT_S 2
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_VOLT_M 0xC
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_VOLT_V_1_8V 0x0
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_VOLT_V_1_7V 0x1
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_VOLT_V_1_6V_NORMAL_OP 0x2
-#define TIMPANI_TXADC_CTL_TXADC_DAC_REF_VOLT_V_1_5V 0x3
-
-#define TIMPANI_TXADC_CTL_TXADC_VREFMID_BIAS_CUR_S 0
-#define TIMPANI_TXADC_CTL_TXADC_VREFMID_BIAS_CUR_M 0x3
-#define TIMPANI_TXADC_CTL_TXADC_VREFMID_BIAS_CUR_V_20UA_NORMAL_OP 0x0
-#define TIMPANI_TXADC_CTL_TXADC_VREFMID_BIAS_CUR_V_40UA 0x1
-#define TIMPANI_TXADC_CTL_TXADC_VREFMID_BIAS_CUR_V_80UA 0x2
-#define TIMPANI_TXADC_CTL_TXADC_VREFMID_BIAS_CUR_V_160UA 0x3
-
-
-/* -- For TXADC_CTL2 */
-#define TIMPANI_A_TXADC_CTL2 (0x14)
-#define TIMPANI_TXADC_CTL2_RWC "RW"
-#define TIMPANI_TXADC_CTL2_POR 0x64
-#define TIMPANI_TXADC_CTL2_S 0
-#define TIMPANI_TXADC_CTL2_M 0xFF
-
-
-#define TIMPANI_TXADC_CTL2_TXADC_COMP_THRESH_VOLT_S 6
-#define TIMPANI_TXADC_CTL2_TXADC_COMP_THRESH_VOLT_M 0xC0
-#define TIMPANI_TXADC_CTL2_TXADC_COMP_THRESH_VOLT_V_333MV 0x0
-#define TIMPANI_TXADC_CTL2_TXADC_COMP_THRESH_VOLT_V_356MV_NORMAL_OP 0x1
-#define TIMPANI_TXADC_CTL2_TXADC_COMP_THRESH_VOLT_V_378MV 0x2
-#define TIMPANI_TXADC_CTL2_TXADC_COMP_THRESH_VOLT_V_400MV 0x3
-
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_BIAS_CUR_S 4
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_BIAS_CUR_M 0x30
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_BIAS_CUR_V_50UA 0x0
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_BIAS_CUR_V_100UA 0x1
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_BIAS_CUR_V_200UA_NORMAL_OP 0x2
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_BIAS_CUR_V_400UA 0x3
-
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_OUT_VOLT_S 2
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_OUT_VOLT_M 0xC
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_OUT_VOLT_V_1_1V 0x0
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_OUT_VOLT_V_1_15V_NORMAL_OP 0x1
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_OUT_VOLT_V_1_2V 0x2
-#define TIMPANI_TXADC_CTL2_TXADC_VICM_REF_BUFF_OUT_VOLT_V_1_25V 0x3
-
-#define TIMPANI_TXADC_CTL2_TXADC_VOCM_BUFFER_BIAS_CUR_S 1
-#define TIMPANI_TXADC_CTL2_TXADC_VOCM_BUFFER_BIAS_CUR_M 0x2
-#define TIMPANI_TXADC_CTL2_TXADC_VOCM_BUFFER_BIAS_CUR_V_50UA_NORMAL_OP 0x0
-#define TIMPANI_TXADC_CTL2_TXADC_VOCM_BUFFER_BIAS_CUR_V_100UA 0x1
-
-#define TIMPANI_TXADC_CTL2_TXADC_DIG_OUT_EN_S 0
-#define TIMPANI_TXADC_CTL2_TXADC_DIG_OUT_EN_M 0x1
-#define TIMPANI_TXADC_CTL2_TXADC_DIG_OUT_EN_DISABLE 0x0
-#define TIMPANI_TXADC_CTL2_TXADC_DIG_OUT_EN_ENABLE_NORMAL_OP 0x1
-
-
-/* -- For TXADC_CTL3 */
-#define TIMPANI_A_TXADC_CTL3 (0x15)
-#define TIMPANI_TXADC_CTL3_RWC "RW"
-#define TIMPANI_TXADC_CTL3_POR 0x64
-#define TIMPANI_TXADC_CTL3_S 0
-#define TIMPANI_TXADC_CTL3_M 0xFF
-
-
-#define TIMPANI_TXADC_CTL3_TXADC_VOCM_REF_BUFF_VOLT_S 6
-#define TIMPANI_TXADC_CTL3_TXADC_VOCM_REF_BUFF_VOLT_M 0xC0
-#define TIMPANI_TXADC_CTL3_TXADC_VOCM_REF_BUFF_VOLT_V_0_85V 0x0
-#define TIMPANI_TXADC_CTL3_TXADC_VOCM_REF_BUFF_VOLT_V_0_90V_NORMAL_OP 0x1
-#define TIMPANI_TXADC_CTL3_TXADC_VOCM_REF_BUFF_VOLT_V_0_95V 0x2
-#define TIMPANI_TXADC_CTL3_TXADC_VOCM_REF_BUFF_VOLT_V_1_00V 0x3
-
-#define TIMPANI_TXADC_CTL3_TXADC_OTA1_BIAS_CUR_S 4
-#define TIMPANI_TXADC_CTL3_TXADC_OTA1_BIAS_CUR_M 0x30
-#define TIMPANI_TXADC_CTL3_TXADC_OTA1_BIAS_CUR_V_10UA 0x0
-#define TIMPANI_TXADC_CTL3_TXADC_OTA1_BIAS_CUR_V_15UA 0x1
-#define TIMPANI_TXADC_CTL3_TXADC_OTA1_BIAS_CUR_V_20UA_NORMAL_OP 0x2
-#define TIMPANI_TXADC_CTL3_TXADC_OTA1_BIAS_CUR_V_25UA 0x3
-
-#define TIMPANI_TXADC_CTL3_TXADC_OTA2_BIAS_CUR_S 2
-#define TIMPANI_TXADC_CTL3_TXADC_OTA2_BIAS_CUR_M 0xC
-#define TIMPANI_TXADC_CTL3_TXADC_OTA2_BIAS_CUR_V_5UA 0x0
-#define TIMPANI_TXADC_CTL3_TXADC_OTA2_BIAS_CUR_V_10UA_NORMAL_OP 0x1
-#define TIMPANI_TXADC_CTL3_TXADC_OTA2_BIAS_CUR_V_15UA 0x2
-#define TIMPANI_TXADC_CTL3_TXADC_OTA2_BIAS_CUR_V_20UA 0x3
-
-#define TIMPANI_TXADC_CTL3_TXADC_COMP_BIAS_CUR_S 1
-#define TIMPANI_TXADC_CTL3_TXADC_COMP_BIAS_CUR_M 0x2
-#define TIMPANI_TXADC_CTL3_TXADC_COMP_BIAS_CUR_V_5UA_NORMAL_OP 0x0
-#define TIMPANI_TXADC_CTL3_TXADC_COMP_BIAS_CUR_V_10UA 0x1
-
-#define TIMPANI_TXADC_CTL3_RESERVED_S 0
-#define TIMPANI_TXADC_CTL3_RESERVED_M 0x1
-
-
-/* -- For TXADC_CHOP_CTL */
-#define TIMPANI_A_TXADC_CHOP_CTL (0x16)
-#define TIMPANI_TXADC_CHOP_CTL_RWC "RW"
-#define TIMPANI_TXADC_CHOP_CTL_POR 0
-#define TIMPANI_TXADC_CHOP_CTL_S 0
-#define TIMPANI_TXADC_CHOP_CTL_M 0xFF
-
-
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_EN_S 7
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_EN_M 0x80
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_EN_DISABLE 0x0
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_EN_ENABLE 0x1
-
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_S 4
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_M 0x70
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_2_NORMAL_OP 0x0
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_4 0x1
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_8 0x2
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_16 0x3
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_32 0x4
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_64 0x5
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_128 0x6
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_DIV_RATIO_V_256 0x7
-
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_STATE_RESET_S 3
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_STATE_RESET_M 0x8
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_STATE_RESET_NORMAL_OP 0x0
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_STATE_RESET_RESET_CHOP 0x1
-
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_CLK_PHASE_SEL_S 2
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_CLK_PHASE_SEL_M 0x4
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_CLK_PHASE_SEL_FALLING_EDGE_CK1 0x0
-#define TIMPANI_TXADC_CHOP_CTL_TXADC_CHOP_CLK_PHASE_SEL_FALLING_EDGE_CK2 0x1
-
-#define TIMPANI_TXADC_CHOP_CTL_RESERVED_S 0
-#define TIMPANI_TXADC_CHOP_CTL_RESERVED_M 0x3
-
-
-/* -- For TXFE3 */
-#define TIMPANI_A_TXFE3 (0x18)
-#define TIMPANI_TXFE3_RWC "RW"
-#define TIMPANI_TXFE3_POR 0
-#define TIMPANI_TXFE3_S 0
-#define TIMPANI_TXFE3_M 0xFF
-
-
-#define TIMPANI_TXFE3_TXFE3_EN_S 7
-#define TIMPANI_TXFE3_TXFE3_EN_M 0x80
-#define TIMPANI_TXFE3_TXFE3_EN_DISABLE 0x0
-#define TIMPANI_TXFE3_TXFE3_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE3_TXFE3_GAIN_S 5
-#define TIMPANI_TXFE3_TXFE3_GAIN_M 0x60
-#define TIMPANI_TXFE3_TXFE3_GAIN_V_0DB 0x0
-#define TIMPANI_TXFE3_TXFE3_GAIN_V_4_5DB 0x1
-#define TIMPANI_TXFE3_TXFE3_GAIN_V_24DB_1 0x2
-#define TIMPANI_TXFE3_TXFE3_GAIN_V_24DB_2 0x3
-
-#define TIMPANI_TXFE3_RESERVED_1_S 2
-#define TIMPANI_TXFE3_RESERVED_1_M 0x1C
-
-#define TIMPANI_TXFE3_TXFE3_IN_CONN_S 1
-#define TIMPANI_TXFE3_TXFE3_IN_CONN_M 0x2
-#define TIMPANI_TXFE3_TXFE3_IN_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE3_TXFE3_IN_CONN_LINE_IN_L 0x1
-
-#define TIMPANI_TXFE3_RESERVED_2_S 0
-#define TIMPANI_TXFE3_RESERVED_2_M 0x1
-
-
-/* -- For TXFE4 */
-#define TIMPANI_A_TXFE4 (0x19)
-#define TIMPANI_TXFE4_RWC "RW"
-#define TIMPANI_TXFE4_POR 0
-#define TIMPANI_TXFE4_S 0
-#define TIMPANI_TXFE4_M 0xFF
-
-
-#define TIMPANI_TXFE4_TXFE4_EN_S 7
-#define TIMPANI_TXFE4_TXFE4_EN_M 0x80
-#define TIMPANI_TXFE4_TXFE4_EN_DISABLE 0x0
-#define TIMPANI_TXFE4_TXFE4_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE4_TXFE4_GAIN_S 5
-#define TIMPANI_TXFE4_TXFE4_GAIN_M 0x60
-#define TIMPANI_TXFE4_TXFE4_GAIN_V_0DB 0x0
-#define TIMPANI_TXFE4_TXFE4_GAIN_V_4_5DB 0x1
-#define TIMPANI_TXFE4_TXFE4_GAIN_V_24DB_1 0x2
-#define TIMPANI_TXFE4_TXFE4_GAIN_V_24DB_2 0x3
-
-#define TIMPANI_TXFE4_RESERVED_1_S 2
-#define TIMPANI_TXFE4_RESERVED_1_M 0x1C
-
-#define TIMPANI_TXFE4_TXFE4_IN_CONN_S 1
-#define TIMPANI_TXFE4_TXFE4_IN_CONN_M 0x2
-#define TIMPANI_TXFE4_TXFE4_IN_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE4_TXFE4_IN_CONN_LINE_IN_R 0x1
-
-#define TIMPANI_TXFE4_RESERVED_2_S 0
-#define TIMPANI_TXFE4_RESERVED_2_M 0x1
-
-
-/* -- For TXFE3_ATEST */
-#define TIMPANI_A_TXFE3_ATEST (0x1A)
-#define TIMPANI_TXFE3_ATEST_RWC "RW"
-#define TIMPANI_TXFE3_ATEST_POR 0
-#define TIMPANI_TXFE3_ATEST_S 0
-#define TIMPANI_TXFE3_ATEST_M 0xFF
-
-
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_SHORT_TO_VICM_EN_S 7
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_SHORT_TO_VICM_EN_M 0x80
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_SHORT_TO_VICM_EN_DISABLE 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_SHORT_TO_VICM_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE3_BYPASS_EN_S 6
-#define TIMPANI_TXFE3_ATEST_TXFE3_BYPASS_EN_M 0x40
-#define TIMPANI_TXFE3_ATEST_TXFE3_BYPASS_EN_DISABLE 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE3_BYPASS_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE3_CMOUT_ATEST_CONN_S 5
-#define TIMPANI_TXFE3_ATEST_TXFE3_CMOUT_ATEST_CONN_M 0x20
-#define TIMPANI_TXFE3_ATEST_TXFE3_CMOUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE3_CMOUT_ATEST_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_ATEST_CONN_S 4
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_ATEST_CONN_M 0x10
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE3_OUT_ATEST_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_SHORT_TO_VICM_EN_S 3
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_SHORT_TO_VICM_EN_M 0x8
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_SHORT_TO_VICM_EN_DISABLE 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_SHORT_TO_VICM_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE4_BYPASS_EN_S 2
-#define TIMPANI_TXFE3_ATEST_TXFE4_BYPASS_EN_M 0x4
-#define TIMPANI_TXFE3_ATEST_TXFE4_BYPASS_EN_DISABLE 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE4_BYPASS_EN_ENABLE 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE4_CMOUT_ATEST_CONN_S 1
-#define TIMPANI_TXFE3_ATEST_TXFE4_CMOUT_ATEST_CONN_M 0x2
-#define TIMPANI_TXFE3_ATEST_TXFE4_CMOUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE4_CMOUT_ATEST_CONN_CONNECT 0x1
-
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_ATEST_CONN_S 0
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_ATEST_CONN_M 0x1
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_TXFE3_ATEST_TXFE4_OUT_ATEST_CONN_CONNECT 0x1
-
-
-/* -- For TXFE_DIFF_SE */
-#define TIMPANI_A_TXFE_DIFF_SE (0x1B)
-#define TIMPANI_TXFE_DIFF_SE_RWC "RW"
-#define TIMPANI_TXFE_DIFF_SE_POR 0
-#define TIMPANI_TXFE_DIFF_SE_S 0
-#define TIMPANI_TXFE_DIFF_SE_M 0xFF
-
-
-#define TIMPANI_TXFE_DIFF_SE_RESERVED_S 4
-#define TIMPANI_TXFE_DIFF_SE_RESERVED_M 0xF0
-
-#define TIMPANI_TXFE_DIFF_SE_TXADC1_IN_MODE_S 3
-#define TIMPANI_TXFE_DIFF_SE_TXADC1_IN_MODE_M 0x8
-#define TIMPANI_TXFE_DIFF_SE_TXADC1_IN_MODE_DIFF 0x0
-#define TIMPANI_TXFE_DIFF_SE_TXADC1_IN_MODE_SINGLE_ENDED 0x1
-
-#define TIMPANI_TXFE_DIFF_SE_TXADC2_IN_MODE_S 2
-#define TIMPANI_TXFE_DIFF_SE_TXADC2_IN_MODE_M 0x4
-#define TIMPANI_TXFE_DIFF_SE_TXADC2_IN_MODE_DIFF 0x0
-#define TIMPANI_TXFE_DIFF_SE_TXADC2_IN_MODE_SINGLE_ENDED 0x1
-
-#define TIMPANI_TXFE_DIFF_SE_TXADC3_IN_MODE_S 1
-#define TIMPANI_TXFE_DIFF_SE_TXADC3_IN_MODE_M 0x2
-#define TIMPANI_TXFE_DIFF_SE_TXADC3_IN_MODE_DIFF 0x0
-#define TIMPANI_TXFE_DIFF_SE_TXADC3_IN_MODE_SINGLE_ENDED 0x1
-
-#define TIMPANI_TXFE_DIFF_SE_TXADC4_IN_MODE_S 0
-#define TIMPANI_TXFE_DIFF_SE_TXADC4_IN_MODE_M 0x1
-#define TIMPANI_TXFE_DIFF_SE_TXADC4_IN_MODE_DIFF 0x0
-#define TIMPANI_TXFE_DIFF_SE_TXADC4_IN_MODE_SINGLE_ENDED 0x1
-
-
-/* -- For CDAC_RX_CLK_CTL */
-#define TIMPANI_A_CDAC_RX_CLK_CTL (0x20)
-#define TIMPANI_CDAC_RX_CLK_CTL_RWC "RW"
-#define TIMPANI_CDAC_RX_CLK_CTL_POR 0x98
-#define TIMPANI_CDAC_RX_CLK_CTL_S 0
-#define TIMPANI_CDAC_RX_CLK_CTL_M 0xFF
-
-
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_EN_S 7
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_EN_M 0x80
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_EN_DISABLE 0x0
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_EN_ENABLE_NORMAL_OP 0x1
-
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_CTRL_EN_S 6
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_CTRL_EN_M 0x40
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_CTRL_EN_DISABLE_NORMAL_OP 0x0
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_CTRL_EN_ENABLE 0x1
-
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_S 2
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_M 0x3C
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_6NS 0x0
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_8_4NS 0x1
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_10_8NS 0x2
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_13_2NS 0x3
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_15_6NS 0x4
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_18NS 0x5
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_20_4NS_NORMAL_OP 0x6
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_22_8NS 0x7
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_25_2NS 0x8
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_27_6NS 0x9
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_30NS 0xA
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_32_4NS 0xB
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_34_8NS 0xC
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_37_2NS 0xD
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_39_6NS 0xE
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_EXTERNAL_DELAY_V_42NS 0xF
-
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_FF_RESET_S 1
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_FF_RESET_M 0x2
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_FF_RESET_ENABLE 0x1
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_FF_RESET_DISABLE 0x0
-
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_ATEST_CONN_S 0
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_ATEST_CONN_M 0x1
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_ATEST_CONN_NO_CONNECT 0x0
-#define TIMPANI_CDAC_RX_CLK_CTL_CDAC_RESET_PULSE_GEN_ATEST_CONN_CONNECT 0x1
-
-
-/* -- For CDAC_BUFF_CTL */
-#define TIMPANI_A_CDAC_BUFF_CTL (0x21)
-#define TIMPANI_CDAC_BUFF_CTL_RWC "RW"
-#define TIMPANI_CDAC_BUFF_CTL_POR 0x60
-#define TIMPANI_CDAC_BUFF_CTL_S 0
-#define TIMPANI_CDAC_BUFF_CTL_M 0xFF
-
-
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_S 5
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_M 0xE0
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_40UA 0x0
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_60UA_NORMAL_OP 0x1
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_80UA 0x2
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_100UA 0x3
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_120UA 0x4
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_140UA 0x5
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_160UA 0x6
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_DM_BUFF_CUR_V_180UA 0x7
-
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_CM_BUFF_CUR_S 3
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_CM_BUFF_CUR_M 0x18
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_CM_BUFF_CUR_V_20UA 0x0
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_CM_BUFF_CUR_V_30UA_NORMAL_OP 0x1
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_CM_BUFF_CUR_V_40UA 0x2
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_CM_BUFF_CUR_V_50UA 0x3
-
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_REF_BUFF_OTA_BIAS_CUR_S 1
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_REF_BUFF_OTA_BIAS_CUR_M 0x6
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_REF_BUFF_OTA_BIAS_CUR_V_5UA_5UA 0x0
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_REF_BUFF_OTA_BIAS_CUR_V_5UA_10UA 0x1
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_REF_BUFF_OTA_BIAS_CUR_V_10UA_5UA 0x2
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_REF_BUFF_OTA_BIAS_CUR_V_10UA_10UA 0x3
-
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_VCOM_SOURCE_S 0
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_VCOM_SOURCE_M 0x1
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_VCOM_SOURCE_CURRENT_TO_VCOM_NORMAL_OP 0x0
-#define TIMPANI_CDAC_BUFF_CTL_CDAC_VCOM_SOURCE_MASTER_BIAS_TO_VCOM 0x1
-
-
-/* -- For CDAC_REF_CTL1 */
-#define TIMPANI_A_CDAC_REF_CTL1 (0x22)
-#define TIMPANI_CDAC_REF_CTL1_RWC "RW"
-#define TIMPANI_CDAC_REF_CTL1_POR 0xe1
-#define TIMPANI_CDAC_REF_CTL1_S 0
-#define TIMPANI_CDAC_REF_CTL1_M 0xFF
-
-
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_S 5
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_M 0xE0
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_8V 0x0
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_825V 0x1
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_85V 0x2
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_9V 0x3
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_925V 0x4
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_95V_NORMAL_OP 0x5
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_1_975 0x6
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACH_VOLT_V_2_0V 0x7
-
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_S 2
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_M 0x1C
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_1V 0x0
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_125V 0x1
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_15V_NORMAL_OP 0x2
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_175V 0x3
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_2V 0x4
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_25V 0x5
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_275V 0x6
-#define TIMPANI_CDAC_REF_CTL1_CDAC_DACL_VOLT_V_0_3V 0x7
-
-#define TIMPANI_CDAC_REF_CTL1_CDAC_CM_VOLT_S 0
-#define TIMPANI_CDAC_REF_CTL1_CDAC_CM_VOLT_M 0x3
-#define TIMPANI_CDAC_REF_CTL1_CDAC_CM_VOLT_V_1_025V 0x0
-#define TIMPANI_CDAC_REF_CTL1_CDAC_CM_VOLT_V_1_05V_NORMAL_OP 0x1
-#define TIMPANI_CDAC_REF_CTL1_CDAC_CM_VOLT_V_1_075V 0x2
-#define TIMPANI_CDAC_REF_CTL1_CDAC_CM_VOLT_V_1_1V 0x3
-
-
-/* -- For IDAC_DWA_FIR_CTL */
-#define TIMPANI_A_IDAC_DWA_FIR_CTL (0x23)
-#define TIMPANI_IDAC_DWA_FIR_CTL_RWC "RW"
-#define TIMPANI_IDAC_DWA_FIR_CTL_POR 0x28
-#define TIMPANI_IDAC_DWA_FIR_CTL_S 0
-#define TIMPANI_IDAC_DWA_FIR_CTL_M 0xFF
-
-
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_CLK_NON_OL_TIME_S 7
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_CLK_NON_OL_TIME_M 0x80
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_CLK_NON_OL_TIME_NORMAL_OP 0x0
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_CLK_NON_OL_TIME_V_150PSEC_REDUCTION 0x1
-
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_S 4
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_M 0x70
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_FIR0 0x0
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_FIR1 0x1
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_FIR2 0x2
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_FIR3 0x3
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_FIR_FIR4 0x4
-
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_EN_SOURCE_S 3
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_EN_SOURCE_M 0x8
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_EN_SOURCE_INTERNAL_NORMAL_OP 0x1
-#define TIMPANI_IDAC_DWA_FIR_CTL_IDAC_EN_SOURCE_EXTERNAL 0x0
-
-#define TIMPANI_IDAC_DWA_FIR_CTL_RESERVED_S 0
-#define TIMPANI_IDAC_DWA_FIR_CTL_RESERVED_M 0x7
-
-
-/* -- For CDAC_REF_CTL2 */
-#define TIMPANI_A_CDAC_REF_CTL2 (0x24)
-#define TIMPANI_CDAC_REF_CTL2_RWC "RW"
-#define TIMPANI_CDAC_REF_CTL2_POR 0xc
-#define TIMPANI_CDAC_REF_CTL2_S 0
-#define TIMPANI_CDAC_REF_CTL2_M 0xFF
-
-
-#define TIMPANI_CDAC_REF_CTL2_RESERVED_1_S 7
-#define TIMPANI_CDAC_REF_CTL2_RESERVED_1_M 0x80
-
-#define TIMPANI_CDAC_REF_CTL2_CDAC_L_EN_S 6
-#define TIMPANI_CDAC_REF_CTL2_CDAC_L_EN_M 0x40
-#define TIMPANI_CDAC_REF_CTL2_CDAC_L_EN_DISABLE 0x0
-#define TIMPANI_CDAC_REF_CTL2_CDAC_L_EN_ENABLE 0x1
-
-#define TIMPANI_CDAC_REF_CTL2_CDAC_R_EN_S 5
-#define TIMPANI_CDAC_REF_CTL2_CDAC_R_EN_M 0x20
-#define TIMPANI_CDAC_REF_CTL2_CDAC_R_EN_DISABLE 0x0
-#define TIMPANI_CDAC_REF_CTL2_CDAC_R_EN_ENABLE 0x1
-
-#define TIMPANI_CDAC_REF_CTL2_RESERVED_2_S 4
-#define TIMPANI_CDAC_REF_CTL2_RESERVED_2_M 0x10
-
-#define TIMPANI_CDAC_REF_CTL2_CDAC_DWA_RX_FILTER_TIMING_S 2
-#define TIMPANI_CDAC_REF_CTL2_CDAC_DWA_RX_FILTER_TIMING_M 0xC
-#define TIMPANI_CDAC_REF_CTL2_CDAC_DWA_RX_FILTER_TIMING_CLK_SYNC_CK11DBAR 0x1
-#define TIMPANI_CDAC_REF_CTL2_CDAC_DWA_RX_FILTER_TIMING_CLK_SYNC_CK21 0x3
-
-#define TIMPANI_CDAC_REF_CTL2_CDAC_OSR_S 0
-#define TIMPANI_CDAC_REF_CTL2_CDAC_OSR_M 0x3
-#define TIMPANI_CDAC_REF_CTL2_CDAC_OSR_V_256 0x0
-#define TIMPANI_CDAC_REF_CTL2_CDAC_OSR_V_128 0x1
-#define TIMPANI_CDAC_REF_CTL2_CDAC_OSR_V_64 0x3
-
-
-/* -- For CDAC_CTL1 */
-#define TIMPANI_A_CDAC_CTL1 (0x25)
-#define TIMPANI_CDAC_CTL1_RWC "RW"
-#define TIMPANI_CDAC_CTL1_POR 0xb
-#define TIMPANI_CDAC_CTL1_S 0
-#define TIMPANI_CDAC_CTL1_M 0xFF
-
-
-#define TIMPANI_CDAC_CTL1_RESERVED_S 6
-#define TIMPANI_CDAC_CTL1_RESERVED_M 0xC0
-
-#define TIMPANI_CDAC_CTL1_CDAC_L_OUT_SHORT_EN_S 5
-#define TIMPANI_CDAC_CTL1_CDAC_L_OUT_SHORT_EN_M 0x20
-#define TIMPANI_CDAC_CTL1_CDAC_L_OUT_SHORT_EN_DISABLE 0x0
-#define TIMPANI_CDAC_CTL1_CDAC_L_OUT_SHORT_EN_ENABLE 0x1
-
-#define TIMPANI_CDAC_CTL1_CDAC_R_OUT_SHORT_EN_S 4
-#define TIMPANI_CDAC_CTL1_CDAC_R_OUT_SHORT_EN_M 0x10
-#define TIMPANI_CDAC_CTL1_CDAC_R_OUT_SHORT_EN_DISABLE 0x0
-#define TIMPANI_CDAC_CTL1_CDAC_R_OUT_SHORT_EN_ENABLE 0x1
-
-#define TIMPANI_CDAC_CTL1_CDAC_REF_RESISTOR_VOLT_S 2
-#define TIMPANI_CDAC_CTL1_CDAC_REF_RESISTOR_VOLT_M 0xC
-#define TIMPANI_CDAC_CTL1_CDAC_REF_RESISTOR_VOLT_V_1_0V 0x0
-#define TIMPANI_CDAC_CTL1_CDAC_REF_RESISTOR_VOLT_V_1_025V 0x1
-#define TIMPANI_CDAC_CTL1_CDAC_REF_RESISTOR_VOLT_V_1_05V_NORMAL_OP 0x2
-#define TIMPANI_CDAC_CTL1_CDAC_REF_RESISTOR_VOLT_V_1_0752V 0x3
-
-#define TIMPANI_CDAC_CTL1_CDAC_SAMP_CAP_RESET_EN_S 1
-#define TIMPANI_CDAC_CTL1_CDAC_SAMP_CAP_RESET_EN_M 0x2
-#define TIMPANI_CDAC_CTL1_CDAC_SAMP_CAP_RESET_EN_DISABLE 0x0
-#define TIMPANI_CDAC_CTL1_CDAC_SAMP_CAP_RESET_EN_ENABLE_NORMAL_OP 0x1
-
-#define TIMPANI_CDAC_CTL1_CDAC_RESET_SOURCE_S 0
-#define TIMPANI_CDAC_CTL1_CDAC_RESET_SOURCE_M 0x1
-#define TIMPANI_CDAC_CTL1_CDAC_RESET_SOURCE_INTERNAL_NORMAL_OP 0x1
-#define TIMPANI_CDAC_CTL1_CDAC_RESET_SOURCE_EXTERNAL_REGISTER_RESET 0x0
-
-
-/* -- For CDAC_CTL2 */
-#define TIMPANI_A_CDAC_CTL2 (0x26)
-#define TIMPANI_CDAC_CTL2_RWC "RW"
-#define TIMPANI_CDAC_CTL2_POR 0xd0
-#define TIMPANI_CDAC_CTL2_S 0
-#define TIMPANI_CDAC_CTL2_M 0xFF
-
-
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_S 5
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_M 0xE0
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_10UA 0x0
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_8_75UA 0x1
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_7_5UA 0x2
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_6_25UA 0x3
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_5UA 0x4
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_3_75UA 0x5
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_2_5UA_NORMAL_OP 0x6
-#define TIMPANI_CDAC_CTL2_CDAC_OTA_BIAS_V_1_25UA 0x7
-
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_S 2
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_M 0x1C
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_10UA 0x0
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_8_75UA 0x1
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_7_5UA 0x2
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_6_25UA 0x3
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_5UA_NORMAL_OP 0x4
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_3_75UA 0x5
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_2_5UA 0x6
-#define TIMPANI_CDAC_CTL2_CDAC_REF_BUFF_OTA_BIAS_V_1_25UA 0x7
-
-#define TIMPANI_CDAC_CTL2_CDAC_RESET_PULSE_GEN_UPDATE_RATE_S 0
-#define TIMPANI_CDAC_CTL2_CDAC_RESET_PULSE_GEN_UPDATE_RATE_M 0x3
-#define TIMPANI_CDAC_CTL2_CDAC_RESET_PULSE_GEN_UPDATE_RATE_FS 0x0
-#define TIMPANI_CDAC_CTL2_CDAC_RESET_PULSE_GEN_UPDATE_RATE_FS_BY_8 0x1
-#define TIMPANI_CDAC_CTL2_CDAC_RESET_PULSE_GEN_UPDATE_RATE_FS_BY_16 0x2
-
-
-/* -- For IDAC_L_CTL */
-#define TIMPANI_A_IDAC_L_CTL (0x28)
-#define TIMPANI_IDAC_L_CTL_RWC "RW"
-#define TIMPANI_IDAC_L_CTL_POR 0xe
-#define TIMPANI_IDAC_L_CTL_S 0
-#define TIMPANI_IDAC_L_CTL_M 0xFF
-
-
-#define TIMPANI_IDAC_L_CTL_IDAC_L_EN_S 7
-#define TIMPANI_IDAC_L_CTL_IDAC_L_EN_M 0x80
-#define TIMPANI_IDAC_L_CTL_IDAC_L_EN_DISABLE 0x0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_EN_ENABLE 0x1
-
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REF_SEL_S 5
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REF_SEL_M 0x60
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REF_SEL_GROUND 0x0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REF_SEL_IBIAS_X_R_REF 0x1
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REF_SEL_BG_VOLTAGE_NORMAL_OP 0x2
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REF_SEL_VDD_BY_2 0x3
-
-#define TIMPANI_IDAC_L_CTL_IDAC_L_GAIN_S 3
-#define TIMPANI_IDAC_L_CTL_IDAC_L_GAIN_M 0x18
-#define TIMPANI_IDAC_L_CTL_IDAC_L_GAIN_NEG_1_5DB 0x0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_GAIN_V_0_0DB_NORMAL_OP 0x1
-#define TIMPANI_IDAC_L_CTL_IDAC_L_GAIN_POS_1_5DB 0x2
-#define TIMPANI_IDAC_L_CTL_IDAC_L_GAIN_POS_3_0DB 0x3
-
-#define TIMPANI_IDAC_L_CTL_IDAC_L_LOW_RESISTANCE_S 2
-#define TIMPANI_IDAC_L_CTL_IDAC_L_LOW_RESISTANCE_M 0x4
-#define TIMPANI_IDAC_L_CTL_IDAC_L_LOW_RESISTANCE_V_30K 0x0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_LOW_RESISTANCE_V_10K_NORMAL_OP 0x1
-
-#define TIMPANI_IDAC_L_CTL_IDAC_L_SYNC_EN_S 1
-#define TIMPANI_IDAC_L_CTL_IDAC_L_SYNC_EN_M 0x2
-#define TIMPANI_IDAC_L_CTL_IDAC_L_SYNC_EN_ASYNCHRONOUSLY 0x0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_SYNC_EN_ENABLE_NORMAL_OP 0x1
-
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REPLICA_BIAS_S 0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REPLICA_BIAS_M 0x1
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REPLICA_BIAS_REPLICA_BIAS_NORMAL_OP 0x0
-#define TIMPANI_IDAC_L_CTL_IDAC_L_REPLICA_BIAS_SERVO_LOOP_BIAS 0x1
-
-
-/* -- For IDAC_R_CTL */
-#define TIMPANI_A_IDAC_R_CTL (0x29)
-#define TIMPANI_IDAC_R_CTL_RWC "RW"
-#define TIMPANI_IDAC_R_CTL_POR 0xe
-#define TIMPANI_IDAC_R_CTL_S 0
-#define TIMPANI_IDAC_R_CTL_M 0xFF
-
-
-#define TIMPANI_IDAC_R_CTL_IDAC_R_EN_S 7
-#define TIMPANI_IDAC_R_CTL_IDAC_R_EN_M 0x80
-#define TIMPANI_IDAC_R_CTL_IDAC_R_EN_DISABLED 0x0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_EN_ENABLED 0x1
-
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REF_SEL_S 5
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REF_SEL_M 0x60
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REF_SEL_GROUND 0x0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REF_SEL_IBIAS_X_R_REF 0x1
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REF_SEL_BG_VOLTAGE_NORMAL_OP 0x2
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REF_SEL_VDD_BY_2 0x3
-
-#define TIMPANI_IDAC_R_CTL_IDAC_R_GAIN_S 3
-#define TIMPANI_IDAC_R_CTL_IDAC_R_GAIN_M 0x18
-#define TIMPANI_IDAC_R_CTL_IDAC_R_GAIN_NEG_1_5DB 0x0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_GAIN_V_0_0DB_NORMAL_OP 0x1
-#define TIMPANI_IDAC_R_CTL_IDAC_R_GAIN_POS_1_5DB 0x2
-#define TIMPANI_IDAC_R_CTL_IDAC_R_GAIN_POS_3_0DB 0x3
-
-#define TIMPANI_IDAC_R_CTL_IDAC_R_LOW_RESISTANCE_S 2
-#define TIMPANI_IDAC_R_CTL_IDAC_R_LOW_RESISTANCE_M 0x4
-#define TIMPANI_IDAC_R_CTL_IDAC_R_LOW_RESISTANCE_V_30K 0x0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_LOW_RESISTANCE_V_10K_NORMAL_OP 0x1
-
-#define TIMPANI_IDAC_R_CTL_IDAC_R_SYNC_EN_S 1
-#define TIMPANI_IDAC_R_CTL_IDAC_R_SYNC_EN_M 0x2
-#define TIMPANI_IDAC_R_CTL_IDAC_R_SYNC_EN_ASYNCHRONOUSLY 0x0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_SYNC_EN_ENABLE_NORMAL_OP 0x1
-
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REPLICA_BIAS_S 0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REPLICA_BIAS_M 0x1
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REPLICA_BIAS_REPLICA_BIAS_NORMAL_OP 0x0
-#define TIMPANI_IDAC_R_CTL_IDAC_R_REPLICA_BIAS_SERVO_LOOP_BIAS 0x1
-
-
-/* -- For PA_MASTER_BIAS */
-#define TIMPANI_A_PA_MASTER_BIAS (0x2D)
-#define TIMPANI_PA_MASTER_BIAS_RWC "RW"
-#define TIMPANI_PA_MASTER_BIAS_POR 0x6f
-#define TIMPANI_PA_MASTER_BIAS_S 0
-#define TIMPANI_PA_MASTER_BIAS_M 0xFF
-
-
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_S 5
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_M 0xE0
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_17_5UA 0x0
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_15_0UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_12_5UA 0x2
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_10_0UA 0x3
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_7_5UA 0x4
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_5_0UA 0x5
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_2_5UA 0x6
-#define TIMPANI_PA_MASTER_BIAS_LINE_MASTER_BIAS_CUR_V_0_0UA 0x7
-
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_S 2
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_M 0x1C
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_17_5UA 0x0
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_15_0UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_12_5UA 0x2
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_10_0UA 0x3
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_7_5UA 0x4
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_5_0UA 0x5
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_2_5UA 0x6
-#define TIMPANI_PA_MASTER_BIAS_HPH_MASTER_BIAS_CUR_V_0_0UA 0x7
-
-#define TIMPANI_PA_MASTER_BIAS_CLASSD_REF_BUF_MASTER_BIAS_CUR_S 0
-#define TIMPANI_PA_MASTER_BIAS_CLASSD_REF_BUF_MASTER_BIAS_CUR_M 0x3
-#define TIMPANI_PA_MASTER_BIAS_CLASSD_REF_BUF_MASTER_BIAS_CUR_V_6_25UA 0x0
-#define TIMPANI_PA_MASTER_BIAS_CLASSD_REF_BUF_MASTER_BIAS_CUR_V_5_0UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_CLASSD_REF_BUF_MASTER_BIAS_CUR_V_3_75UA 0x2
-#define TIMPANI_PA_MASTER_BIAS_CLASSD_REF_BUF_MASTER_BIAS_CUR_V_2_5UA 0x3
-
-
-/* -- For PA_CLASSD_BIAS */
-#define TIMPANI_A_PA_CLASSD_BIAS (0x2E)
-#define TIMPANI_PA_CLASSD_BIAS_RWC "RW"
-#define TIMPANI_PA_CLASSD_BIAS_POR 0x55
-#define TIMPANI_PA_CLASSD_BIAS_S 0
-#define TIMPANI_PA_CLASSD_BIAS_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_COMP_BIAS_CUR_S 6
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_COMP_BIAS_CUR_M 0xC0
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_COMP_BIAS_CUR_V_6_25UA 0x0
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_COMP_BIAS_CUR_V_5_0UA 0x1
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_COMP_BIAS_CUR_V_3_75UA 0x2
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_COMP_BIAS_CUR_V_2_5UA 0x3
-
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA1_BIAS_CUR_S 4
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA1_BIAS_CUR_M 0x30
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA1_BIAS_CUR_V_6_25UA 0x0
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA1_BIAS_CUR_V_5_0U 0x1
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA1_BIAS_CUR_V_3_75UA 0x2
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA1_BIAS_CUR_V_2_5UA 0x3
-
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA2_BIAS_CUR_S 2
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA2_BIAS_CUR_M 0xC
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA2_BIAS_CUR_V_6_25UA 0x0
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA2_BIAS_CUR_V_5_0UA 0x1
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA2_BIAS_CUR_V_3_75UA 0x2
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OTA2_BIAS_CUR_V_2_5UA 0x3
-
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OCP_BIAS_CUR_S 0
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OCP_BIAS_CUR_M 0x3
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OCP_BIAS_CUR_V_6_25UA 0x0
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OCP_BIAS_CUR_V_5_0UA 0x1
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OCP_BIAS_CUR_V_3_75UA 0x2
-#define TIMPANI_PA_CLASSD_BIAS_CLASSD_OCP_BIAS_CUR_V_2_5UA 0x3
-
-
-/* -- For AUXPGA_CUR */
-#define TIMPANI_A_AUXPGA_CUR (0x2F)
-#define TIMPANI_AUXPGA_CUR_RWC "RW"
-#define TIMPANI_AUXPGA_CUR_POR 0x44
-#define TIMPANI_AUXPGA_CUR_S 0
-#define TIMPANI_AUXPGA_CUR_M 0xFF
-
-
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_S 4
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_M 0xF0
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_0UA 0x0
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_0_3125UA 0x1
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_0_625UA 0x2
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_0_9375UA 0x3
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_1_25UA 0x4
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_1_5625UA 0x5
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_1_875UA 0x6
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_2_1875UA 0x7
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_2_5UA 0x8
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_2_8125UA 0x9
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_3_125UA 0xA
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_3_4375UA 0xB
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_3_75UA 0xC
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_4_0625UA 0xD
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_4_375UA 0xE
-#define TIMPANI_AUXPGA_CUR_AUXPGA_PMOSAB_CUR_V_4_6875UA 0xF
-
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_S 0
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_M 0xF
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_0UA 0x0
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_0_3125UA 0x1
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_0_625UA 0x2
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_0_9375UA 0x3
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_1_25UA 0x4
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_1_5625UA 0x5
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_1_875UA 0x6
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_2_1875UA 0x7
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_2_5UA 0x8
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_2_8125UA 0x9
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_3_125UA 0xA
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_3_4375UA 0xB
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_3_75UA 0xC
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_4_0625UA 0xD
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_4_375UA 0xE
-#define TIMPANI_AUXPGA_CUR_AUXPGA_NMOSAB_CUR_V_4_6875UA 0xF
-
-
-/* -- For AUXPGA_CM */
-#define TIMPANI_A_AUXPGA_CM (0x30)
-#define TIMPANI_AUXPGA_CM_RWC "RW"
-#define TIMPANI_AUXPGA_CM_POR 0x92
-#define TIMPANI_AUXPGA_CM_S 0
-#define TIMPANI_AUXPGA_CM_M 0xFF
-
-
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_S 5
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_M 0xE0
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_7_5UA 0x0
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_7_925UA 0x1
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_8_75UA 0x2
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_9_375UA 0x3
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_10UA 0x4
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_10_625UA 0x5
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_11_25UA 0x6
-#define TIMPANI_AUXPGA_CM_AUXPGA_R_CM_DIFF_PAIR_TAIL_CUR_V_11_875UA 0x7
-
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_S 2
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_M 0x1C
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_7_5UA 0x0
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_7_925UA 0x1
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_8_75UA 0x2
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_9_375UA 0x3
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_10UA 0x4
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_10_625UA 0x5
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_11_25UA 0x6
-#define TIMPANI_AUXPGA_CM_AUXPGA_L_CM_DIFF_PAIR_TAIL_CUR_V_11_875UA 0x7
-
-#define TIMPANI_AUXPGA_CM_AUXPGA_R2R_CM_S 1
-#define TIMPANI_AUXPGA_CM_AUXPGA_R2R_CM_M 0x2
-#define TIMPANI_AUXPGA_CM_AUXPGA_R2R_CM_VCMI_TO_R2R_CM 0x1
-#define TIMPANI_AUXPGA_CM_AUXPGA_R2R_CM_R2R_CM_FLOATING 0x0
-
-#define TIMPANI_AUXPGA_CM_AUXPGA_VCM_REF_GEN_S 0
-#define TIMPANI_AUXPGA_CM_AUXPGA_VCM_REF_GEN_M 0x1
-#define TIMPANI_AUXPGA_CM_AUXPGA_VCM_REF_GEN_GEN_VCM_LOCALLY 0x1
-#define TIMPANI_AUXPGA_CM_AUXPGA_VCM_REF_GEN_BG_VCM 0x0
-
-
-/* -- For PA_HPH_EARPA_MSTB_EN */
-#define TIMPANI_A_PA_HPH_EARPA_MSTB_EN (0x31)
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_RWC "RW"
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_POR 0x4
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_S 0
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_M 0xFF
-
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_EN_S 7
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_EN_M 0x80
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_BIAS_EN_S 6
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_BIAS_EN_M 0x40
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_BIAS_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_L_BIAS_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_EN_S 5
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_EN_M 0x20
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_BIAS_EN_S 4
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_BIAS_EN_M 0x10
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_BIAS_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_R_BIAS_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_VCM_BUFFER_EN_S 3
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_VCM_BUFFER_EN_M 0x8
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_VCM_BUFFER_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_VCM_BUFFER_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_CAPLESS_MODE_S 2
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_CAPLESS_MODE_M 0x4
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_CAPLESS_MODE_CAPLESS 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_HPH_CAPLESS_MODE_LEGACY 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_EARPA_EN_S 1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_EARPA_EN_M 0x2
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_EARPA_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_EARPA_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_PA_MASTER_BIAS_EN_S 0
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_PA_MASTER_BIAS_EN_M 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_PA_MASTER_BIAS_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_EARPA_MSTB_EN_PA_MASTER_BIAS_EN_DISABLE 0x0
-
-
-/* -- For PA_LINE_AUXO_EN */
-#define TIMPANI_A_PA_LINE_AUXO_EN (0x32)
-#define TIMPANI_PA_LINE_AUXO_EN_RWC "RW"
-#define TIMPANI_PA_LINE_AUXO_EN_POR 0
-#define TIMPANI_PA_LINE_AUXO_EN_S 0
-#define TIMPANI_PA_LINE_AUXO_EN_M 0xFF
-
-
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_EN_S 7
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_EN_M 0x80
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_BIAS_EN_S 6
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_BIAS_EN_M 0x40
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_BIAS_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_L_BIAS_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_EN_S 5
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_EN_M 0x20
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_BIAS_EN_S 4
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_BIAS_EN_M 0x10
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_BIAS_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_R_BIAS_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_VCM_BUFFER_EN_S 3
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_VCM_BUFFER_EN_M 0x8
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_VCM_BUFFER_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_LINE_VCM_BUFFER_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_EN_S 2
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_EN_M 0x4
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_BIAS_EN_S 1
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_BIAS_EN_M 0x2
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_BIAS_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_BIAS_EN_DISABLE 0x0
-
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_VCM_BUFFER_EN_S 0
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_VCM_BUFFER_EN_M 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_VCM_BUFFER_EN_ENABLE 0x1
-#define TIMPANI_PA_LINE_AUXO_EN_AUXOUT_VCM_BUFFER_EN_DISABLE 0x0
-
-
-/* -- For PA_CLASSD_AUXPGA_EN */
-#define TIMPANI_A_PA_CLASSD_AUXPGA_EN (0x33)
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_RWC "RW"
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_POR 0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_S 0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_MUTE_S 7
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_MUTE_M 0x80
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_MUTE_MUTE 0x1
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_MUTE_UNMUTE 0x0
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_MUTE_S 6
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_MUTE_M 0x40
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_MUTE_MUTE 0x1
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_MUTE_UNMUTE 0x0
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_EN_S 5
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_EN_M 0x20
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_L_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_EN_S 4
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_EN_M 0x10
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_AUXPGA_R_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_REF_EN_S 3
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_REF_EN_M 0x8
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_REF_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_REF_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_EN_S 2
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_EN_M 0x4
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_L_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_REF_EN_S 1
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_REF_EN_M 0x2
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_REF_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_REF_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_EN_S 0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_EN_M 0x1
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_AUXPGA_EN_CLASSD_R_EN_ENABLE 0x1
-
-
-/* -- For PA_LINE_L_GAIN */
-#define TIMPANI_A_PA_LINE_L_GAIN (0x34)
-#define TIMPANI_PA_LINE_L_GAIN_RWC "RW"
-#define TIMPANI_PA_LINE_L_GAIN_POR 0xac
-#define TIMPANI_PA_LINE_L_GAIN_S 0
-#define TIMPANI_PA_LINE_L_GAIN_M 0xFF
-
-
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_S 2
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_M 0xFC
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_POS_1_5 0x0
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_POS_0_0 0x1
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_1_5 0x2
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_3_0 0x3
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_4_5 0x4
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_6_0 0x5
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_7_5 0x6
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_9_0 0x7
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_10_5 0x8
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_12_0 0x9
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_13_5 0xA
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_15_0 0xB
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_16_5 0xC
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_18_0 0xD
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_19_5 0xE
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_21_0 0xF
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_22_5 0x10
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_24_0 0x11
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_25_5 0x12
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_27_0 0x13
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_28_5 0x14
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_30_0 0x15
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_31_5 0x16
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_33_0 0x17
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_34_5 0x18
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_36_0 0x19
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_37_5 0x1A
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_39_0 0x1B
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_40_5 0x1C
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_42_0 0x1D
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_43_5 0x1E
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_45_0 0x1F
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_46_5 0x20
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_48_0 0x21
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_49_5 0x22
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_51_0 0x23
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_52_5 0x24
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_54_0 0x25
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_55_5 0x26
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_57_0 0x27
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_58_5 0x28
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_60_0 0x29
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_61_5 0x2A
-#define TIMPANI_PA_LINE_L_GAIN_LINE_L_GAIN_NEG_63_0 0x2B
-
-#define TIMPANI_PA_LINE_L_GAIN_RESERVED_S 0
-#define TIMPANI_PA_LINE_L_GAIN_RESERVED_M 0x3
-
-
-/* -- For PA_LINE_R_GAIN */
-#define TIMPANI_A_PA_LINE_R_GAIN (0x35)
-#define TIMPANI_PA_LINE_R_GAIN_RWC "RW"
-#define TIMPANI_PA_LINE_R_GAIN_POR 0xac
-#define TIMPANI_PA_LINE_R_GAIN_S 0
-#define TIMPANI_PA_LINE_R_GAIN_M 0xFF
-
-
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_S 2
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_M 0xFC
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_POS_1_5 0x0
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_POS_0_0 0x1
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_1_5 0x2
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_3_0 0x3
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_4_5 0x4
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_6_0 0x5
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_7_5 0x6
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_9_0 0x7
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_10_5 0x8
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_12_0 0x9
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_13_5 0xA
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_15_0 0xB
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_16_5 0xC
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_18_0 0xD
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_19_5 0xE
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_21_0 0xF
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_22_5 0x10
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_24_0 0x11
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_25_5 0x12
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_27_0 0x13
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_28_5 0x14
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_30_0 0x15
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_31_5 0x16
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_33_0 0x17
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_34_5 0x18
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_36_0 0x19
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_37_5 0x1A
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_39_0 0x1B
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_40_5 0x1C
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_42_0 0x1D
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_43_5 0x1E
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_45_0 0x1F
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_46_5 0x20
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_48_0 0x21
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_49_5 0x22
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_51_0 0x23
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_52_5 0x24
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_54_0 0x25
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_55_5 0x26
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_57_0 0x27
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_58_5 0x28
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_60_0 0x29
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_61_5 0x2A
-#define TIMPANI_PA_LINE_R_GAIN_LINE_R_GAIN_NEG_63_0 0x2B
-
-#define TIMPANI_PA_LINE_R_GAIN_RESERVED_S 0
-#define TIMPANI_PA_LINE_R_GAIN_RESERVED_M 0x3
-
-
-/* -- For PA_HPH_L_GAIN */
-#define TIMPANI_A_PA_HPH_L_GAIN (0x36)
-#define TIMPANI_PA_HPH_L_GAIN_RWC "RW"
-#define TIMPANI_PA_HPH_L_GAIN_POR 0xae
-#define TIMPANI_PA_HPH_L_GAIN_S 0
-#define TIMPANI_PA_HPH_L_GAIN_M 0xFF
-
-
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_S 2
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_M 0xFC
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_POS_1_5 0x0
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_POS_0_0 0x1
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_1_5 0x2
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_3_0 0x3
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_4_5 0x4
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_6_0 0x5
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_7_5 0x6
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_9_0 0x7
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_10_5 0x8
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_12_0 0x9
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_13_5 0xA
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_15_0 0xB
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_16_5 0xC
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_18_0 0xD
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_19_5 0xE
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_21_0 0xF
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_22_5 0x10
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_24_0 0x11
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_25_5 0x12
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_27_0 0x13
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_28_5 0x14
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_30_0 0x15
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_31_5 0x16
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_33_0 0x17
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_34_5 0x18
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_36_0 0x19
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_37_5 0x1A
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_39_0 0x1B
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_40_5 0x1C
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_42_0 0x1D
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_43_5 0x1E
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_45_0 0x1F
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_46_5 0x20
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_48_0 0x21
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_49_5 0x22
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_51_0 0x23
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_52_5 0x24
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_54_0 0x25
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_55_5 0x26
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_57_0 0x27
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_58_5 0x28
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_60_0 0x29
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_61_5 0x2A
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_GAIN_NEG_63_0 0x2B
-
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_MUTE_S 1
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_MUTE_M 0x2
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_MUTE_MUTE 0x1
-#define TIMPANI_PA_HPH_L_GAIN_HPH_L_MUTE_UNMUTE 0x0
-
-#define TIMPANI_PA_HPH_L_GAIN_RESERVED_S 0
-#define TIMPANI_PA_HPH_L_GAIN_RESERVED_M 0x1
-
-
-/* -- For PA_HPH_R_GAIN */
-#define TIMPANI_A_PA_HPH_R_GAIN (0x37)
-#define TIMPANI_PA_HPH_R_GAIN_RWC "RW"
-#define TIMPANI_PA_HPH_R_GAIN_POR 0xae
-#define TIMPANI_PA_HPH_R_GAIN_S 0
-#define TIMPANI_PA_HPH_R_GAIN_M 0xFF
-
-
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_S 2
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_M 0xFC
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_POS_1_5 0x0
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_POS_0_0 0x1
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_1_5 0x2
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_3_0 0x3
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_4_5 0x4
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_6_0 0x5
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_7_5 0x6
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_9_0 0x7
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_10_5 0x8
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_12_0 0x9
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_13_5 0xA
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_15_0 0xB
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_16_5 0xC
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_18_0 0xD
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_19_5 0xE
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_21_0 0xF
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_22_5 0x10
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_24_0 0x11
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_25_5 0x12
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_27_0 0x13
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_28_5 0x14
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_30_0 0x15
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_31_5 0x16
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_33_0 0x17
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_34_5 0x18
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_36_0 0x19
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_37_5 0x1A
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_39_0 0x1B
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_40_5 0x1C
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_42_0 0x1D
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_43_5 0x1E
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_45_0 0x1F
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_46_5 0x20
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_48_0 0x21
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_49_5 0x22
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_51_0 0x23
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_52_5 0x24
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_54_0 0x25
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_55_5 0x26
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_57_0 0x27
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_58_5 0x28
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_60_0 0x29
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_61_5 0x2A
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_GAIN_NEG_63_0 0x2B
-
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_MUTE_S 1
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_MUTE_M 0x2
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_MUTE_MUTE 0x1
-#define TIMPANI_PA_HPH_R_GAIN_HPH_R_MUTE_UNMUTE 0x0
-
-#define TIMPANI_PA_HPH_R_GAIN_RESERVED_S 0
-#define TIMPANI_PA_HPH_R_GAIN_RESERVED_M 0x1
-
-
-/* -- For AUXPGA_LR_GAIN */
-#define TIMPANI_A_AUXPGA_LR_GAIN (0x38)
-#define TIMPANI_AUXPGA_LR_GAIN_RWC "RW"
-#define TIMPANI_AUXPGA_LR_GAIN_POR 0xaa
-#define TIMPANI_AUXPGA_LR_GAIN_S 0
-#define TIMPANI_AUXPGA_LR_GAIN_M 0xFF
-
-
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_S 4
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_M 0xF0
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_30DB 0x0
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_27DB 0x1
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_24DB 0x2
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_21DB 0x3
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_18DB 0x4
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_15DB 0x5
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_12DB 0x6
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_9_0DB 0x7
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_6_0DB 0x8
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_NEG_3_0DB 0x9
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_POS_0_0DB 0xA
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_POS_3_0DB 0xB
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_POS_6_0DB 0xC
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_POS_9_0DB 0xD
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_POS_12_0DB_1 0xE
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_L_GAIN_POS_12_0DB_2 0xF
-
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_S 0
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_M 0xF
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_30DB 0x0
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_27DB 0x1
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_24DB 0x2
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_21DB 0x3
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_18DB 0x4
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_15DB 0x5
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_12DB 0x6
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_9_0DB 0x7
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_6_0DB 0x8
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_NEG_3_0DB 0x9
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_POS_0_0DB 0xA
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_POS_3_0DB 0xB
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_POS_6_0DB 0xC
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_POS_9_0DB 0xD
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_POS_12_0DB_1 0xE
-#define TIMPANI_AUXPGA_LR_GAIN_AUXPGA_R_GAIN_POS_12_0DB_2 0xF
-
-
-/* -- For PA_AUXO_EARPA_CONN */
-#define TIMPANI_A_PA_AUXO_EARPA_CONN (0x39)
-#define TIMPANI_PA_AUXO_EARPA_CONN_RWC "RW"
-#define TIMPANI_PA_AUXO_EARPA_CONN_POR 0
-#define TIMPANI_PA_AUXO_EARPA_CONN_S 0
-#define TIMPANI_PA_AUXO_EARPA_CONN_M 0xFF
-
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_AUXPGA_L_CONN_S 7
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_AUXPGA_L_CONN_M 0x80
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_IDAC_L_CONN_S 6
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_IDAC_L_CONN_M 0x40
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_IDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_IDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_CDAC_L_CONN_S 5
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_CDAC_L_CONN_M 0x20
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_AUXO_EARPA_CONN_AUXOUT_CDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_RESERVED_S 4
-#define TIMPANI_PA_AUXO_EARPA_CONN_RESERVED_M 0x10
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_GAIN_S 3
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_GAIN_M 0x8
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_GAIN_V_3_52DB 0x1
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_GAIN_V_2_02DB 0x0
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_AUXPGA_L_CONN_S 2
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_AUXPGA_L_CONN_M 0x4
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_IDAC_L_CONN_S 1
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_IDAC_L_CONN_M 0x2
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_IDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_IDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_CDAC_L_CONN_S 0
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_CDAC_L_CONN_M 0x1
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_AUXO_EARPA_CONN_EARPA_CDAC_L_CONN_CONNECT 0x1
-
-
-/* -- For PA_LINE_ST_CONN */
-#define TIMPANI_A_PA_LINE_ST_CONN (0x3A)
-#define TIMPANI_PA_LINE_ST_CONN_RWC "RW"
-#define TIMPANI_PA_LINE_ST_CONN_POR 0
-#define TIMPANI_PA_LINE_ST_CONN_S 0
-#define TIMPANI_PA_LINE_ST_CONN_M 0xFF
-
-
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_AUXPGA_L_CONN_S 7
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_AUXPGA_L_CONN_M 0x80
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_IDAC_L_CONN_S 6
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_IDAC_L_CONN_M 0x40
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_IDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_IDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_CDAC_L_CONN_S 5
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_CDAC_L_CONN_M 0x20
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_ST_CONN_LINE_L_CDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_AUXPGA_R_CONN_S 4
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_AUXPGA_R_CONN_M 0x10
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_AUXPGA_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_AUXPGA_R_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_IDAC_R_CONN_S 3
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_IDAC_R_CONN_M 0x8
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_IDAC_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_IDAC_R_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_CDAC_R_CONN_S 2
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_CDAC_R_CONN_M 0x4
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_CDAC_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_ST_CONN_LINE_R_CDAC_R_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_ST_CONN_AUXPGA_L_VCM_ADD_CURR_S 0
-#define TIMPANI_PA_LINE_ST_CONN_AUXPGA_L_VCM_ADD_CURR_M 0x3
-#define TIMPANI_PA_LINE_ST_CONN_AUXPGA_L_VCM_ADD_CURR_NONE 0x0
-#define TIMPANI_PA_LINE_ST_CONN_AUXPGA_L_VCM_ADD_CURR_V_1_25UA 0x1
-#define TIMPANI_PA_LINE_ST_CONN_AUXPGA_L_VCM_ADD_CURR_V_2_5UA 0x2
-#define TIMPANI_PA_LINE_ST_CONN_AUXPGA_L_VCM_ADD_CURR_V_3_75UA 0x3
-
-
-/* -- For PA_LINE_MONO_CONN */
-#define TIMPANI_A_PA_LINE_MONO_CONN (0x3B)
-#define TIMPANI_PA_LINE_MONO_CONN_RWC "RW"
-#define TIMPANI_PA_LINE_MONO_CONN_POR 0
-#define TIMPANI_PA_LINE_MONO_CONN_S 0
-#define TIMPANI_PA_LINE_MONO_CONN_M 0xFF
-
-
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_CONN_S 7
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_CONN_M 0x80
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_CONN_S 6
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_CONN_M 0x40
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_CONN_S 5
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_CONN_M 0x20
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_INV_CONN_S 4
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_INV_CONN_M 0x10
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_INV_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_AUXPGA_L_INV_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_INV_CONN_S 3
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_INV_CONN_M 0x8
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_INV_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_IDAC_L_INV_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_INV_CONN_S 2
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_INV_CONN_M 0x4
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_INV_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_LINE_R_CDAC_L_INV_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_LINE_MONO_CONN_AUXPGA_R_VCM_ADD_CURR_S 0
-#define TIMPANI_PA_LINE_MONO_CONN_AUXPGA_R_VCM_ADD_CURR_M 0x3
-#define TIMPANI_PA_LINE_MONO_CONN_AUXPGA_R_VCM_ADD_CURR_NONE 0x0
-#define TIMPANI_PA_LINE_MONO_CONN_AUXPGA_R_VCM_ADD_CURR_V_1_25UA 0x1
-#define TIMPANI_PA_LINE_MONO_CONN_AUXPGA_R_VCM_ADD_CURR_V_2_5UA 0x2
-#define TIMPANI_PA_LINE_MONO_CONN_AUXPGA_R_VCM_ADD_CURR_V_3_75UA 0x3
-
-
-/* -- For PA_HPH_ST_CONN */
-#define TIMPANI_A_PA_HPH_ST_CONN (0x3C)
-#define TIMPANI_PA_HPH_ST_CONN_RWC "RW"
-#define TIMPANI_PA_HPH_ST_CONN_POR 0
-#define TIMPANI_PA_HPH_ST_CONN_S 0
-#define TIMPANI_PA_HPH_ST_CONN_M 0xFF
-
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_AUXPGA_L_CONN_S 7
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_AUXPGA_L_CONN_M 0x80
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_IDAC_L_CONN_S 6
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_IDAC_L_CONN_M 0x40
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_IDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_IDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_CDAC_L_CONN_S 5
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_CDAC_L_CONN_M 0x20
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_CDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_AUXPGA_R_CONN_S 4
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_AUXPGA_R_CONN_M 0x10
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_AUXPGA_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_AUXPGA_R_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_IDAC_R_CONN_S 3
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_IDAC_R_CONN_M 0x8
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_IDAC_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_IDAC_R_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_CDAC_R_CONN_S 2
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_CDAC_R_CONN_M 0x4
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_CDAC_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_CDAC_R_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_RAMP_GEN_EN_S 1
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_RAMP_GEN_EN_M 0x2
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_RAMP_GEN_EN_DISABLE 0x1
-#define TIMPANI_PA_HPH_ST_CONN_HPH_L_RAMP_GEN_EN_ENABLE 0x0
-
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_RAMP_GEN_EN_S 0
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_RAMP_GEN_EN_M 0x1
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_RAMP_GEN_EN_DISABLE 0x1
-#define TIMPANI_PA_HPH_ST_CONN_HPH_R_RAMP_GEN_EN_ENABLE 0x0
-
-
-/* -- For PA_HPH_MONO_CONN */
-#define TIMPANI_A_PA_HPH_MONO_CONN (0x3D)
-#define TIMPANI_PA_HPH_MONO_CONN_RWC "RW"
-#define TIMPANI_PA_HPH_MONO_CONN_POR 0
-#define TIMPANI_PA_HPH_MONO_CONN_S 0
-#define TIMPANI_PA_HPH_MONO_CONN_M 0xFF
-
-
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_CONN_S 7
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_CONN_M 0x80
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_CONN_S 6
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_CONN_M 0x40
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_CONN_S 5
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_CONN_M 0x20
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_INV_CONN_S 4
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_INV_CONN_M 0x10
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_INV_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_AUXPGA_L_INV_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_INV_CONN_S 3
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_INV_CONN_M 0x8
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_INV_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_IDAC_L_INV_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_INV_CONN_S 2
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_INV_CONN_M 0x4
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_INV_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_HPH_MONO_CONN_HPH_R_CDAC_L_INV_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_HPH_MONO_CONN_RESERVED_S 0
-#define TIMPANI_PA_HPH_MONO_CONN_RESERVED_M 0x3
-
-
-/* -- For PA_CLASSD_CONN */
-#define TIMPANI_A_PA_CLASSD_CONN (0x3E)
-#define TIMPANI_PA_CLASSD_CONN_RWC "RW"
-#define TIMPANI_PA_CLASSD_CONN_POR 0
-#define TIMPANI_PA_CLASSD_CONN_S 0
-#define TIMPANI_PA_CLASSD_CONN_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_CDAC_CONN_S 7
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_CDAC_CONN_M 0x80
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_CDAC_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_CDAC_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_IDAC_CONN_S 6
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_IDAC_CONN_M 0x40
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_IDAC_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_IDAC_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_AUXPGA_CONN_S 5
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_AUXPGA_CONN_M 0x20
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_AUXPGA_CONN_NO_CONNECT 0x0
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_AUXPGA_CONN_CONNECT 0x1
-
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_PA_MODE_S 4
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_PA_MODE_M 0x10
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_PA_MODE_MONO_DIFF 0x1
-#define TIMPANI_PA_CLASSD_CONN_CLASSD_PA_MODE_STEREO 0x0
-
-#define TIMPANI_PA_CLASSD_CONN_RESERVED_S 0
-#define TIMPANI_PA_CLASSD_CONN_RESERVED_M 0xF
-
-
-/* -- For PA_CNP_CTL */
-#define TIMPANI_A_PA_CNP_CTL (0x3F)
-#define TIMPANI_PA_CNP_CTL_RWC "RW"
-#define TIMPANI_PA_CNP_CTL_POR 0x07
-#define TIMPANI_PA_CNP_CTL_S 0
-#define TIMPANI_PA_CNP_CTL_M 0xFF
-
-
-#define TIMPANI_PA_CNP_CTL_CNP_RAMP_GEN_CURRENT_S 6
-#define TIMPANI_PA_CNP_CTL_CNP_RAMP_GEN_CURRENT_M 0xC0
-#define TIMPANI_PA_CNP_CTL_CNP_RAMP_GEN_CURRENT_V_1_75_NA 0x0
-#define TIMPANI_PA_CNP_CTL_CNP_RAMP_GEN_CURRENT_V_3_5_NA_NORMAL_OP 0x1
-#define TIMPANI_PA_CNP_CTL_CNP_RAMP_GEN_CURRENT_V_5_25_NA 0x2
-#define TIMPANI_PA_CNP_CTL_CNP_RAMP_GEN_CURRENT_V_10_NA 0x3
-
-#define TIMPANI_PA_CNP_CTL_RESERVED_S 4
-#define TIMPANI_PA_CNP_CTL_RESERVED_M 0x30
-
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_CIRCUIT_EN_S 3
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_CIRCUIT_EN_M 0x8
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_CIRCUIT_EN_DISABLE 0x0
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_CIRCUIT_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_S 0
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_M 0x7
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_220_V 0x0
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_243_V 0x1
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_266_V 0x2
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_290_V 0x3
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_341_V 0x4
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_339_V 0x5
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_365_V 0x6
-#define TIMPANI_PA_CNP_CTL_CLASSD_SUPPLY_DUMP_THRESH_V_2_391_V 0x7
-
-
-/* -- For PA_CLASSD_L_CTL */
-#define TIMPANI_A_PA_CLASSD_L_CTL (0x40)
-#define TIMPANI_PA_CLASSD_L_CTL_RWC "RW"
-#define TIMPANI_PA_CLASSD_L_CTL_POR 0x08
-#define TIMPANI_PA_CLASSD_L_CTL_S 0
-#define TIMPANI_PA_CLASSD_L_CTL_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_L_CTL_RESERVED_S 6
-#define TIMPANI_PA_CLASSD_L_CTL_RESERVED_M 0xC0
-
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_LOGIC_RESET_S 5
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_LOGIC_RESET_M 0x20
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_LOGIC_RESET_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_LOGIC_RESET_RESET_PA_LOGIC 0x1
-
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_INT_RESET_S 4
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_INT_RESET_M 0x10
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_INT_RESET_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_INT_RESET_DISCHARGE_CAPS 0x1
-
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_REF_SEL_S 2
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_REF_SEL_M 0xC
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_REF_SEL_GND 0x0
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_REF_SEL_IBIAS_X_R_REF 0x1
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_REF_SEL_BG_VOLTAGE 0x2
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_REF_SEL_VDD_BY_2 0x3
-
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_1_S 1
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_1_M 0x2
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_1_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_1_PA_OUT_TO_VDD 0x1
-
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_0_S 0
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_0_M 0x1
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_0_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_L_CTL_CLASSD_L_PA_FORCE_0_PA_OUT_TO_GND 0x1
-
-
-/* -- For PA_CLASSD_R_CTL */
-#define TIMPANI_A_PA_CLASSD_R_CTL (0x41)
-#define TIMPANI_PA_CLASSD_R_CTL_RWC "RW"
-#define TIMPANI_PA_CLASSD_R_CTL_POR 0x08
-#define TIMPANI_PA_CLASSD_R_CTL_S 0
-#define TIMPANI_PA_CLASSD_R_CTL_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_R_CTL_RESERVED_S 6
-#define TIMPANI_PA_CLASSD_R_CTL_RESERVED_M 0xC0
-
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_LOGIC_RESET_S 5
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_LOGIC_RESET_M 0x20
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_LOGIC_RESET_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_LOGIC_RESET_RESET_PA_LOGIC 0x1
-
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_INT_RESET_S 4
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_INT_RESET_M 0x10
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_INT_RESET_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_INT_RESET_DISCHARGE_CAPS 0x1
-
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_REF_SEL_S 2
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_REF_SEL_M 0xC
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_REF_SEL_GND 0x0
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_REF_SEL_IBIAS_X_R_REF 0x1
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_REF_SEL_BG_VOLTAGE 0x2
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_REF_SEL_VDD_BY_2 0x3
-
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_1_S 1
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_1_M 0x2
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_1_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_1_PA_OUT_TO_VDD 0x1
-
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_0_S 0
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_0_M 0x1
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_0_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_R_CTL_CLASSD_R_PA_FORCE_0_PA_OUT_TO_GND 0x1
-
-
-/* -- For PA_CLASSD_INT2_CTL */
-#define TIMPANI_A_PA_CLASSD_INT2_CTL (0x42)
-#define TIMPANI_PA_CLASSD_INT2_CTL_RWC "RW"
-#define TIMPANI_PA_CLASSD_INT2_CTL_POR 0xb0
-#define TIMPANI_PA_CLASSD_INT2_CTL_S 0
-#define TIMPANI_PA_CLASSD_INT2_CTL_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_CFB_S 6
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_CFB_M 0xC0
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_CFB_V_5_0PF 0x0
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_CFB_V_7_5PF 0x1
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_CFB_V_10PF 0x2
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_CFB_V_15PF 0x3
-
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_RIN_S 4
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_RIN_M 0x30
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_RIN_V_100K 0x0
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_RIN_V_150K 0x1
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_RIN_V_175K 0x2
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_L_INT2_RIN_V_200K 0x3
-
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_CFB_S 2
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_CFB_M 0xC
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_CFB_V_5_0PF 0x0
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_CFB_V_7_5PF 0x1
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_CFB_V_10PF 0x2
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_CFB_V_15PF 0x3
-
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_RIN_S 0
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_RIN_M 0x3
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_RIN_V_100K 0x0
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_RIN_V_150K 0x1
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_RIN_V_175K 0x2
-#define TIMPANI_PA_CLASSD_INT2_CTL_CLASSD_R_INT2_RIN_V_200K 0x3
-
-
-/* -- For PA_HPH_L_OCP_CLK_CTL */
-#define TIMPANI_A_PA_HPH_L_OCP_CLK_CTL (0x43)
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_RWC "RW"
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_POR 0xf2
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_S 0
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_M 0xFF
-
-
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_DIV_2_EN_S 7
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_DIV_2_EN_M 0x80
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_DIV_2_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_DIV_2_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_EN_S 6
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_EN_M 0x40
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_RATIO_S 4
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_RATIO_M 0x30
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_RATIO_DIV2 0x0
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_RATIO_DIV4 0x1
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_RATIO_DIV6 0x2
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CARRIER_PROG_DIV_RATIO_DIV8 0x3
-
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CLK_SEL_LEFT_S 3
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CLK_SEL_LEFT_M 0x8
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CLK_SEL_LEFT_CLK_FROM_CH_2 0x1
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_CLK_SEL_LEFT_CLK_FROM_CH_1 0x0
-
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_2_EN_S 2
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_2_EN_M 0x4
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_2_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_2_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_RATIO_S 0
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_RATIO_M 0x3
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_RATIO_DIV_BY_4 0x0
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_RATIO_DIV_BY_8 0x1
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_RATIO_DIV_BY_12 0x2
-#define TIMPANI_PA_HPH_L_OCP_CLK_CTL_HPH_L_OCP_TIMER_DIV_RATIO_DIV_BY_16 0x3
-
-
-/* -- For PA_CLASSD_L_SW_CTL */
-#define TIMPANI_A_PA_CLASSD_L_SW_CTL (0x44)
-#define TIMPANI_PA_CLASSD_L_SW_CTL_RWC "RW"
-#define TIMPANI_PA_CLASSD_L_SW_CTL_POR 0x37
-#define TIMPANI_PA_CLASSD_L_SW_CTL_S 0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_BREAK_BEFORE_MAKE_DELAY_S 6
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_BREAK_BEFORE_MAKE_DELAY_M 0xC0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_BREAK_BEFORE_MAKE_DELAY_V_1 0x0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_BREAK_BEFORE_MAKE_DELAY_V_2 0x1
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_BREAK_BEFORE_MAKE_DELAY_V_3 0x2
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_BREAK_BEFORE_MAKE_DELAY_V_4 0x3
-
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_OUT_DRIVE_STREN_S 4
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_OUT_DRIVE_STREN_M 0x30
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_OUT_DRIVE_STREN_V_3_OF_6_UNITS 0x0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_OUT_DRIVE_STREN_V_4_OF_6_UNITS 0x1
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_OUT_DRIVE_STREN_V_5_OF_6_UNITS 0x2
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_OUT_DRIVE_STREN_V_6_OF_6_UNITS 0x3
-
-#define TIMPANI_PA_CLASSD_L_SW_CTL_RESERVED_S 3
-#define TIMPANI_PA_CLASSD_L_SW_CTL_RESERVED_M 0x8
-
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_BYPASS_CAP_EN_S 2
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_BYPASS_CAP_EN_M 0x4
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_BYPASS_CAP_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_BYPASS_CAP_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_NON_OVERLAP_EN_S 1
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_NON_OVERLAP_EN_M 0x2
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_NON_OVERLAP_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_NON_OVERLAP_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_SWITCH_MODE_S 0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_SWITCH_MODE_M 0x1
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_SWITCH_MODE_POWER_GROUND 0x0
-#define TIMPANI_PA_CLASSD_L_SW_CTL_CLASSD_L_CDAC_SWITCH_MODE_RST_MIDPOINT 0x1
-
-/* -- For PA_CLASSD_L_OCP1 */
-#define TIMPANI_A_PA_CLASSD_L_OCP1 (0x45)
-#define TIMPANI_PA_CLASSD_L_OCP1_RWC "RW"
-#define TIMPANI_PA_CLASSD_L_OCP1_POR 0xff
-#define TIMPANI_PA_CLASSD_L_OCP1_S 0
-#define TIMPANI_PA_CLASSD_L_OCP1_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_EN_S 7
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_EN_M 0x80
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_LOCK_S 6
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_LOCK_M 0x40
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_LOCK_NEVER_LOCKS 0x0
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_LOCK_LOCKS 0x1
-
-#define TIMPANI_PA_CLASSD_L_OCP1_OCP_CUR_THRESH_S 4
-#define TIMPANI_PA_CLASSD_L_OCP1_OCP_CUR_THRESH_M 0x30
-#define TIMPANI_PA_CLASSD_L_OCP1_OCP_CUR_THRESH_V_100MA_83_3MA_66_7MA_50MA 0x0
-#define TIMPANI_PA_CLASSD_L_OCP1_OCP_CUR_THRESH_V_133MA_111MA_88_7MA_66_7MA 0x1
-#define TIMPANI_PA_CLASSD_L_OCP1_OCP_CUR_THRESH_V_166MA_138MA_111MA_83_3MA 0x2
-#define TIMPANI_PA_CLASSD_L_OCP1_OCP_CUR_THRESH_V_200MA_166MA_133MA_100MA 0x3
-
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_S 0
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_M 0xF
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_1 0x1
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_2 0x2
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_3 0x3
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_4 0x4
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_5 0x5
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_6 0x6
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_7 0x7
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_8 0x8
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_9 0x9
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_10 0xA
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_11 0xB
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_12 0xC
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_13 0xD
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_14 0xE
-#define TIMPANI_PA_CLASSD_L_OCP1_CLASSD_L_OCP_NUM_CONN_ATTEMPTS_V_15 0xF
-
-/* -- For PA_CLASSD_L_OCP2 */
-#define TIMPANI_A_PA_CLASSD_L_OCP2 (0x46)
-#define TIMPANI_PA_CLASSD_L_OCP2_RWC "RW"
-#define TIMPANI_PA_CLASSD_L_OCP2_POR 0x77
-#define TIMPANI_PA_CLASSD_L_OCP2_S 0
-#define TIMPANI_PA_CLASSD_L_OCP2_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_S 4
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_M 0xF0
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_255 0x0
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_511 0x1
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_767 0x2
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_1023 0x3
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_1279 0x4
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_1535 0x5
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_1791 0x6
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_2047 0x7
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_2303 0x8
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_2559 0x9
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_2815 0xA
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_3071 0xB
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_3327 0xC
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_3583 0xD
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_3839 0xE
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_WAIT_CNT_V_4095 0xF
-
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_S 0
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_M 0xF
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_255 0x0
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_511 0x1
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_767 0x2
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_1023 0x3
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_1279 0x4
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_1535 0x5
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_1791 0x6
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_2047 0x7
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_2303 0x8
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_2559 0x9
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_2815 0xA
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_3071 0xB
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_3327 0xC
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_3583 0xD
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_3839 0xE
-#define TIMPANI_PA_CLASSD_L_OCP2_CLASSD_L_OCP_OCP_RUN_CNT_V_4095 0xF
-
-
-/* -- For PA_HPH_R_OCP_CLK_CTL */
-#define TIMPANI_A_PA_HPH_R_OCP_CLK_CTL (0x47)
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_RWC "RW"
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_POR 0xf2
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_S 0
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_M 0xFF
-
-
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_DIV_2_EN_S 7
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_DIV_2_EN_M 0x80
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_DIV_2_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_DIV_2_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_EN_S 6
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_EN_M 0x40
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_RATIO_S 4
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_RATIO_M 0x30
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_RATIO_DIV2 0x0
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_RATIO_DIV4 0x1
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_RATIO_DIV6 0x2
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CARRIER_PROG_DIV_RATIO_DIV8 0x3
-
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CLK_SEL_RIGHT_S 3
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CLK_SEL_RIGHT_M 0x8
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CLK_SEL_RIGHT_CLK_FROM_CH_2 0x1
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_CLK_SEL_RIGHT_CLK_FROM_CH_1 0x0
-
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_2_EN_S 2
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_2_EN_M 0x4
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_2_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_2_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_RATIO_S 0
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_RATIO_M 0x3
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_RATIO_DIV_BY_4 0x0
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_RATIO_DIV_BY_8 0x1
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_RATIO_DIV_BY_12 0x2
-#define TIMPANI_PA_HPH_R_OCP_CLK_CTL_HPH_R_OCP_TIMER_DIV_RATIO_DIV_BY_16 0x3
-
-
-/* -- For PA_CLASSD_R_SW_CTL */
-#define TIMPANI_A_PA_CLASSD_R_SW_CTL (0x48)
-#define TIMPANI_PA_CLASSD_R_SW_CTL_RWC "RW"
-#define TIMPANI_PA_CLASSD_R_SW_CTL_POR 0x37
-#define TIMPANI_PA_CLASSD_R_SW_CTL_S 0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_BREAK_BEFORE_MAKE_DELAY_S 6
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_BREAK_BEFORE_MAKE_DELAY_M 0xC0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_BREAK_BEFORE_MAKE_DELAY_V_1 0x0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_BREAK_BEFORE_MAKE_DELAY_V_2 0x1
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_BREAK_BEFORE_MAKE_DELAY_V_3 0x2
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_BREAK_BEFORE_MAKE_DELAY_V_4 0x3
-
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_OUT_DRIVE_STREN_S 4
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_OUT_DRIVE_STREN_M 0x30
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_OUT_DRIVE_STREN_V_3_OF_6_UNITS 0x0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_OUT_DRIVE_STREN_V_4_OF_6_UNITS 0x1
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_OUT_DRIVE_STREN_V_5_OF_6_UNITS 0x2
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_OUT_DRIVE_STREN_V_6_OF_6_UNITS 0x3
-
-#define TIMPANI_PA_CLASSD_R_SW_CTL_RESERVED_S 3
-#define TIMPANI_PA_CLASSD_R_SW_CTL_RESERVED_M 0x8
-
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_BYPASS_CAP_EN_S 2
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_BYPASS_CAP_EN_M 0x4
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_BYPASS_CAP_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_BYPASS_CAP_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_NON_OVERLAP_EN_S 1
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_NON_OVERLAP_EN_M 0x2
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_NON_OVERLAP_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_NON_OVERLAP_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_SWITCH_MODE_S 0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_SWITCH_MODE_M 0x1
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_SWITCH_MODE_POWER_GROUND 0x0
-#define TIMPANI_PA_CLASSD_R_SW_CTL_CLASSD_R_CDAC_SWITCH_MODE_RST_MIDPOINT 0x1
-
-
-/* -- For PA_CLASSD_R_OCP1 */
-#define TIMPANI_A_PA_CLASSD_R_OCP1 (0x49)
-#define TIMPANI_PA_CLASSD_R_OCP1_RWC "RW"
-#define TIMPANI_PA_CLASSD_R_OCP1_POR 0xff
-#define TIMPANI_PA_CLASSD_R_OCP1_S 0
-#define TIMPANI_PA_CLASSD_R_OCP1_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_EN_S 7
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_EN_M 0x80
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_EN_DISABLE 0x0
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_EN_ENABLE 0x1
-
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_LOCK_S 6
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_LOCK_M 0x40
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_LOCK_NEVER_LOCKS 0x0
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_LOCK_LOCKS 0x1
-
-#define TIMPANI_PA_CLASSD_R_OCP1_OCP_CUR_THRESH_S 4
-#define TIMPANI_PA_CLASSD_R_OCP1_OCP_CUR_THRESH_M 0x30
-#define TIMPANI_PA_CLASSD_R_OCP1_OCP_CUR_THRESH_V_100MA_83_3MA_66_7MA_50MA 0x0
-#define TIMPANI_PA_CLASSD_R_OCP1_OCP_CUR_THRESH_V_133MA_111MA_88_7MA_66_7MA 0x1
-#define TIMPANI_PA_CLASSD_R_OCP1_OCP_CUR_THRESH_V_166MA_138MA_111MA_83_3MA 0x2
-#define TIMPANI_PA_CLASSD_R_OCP1_OCP_CUR_THRESH_V_200MA_166MA_133MA_100MA 0x3
-
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_S 0
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_M 0xF
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_1 0x1
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_2 0x2
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_3 0x3
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_4 0x4
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_5 0x5
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_6 0x6
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_7 0x7
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_8 0x8
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_9 0x9
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_10 0xA
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_11 0xB
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_12 0xC
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_13 0xD
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_14 0xE
-#define TIMPANI_PA_CLASSD_R_OCP1_CLASSD_R_OCP_NUM_CONN_ATTEMPTS_V_15 0xF
-
-
-/* -- For PA_CLASSD_R_OCP2 */
-#define TIMPANI_A_PA_CLASSD_R_OCP2 (0x4A)
-#define TIMPANI_PA_CLASSD_R_OCP2_RWC "RW"
-#define TIMPANI_PA_CLASSD_R_OCP2_POR 0x77
-#define TIMPANI_PA_CLASSD_R_OCP2_S 0
-#define TIMPANI_PA_CLASSD_R_OCP2_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_S 4
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_M 0xF0
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_255 0x0
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_511 0x1
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_767 0x2
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_1023 0x3
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_1279 0x4
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_1535 0x5
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_1791 0x6
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_2047 0x7
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_2303 0x8
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_2559 0x9
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_2815 0xA
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_3071 0xB
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_3327 0xC
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_3583 0xD
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_3839 0xE
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_WAIT_CNT_V_4095 0xF
-
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_S 0
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_M 0xF
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_255 0x0
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_511 0x1
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_767 0x2
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_1023 0x3
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_1279 0x4
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_1535 0x5
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_1791 0x6
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_2047 0x7
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_2303 0x8
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_2559 0x9
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_2815 0xA
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_3071 0xB
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_3327 0xC
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_3583 0xD
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_3839 0xE
-#define TIMPANI_PA_CLASSD_R_OCP2_CLASSD_R_OCP_OCP_RUN_CNT_V_4095 0xF
-
-
-/* -- For PA_HPH_CTL1 */
-#define TIMPANI_A_PA_HPH_CTL1 (0x4B)
-#define TIMPANI_PA_HPH_CTL1_RWC "RW"
-#define TIMPANI_PA_HPH_CTL1_POR 0x44
-#define TIMPANI_PA_HPH_CTL1_S 0
-#define TIMPANI_PA_HPH_CTL1_M 0xFF
-
-
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_S 4
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_M 0xF0
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_400PER 0x1
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_200PER 0x2
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_133PER 0x3
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_100PER 0x4
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_66PER 0x6
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_50PER 0x8
-#define TIMPANI_PA_HPH_CTL1_HPH_GM3_BIAS_V_33PER 0xC
-
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_DET_EN_S 3
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_DET_EN_M 0x8
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_DET_EN_DISABLE 0x0
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_DET_EN_ENABLE 0x1
-
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_S 0
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_M 0x7
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_V_300MA 0x0
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_V_350MA 0x2
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_V_365MA 0x3
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_V_150MA 0x4
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_V_190MA 0x6
-#define TIMPANI_PA_HPH_CTL1_HPH_SHORT_CIRCUIT_CUR_LIMIT_V_220MA 0x7
-
-
-/* -- For PA_HPH_CTL2 */
-#define TIMPANI_A_PA_HPH_CTL2 (0x4C)
-#define TIMPANI_PA_HPH_CTL2_RWC "RW"
-#define TIMPANI_PA_HPH_CTL2_POR 0xC8
-#define TIMPANI_PA_HPH_CTL2_S 0
-#define TIMPANI_PA_HPH_CTL2_M 0xFF
-
-
-#define TIMPANI_PA_HPH_CTL2_HPH_SW_VNEG_CTL_S 7
-#define TIMPANI_PA_HPH_CTL2_HPH_SW_VNEG_CTL_M 0x80
-#define TIMPANI_PA_HPH_CTL2_HPH_SW_VNEG_CTL_VNEG 0x1
-#define TIMPANI_PA_HPH_CTL2_HPH_SW_VNEG_CTL_VSS 0x0
-
-#define TIMPANI_PA_HPH_CTL2_HPH_VNEG_PS_GAIN_S 6
-#define TIMPANI_PA_HPH_CTL2_HPH_VNEG_PS_GAIN_M 0x40
-#define TIMPANI_PA_HPH_CTL2_HPH_VNEG_PS_GAIN_V_1_5 0x1
-#define TIMPANI_PA_HPH_CTL2_HPH_VNEG_PS_GAIN_V_2_5 0x0
-
-#define TIMPANI_PA_HPH_CTL2_HPH_PS_FILTER_EN_S 5
-#define TIMPANI_PA_HPH_CTL2_HPH_PS_FILTER_EN_M 0x20
-#define TIMPANI_PA_HPH_CTL2_HPH_PS_FILTER_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_CTL2_HPH_PS_FILTER_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_CTL2_HPH_OCP_EN_S 4
-#define TIMPANI_PA_HPH_CTL2_HPH_OCP_EN_M 0x10
-#define TIMPANI_PA_HPH_CTL2_HPH_OCP_EN_ENABLE 0x1
-#define TIMPANI_PA_HPH_CTL2_HPH_OCP_EN_DISABLE 0x0
-
-#define TIMPANI_PA_HPH_CTL2_HPH_VREF_SEL_S 2
-#define TIMPANI_PA_HPH_CTL2_HPH_VREF_SEL_M 0xC
-#define TIMPANI_PA_HPH_CTL2_HPH_VREF_SEL_GROUND 0x0
-#define TIMPANI_PA_HPH_CTL2_HPH_VREF_SEL_IBIAS_ON_RESISTOR 0x1
-#define TIMPANI_PA_HPH_CTL2_HPH_VREF_SEL_BG 0x2
-#define TIMPANI_PA_HPH_CTL2_HPH_VREF_SEL_AVDD_BY_2 0x3
-
-#define TIMPANI_PA_HPH_CTL2_HPH_OUT_SHUNT_EN_S 1
-#define TIMPANI_PA_HPH_CTL2_HPH_OUT_SHUNT_EN_M 0x2
-#define TIMPANI_PA_HPH_CTL2_HPH_OUT_SHUNT_EN_DISABLE 0x0
-#define TIMPANI_PA_HPH_CTL2_HPH_OUT_SHUNT_EN_ENABLE 0x1
-
-#define TIMPANI_PA_HPH_CTL2_RESERVED_S 0
-#define TIMPANI_PA_HPH_CTL2_RESERVED_M 0x1
-
-
-/* -- For PA_LINE_AUXO_CTL */
-#define TIMPANI_A_PA_LINE_AUXO_CTL (0x4D)
-#define TIMPANI_PA_LINE_AUXO_CTL_RWC "RW"
-#define TIMPANI_PA_LINE_AUXO_CTL_POR 0x2
-#define TIMPANI_PA_LINE_AUXO_CTL_S 0
-#define TIMPANI_PA_LINE_AUXO_CTL_M 0xFF
-
-
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_RAMPGEN_CNT_S 6
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_RAMPGEN_CNT_M 0xC0
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_RAMPGEN_CNT_V_1_75NA 0x0
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_RAMPGEN_CNT_V_3_5NA 0x1
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_RAMPGEN_CNT_V_5_25NA 0x2
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_RAMPGEN_CNT_V_10NA 0x3
-
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_L_BIAS_CUR_S 4
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_L_BIAS_CUR_M 0x30
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_L_BIAS_CUR_V_60UA 0x0
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_L_BIAS_CUR_V_30UA_1 0x1
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_L_BIAS_CUR_V_30UA_2 0x2
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_L_BIAS_CUR_V_15UA 0x3
-
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_R_BIAS_CUR_S 2
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_R_BIAS_CUR_M 0xC
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_R_BIAS_CUR_V_60UA 0x0
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_R_BIAS_CUR_V_30UA_1 0x1
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_R_BIAS_CUR_V_30UA_2 0x2
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_R_BIAS_CUR_V_15UA 0x3
-
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_CM_REF_SEL_S 0
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_CM_REF_SEL_M 0x3
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_CM_REF_SEL_VSSA 0x0
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_CM_REF_SEL_BG 0x2
-#define TIMPANI_PA_LINE_AUXO_CTL_LINEO_AUXO_CM_REF_SEL_VDDA_BY_2 0x3
-
-
-/* -- For PA_AUXO_EARPA_CTL */
-#define TIMPANI_A_PA_AUXO_EARPA_CTL (0x4E)
-#define TIMPANI_PA_AUXO_EARPA_CTL_RWC "RW"
-#define TIMPANI_PA_AUXO_EARPA_CTL_POR 0xe
-#define TIMPANI_PA_AUXO_EARPA_CTL_S 0
-#define TIMPANI_PA_AUXO_EARPA_CTL_M 0xFF
-
-
-#define TIMPANI_PA_AUXO_EARPA_CTL_RESERVED_S 6
-#define TIMPANI_PA_AUXO_EARPA_CTL_RESERVED_M 0xC0
-
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_BIAS_CUR_S 4
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_BIAS_CUR_M 0x30
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_BIAS_CUR_V_60UA 0x0
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_BIAS_CUR_V_30UA 0x1
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_BIAS_CUR_V_30UA_SAME_AS_01 0x2
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_BIAS_CUR_V_15UA 0x3
-
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_GAIN_S 3
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_GAIN_M 0x8
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_GAIN_NEG_4_5DB 0x1
-#define TIMPANI_PA_AUXO_EARPA_CTL_AUXO_GAIN_NEG_3_0DB 0x0
-
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_MASTER_BIAS_CUR_S 1
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_MASTER_BIAS_CUR_M 0x6
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_MASTER_BIAS_CUR_V_12_5UA 0x0
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_MASTER_BIAS_CUR_V_10_0UA 0x1
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_MASTER_BIAS_CUR_V_7_5UA 0x2
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_MASTER_BIAS_CUR_V_5_0UA 0x3
-
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_VCM_SOURCE_S 0
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_VCM_SOURCE_M 0x1
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_VCM_SOURCE_BG 0x1
-#define TIMPANI_PA_AUXO_EARPA_CTL_EARPA_VCM_SOURCE_LOCAL_VCM 0x0
-
-
-/* -- For PA_EARO_CTL */
-#define TIMPANI_A_PA_EARO_CTL (0x4F)
-#define TIMPANI_PA_EARO_CTL_RWC "RW"
-#define TIMPANI_PA_EARO_CTL_POR 0x0
-#define TIMPANI_PA_EARO_CTL_S 0
-#define TIMPANI_PA_EARO_CTL_M 0xFF
-
-
-#define TIMPANI_PA_EARO_CTL_EARPA_STARTUP_S 7
-#define TIMPANI_PA_EARO_CTL_EARPA_STARTUP_M 0x80
-#define TIMPANI_PA_EARO_CTL_EARPA_STARTUP_NORMAL_OP 0x0
-#define TIMPANI_PA_EARO_CTL_EARPA_STARTUP_CONNECT_INPUTS_TO_GROUND 0x1
-
-#define TIMPANI_PA_EARO_CTL_EARPA_BYPASS_INPUT_CM_S 6
-#define TIMPANI_PA_EARO_CTL_EARPA_BYPASS_INPUT_CM_M 0x40
-#define TIMPANI_PA_EARO_CTL_EARPA_BYPASS_INPUT_CM_NO_BYPASS 0x0
-#define TIMPANI_PA_EARO_CTL_EARPA_BYPASS_INPUT_CM_BYPASS 0x1
-
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_S 3
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_M 0x38
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_213UA 0x0
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_280UA 0x1
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_408UA_1 0x2
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_780UA_1 0x3
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_408UA_2 0x4
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_530UA 0x5
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_780UA_2 0x6
-#define TIMPANI_PA_EARO_CTL_EARPA_NMOS_BIAS_CUR_V_1480UA 0x7
-
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_S 0
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_M 0x7
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_213UA 0x0
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_280UA 0x1
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_408UA_1 0x2
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_780UA_1 0x3
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_408UA_2 0x4
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_530UA 0x5
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_780UA_2 0x6
-#define TIMPANI_PA_EARO_CTL_EARPA_PMOS_BIAS_CUR_V_1480UA 0x7
-
-
-/* -- For PA_MASTER_BIAS_CUR */
-#define TIMPANI_A_PA_MASTER_BIAS_CUR (0x50)
-#define TIMPANI_PA_MASTER_BIAS_CUR_RWC "RW"
-#define TIMPANI_PA_MASTER_BIAS_CUR_POR 0xea
-#define TIMPANI_PA_MASTER_BIAS_CUR_S 0
-#define TIMPANI_PA_MASTER_BIAS_CUR_M 0xFF
-
-
-#define TIMPANI_PA_MASTER_BIAS_CUR_RAMPGEN_MASTER_BIAS_CUR_S 7
-#define TIMPANI_PA_MASTER_BIAS_CUR_RAMPGEN_MASTER_BIAS_CUR_M 0x80
-#define TIMPANI_PA_MASTER_BIAS_CUR_RAMPGEN_MASTER_BIAS_CUR_V_2_5UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_CUR_RAMPGEN_MASTER_BIAS_CUR_V_5UA 0x0
-
-#define TIMPANI_PA_MASTER_BIAS_CUR_AUXPGA_BIAS_CUR_S 5
-#define TIMPANI_PA_MASTER_BIAS_CUR_AUXPGA_BIAS_CUR_M 0x60
-#define TIMPANI_PA_MASTER_BIAS_CUR_AUXPGA_BIAS_CUR_V_10UA 0x0
-#define TIMPANI_PA_MASTER_BIAS_CUR_AUXPGA_BIAS_CUR_V_7_5UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_CUR_AUXPGA_BIAS_CUR_V_5_0UA 0x2
-#define TIMPANI_PA_MASTER_BIAS_CUR_AUXPGA_BIAS_CUR_V_2_5UA 0x3
-
-#define TIMPANI_PA_MASTER_BIAS_CUR_HPH_VCM_BUFF_BIAS_CURR_S 3
-#define TIMPANI_PA_MASTER_BIAS_CUR_HPH_VCM_BUFF_BIAS_CURR_M 0x18
-#define TIMPANI_PA_MASTER_BIAS_CUR_HPH_VCM_BUFF_BIAS_CURR_V_6_25UA 0x0
-#define TIMPANI_PA_MASTER_BIAS_CUR_HPH_VCM_BUFF_BIAS_CURR_V_5_0UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_CUR_HPH_VCM_BUFF_BIAS_CURR_V_3_75UA 0x2
-#define TIMPANI_PA_MASTER_BIAS_CUR_HPH_VCM_BUFF_BIAS_CURR_V_2_5UA 0x3
-
-#define TIMPANI_PA_MASTER_BIAS_CUR_LINE_VCM_BUFF_BIAS_CURR_S 1
-#define TIMPANI_PA_MASTER_BIAS_CUR_LINE_VCM_BUFF_BIAS_CURR_M 0x6
-#define TIMPANI_PA_MASTER_BIAS_CUR_LINE_VCM_BUFF_BIAS_CURR_V_6_25UA 0x0
-#define TIMPANI_PA_MASTER_BIAS_CUR_LINE_VCM_BUFF_BIAS_CURR_V_5_0UA 0x1
-#define TIMPANI_PA_MASTER_BIAS_CUR_LINE_VCM_BUFF_BIAS_CURR_V_3_75UA 0x2
-#define TIMPANI_PA_MASTER_BIAS_CUR_LINE_VCM_BUFF_BIAS_CURR_V_2_5UA 0x3
-
-#define TIMPANI_PA_MASTER_BIAS_CUR_RESERVED_S 0
-#define TIMPANI_PA_MASTER_BIAS_CUR_RESERVED_M 0x1
-
-
-/* -- For PA_CLASSD_SC_STATUS */
-#define TIMPANI_A_PA_CLASSD_SC_STATUS (0x51)
-#define TIMPANI_PA_CLASSD_SC_STATUS_RWC "R"
-#define TIMPANI_PA_CLASSD_SC_STATUS_POR 0
-#define TIMPANI_PA_CLASSD_SC_STATUS_S 0
-#define TIMPANI_PA_CLASSD_SC_STATUS_M 0xFF
-
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_SC_DET_S 7
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_SC_DET_M 0x80
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_SC_DET_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_SC_DET_SC_DET 0x1
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_PWR_STAGE_HI_Z_S 6
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_PWR_STAGE_HI_Z_M 0x40
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_PWR_STAGE_HI_Z_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_L_PWR_STAGE_HI_Z_POWER_STAGE_OFF 0x1
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_RESERVED_1_S 4
-#define TIMPANI_PA_CLASSD_SC_STATUS_RESERVED_1_M 0x30
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_SC_DET_S 3
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_SC_DET_M 0x8
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_SC_DET_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_SC_DET_SC_DET 0x1
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_PWR_STAGE_HI_Z_S 2
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_PWR_STAGE_HI_Z_M 0x4
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_PWR_STAGE_HI_Z_NORMAL_OP 0x0
-#define TIMPANI_PA_CLASSD_SC_STATUS_CLASSD_R_PWR_STAGE_HI_Z_POWER_STAGE_OFF 0x1
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_RESERVED_2_S 1
-#define TIMPANI_PA_CLASSD_SC_STATUS_RESERVED_2_M 0x2
-
-#define TIMPANI_PA_CLASSD_SC_STATUS_RESERVED_S 0
-#define TIMPANI_PA_CLASSD_SC_STATUS_RESERVED_M 0x1
-
-
-/* -- For PA_HPH_SC_STATUS */
-#define TIMPANI_A_PA_HPH_SC_STATUS (0x52)
-#define TIMPANI_PA_HPH_SC_STATUS_RWC "R"
-#define TIMPANI_PA_HPH_SC_STATUS_POR 0
-#define TIMPANI_PA_HPH_SC_STATUS_S 0
-#define TIMPANI_PA_HPH_SC_STATUS_M 0xFF
-
-
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_L_SC_DET_S 7
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_L_SC_DET_M 0x80
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_L_SC_DET_NORMAL_OP 0x0
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_L_SC_DET_SC_DET 0x1
-
-#define TIMPANI_PA_HPH_SC_STATUS_RESERVED_1_S 4
-#define TIMPANI_PA_HPH_SC_STATUS_RESERVED_1_M 0x70
-
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_R_SC_DET_S 3
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_R_SC_DET_M 0x8
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_R_SC_DET_NORMAL_OP 0x0
-#define TIMPANI_PA_HPH_SC_STATUS_HPH_R_SC_DET_SC_DET 0x1
-
-#define TIMPANI_PA_HPH_SC_STATUS_RESERVED_2_S 2
-#define TIMPANI_PA_HPH_SC_STATUS_RESERVED_2_M 0x4
-
-#define TIMPANI_PA_HPH_SC_STATUS_RESERVED_S 0
-#define TIMPANI_PA_HPH_SC_STATUS_RESERVED_M 0x3
-
-
-/* -- For ATEST_EN */
-#define TIMPANI_A_ATEST_EN (0x53)
-#define TIMPANI_ATEST_EN_RWC "RW"
-#define TIMPANI_ATEST_EN_POR 0
-#define TIMPANI_ATEST_EN_S 0
-#define TIMPANI_ATEST_EN_M 0xFF
-
-
-#define TIMPANI_ATEST_EN_ATEST_EN_S 7
-#define TIMPANI_ATEST_EN_ATEST_EN_M 0x80
-#define TIMPANI_ATEST_EN_ATEST_EN_DISABLE 0x0
-#define TIMPANI_ATEST_EN_ATEST_EN_ENABLE 0x1
-
-#define TIMPANI_ATEST_EN_RESERVED_S 0
-#define TIMPANI_ATEST_EN_RESERVED_M 0x7F
-
-
-/* -- For ATEST_TSHKADC */
-#define TIMPANI_A_ATEST_TSHKADC (0x54)
-#define TIMPANI_ATEST_TSHKADC_RWC "RW"
-#define TIMPANI_ATEST_TSHKADC_POR 0
-#define TIMPANI_ATEST_TSHKADC_S 0
-#define TIMPANI_ATEST_TSHKADC_M 0xFF
-
-
-#define TIMPANI_ATEST_TSHKADC_RESERVED_S 4
-#define TIMPANI_ATEST_TSHKADC_RESERVED_M 0xF0
-
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_AN_CONN_S 2
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_AN_CONN_M 0xC
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_AN_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_AN_CONN_MUX1 0x1
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_AN_CONN_MUX2 0x2
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_AN_CONN_MUX3 0x3
-
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_DIG_CONN_S 0
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_DIG_CONN_M 0x3
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_DIG_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_DIG_CONN_MUX1 0x1
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_DIG_CONN_MUX2 0x2
-#define TIMPANI_ATEST_TSHKADC_ATEST_TSADC_DIG_CONN_MUX3 0x3
-
-
-/* -- For ATEST_TXADC13 */
-#define TIMPANI_A_ATEST_TXADC13 (0x55)
-#define TIMPANI_ATEST_TXADC13_RWC "RW"
-#define TIMPANI_ATEST_TXADC13_POR 0
-#define TIMPANI_ATEST_TXADC13_S 0
-#define TIMPANI_ATEST_TXADC13_M 0xFF
-
-
-#define TIMPANI_ATEST_TXADC13_RESERVED_S 7
-#define TIMPANI_ATEST_TXADC13_RESERVED_M 0x80
-
-#define TIMPANI_ATEST_TXADC13_ATEST_SEL_L_S 6
-#define TIMPANI_ATEST_TXADC13_ATEST_SEL_L_M 0x40
-#define TIMPANI_ATEST_TXADC13_ATEST_SEL_L_TXADC1 0x0
-#define TIMPANI_ATEST_TXADC13_ATEST_SEL_L_TXADC3 0x1
-
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_S 3
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_M 0x38
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_ICMP1_TO_ATEST1 0x1
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_IOTA2_TO_ATEST1 0x2
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_IOTA1_TO_ATEST1 0x3
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_VICM_TO_ATEST1 0x4
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_VTH_P_TO_ATEST1 0x5
-#define TIMPANI_ATEST_TXADC13_ATEST1_TXADC13_CONN_VREFP_TO_ATEST1 0x6
-
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_S 0
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_M 0x7
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_IDACREF_TO_ATEST2 0x1
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_IB_10U_TO_ATEST2 0x2
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_VREFMID_TO_ATEST2 0x3
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_VOCM_TO_ATEST2 0x4
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_VTH_N_TO_ATEST2 0x5
-#define TIMPANI_ATEST_TXADC13_ATEST2_TXADC13_CONN_VREFN_TO_ATEST2 0x6
-
-
-/* -- For ATEST_TXADC24 */
-#define TIMPANI_A_ATEST_TXADC24 (0x56)
-#define TIMPANI_ATEST_TXADC24_RWC "RW"
-#define TIMPANI_ATEST_TXADC24_POR 0
-#define TIMPANI_ATEST_TXADC24_S 0
-#define TIMPANI_ATEST_TXADC24_M 0xFF
-
-
-#define TIMPANI_ATEST_TXADC24_RESERVED_S 7
-#define TIMPANI_ATEST_TXADC24_RESERVED_M 0x80
-
-#define TIMPANI_ATEST_TXADC24_ATEST_SEL_R_S 6
-#define TIMPANI_ATEST_TXADC24_ATEST_SEL_R_M 0x40
-#define TIMPANI_ATEST_TXADC24_ATEST_SEL_R_TXADC1 0x0
-#define TIMPANI_ATEST_TXADC24_ATEST_SEL_R_TXADC3 0x1
-
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_S 3
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_M 0x38
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_ICMP1_TO_ATEST1 0x1
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_IOTA2_TO_ATEST1 0x2
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_IOTA1_TO_ATEST1 0x3
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_VICM_TO_ATEST1 0x4
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_VTH_P_TO_ATEST1 0x5
-#define TIMPANI_ATEST_TXADC24_ATEST1_TXADC24_CONN_VREFP_TO_ATEST1 0x6
-
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_S 0
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_M 0x7
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_IDACREF_TO_ATEST2 0x1
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_IB_10U_TO_ATEST2 0x2
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_VREFMID_TO_ATEST2 0x3
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_VOCM_TO_ATEST2 0x4
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_VTH_N_TO_ATEST2 0x5
-#define TIMPANI_ATEST_TXADC24_ATEST2_TXADC24_CONN_VREFN_TO_ATEST2 0x6
-
-
-/* -- For ATEST_AUXPGA */
-#define TIMPANI_A_ATEST_AUXPGA (0x57)
-#define TIMPANI_ATEST_AUXPGA_RWC "RW"
-#define TIMPANI_ATEST_AUXPGA_POR 0
-#define TIMPANI_ATEST_AUXPGA_S 0
-#define TIMPANI_ATEST_AUXPGA_M 0xFF
-
-
-#define TIMPANI_ATEST_AUXPGA_ATEST1_AUXPGA_INT_VCM_CONN_S 7
-#define TIMPANI_ATEST_AUXPGA_ATEST1_AUXPGA_INT_VCM_CONN_M 0x80
-#define TIMPANI_ATEST_AUXPGA_ATEST1_AUXPGA_INT_VCM_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_AUXPGA_ATEST1_AUXPGA_INT_VCM_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMI_VDD_CONN_S 6
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMI_VDD_CONN_M 0x40
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMI_VDD_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMI_VDD_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMO_R_L_CONN_S 5
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMO_R_L_CONN_M 0x20
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMO_R_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_VCMO_R_L_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_R_CONN_S 4
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_R_CONN_M 0x10
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_R_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_L_CONN_S 3
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_L_CONN_M 0x8
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_AUXPGA_ATEST_AUXPGA_L_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_AUXPGA_RESERVED_S 0
-#define TIMPANI_ATEST_AUXPGA_RESERVED_M 0x7
-
-
-/* -- For ATEST_CDAC */
-#define TIMPANI_A_ATEST_CDAC (0x58)
-#define TIMPANI_ATEST_CDAC_RWC "RW"
-#define TIMPANI_ATEST_CDAC_POR 0
-#define TIMPANI_ATEST_CDAC_S 0
-#define TIMPANI_ATEST_CDAC_M 0xFF
-
-
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_IN_CONN_S 7
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_IN_CONN_M 0x80
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_IN_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_IN_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_OUT_CONN_S 6
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_OUT_CONN_M 0x40
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_OUT_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_DWA_OUT_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_L_OUT_CONN_S 5
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_L_OUT_CONN_M 0x20
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_L_OUT_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_L_OUT_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_R_OUT_CONN_S 4
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_R_OUT_CONN_M 0x10
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_R_OUT_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_CDAC_ATEST_FILTER_R_OUT_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_L_CONN_S 2
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_L_CONN_M 0xC
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_L_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_L_CONN_TEST1 0x1
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_L_CONN_TEST2 0x2
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_L_CONN_TEST3 0x3
-
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_R_CONN_S 0
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_R_CONN_M 0x3
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_R_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_R_CONN_TEST1 0x1
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_R_CONN_TEST2 0x2
-#define TIMPANI_ATEST_CDAC_ATEST_CDAC_R_CONN_TEST3 0x3
-
-
-/* -- For ATEST_IDAC */
-#define TIMPANI_A_ATEST_IDAC (0x59)
-#define TIMPANI_ATEST_IDAC_RWC "RW"
-#define TIMPANI_ATEST_IDAC_POR 0
-#define TIMPANI_ATEST_IDAC_S 0
-#define TIMPANI_ATEST_IDAC_M 0xFF
-
-
-#define TIMPANI_ATEST_IDAC_ATEST1_LR_CONN_S 7
-#define TIMPANI_ATEST_IDAC_ATEST1_LR_CONN_M 0x80
-#define TIMPANI_ATEST_IDAC_ATEST1_LR_CONN_RIGHT 0x1
-#define TIMPANI_ATEST_IDAC_ATEST1_LR_CONN_LEFT 0x0
-
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_S 4
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_M 0x70
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_IDAC_NEG_OUT 0x7
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_CT_FILTER_POS_OUT 0x6
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_CT_FILTER_IBIAS 0x5
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_NO_CONNECT_1 0x4
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_NO_CONNECT_2 0x3
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_NO_CONNECT_3 0x2
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_NO_CONNECT_4 0x1
-#define TIMPANI_ATEST_IDAC_ATEST1_CONN_NO_CONNECT_5 0x0
-
-#define TIMPANI_ATEST_IDAC_ATEST2_LR_CONN_S 3
-#define TIMPANI_ATEST_IDAC_ATEST2_LR_CONN_M 0x8
-#define TIMPANI_ATEST_IDAC_ATEST2_LR_CONN_RIGHT 0x1
-#define TIMPANI_ATEST_IDAC_ATEST2_LR_CONN_LEFT 0x0
-
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_S 0
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_M 0x7
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_IDAC_POS_OUT 0x7
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_CT_FILTER_NEG_OUT 0x6
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_IDAC_IBIAS 0x5
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_NO_CONNECT_1 0x4
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_NO_CONNECT_2 0x3
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_NO_CONNECT_3 0x2
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_NO_CONNECT_4 0x1
-#define TIMPANI_ATEST_IDAC_ATEST2_CONN_NO_CONNECT_5 0x0
-
-
-/* -- For ATEST_PA1 */
-#define TIMPANI_A_ATEST_PA1 (0x5A)
-#define TIMPANI_ATEST_PA1_RWC "RW"
-#define TIMPANI_ATEST_PA1_POR 0
-#define TIMPANI_ATEST_PA1_S 0
-#define TIMPANI_ATEST_PA1_M 0xFF
-
-
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_FSV_NP_CONN_S 7
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_FSV_NP_CONN_M 0x80
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_FSV_NP_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_FSV_NP_CONN_EN 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NCASC_NMIRR_CONN_S 6
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NCASC_NMIRR_CONN_M 0x40
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NCASC_NMIRR_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NCASC_NMIRR_CONN_EN 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NMIRR_PCASC_CONN_S 5
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NMIRR_PCASC_CONN_M 0x20
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NMIRR_PCASC_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_NMIRR_PCASC_CONN_EN 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_VCM_PTAIL1_CONN_S 4
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_VCM_PTAIL1_CONN_M 0x10
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_VCM_PTAIL1_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_VCM_PTAIL1_CONN_EN 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_IBTEST_VSS2P2_CONN_S 3
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_IBTEST_VSS2P2_CONN_M 0x8
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_IBTEST_VSS2P2_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_IBTEST_VSS2P2_CONN_EN 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_ITEST1_ITEST2_CONN_S 2
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_ITEST1_ITEST2_CONN_M 0x4
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_ITEST1_ITEST2_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST_EARPA_ITEST1_ITEST2_CONN_EN 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST_CLASSD_CLK_GATING_S 1
-#define TIMPANI_ATEST_PA1_ATEST_CLASSD_CLK_GATING_M 0x2
-#define TIMPANI_ATEST_PA1_ATEST_CLASSD_CLK_GATING_PASS 0x0
-#define TIMPANI_ATEST_PA1_ATEST_CLASSD_CLK_GATING_GATE 0x1
-
-#define TIMPANI_ATEST_PA1_ATEST2_HPH_VCM_CONN_S 0
-#define TIMPANI_ATEST_PA1_ATEST2_HPH_VCM_CONN_M 0x1
-#define TIMPANI_ATEST_PA1_ATEST2_HPH_VCM_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_PA1_ATEST2_HPH_VCM_CONN_CONNECT 0x1
-
-
-/* -- For ATEST_CLASSD */
-#define TIMPANI_A_ATEST_CLASSD (0x5B)
-#define TIMPANI_ATEST_CLASSD_RWC "RW"
-#define TIMPANI_ATEST_CLASSD_POR 0
-#define TIMPANI_ATEST_CLASSD_S 0
-#define TIMPANI_ATEST_CLASSD_M 0xFF
-
-
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_S 4
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_M 0xF0
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_NO_CONNECT_1 0x0
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_SC_OCP 0x1
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_CDAC_CLK 0x2
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_POS_CDAC 0x3
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_BREAK_BEFORE_MAKE_OUT_CP 0x4
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_COMP_OUT 0x5
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_INT2_POS_OUT 0x6
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_L_INT1_POS_OUT 0x7
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_NO_CONNECT_2 0x8
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_SC_OCP_SIGNAL 0x9
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_CDAC_CLK 0xA
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_POS_CDAC 0xB
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_BREAK_BEFORE_MAKE_OUT_CP 0xC
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_COMP_OUT 0xD
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_INT2_POS_OUT 0xE
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST1_CONN_R_INT1_POS_OUT 0xF
-
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_S 0
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_M 0xF
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_NO_CONNECT_1 0x0
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_HI_Z_OCP 0x1
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_OCP_CLOCK 0x2
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_NEG_CDAC 0x3
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_BREAK_BEFORE_MAKE_OUT_CN 0x4
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_CM_BUFF_OUT 0x5
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_INT2_NEG_OUT 0x6
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_L_INT1_NEG_OUT 0x7
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_NO_CONNECT_2 0x8
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_HI_Z_OCP 0x9
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_OCP_CLOCK 0xA
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_NEGATIVE_CDAC 0xB
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_BREAK_BEFORE_MAKE_OUT_CN 0xC
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_CM_BUFF_OUT 0xD
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_INTR2_NEG_OUT 0xE
-#define TIMPANI_ATEST_CLASSD_CLASSD_ATEST2_CONN_R_INT1_NEG_OUT 0xF
-
-
-/* -- For ATEST_LINEO_AUXO */
-#define TIMPANI_A_ATEST_LINEO_AUXO (0x5C)
-#define TIMPANI_ATEST_LINEO_AUXO_RWC "RW"
-#define TIMPANI_ATEST_LINEO_AUXO_POR 0
-#define TIMPANI_ATEST_LINEO_AUXO_S 0
-#define TIMPANI_ATEST_LINEO_AUXO_M 0xFF
-
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_EN_S 7
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_EN_M 0x80
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_EN_DISABLE 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_EN_ENABLE 0x1
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_VCM_CONN_S 6
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_VCM_CONN_M 0x40
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_VCM_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_AUXO_VCM_CONN_CONNECT 0x1
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NREFIN_STG1OP_CONN_S 5
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NREFIN_STG1OP_CONN_M 0x20
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NREFIN_STG1OP_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NREFIN_STG1OP_CONN_EN 0x1
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NMOS_PMOS_CONN_S 4
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NMOS_PMOS_CONN_M 0x10
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NMOS_PMOS_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_L_NMOS_PMOS_CONN_EN 01
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NREFIN_STG1OP_CONN_S 3
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NREFIN_STG1OP_CONN_M 0x8
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NREFIN_STG1OP_CONN_NO_CONNECT 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NREFIN_STG1OP_CONN_EN 01
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NMOS_PMOS_CONN_S 2
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NMOS_PMOS_CONN_M 0x4
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NMOS_PMOS_CONN_DISABLE 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_LINEO_R_NMOS_PMOS_CONN_EN 0x1
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NREFIN_STG1OP_CONN_S 1
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NREFIN_STG1OP_CONN_M 0x2
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NREFIN_STG1OP_CONN_DISABLE 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NREFIN_STG1OP_CONN_EN 0x1
-
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NMOS_PMOS_CONN_S 0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NMOS_PMOS_CONN_M 0x1
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NMOS_PMOS_CONN_DISABLE 0x0
-#define TIMPANI_ATEST_LINEO_AUXO_ATEST_AUXO_NMOS_PMOS_CONN_EN 0x1
-
-
-/* -- For CDC_RESET_CTL */
-#define TIMPANI_A_CDC_RESET_CTL (0x80)
-#define TIMPANI_CDC_RESET_CTL_RWC "RW"
-#define TIMPANI_CDC_RESET_CTL_POR 0
-#define TIMPANI_CDC_RESET_CTL_S 0
-#define TIMPANI_CDC_RESET_CTL_M 0x7F
-
-
-#define TIMPANI_CDC_RESET_CTL_ARB_SOFT_RESET_S 6
-#define TIMPANI_CDC_RESET_CTL_ARB_SOFT_RESET_M 0x40
-
-#define TIMPANI_CDC_RESET_CTL_TX2_SOFT_RESET_R_S 5
-#define TIMPANI_CDC_RESET_CTL_TX2_SOFT_RESET_R_M 0x20
-
-#define TIMPANI_CDC_RESET_CTL_TX2_SOFT_RESET_L_S 4
-#define TIMPANI_CDC_RESET_CTL_TX2_SOFT_RESET_L_M 0x10
-
-#define TIMPANI_CDC_RESET_CTL_RX2_SOFT_RESET_S 3
-#define TIMPANI_CDC_RESET_CTL_RX2_SOFT_RESET_M 0x8
-
-#define TIMPANI_CDC_RESET_CTL_TX1_SOFT_RESET_R_S 2
-#define TIMPANI_CDC_RESET_CTL_TX1_SOFT_RESET_R_M 0x4
-
-#define TIMPANI_CDC_RESET_CTL_RX1_SOFT_RESET_S 1
-#define TIMPANI_CDC_RESET_CTL_RX1_SOFT_RESET_M 0x2
-
-#define TIMPANI_CDC_RESET_CTL_TX1_SOFT_RESET_L_S 0
-#define TIMPANI_CDC_RESET_CTL_TX1_SOFT_RESET_L_M 0x1
-
-
-/* -- For CDC_RX1_CTL */
-#define TIMPANI_A_CDC_RX1_CTL (0x81)
-#define TIMPANI_CDC_RX1_CTL_RWC "RW"
-#define TIMPANI_CDC_RX1_CTL_POR 0xc
-#define TIMPANI_CDC_RX1_CTL_S 0
-#define TIMPANI_CDC_RX1_CTL_M 0x3F
-
-
-#define TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_R_S 5
-#define TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_R_M 0x20
-
-#define TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_L_S 4
-#define TIMPANI_CDC_RX1_CTL_SIDETONE_EN1_L_M 0x10
-
-#define TIMPANI_CDC_RX1_CTL_RX1_RATE_S 2
-#define TIMPANI_CDC_RX1_CTL_RX1_RATE_M 0xC
-#define TIMPANI_CDC_RX1_CTL_RX1_RATE_OSR_256 0x3
-#define TIMPANI_CDC_RX1_CTL_RX1_RATE_OSR_128 0x1
-#define TIMPANI_CDC_RX1_CTL_RX1_RATE_OSR_64 0x0
-
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_RATE_S 1
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_RATE_M 0x2
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_RATE_BR_32 0x1
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_RATE_BR_64 0x0
-
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_MODE_S 0
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_MODE_M 0x1
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_MODE_MASTER 0x1
-#define TIMPANI_CDC_RX1_CTL_RX1_I2S_MODE_SLAVE 0x0
-
-
-/* -- For CDC_TX_I2S_CTL */
-#define TIMPANI_A_CDC_TX_I2S_CTL (0x82)
-#define TIMPANI_CDC_TX_I2S_CTL_RWC "RW"
-#define TIMPANI_CDC_TX_I2S_CTL_POR 0xc
-#define TIMPANI_CDC_TX_I2S_CTL_S 0
-#define TIMPANI_CDC_TX_I2S_CTL_M 0x3F
-
-
-#define TIMPANI_CDC_TX_I2S_CTL_TX2_I2S_SD_OE_S 5
-#define TIMPANI_CDC_TX_I2S_CTL_TX2_I2S_SD_OE_M 0x20
-
-#define TIMPANI_CDC_TX_I2S_CTL_TX1_I2S_SD_OE_S 4
-#define TIMPANI_CDC_TX_I2S_CTL_TX1_I2S_SD_OE_M 0x10
-
-#define TIMPANI_CDC_TX_I2S_CTL_TX_RATE_S 2
-#define TIMPANI_CDC_TX_I2S_CTL_TX_RATE_M 0xC
-#define TIMPANI_CDC_TX_I2S_CTL_TX_RATE_OSR_256 0x3
-#define TIMPANI_CDC_TX_I2S_CTL_TX_RATE_OSR_128 0x1
-#define TIMPANI_CDC_TX_I2S_CTL_TX_RATE_OSR_64 0x0
-
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_RATE_S 1
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_RATE_M 0x2
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_RATE_BR_32 0x1
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_RATE_BR_64 0x0
-
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_MODE_S 0
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_MODE_M 0x1
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_MODE_MASTER 0x1
-#define TIMPANI_CDC_TX_I2S_CTL_TX_I2S_MODE_SLAVE 0x0
-
-
-/* -- For CDC_CH_CTL */
-#define TIMPANI_A_CDC_CH_CTL (0x83)
-#define TIMPANI_CDC_CH_CTL_RWC "RW"
-#define TIMPANI_CDC_CH_CTL_POR 0
-#define TIMPANI_CDC_CH_CTL_S 0
-#define TIMPANI_CDC_CH_CTL_M 0xFF
-
-
-#define TIMPANI_CDC_CH_CTL_TX2_EN_R_S 7
-#define TIMPANI_CDC_CH_CTL_TX2_EN_R_M 0x80
-
-#define TIMPANI_CDC_CH_CTL_TX2_EN_L_S 6
-#define TIMPANI_CDC_CH_CTL_TX2_EN_L_M 0x40
-
-#define TIMPANI_CDC_CH_CTL_RX2_EN_R_S 5
-#define TIMPANI_CDC_CH_CTL_RX2_EN_R_M 0x20
-
-#define TIMPANI_CDC_CH_CTL_RX2_EN_L_S 4
-#define TIMPANI_CDC_CH_CTL_RX2_EN_L_M 0x10
-
-#define TIMPANI_CDC_CH_CTL_TX1_EN_R_S 3
-#define TIMPANI_CDC_CH_CTL_TX1_EN_R_M 0x8
-
-#define TIMPANI_CDC_CH_CTL_TX1_EN_L_S 2
-#define TIMPANI_CDC_CH_CTL_TX1_EN_L_M 0x4
-
-#define TIMPANI_CDC_CH_CTL_RX1_EN_R_S 1
-#define TIMPANI_CDC_CH_CTL_RX1_EN_R_M 0x2
-
-#define TIMPANI_CDC_CH_CTL_RX1_EN_L_S 0
-#define TIMPANI_CDC_CH_CTL_RX1_EN_L_M 0x1
-
-
-/* -- For CDC_RX1LG */
-#define TIMPANI_A_CDC_RX1LG (0x84)
-#define TIMPANI_CDC_RX1LG_RWC "RW"
-#define TIMPANI_CDC_RX1LG_POR 0xac
-#define TIMPANI_CDC_RX1LG_S 0
-#define TIMPANI_CDC_RX1LG_M 0xFF
-
-
-#define TIMPANI_CDC_RX1LG_GAIN_S 0
-#define TIMPANI_CDC_RX1LG_GAIN_M 0xFF
-
-
-/* -- For CDC_RX1RG */
-#define TIMPANI_A_CDC_RX1RG (0x85)
-#define TIMPANI_CDC_RX1RG_RWC "RW"
-#define TIMPANI_CDC_RX1RG_POR 0xac
-#define TIMPANI_CDC_RX1RG_S 0
-#define TIMPANI_CDC_RX1RG_M 0xFF
-
-
-#define TIMPANI_CDC_RX1RG_GAIN_S 0
-#define TIMPANI_CDC_RX1RG_GAIN_M 0xFF
-
-
-/* -- For CDC_TX1LG */
-#define TIMPANI_A_CDC_TX1LG (0x86)
-#define TIMPANI_CDC_TX1LG_RWC "RW"
-#define TIMPANI_CDC_TX1LG_POR 0xac
-#define TIMPANI_CDC_TX1LG_S 0
-#define TIMPANI_CDC_TX1LG_M 0xFF
-
-
-#define TIMPANI_CDC_TX1LG_GAIN_S 0
-#define TIMPANI_CDC_TX1LG_GAIN_M 0xFF
-
-
-/* -- For CDC_TX1RG */
-#define TIMPANI_A_CDC_TX1RG (0x87)
-#define TIMPANI_CDC_TX1RG_RWC "RW"
-#define TIMPANI_CDC_TX1RG_POR 0xac
-#define TIMPANI_CDC_TX1RG_S 0
-#define TIMPANI_CDC_TX1RG_M 0xFF
-
-
-#define TIMPANI_CDC_TX1RG_GAIN_S 0
-#define TIMPANI_CDC_TX1RG_GAIN_M 0xFF
-
-
-/* -- For CDC_RX_PGA_TIMER */
-#define TIMPANI_A_CDC_RX_PGA_TIMER (0x88)
-#define TIMPANI_CDC_RX_PGA_TIMER_RWC "RW"
-#define TIMPANI_CDC_RX_PGA_TIMER_POR 0xff
-#define TIMPANI_CDC_RX_PGA_TIMER_S 0
-#define TIMPANI_CDC_RX_PGA_TIMER_M 0xFF
-
-
-#define TIMPANI_CDC_RX_PGA_TIMER_TIMER_VAL_S 0
-#define TIMPANI_CDC_RX_PGA_TIMER_TIMER_VAL_M 0xFF
-
-
-/* -- For CDC_TX_PGA_TIMER */
-#define TIMPANI_A_CDC_TX_PGA_TIMER (0x89)
-#define TIMPANI_CDC_TX_PGA_TIMER_RWC "RW"
-#define TIMPANI_CDC_TX_PGA_TIMER_POR 0xff
-#define TIMPANI_CDC_TX_PGA_TIMER_S 0
-#define TIMPANI_CDC_TX_PGA_TIMER_M 0xFF
-
-
-#define TIMPANI_CDC_TX_PGA_TIMER_TIMER_VAL_S 0
-#define TIMPANI_CDC_TX_PGA_TIMER_TIMER_VAL_M 0xFF
-
-
-/* -- For CDC_GCTL1 */
-#define TIMPANI_A_CDC_GCTL1 (0x8A)
-#define TIMPANI_CDC_GCTL1_RWC "RW"
-#define TIMPANI_CDC_GCTL1_POR 0x33
-#define TIMPANI_CDC_GCTL1_S 0
-#define TIMPANI_CDC_GCTL1_M 0xFF
-
-
-#define TIMPANI_CDC_GCTL1_TX1_PGA_UPDATE_R_S 7
-#define TIMPANI_CDC_GCTL1_TX1_PGA_UPDATE_R_M 0x80
-
-#define TIMPANI_CDC_GCTL1_TX1_PGA_UPDATE_L_S 6
-#define TIMPANI_CDC_GCTL1_TX1_PGA_UPDATE_L_M 0x40
-
-#define TIMPANI_CDC_GCTL1_TX1_PGA_MUTE_EN_R_S 5
-#define TIMPANI_CDC_GCTL1_TX1_PGA_MUTE_EN_R_M 0x20
-
-#define TIMPANI_CDC_GCTL1_TX1_PGA_MUTE_EN_L_S 4
-#define TIMPANI_CDC_GCTL1_TX1_PGA_MUTE_EN_L_M 0x10
-
-#define TIMPANI_CDC_GCTL1_RX1_PGA_UPDATE_R_S 3
-#define TIMPANI_CDC_GCTL1_RX1_PGA_UPDATE_R_M 0x8
-
-#define TIMPANI_CDC_GCTL1_RX1_PGA_UPDATE_L_S 2
-#define TIMPANI_CDC_GCTL1_RX1_PGA_UPDATE_L_M 0x4
-
-#define TIMPANI_CDC_GCTL1_RX1_PGA_MUTE_EN_R_S 1
-#define TIMPANI_CDC_GCTL1_RX1_PGA_MUTE_EN_R_M 0x2
-
-#define TIMPANI_CDC_GCTL1_RX1_PGA_MUTE_EN_L_S 0
-#define TIMPANI_CDC_GCTL1_RX1_PGA_MUTE_EN_L_M 0x1
-
-
-/* -- For CDC_TX1L_STG */
-#define TIMPANI_A_CDC_TX1L_STG (0x8B)
-#define TIMPANI_CDC_TX1L_STG_RWC "RW"
-#define TIMPANI_CDC_TX1L_STG_POR 0xac
-#define TIMPANI_CDC_TX1L_STG_S 0
-#define TIMPANI_CDC_TX1L_STG_M 0xFF
-
-
-#define TIMPANI_CDC_TX1L_STG_GAIN_S 0
-#define TIMPANI_CDC_TX1L_STG_GAIN_M 0xFF
-
-
-/* -- For CDC_ST_CTL */
-#define TIMPANI_A_CDC_ST_CTL (0x8C)
-#define TIMPANI_CDC_ST_CTL_RWC "RW"
-#define TIMPANI_CDC_ST_CTL_POR 0x55
-#define TIMPANI_CDC_ST_CTL_S 0
-#define TIMPANI_CDC_ST_CTL_M 0xFF
-
-
-#define TIMPANI_CDC_ST_CTL_TX2_R_SIDETONE_UPDATE_S 7
-#define TIMPANI_CDC_ST_CTL_TX2_R_SIDETONE_UPDATE_M 0x80
-
-#define TIMPANI_CDC_ST_CTL_TX2_R_SIDETONE_MUTE_EN_S 6
-#define TIMPANI_CDC_ST_CTL_TX2_R_SIDETONE_MUTE_EN_M 0x40
-
-#define TIMPANI_CDC_ST_CTL_TX2_L_SIDETONE_UPDATE_S 5
-#define TIMPANI_CDC_ST_CTL_TX2_L_SIDETONE_UPDATE_M 0x20
-
-#define TIMPANI_CDC_ST_CTL_TX2_L_SIDETONE_MUTE_EN_S 4
-#define TIMPANI_CDC_ST_CTL_TX2_L_SIDETONE_MUTE_EN_M 0x10
-
-#define TIMPANI_CDC_ST_CTL_TX1_R_SIDETONE_UPDATE_S 3
-#define TIMPANI_CDC_ST_CTL_TX1_R_SIDETONE_UPDATE_M 0x8
-
-#define TIMPANI_CDC_ST_CTL_TX1_R_SIDETONE_MUTE_EN_S 2
-#define TIMPANI_CDC_ST_CTL_TX1_R_SIDETONE_MUTE_EN_M 0x4
-
-#define TIMPANI_CDC_ST_CTL_TX1_L_SIDETONE_UPDATE_S 1
-#define TIMPANI_CDC_ST_CTL_TX1_L_SIDETONE_UPDATE_M 0x2
-
-#define TIMPANI_CDC_ST_CTL_TX1_L_SIDETONE_MUTE_EN_S 0
-#define TIMPANI_CDC_ST_CTL_TX1_L_SIDETONE_MUTE_EN_M 0x1
-
-
-/* -- For CDC_RX1L_DCOFFSET */
-#define TIMPANI_A_CDC_RX1L_DCOFFSET (0x8D)
-#define TIMPANI_CDC_RX1L_DCOFFSET_RWC "RW"
-#define TIMPANI_CDC_RX1L_DCOFFSET_POR 0
-#define TIMPANI_CDC_RX1L_DCOFFSET_S 0
-#define TIMPANI_CDC_RX1L_DCOFFSET_M 0xFF
-
-
-#define TIMPANI_CDC_RX1L_DCOFFSET_OFFSET_S 0
-#define TIMPANI_CDC_RX1L_DCOFFSET_OFFSET_M 0xFF
-
-
-/* -- For CDC_RX1R_DCOFFSET */
-#define TIMPANI_A_CDC_RX1R_DCOFFSET (0x8E)
-#define TIMPANI_CDC_RX1R_DCOFFSET_RWC "RW"
-#define TIMPANI_CDC_RX1R_DCOFFSET_POR 0
-#define TIMPANI_CDC_RX1R_DCOFFSET_S 0
-#define TIMPANI_CDC_RX1R_DCOFFSET_M 0xFF
-
-
-#define TIMPANI_CDC_RX1R_DCOFFSET_OFFSET_S 0
-#define TIMPANI_CDC_RX1R_DCOFFSET_OFFSET_M 0xFF
-
-
-/* -- For CDC_BYPASS_CTL1 */
-#define TIMPANI_A_CDC_BYPASS_CTL1 (0x8F)
-#define TIMPANI_CDC_BYPASS_CTL1_RWC "RW"
-#define TIMPANI_CDC_BYPASS_CTL1_POR 0x2
-#define TIMPANI_CDC_BYPASS_CTL1_S 0
-#define TIMPANI_CDC_BYPASS_CTL1_M 0xF
-
-
-#define TIMPANI_CDC_BYPASS_CTL1_DITHER_BP_S 3
-#define TIMPANI_CDC_BYPASS_CTL1_DITHER_BP_M 0x8
-
-#define TIMPANI_CDC_BYPASS_CTL1_DITHER_SHAPE_SEL_S 2
-#define TIMPANI_CDC_BYPASS_CTL1_DITHER_SHAPE_SEL_M 0x4
-
-#define TIMPANI_CDC_BYPASS_CTL1_DITHER_DLY_SEL_S 1
-#define TIMPANI_CDC_BYPASS_CTL1_DITHER_DLY_SEL_M 0x2
-
-#define TIMPANI_CDC_BYPASS_CTL1_RX1_HPF_BP_S 0
-#define TIMPANI_CDC_BYPASS_CTL1_RX1_HPF_BP_M 0x1
-
-
-/* -- For CDC_PDM_CONFIG */
-#define TIMPANI_A_CDC_PDM_CONFIG (0x90)
-#define TIMPANI_CDC_PDM_CONFIG_RWC "RW"
-#define TIMPANI_CDC_PDM_CONFIG_POR 0
-#define TIMPANI_CDC_PDM_CONFIG_S 0
-#define TIMPANI_CDC_PDM_CONFIG_M 0xF
-
-
-#define TIMPANI_CDC_PDM_CONFIG_PDM_SEL_S 0
-#define TIMPANI_CDC_PDM_CONFIG_PDM_SEL_M 0xF
-
-
-/* -- For CDC_TESTMODE1 */
-#define TIMPANI_A_CDC_TESTMODE1 (0x91)
-#define TIMPANI_CDC_TESTMODE1_RWC "RW"
-#define TIMPANI_CDC_TESTMODE1_POR 0
-#define TIMPANI_CDC_TESTMODE1_S 0
-#define TIMPANI_CDC_TESTMODE1_M 0x3F
-
-
-#define TIMPANI_CDC_TESTMODE1_COMP_I2C_TEST_EN_S 5
-#define TIMPANI_CDC_TESTMODE1_COMP_I2C_TEST_EN_M 0x20
-
-#define TIMPANI_CDC_TESTMODE1_RX1_TEST_EN_R_S 4
-#define TIMPANI_CDC_TESTMODE1_RX1_TEST_EN_R_M 0x10
-
-#define TIMPANI_CDC_TESTMODE1_RX1_TEST_EN_L_S 3
-#define TIMPANI_CDC_TESTMODE1_RX1_TEST_EN_L_M 0x8
-
-#define TIMPANI_CDC_TESTMODE1_TX1_TEST_EN_R_S 2
-#define TIMPANI_CDC_TESTMODE1_TX1_TEST_EN_R_M 0x4
-
-#define TIMPANI_CDC_TESTMODE1_TX1_TEST_EN_L_S 1
-#define TIMPANI_CDC_TESTMODE1_TX1_TEST_EN_L_M 0x2
-
-#define TIMPANI_CDC_TESTMODE1_A_LOOPBACK_EN1_S 0
-#define TIMPANI_CDC_TESTMODE1_A_LOOPBACK_EN1_M 0x1
-
-
-/* -- For CDC_DMIC_CLK_CTL */
-#define TIMPANI_A_CDC_DMIC_CLK_CTL (0x92)
-#define TIMPANI_CDC_DMIC_CLK_CTL_RWC "RW"
-#define TIMPANI_CDC_DMIC_CLK_CTL_POR 0
-#define TIMPANI_CDC_DMIC_CLK_CTL_S 0
-#define TIMPANI_CDC_DMIC_CLK_CTL_M 0x3F
-
-
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_S 3
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_M 0x38
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_DIV_6 0x4
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_DIV_4 0x3
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_DIV_3 0x2
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_DIV_2 0x1
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_DIV_SEL_DIV_1 0x0
-
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_SEL_S 1
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_SEL_M 0x6
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_SEL_RX_MCLK2 0x2
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_SEL_RX_MCLK1 0x1
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_MCLK_SEL_TX_MCLK 0x0
-
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_CLK_EN_S 0
-#define TIMPANI_CDC_DMIC_CLK_CTL_DMIC_CLK_EN_M 0x1
-
-
-/* -- For CDC_ADC12_CLK_CTL */
-#define TIMPANI_A_CDC_ADC12_CLK_CTL (0x93)
-#define TIMPANI_CDC_ADC12_CLK_CTL_RWC "RW"
-#define TIMPANI_CDC_ADC12_CLK_CTL_POR 0
-#define TIMPANI_CDC_ADC12_CLK_CTL_S 0
-#define TIMPANI_CDC_ADC12_CLK_CTL_M 0xFF
-
-
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_SEL_S 6
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_SEL_M 0xC0
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_SEL_RX_MCLK2 0x2
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_SEL_RX_MCLK1 0x1
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_SEL_TX_MCLK 0x0
-
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_S 3
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_M 0x38
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_DIV_6 0x4
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_DIV_4 0x3
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_DIV_3 0x2
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_DIV_2 0x1
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_R_DIV_1 0x0
-
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_S 0
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_M 0x7
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_DIV_6 0x4
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_DIV_4 0x3
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_DIV_3 0x2
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_DIV_2 0x1
-#define TIMPANI_CDC_ADC12_CLK_CTL_TX1_MCLK_DIV_SEL_L_DIV_1 0x0
-
-
-/* -- For CDC_TX1_CTL */
-#define TIMPANI_A_CDC_TX1_CTL (0x94)
-#define TIMPANI_CDC_TX1_CTL_RWC "RW"
-#define TIMPANI_CDC_TX1_CTL_POR 0x1b
-#define TIMPANI_CDC_TX1_CTL_S 0
-#define TIMPANI_CDC_TX1_CTL_M 0x3F
-
-
-#define TIMPANI_CDC_TX1_CTL_TX1_DMIC_SEL_R_S 5
-#define TIMPANI_CDC_TX1_CTL_TX1_DMIC_SEL_R_M 0x20
-
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_R_S 3
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_R_M 0x18
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_R_OSR_256 0x3
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_R_OSR_128 0x1
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_R_OSR_64 0x0
-
-#define TIMPANI_CDC_TX1_CTL_TX1_DMIC_SEL_L_S 2
-#define TIMPANI_CDC_TX1_CTL_TX1_DMIC_SEL_L_M 0x4
-
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_L_S 0
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_L_M 0x3
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_L_OSR_256 0x3
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_L_OSR_128 0x1
-#define TIMPANI_CDC_TX1_CTL_TX1_RATE_L_OSR_64 0x0
-
-
-/* -- For CDC_ADC34_CLK_CTL */
-#define TIMPANI_A_CDC_ADC34_CLK_CTL (0x95)
-#define TIMPANI_CDC_ADC34_CLK_CTL_RWC "RW"
-#define TIMPANI_CDC_ADC34_CLK_CTL_POR 0
-#define TIMPANI_CDC_ADC34_CLK_CTL_S 0
-#define TIMPANI_CDC_ADC34_CLK_CTL_M 0xFF
-
-
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_SEL_S 6
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_SEL_M 0xC0
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_SEL_RX_MCLK2 0x2
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_SEL_RX_MCLK1 0x1
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_SEL_TX_MCLK 0x0
-
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_S 3
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_M 0x38
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_DIV_6 0x4
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_DIV_4 0x3
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_DIV_3 0x2
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_DIV_2 0x1
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_R_DIV_1 0x0
-
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_S 0
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_M 0x7
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_DIV_6 0x4
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_DIV_4 0x3
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_DIV_3 0x2
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_DIV_2 0x1
-#define TIMPANI_CDC_ADC34_CLK_CTL_TX2_MCLK_DIV_SEL_L_DIV_1 0x0
-
-
-/* -- For CDC_TX2_CTL */
-#define TIMPANI_A_CDC_TX2_CTL (0x96)
-#define TIMPANI_CDC_TX2_CTL_RWC "RW"
-#define TIMPANI_CDC_TX2_CTL_POR 0x1b
-#define TIMPANI_CDC_TX2_CTL_S 0
-#define TIMPANI_CDC_TX2_CTL_M 0x3F
-
-
-#define TIMPANI_CDC_TX2_CTL_TX2_DMIC_SEL_R_S 5
-#define TIMPANI_CDC_TX2_CTL_TX2_DMIC_SEL_R_M 0x20
-
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_R_S 3
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_R_M 0x18
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_R_OSR_256 0x3
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_R_OSR_128 0x1
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_R_OSR_64 0x0
-
-#define TIMPANI_CDC_TX2_CTL_TX2_DMIC_SEL_L_S 2
-#define TIMPANI_CDC_TX2_CTL_TX2_DMIC_SEL_L_M 0x4
-
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_L_S 0
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_L_M 0x3
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_L_OSR_256 0x3
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_L_OSR_128 0x1
-#define TIMPANI_CDC_TX2_CTL_TX2_RATE_L_OSR_64 0x0
-
-
-/* -- For CDC_RX1_CLK_CTL */
-#define TIMPANI_A_CDC_RX1_CLK_CTL (0x97)
-#define TIMPANI_CDC_RX1_CLK_CTL_RWC "RW"
-#define TIMPANI_CDC_RX1_CLK_CTL_POR 0x1
-#define TIMPANI_CDC_RX1_CLK_CTL_S 0
-#define TIMPANI_CDC_RX1_CLK_CTL_M 0x1F
-
-
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_S 2
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_M 0x1C
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_DIV_6 0x4
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_DIV_4 0x3
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_DIV_3 0x2
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_DIV_2 0x1
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_DIV_SEL_DIV_1 0x0
-
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_SEL_S 0
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_SEL_M 0x3
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_SEL_RX_MCLK2 0x2
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_SEL_RX_MCLK1 0x1
-#define TIMPANI_CDC_RX1_CLK_CTL_RX1_MCLK_SEL_TX_MCLK 0x0
-
-
-/* -- For CDC_RX2_CLK_CTL */
-#define TIMPANI_A_CDC_RX2_CLK_CTL (0x98)
-#define TIMPANI_CDC_RX2_CLK_CTL_RWC "RW"
-#define TIMPANI_CDC_RX2_CLK_CTL_POR 0x2
-#define TIMPANI_CDC_RX2_CLK_CTL_S 0
-#define TIMPANI_CDC_RX2_CLK_CTL_M 0x1F
-
-
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_S 2
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_M 0x1C
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_DIV_6 0x4
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_DIV_4 0x3
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_DIV_3 0x2
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_DIV_2 0x1
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_DIV_SEL_DIV_1 0x0
-
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_SEL_S 0
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_SEL_M 0x3
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_SEL_RX_MCLK2 0x2
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_SEL_RX_MCLK1 0x1
-#define TIMPANI_CDC_RX2_CLK_CTL_RX2_MCLK_SEL_TX_MCLK 0x0
-
-
-/* -- For CDC_DEC_ADC_SEL */
-#define TIMPANI_A_CDC_DEC_ADC_SEL (0x99)
-#define TIMPANI_CDC_DEC_ADC_SEL_RWC "RW"
-#define TIMPANI_CDC_DEC_ADC_SEL_POR 0
-#define TIMPANI_CDC_DEC_ADC_SEL_S 0
-#define TIMPANI_CDC_DEC_ADC_SEL_M 0xFF
-
-
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_R_S 6
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_R_M 0xC0
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_R_ADC4 0x3
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_R_ADC3 0x2
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_R_ADC2 0x1
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_R_ADC1 0x0
-
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_L_S 4
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_L_M 0x30
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_L_ADC4 0x3
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_L_ADC3 0x2
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_L_ADC2 0x1
-#define TIMPANI_CDC_DEC_ADC_SEL_TX2_ADC_SEL_L_ADC1 0x0
-
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_R_S 2
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_R_M 0xC
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_R_ADC4 0x3
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_R_ADC3 0x2
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_R_ADC2 0x1
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_R_ADC1 0x0
-
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_L_S 0
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_L_M 0x3
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_L_ADC4 0x3
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_L_ADC3 0x2
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_L_ADC2 0x1
-#define TIMPANI_CDC_DEC_ADC_SEL_TX1_ADC_SEL_L_ADC1 0x0
-
-
-/* -- For CDC_ANC_INPUT_MUX */
-#define TIMPANI_A_CDC_ANC_INPUT_MUX (0x9A)
-#define TIMPANI_CDC_ANC_INPUT_MUX_RWC "RW"
-#define TIMPANI_CDC_ANC_INPUT_MUX_POR 0
-#define TIMPANI_CDC_ANC_INPUT_MUX_S 0
-#define TIMPANI_CDC_ANC_INPUT_MUX_M 0xFF
-
-
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_ADC_SEL_S 6
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_ADC_SEL_M 0xC0
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_ADC_SEL_A_CDC_TX2DOR 0x3
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_ADC_SEL_A_CDC_TX2DOL 0x2
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_ADC_SEL_A_CDC_TX1DOR 0x1
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_ADC_SEL_A_CDC_TX1DOL 0x0
-
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_DMIC_SEL_S 4
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_DMIC_SEL_M 0x30
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_DMIC_SEL_MIC2_DIN_R 0x3
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_DMIC_SEL_MIC2_DIN_L 0x2
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_DMIC_SEL_MIC1_DIN_R 0x1
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC2_DMIC_SEL_MIC1_DIN_L 0x0
-
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_ADC_SEL_S 2
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_ADC_SEL_M 0xC
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_ADC_SEL_A_CDC_TX2DOR 0x3
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_ADC_SEL_A_CDC_TX2DOL 0x2
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_ADC_SEL_A_CDC_TX1DOR 0x1
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_ADC_SEL_A_CDC_TX1DOL 0x0
-
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_DMIC_SEL_S 0
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_DMIC_SEL_M 0x3
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_DMIC_SEL_MIC2_DIN_R 0x3
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_DMIC_SEL_MIC2_DIN_L 0x2
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_DMIC_SEL_MIC1_DIN_R 0x1
-#define TIMPANI_CDC_ANC_INPUT_MUX_ANC1_DMIC_SEL_MIC1_DIN_L 0x0
-
-
-/* -- For CDC_ANC_RX_CLK_NS_SEL */
-#define TIMPANI_A_CDC_ANC_RX_CLK_NS_SEL (0x9B)
-#define TIMPANI_CDC_ANC_RX_CLK_NS_SEL_RWC "RW"
-#define TIMPANI_CDC_ANC_RX_CLK_NS_SEL_POR 0
-#define TIMPANI_CDC_ANC_RX_CLK_NS_SEL_S 0
-#define TIMPANI_CDC_ANC_RX_CLK_NS_SEL_M 0x1
-
-
-#define TIMPANI_CDC_ANC_RX_CLK_NS_SEL_ANC_RX_CLK_NS_SEL_S 0
-#define TIMPANI_CDC_ANC_RX_CLK_NS_SEL_ANC_RX_CLK_NS_SEL_M 0x1
-
-
-/* -- For CDC_ANC_FB_TUNE_SEL */
-#define TIMPANI_A_CDC_ANC_FB_TUNE_SEL (0x9C)
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_RWC "RW"
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_POR 0
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_S 0
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_M 0x3
-
-
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC2_FB_ADC_SEL_S 1
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC2_FB_ADC_SEL_M 0x2
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC2_FB_ADC_SEL_FB_TUNE_EN 0x1
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC2_FB_ADC_SEL_FB_TUNE_DIS 0x0
-
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC1_FB_ADC_SEL_S 0
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC1_FB_ADC_SEL_M 0x1
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC1_FB_ADC_SEL_FB_TUNE_EN 0x1
-#define TIMPANI_CDC_ANC_FB_TUNE_SEL_ANC1_FB_ADC_SEL_FB_TUNE_DIS 0x0
-
-
-/* -- For CLK_DIV_SYNC_CTL */
-#define TIMPANI_A_CLK_DIV_SYNC_CTL (0x9E)
-#define TIMPANI_CLK_DIV_SYNC_CTL_RWC "RW"
-#define TIMPANI_CLK_DIV_SYNC_CTL_POR 0
-#define TIMPANI_CLK_DIV_SYNC_CTL_S 0
-#define TIMPANI_CLK_DIV_SYNC_CTL_M 0x3
-
-
-#define TIMPANI_CLK_DIV_SYNC_CTL_GLBL_DIV_SYNC_S 1
-#define TIMPANI_CLK_DIV_SYNC_CTL_GLBL_DIV_SYNC_M 0x2
-
-#define TIMPANI_CLK_DIV_SYNC_CTL_TX_DIV_SYNC_S 0
-#define TIMPANI_CLK_DIV_SYNC_CTL_TX_DIV_SYNC_M 0x1
-
-
-/* -- For CDC_ADC_CLK_EN */
-#define TIMPANI_A_CDC_ADC_CLK_EN (0x9F)
-#define TIMPANI_CDC_ADC_CLK_EN_RWC "RW"
-#define TIMPANI_CDC_ADC_CLK_EN_POR 0
-#define TIMPANI_CDC_ADC_CLK_EN_S 0
-#define TIMPANI_CDC_ADC_CLK_EN_M 0xF
-
-
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX2_R_EN_S 3
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX2_R_EN_M 0x8
-
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX2_L_EN_S 2
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX2_L_EN_M 0x4
-
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX1_R_EN_S 1
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX1_R_EN_M 0x2
-
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX1_L_EN_S 0
-#define TIMPANI_CDC_ADC_CLK_EN_A_TX1_L_EN_M 0x1
-
-
-/* -- For CDC_ST_MIXING */
-#define TIMPANI_A_CDC_ST_MIXING (0xA0)
-#define TIMPANI_CDC_ST_MIXING_RWC "RW"
-#define TIMPANI_CDC_ST_MIXING_POR 0
-#define TIMPANI_CDC_ST_MIXING_S 0
-#define TIMPANI_CDC_ST_MIXING_M 0xF
-
-
-#define TIMPANI_CDC_ST_MIXING_TX2_R_S 3
-#define TIMPANI_CDC_ST_MIXING_TX2_R_M 0x8
-
-#define TIMPANI_CDC_ST_MIXING_TX2_L_S 2
-#define TIMPANI_CDC_ST_MIXING_TX2_L_M 0x4
-
-#define TIMPANI_CDC_ST_MIXING_TX1_R_S 1
-#define TIMPANI_CDC_ST_MIXING_TX1_R_M 0x2
-
-#define TIMPANI_CDC_ST_MIXING_TX1_L_S 0
-#define TIMPANI_CDC_ST_MIXING_TX1_L_M 0x1
-
-
-/* -- For CDC_RX2_CTL */
-#define TIMPANI_A_CDC_RX2_CTL (0xA1)
-#define TIMPANI_CDC_RX2_CTL_RWC "RW"
-#define TIMPANI_CDC_RX2_CTL_POR 0xc
-#define TIMPANI_CDC_RX2_CTL_S 0
-#define TIMPANI_CDC_RX2_CTL_M 0x3F
-
-
-#define TIMPANI_CDC_RX2_CTL_SIDETONE_EN2_R_S 5
-#define TIMPANI_CDC_RX2_CTL_SIDETONE_EN2_R_M 0x20
-
-#define TIMPANI_CDC_RX2_CTL_SIDETONE_EN2_L_S 4
-#define TIMPANI_CDC_RX2_CTL_SIDETONE_EN2_L_M 0x10
-
-#define TIMPANI_CDC_RX2_CTL_RX2_RATE_S 2
-#define TIMPANI_CDC_RX2_CTL_RX2_RATE_M 0xC
-#define TIMPANI_CDC_RX2_CTL_RX2_RATE_OSR_256 0x3
-#define TIMPANI_CDC_RX2_CTL_RX2_RATE_OSR_128 0x1
-#define TIMPANI_CDC_RX2_CTL_RX2_RATE_OSR_64 0x0
-
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_RATE_S 1
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_RATE_M 0x2
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_RATE_BR_32 0x1
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_RATE_BR_64 0x0
-
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_MODE_S 0
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_MODE_M 0x1
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_MODE_MASTER 0x1
-#define TIMPANI_CDC_RX2_CTL_RX2_I2S_MODE_SLAVE 0x0
-
-
-/* -- For CDC_ARB_CLK_EN */
-#define TIMPANI_A_CDC_ARB_CLK_EN (0xA2)
-#define TIMPANI_CDC_ARB_CLK_EN_RWC "RW"
-#define TIMPANI_CDC_ARB_CLK_EN_POR 0
-#define TIMPANI_CDC_ARB_CLK_EN_S 0
-#define TIMPANI_CDC_ARB_CLK_EN_M 0x1
-
-
-#define TIMPANI_CDC_ARB_CLK_EN_ARB_CLK_EN_S 0
-#define TIMPANI_CDC_ARB_CLK_EN_ARB_CLK_EN_M 0x1
-
-
-/* -- For CDC_I2S_CTL2 */
-#define TIMPANI_A_CDC_I2S_CTL2 (0xA3)
-#define TIMPANI_CDC_I2S_CTL2_RWC "RW"
-#define TIMPANI_CDC_I2S_CTL2_POR 0
-#define TIMPANI_CDC_I2S_CTL2_S 0
-#define TIMPANI_CDC_I2S_CTL2_M 0x3F
-
-
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_S 3
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_M 0x38
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_CLK_DMIC 0x4
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_CLK_TX2_R 0x3
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_CLK_TX2_L 0x2
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_CLK_TX1_R 0x1
-#define TIMPANI_CDC_I2S_CTL2_TX_I2S_CLK_SEL_CLK_TX1_L 0x0
-
-#define TIMPANI_CDC_I2S_CTL2_RX2_I2SCLK_EN_S 2
-#define TIMPANI_CDC_I2S_CTL2_RX2_I2SCLK_EN_M 0x4
-
-#define TIMPANI_CDC_I2S_CTL2_RX1_I2SCLK_EN_S 1
-#define TIMPANI_CDC_I2S_CTL2_RX1_I2SCLK_EN_M 0x2
-
-#define TIMPANI_CDC_I2S_CTL2_TX_I2SCLK_EN_S 0
-#define TIMPANI_CDC_I2S_CTL2_TX_I2SCLK_EN_M 0x1
-
-
-/* -- For CDC_RX2LG */
-#define TIMPANI_A_CDC_RX2LG (0xA4)
-#define TIMPANI_CDC_RX2LG_RWC "RW"
-#define TIMPANI_CDC_RX2LG_POR 0xac
-#define TIMPANI_CDC_RX2LG_S 0
-#define TIMPANI_CDC_RX2LG_M 0xFF
-
-
-#define TIMPANI_CDC_RX2LG_GAIN_S 0
-#define TIMPANI_CDC_RX2LG_GAIN_M 0xFF
-
-
-/* -- For CDC_RX2RG */
-#define TIMPANI_A_CDC_RX2RG (0xA5)
-#define TIMPANI_CDC_RX2RG_RWC "RW"
-#define TIMPANI_CDC_RX2RG_POR 0xac
-#define TIMPANI_CDC_RX2RG_S 0
-#define TIMPANI_CDC_RX2RG_M 0xFF
-
-
-#define TIMPANI_CDC_RX2RG_GAIN_S 0
-#define TIMPANI_CDC_RX2RG_GAIN_M 0xFF
-
-
-/* -- For CDC_TX2LG */
-#define TIMPANI_A_CDC_TX2LG (0xA6)
-#define TIMPANI_CDC_TX2LG_RWC "RW"
-#define TIMPANI_CDC_TX2LG_POR 0xac
-#define TIMPANI_CDC_TX2LG_S 0
-#define TIMPANI_CDC_TX2LG_M 0xFF
-
-
-#define TIMPANI_CDC_TX2LG_GAIN_S 0
-#define TIMPANI_CDC_TX2LG_GAIN_M 0xFF
-
-
-/* -- For CDC_TX2RG */
-#define TIMPANI_A_CDC_TX2RG (0xA7)
-#define TIMPANI_CDC_TX2RG_RWC "RW"
-#define TIMPANI_CDC_TX2RG_POR 0xac
-#define TIMPANI_CDC_TX2RG_S 0
-#define TIMPANI_CDC_TX2RG_M 0xFF
-
-
-#define TIMPANI_CDC_TX2RG_GAIN_S 0
-#define TIMPANI_CDC_TX2RG_GAIN_M 0xFF
-
-
-/* -- For CDC_DMIC_MUX */
-#define TIMPANI_A_CDC_DMIC_MUX (0xA8)
-#define TIMPANI_CDC_DMIC_MUX_RWC "RW"
-#define TIMPANI_CDC_DMIC_MUX_POR 0
-#define TIMPANI_CDC_DMIC_MUX_S 0
-#define TIMPANI_CDC_DMIC_MUX_M 0xFF
-
-
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_R_S 6
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_R_M 0xC0
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_R_MIC2_DIN_R 0x3
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_R_MIC2_DIN_L 0x2
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_R_MIC1_DIN_R 0x1
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_R_MIC1_DIN_L 0x0
-
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_L_S 4
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_L_M 0x30
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_L_MIC2_DIN_R 0x3
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_L_MIC2_DIN_L 0x2
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_L_MIC1_DIN_R 0x1
-#define TIMPANI_CDC_DMIC_MUX_TX2_DMIC_MUX_SEL_L_MIC1_DIN_L 0x0
-
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_R_S 2
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_R_M 0xC
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_R_MIC2_DIN_R 0x3
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_R_MIC2_DIN_L 0x2
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_R_MIC1_DIN_R 0x1
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_R_MIC1_DIN_L 0x0
-
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_L_S 0
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_L_M 0x3
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_L_MIC2_DIN_R 0x3
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_L_MIC2_DIN_L 0x2
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_L_MIC1_DIN_R 0x1
-#define TIMPANI_CDC_DMIC_MUX_TX1_DMIC_MUX_SEL_L_MIC1_DIN_L 0x0
-
-
-/* -- For CDC_ARB_CLK_CTL */
-#define TIMPANI_A_CDC_ARB_CLK_CTL (0xA9)
-#define TIMPANI_CDC_ARB_CLK_CTL_RWC "RW"
-#define TIMPANI_CDC_ARB_CLK_CTL_POR 0
-#define TIMPANI_CDC_ARB_CLK_CTL_S 0
-#define TIMPANI_CDC_ARB_CLK_CTL_M 0x3
-
-
-#define TIMPANI_CDC_ARB_CLK_CTL_ARB_CLK_SEL_S 0
-#define TIMPANI_CDC_ARB_CLK_CTL_ARB_CLK_SEL_M 0x3
-#define TIMPANI_CDC_ARB_CLK_CTL_ARB_CLK_SEL_TX_MCLK 0x0
-#define TIMPANI_CDC_ARB_CLK_CTL_ARB_CLK_SEL_RX_MCLK1 0x1
-#define TIMPANI_CDC_ARB_CLK_CTL_ARB_CLK_SEL_RX_MCLK2 0x2
-#define TIMPANI_CDC_ARB_CLK_CTL_ARB_CLK_SEL_TCXO 0x3
-
-
-/* -- For CDC_GCTL2 */
-#define TIMPANI_A_CDC_GCTL2 (0xAA)
-#define TIMPANI_CDC_GCTL2_RWC "RW"
-#define TIMPANI_CDC_GCTL2_POR 0x33
-#define TIMPANI_CDC_GCTL2_S 0
-#define TIMPANI_CDC_GCTL2_M 0xFF
-
-
-#define TIMPANI_CDC_GCTL2_TX2_PGA_UPDATE_R_S 7
-#define TIMPANI_CDC_GCTL2_TX2_PGA_UPDATE_R_M 0x80
-
-#define TIMPANI_CDC_GCTL2_TX2_PGA_UPDATE_L_S 6
-#define TIMPANI_CDC_GCTL2_TX2_PGA_UPDATE_L_M 0x40
-
-#define TIMPANI_CDC_GCTL2_TX2_PGA_MUTE_EN_R_S 5
-#define TIMPANI_CDC_GCTL2_TX2_PGA_MUTE_EN_R_M 0x20
-
-#define TIMPANI_CDC_GCTL2_TX2_PGA_MUTE_EN_L_S 4
-#define TIMPANI_CDC_GCTL2_TX2_PGA_MUTE_EN_L_M 0x10
-
-#define TIMPANI_CDC_GCTL2_RX2_PGA_UPDATE_R_S 3
-#define TIMPANI_CDC_GCTL2_RX2_PGA_UPDATE_R_M 0x8
-
-#define TIMPANI_CDC_GCTL2_RX2_PGA_UPDATE_L_S 2
-#define TIMPANI_CDC_GCTL2_RX2_PGA_UPDATE_L_M 0x4
-
-#define TIMPANI_CDC_GCTL2_RX2_PGA_MUTE_EN_R_S 1
-#define TIMPANI_CDC_GCTL2_RX2_PGA_MUTE_EN_R_M 0x2
-
-#define TIMPANI_CDC_GCTL2_RX2_PGA_MUTE_EN_L_S 0
-#define TIMPANI_CDC_GCTL2_RX2_PGA_MUTE_EN_L_M 0x1
-
-
-/* -- For CDC_BYPASS_CTL2 */
-#define TIMPANI_A_CDC_BYPASS_CTL2 (0xAB)
-#define TIMPANI_CDC_BYPASS_CTL2_RWC "RW"
-#define TIMPANI_CDC_BYPASS_CTL2_POR 0x2D
-#define TIMPANI_CDC_BYPASS_CTL2_S 0
-#define TIMPANI_CDC_BYPASS_CTL2_M 0x3F
-
-
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_DMIC_GAIN_BP_R_S 5
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_DMIC_GAIN_BP_R_M 0x20
-
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_ADC_GAIN_BP_R_S 4
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_ADC_GAIN_BP_R_M 0x10
-
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_HPF_BP_R_S 3
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_HPF_BP_R_M 0x8
-
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_DMIC_GAIN_BP_L_S 2
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_DMIC_GAIN_BP_L_M 0x4
-
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_ADC_GAIN_BP_L_S 1
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_ADC_GAIN_BP_L_M 0x2
-
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_HPF_BP_L_S 0
-#define TIMPANI_CDC_BYPASS_CTL2_TX1_HPF_BP_L_M 0x1
-
-
-/* -- For CDC_BYPASS_CTL3 */
-#define TIMPANI_A_CDC_BYPASS_CTL3 (0xAC)
-#define TIMPANI_CDC_BYPASS_CTL3_RWC "RW"
-#define TIMPANI_CDC_BYPASS_CTL3_POR 0x2D
-#define TIMPANI_CDC_BYPASS_CTL3_S 0
-#define TIMPANI_CDC_BYPASS_CTL3_M 0x3F
-
-
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_DMIC_GAIN_BP_R_S 5
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_DMIC_GAIN_BP_R_M 0x20
-
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_ADC_GAIN_BP_R_S 4
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_ADC_GAIN_BP_R_M 0x10
-
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_HPF_BP_R_S 3
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_HPF_BP_R_M 0x8
-
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_DMIC_GAIN_BP_L_S 2
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_DMIC_GAIN_BP_L_M 0x4
-
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_ADC_GAIN_BP_L_S 1
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_ADC_GAIN_BP_L_M 0x2
-
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_HPF_BP_L_S 0
-#define TIMPANI_CDC_BYPASS_CTL3_TX2_HPF_BP_L_M 0x1
-
-
-/* -- For CDC_BYPASS_CTL4 */
-#define TIMPANI_A_CDC_BYPASS_CTL4 (0xAD)
-#define TIMPANI_CDC_BYPASS_CTL4_RWC "RW"
-#define TIMPANI_CDC_BYPASS_CTL4_POR 0x2
-#define TIMPANI_CDC_BYPASS_CTL4_S 0
-#define TIMPANI_CDC_BYPASS_CTL4_M 0xF
-
-
-#define TIMPANI_CDC_BYPASS_CTL4_DITHER_BP_S 3
-#define TIMPANI_CDC_BYPASS_CTL4_DITHER_BP_M 0x8
-
-#define TIMPANI_CDC_BYPASS_CTL4_DITHER_SHAPE_SEL_S 2
-#define TIMPANI_CDC_BYPASS_CTL4_DITHER_SHAPE_SEL_M 0x4
-
-#define TIMPANI_CDC_BYPASS_CTL4_DITHER_DLY_SEL_S 1
-#define TIMPANI_CDC_BYPASS_CTL4_DITHER_DLY_SEL_M 0x2
-
-#define TIMPANI_CDC_BYPASS_CTL4_RX2_HPF_BP_S 0
-#define TIMPANI_CDC_BYPASS_CTL4_RX2_HPF_BP_M 0x1
-
-
-/* -- For CDC_RX2L_DCOFFSET */
-#define TIMPANI_A_CDC_RX2L_DCOFFSET (0xAE)
-#define TIMPANI_CDC_RX2L_DCOFFSET_RWC "RW"
-#define TIMPANI_CDC_RX2L_DCOFFSET_POR 0
-#define TIMPANI_CDC_RX2L_DCOFFSET_S 0
-#define TIMPANI_CDC_RX2L_DCOFFSET_M 0xFF
-
-
-#define TIMPANI_CDC_RX2L_DCOFFSET_OFFSET_S 0
-#define TIMPANI_CDC_RX2L_DCOFFSET_OFFSET_M 0xFF
-
-
-/* -- For CDC_RX2R_DCOFFSET */
-#define TIMPANI_A_CDC_RX2R_DCOFFSET (0xAF)
-#define TIMPANI_CDC_RX2R_DCOFFSET_RWC "RW"
-#define TIMPANI_CDC_RX2R_DCOFFSET_POR 0
-#define TIMPANI_CDC_RX2R_DCOFFSET_S 0
-#define TIMPANI_CDC_RX2R_DCOFFSET_M 0xFF
-
-
-#define TIMPANI_CDC_RX2R_DCOFFSET_OFFSET_S 0
-#define TIMPANI_CDC_RX2R_DCOFFSET_OFFSET_M 0xFF
-
-
-/* -- For CDC_RX_MIX_CTL */
-#define TIMPANI_A_CDC_RX_MIX_CTL (0xB0)
-#define TIMPANI_CDC_RX_MIX_CTL_RWC "RW"
-#define TIMPANI_CDC_RX_MIX_CTL_POR 0
-#define TIMPANI_CDC_RX_MIX_CTL_S 0
-#define TIMPANI_CDC_RX_MIX_CTL_M 0x3
-
-
-#define TIMPANI_CDC_RX_MIX_CTL_RX2TO1_EN_S 1
-#define TIMPANI_CDC_RX_MIX_CTL_RX2TO1_EN_M 0x2
-
-#define TIMPANI_CDC_RX_MIX_CTL_RX1TO2_EN_S 0
-#define TIMPANI_CDC_RX_MIX_CTL_RX1TO2_EN_M 0x1
-
-
-/* -- For CDC_SPARE_CTL */
-#define TIMPANI_A_CDC_SPARE_CTL (0xB1)
-#define TIMPANI_CDC_SPARE_CTL_RWC "RW"
-#define TIMPANI_CDC_SPARE_CTL_POR 0
-#define TIMPANI_CDC_SPARE_CTL_S 0
-#define TIMPANI_CDC_SPARE_CTL_M 0xFF
-
-
-#define TIMPANI_CDC_SPARE_CTL_CDC_SPARE_S 0
-#define TIMPANI_CDC_SPARE_CTL_CDC_SPARE_M 0xFF
-
-
-/* -- For CDC_TESTMODE2 */
-#define TIMPANI_A_CDC_TESTMODE2 (0xB2)
-#define TIMPANI_CDC_TESTMODE2_RWC "RW"
-#define TIMPANI_CDC_TESTMODE2_POR 0
-#define TIMPANI_CDC_TESTMODE2_S 0
-#define TIMPANI_CDC_TESTMODE2_M 0x1F
-
-
-#define TIMPANI_CDC_TESTMODE2_RX2_TEST_EN_R_S 4
-#define TIMPANI_CDC_TESTMODE2_RX2_TEST_EN_R_M 0x10
-
-#define TIMPANI_CDC_TESTMODE2_RX2_TEST_EN_L_S 3
-#define TIMPANI_CDC_TESTMODE2_RX2_TEST_EN_L_M 0x8
-
-#define TIMPANI_CDC_TESTMODE2_TX2_TEST_EN_R_S 2
-#define TIMPANI_CDC_TESTMODE2_TX2_TEST_EN_R_M 0x4
-
-#define TIMPANI_CDC_TESTMODE2_TX2_TEST_EN_L_S 1
-#define TIMPANI_CDC_TESTMODE2_TX2_TEST_EN_L_M 0x2
-
-#define TIMPANI_CDC_TESTMODE2_A_LOOPBACK_EN2_S 0
-#define TIMPANI_CDC_TESTMODE2_A_LOOPBACK_EN2_M 0x1
-
-
-/* -- For CDC_PDM_OE */
-#define TIMPANI_A_CDC_PDM_OE (0xB3)
-#define TIMPANI_CDC_PDM_OE_RWC "RW"
-#define TIMPANI_CDC_PDM_OE_POR 0
-#define TIMPANI_CDC_PDM_OE_S 0
-#define TIMPANI_CDC_PDM_OE_M 0x3F
-
-
-#define TIMPANI_CDC_PDM_OE_PDM_23_20_OE_S 5
-#define TIMPANI_CDC_PDM_OE_PDM_23_20_OE_M 0x20
-
-#define TIMPANI_CDC_PDM_OE_PDM_19_16_OE_S 4
-#define TIMPANI_CDC_PDM_OE_PDM_19_16_OE_M 0x10
-
-#define TIMPANI_CDC_PDM_OE_PDM_15_12_OE_S 3
-#define TIMPANI_CDC_PDM_OE_PDM_15_12_OE_M 0x8
-
-#define TIMPANI_CDC_PDM_OE_PDM_11_8_OE_S 2
-#define TIMPANI_CDC_PDM_OE_PDM_11_8_OE_M 0x4
-
-#define TIMPANI_CDC_PDM_OE_PDM_7_4_OE_S 1
-#define TIMPANI_CDC_PDM_OE_PDM_7_4_OE_M 0x2
-
-#define TIMPANI_CDC_PDM_OE_PDM_3_0_OE_S 0
-#define TIMPANI_CDC_PDM_OE_PDM_3_0_OE_M 0x1
-
-
-/* -- For CDC_TX1R_STG */
-#define TIMPANI_A_CDC_TX1R_STG (0xB4)
-#define TIMPANI_CDC_TX1R_STG_RWC "RW"
-#define TIMPANI_CDC_TX1R_STG_POR 0xac
-#define TIMPANI_CDC_TX1R_STG_S 0
-#define TIMPANI_CDC_TX1R_STG_M 0xFF
-
-
-#define TIMPANI_CDC_TX1R_STG_GAIN_S 0
-#define TIMPANI_CDC_TX1R_STG_GAIN_M 0xFF
-
-
-/* -- For CDC_TX2L_STG */
-#define TIMPANI_A_CDC_TX2L_STG (0xB5)
-#define TIMPANI_CDC_TX2L_STG_RWC "RW"
-#define TIMPANI_CDC_TX2L_STG_POR 0xac
-#define TIMPANI_CDC_TX2L_STG_S 0
-#define TIMPANI_CDC_TX2L_STG_M 0xFF
-
-
-#define TIMPANI_CDC_TX2L_STG_GAIN_S 0
-#define TIMPANI_CDC_TX2L_STG_GAIN_M 0xFF
-
-
-/* -- For CDC_TX2R_STG */
-#define TIMPANI_A_CDC_TX2R_STG (0xB6)
-#define TIMPANI_CDC_TX2R_STG_RWC "RW"
-#define TIMPANI_CDC_TX2R_STG_POR 0xac
-#define TIMPANI_CDC_TX2R_STG_S 0
-#define TIMPANI_CDC_TX2R_STG_M 0xFF
-
-
-#define TIMPANI_CDC_TX2R_STG_GAIN_S 0
-#define TIMPANI_CDC_TX2R_STG_GAIN_M 0xFF
-
-
-/* -- For CDC_ARB_BYPASS_CTL */
-#define TIMPANI_A_CDC_ARB_BYPASS_CTL (0xB7)
-#define TIMPANI_CDC_ARB_BYPASS_CTL_RWC "RW"
-#define TIMPANI_CDC_ARB_BYPASS_CTL_POR 0
-#define TIMPANI_CDC_ARB_BYPASS_CTL_S 0
-#define TIMPANI_CDC_ARB_BYPASS_CTL_M 0x1
-
-
-#define TIMPANI_CDC_ARB_BYPASS_CTL_ARB_BYPASS_EN_S 0
-#define TIMPANI_CDC_ARB_BYPASS_CTL_ARB_BYPASS_EN_M 0x1
-#define TIMPANI_CDC_ARB_BYPASS_CTL_ARB_BYPASS_EN_BYPASS 0x1
-#define TIMPANI_CDC_ARB_BYPASS_CTL_ARB_BYPASS_EN_NO_BYPASS 0x0
-
-
-/* -- For CDC_ANC1_CTL1 */
-#define TIMPANI_A_CDC_ANC1_CTL1 (0xC0)
-#define TIMPANI_CDC_ANC1_CTL1_RWC "RW"
-#define TIMPANI_CDC_ANC1_CTL1_POR 0
-#define TIMPANI_CDC_ANC1_CTL1_S 0
-#define TIMPANI_CDC_ANC1_CTL1_M 0x3F
-
-
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FF_OUT_DIS_S 5
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FF_OUT_DIS_M 0x20
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FF_OUT_DIS_FF_OUT_DIS 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FF_OUT_DIS_FF_OUT_EN 0x0
-
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_ADC_DMIC_SEL_S 4
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_ADC_DMIC_SEL_M 0x10
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_ADC_DMIC_SEL_DMIC 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_ADC_DMIC_SEL_ADC 0x0
-
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_LR_EN_S 3
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_LR_EN_M 0x8
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_LR_EN_LR_MIX_EN 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_LR_EN_LR_MIX_DIS 0x0
-
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FB_EN_S 2
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FB_EN_M 0x4
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FB_EN_FB_MIX_EN 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_FB_EN_FB_MIX_DIS 0x0
-
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_EN_S 1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_EN_M 0x2
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_EN_ANC_EN 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_EN_ANC_DIS 0x0
-
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_SOFT_RESET_S 0
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_SOFT_RESET_M 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_SOFT_RESET_ANC_RESET 0x1
-#define TIMPANI_CDC_ANC1_CTL1_ANC1_SOFT_RESET_ANC_ACTIVE 0x0
-
-
-/* -- For CDC_ANC1_CTL2 */
-#define TIMPANI_A_CDC_ANC1_CTL2 (0xC1)
-#define TIMPANI_CDC_ANC1_CTL2_RWC "RW"
-#define TIMPANI_CDC_ANC1_CTL2_POR 0
-#define TIMPANI_CDC_ANC1_CTL2_S 0
-#define TIMPANI_CDC_ANC1_CTL2_M 0x1F
-
-
-#define TIMPANI_CDC_ANC1_CTL2_ANC1_FREQ_SEL_S 0
-#define TIMPANI_CDC_ANC1_CTL2_ANC1_FREQ_SEL_M 0x1F
-
-
-/* -- For CDC_ANC1_FF_FB_SHIFT */
-#define TIMPANI_A_CDC_ANC1_FF_FB_SHIFT (0xC2)
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_RWC "RW"
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_POR 0
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_S 0
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_M 0xFF
-
-
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_ANC1_FB_LPF_SHIFT_S 4
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_ANC1_FB_LPF_SHIFT_M 0xF0
-
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_ANC1_FF_LPF_SHIFT_S 0
-#define TIMPANI_CDC_ANC1_FF_FB_SHIFT_ANC1_FF_LPF_SHIFT_M 0xF
-
-
-/* -- For CDC_ANC1_RX_NS */
-#define TIMPANI_A_CDC_ANC1_RX_NS (0xC3)
-#define TIMPANI_CDC_ANC1_RX_NS_RWC "RW"
-#define TIMPANI_CDC_ANC1_RX_NS_POR 0x1
-#define TIMPANI_CDC_ANC1_RX_NS_S 0
-#define TIMPANI_CDC_ANC1_RX_NS_M 0x7
-
-
-#define TIMPANI_CDC_ANC1_RX_NS_ANC1_DITHER_BP_S 2
-#define TIMPANI_CDC_ANC1_RX_NS_ANC1_DITHER_BP_M 0x4
-
-#define TIMPANI_CDC_ANC1_RX_NS_ANC1_DITHER_SHAPE_SEL_S 1
-#define TIMPANI_CDC_ANC1_RX_NS_ANC1_DITHER_SHAPE_SEL_M 0x2
-
-#define TIMPANI_CDC_ANC1_RX_NS_ANC1_DITHER_DLY_SEL_S 0
-#define TIMPANI_CDC_ANC1_RX_NS_ANC1_DITHER_DLY_SEL_M 0x1
-
-
-/* -- For CDC_ANC1_SPARE */
-#define TIMPANI_A_CDC_ANC1_SPARE (0xC4)
-#define TIMPANI_CDC_ANC1_SPARE_RWC "RW"
-#define TIMPANI_CDC_ANC1_SPARE_POR 0
-#define TIMPANI_CDC_ANC1_SPARE_S 0
-#define TIMPANI_CDC_ANC1_SPARE_M 0xFF
-
-
-#define TIMPANI_CDC_ANC1_SPARE_ANC1_SPARE_S 0
-#define TIMPANI_CDC_ANC1_SPARE_ANC1_SPARE_M 0xFF
-
-
-/* -- For CDC_ANC1_IIR_COEFF_PTR */
-#define TIMPANI_A_CDC_ANC1_IIR_COEFF_PTR (0xC5)
-#define TIMPANI_CDC_ANC1_IIR_COEFF_PTR_RWC "RW"
-#define TIMPANI_CDC_ANC1_IIR_COEFF_PTR_POR 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_PTR_M 0x1F
-
-
-#define TIMPANI_CDC_ANC1_IIR_COEFF_PTR_ANC1_IIR_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_PTR_ANC1_IIR_COEFF_PTR_M 0x1F
-
-
-/* -- For CDC_ANC1_IIR_COEFF_MSB */
-#define TIMPANI_A_CDC_ANC1_IIR_COEFF_MSB (0xC6)
-#define TIMPANI_CDC_ANC1_IIR_COEFF_MSB_RWC "RW"
-#define TIMPANI_CDC_ANC1_IIR_COEFF_MSB_POR 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_MSB_M 0x1
-
-
-#define TIMPANI_CDC_ANC1_IIR_COEFF_MSB_ANC1_IIR_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_MSB_ANC1_IIR_COEFF_MSB_M 0x1
-
-
-/* -- For CDC_ANC1_IIR_COEFF_LSB */
-#define TIMPANI_A_CDC_ANC1_IIR_COEFF_LSB (0xC7)
-#define TIMPANI_CDC_ANC1_IIR_COEFF_LSB_RWC "RW"
-#define TIMPANI_CDC_ANC1_IIR_COEFF_LSB_POR 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_LSB_M 0xFF
-
-
-#define TIMPANI_CDC_ANC1_IIR_COEFF_LSB_ANC1_IIR_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_LSB_ANC1_IIR_COEFF_LSB_M 0xFF
-
-
-/* -- For CDC_ANC1_IIR_COEFF_CTL */
-#define TIMPANI_A_CDC_ANC1_IIR_COEFF_CTL (0xC8)
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_RWC "RW"
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_POR 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_M 0x3
-
-
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_ADAPTIVE_S 1
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_ADAPTIVE_M 0x2
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_ADAPTIVE_ADAPTIVE 0x1
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_ADAPTIVE_NON_ADAPTIVE 0x0
-
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_EN_S 0
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_EN_M 0x1
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_EN_UPDATE 0x1
-#define TIMPANI_CDC_ANC1_IIR_COEFF_CTL_ANC1_IIR_COEFF_EN_NO_UPDATE 0x0
-
-
-/* -- For CDC_ANC1_LPF_COEFF_PTR */
-#define TIMPANI_A_CDC_ANC1_LPF_COEFF_PTR (0xC9)
-#define TIMPANI_CDC_ANC1_LPF_COEFF_PTR_RWC "RW"
-#define TIMPANI_CDC_ANC1_LPF_COEFF_PTR_POR 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_PTR_M 0xF
-
-
-#define TIMPANI_CDC_ANC1_LPF_COEFF_PTR_ANC1_LPF_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_PTR_ANC1_LPF_COEFF_PTR_M 0xF
-
-
-/* -- For CDC_ANC1_LPF_COEFF_MSB */
-#define TIMPANI_A_CDC_ANC1_LPF_COEFF_MSB (0xCA)
-#define TIMPANI_CDC_ANC1_LPF_COEFF_MSB_RWC "RW"
-#define TIMPANI_CDC_ANC1_LPF_COEFF_MSB_POR 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_MSB_M 0xF
-
-
-#define TIMPANI_CDC_ANC1_LPF_COEFF_MSB_ANC1_LPF_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_MSB_ANC1_LPF_COEFF_MSB_M 0xF
-
-
-/* -- For CDC_ANC1_LPF_COEFF_LSB */
-#define TIMPANI_A_CDC_ANC1_LPF_COEFF_LSB (0xCB)
-#define TIMPANI_CDC_ANC1_LPF_COEFF_LSB_RWC "RW"
-#define TIMPANI_CDC_ANC1_LPF_COEFF_LSB_POR 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_LSB_M 0xFF
-
-
-#define TIMPANI_CDC_ANC1_LPF_COEFF_LSB_ANC1_LPF_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC1_LPF_COEFF_LSB_ANC1_LPF_COEFF_LSB_M 0xFF
-
-
-/* -- For CDC_ANC1_SCALE_PTR */
-#define TIMPANI_A_CDC_ANC1_SCALE_PTR (0xCC)
-#define TIMPANI_CDC_ANC1_SCALE_PTR_RWC "RW"
-#define TIMPANI_CDC_ANC1_SCALE_PTR_POR 0
-#define TIMPANI_CDC_ANC1_SCALE_PTR_S 0
-#define TIMPANI_CDC_ANC1_SCALE_PTR_M 0x7
-
-
-#define TIMPANI_CDC_ANC1_SCALE_PTR_ANC1_SCALE_PTR_S 0
-#define TIMPANI_CDC_ANC1_SCALE_PTR_ANC1_SCALE_PTR_M 0x7
-
-
-/* -- For CDC_ANC1_SCALE */
-#define TIMPANI_A_CDC_ANC1_SCALE (0xCD)
-#define TIMPANI_CDC_ANC1_SCALE_RWC "RW"
-#define TIMPANI_CDC_ANC1_SCALE_POR 0
-#define TIMPANI_CDC_ANC1_SCALE_S 0
-#define TIMPANI_CDC_ANC1_SCALE_M 0xFF
-
-
-#define TIMPANI_CDC_ANC1_SCALE_ANC1_SCALE_S 0
-#define TIMPANI_CDC_ANC1_SCALE_ANC1_SCALE_M 0xFF
-
-
-/* -- For CDC_ANC1_DEBUG */
-#define TIMPANI_A_CDC_ANC1_DEBUG (0xCE)
-#define TIMPANI_CDC_ANC1_DEBUG_RWC "RW"
-#define TIMPANI_CDC_ANC1_DEBUG_POR 0
-#define TIMPANI_CDC_ANC1_DEBUG_S 0
-#define TIMPANI_CDC_ANC1_DEBUG_M 0xF
-
-
-#define TIMPANI_CDC_ANC1_DEBUG_ANC1_DEBUG_SEL_S 0
-#define TIMPANI_CDC_ANC1_DEBUG_ANC1_DEBUG_SEL_M 0xF
-
-
-/* -- For CDC_ANC2_CTL1 */
-#define TIMPANI_A_CDC_ANC2_CTL1 (0xD0)
-#define TIMPANI_CDC_ANC2_CTL1_RWC "RW"
-#define TIMPANI_CDC_ANC2_CTL1_POR 0
-#define TIMPANI_CDC_ANC2_CTL1_S 0
-#define TIMPANI_CDC_ANC2_CTL1_M 0x3F
-
-
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FF_OUT_DIS_S 5
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FF_OUT_DIS_M 0x20
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FF_OUT_DIS_FF_OUT_DIS 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FF_OUT_DIS_FF_OUT_EN 0x0
-
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_ADC_DMIC_SEL_S 4
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_ADC_DMIC_SEL_M 0x10
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_ADC_DMIC_SEL_DMIC 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_ADC_DMIC_SEL_ADC 0x0
-
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_LR_EN_S 3
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_LR_EN_M 0x8
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_LR_EN_LR_MIX_EN 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_LR_EN_LR_MIX_DIS 0x0
-
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FB_EN_S 2
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FB_EN_M 0x4
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FB_EN_FB_MIX_EN 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_FB_EN_FB_MIX_DIS 0x0
-
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_EN_S 1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_EN_M 0x2
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_EN_ANC_EN 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_EN_ANC_DIS 0x0
-
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_SOFT_RESET_S 0
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_SOFT_RESET_M 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_SOFT_RESET_ANC_RESET 0x1
-#define TIMPANI_CDC_ANC2_CTL1_ANC2_SOFT_RESET_ANC_ACTIVE 0x0
-
-
-/* -- For CDC_ANC2_CTL2 */
-#define TIMPANI_A_CDC_ANC2_CTL2 (0xD1)
-#define TIMPANI_CDC_ANC2_CTL2_RWC "RW"
-#define TIMPANI_CDC_ANC2_CTL2_POR 0
-#define TIMPANI_CDC_ANC2_CTL2_S 0
-#define TIMPANI_CDC_ANC2_CTL2_M 0x1F
-
-
-#define TIMPANI_CDC_ANC2_CTL2_ANC2_FREQ_SEL_S 0
-#define TIMPANI_CDC_ANC2_CTL2_ANC2_FREQ_SEL_M 0x1F
-
-
-/* -- For CDC_ANC2_FF_FB_SHIFT */
-#define TIMPANI_A_CDC_ANC2_FF_FB_SHIFT (0xD2)
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_RWC "RW"
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_POR 0
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_S 0
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_M 0xFF
-
-
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_ANC2_FB_LPF_SHIFT_S 4
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_ANC2_FB_LPF_SHIFT_M 0xF0
-
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_ANC2_FF_LPF_SHIFT_S 0
-#define TIMPANI_CDC_ANC2_FF_FB_SHIFT_ANC2_FF_LPF_SHIFT_M 0xF
-
-
-/* -- For CDC_ANC2_RX_NS */
-#define TIMPANI_A_CDC_ANC2_RX_NS (0xD3)
-#define TIMPANI_CDC_ANC2_RX_NS_RWC "RW"
-#define TIMPANI_CDC_ANC2_RX_NS_POR 0x1
-#define TIMPANI_CDC_ANC2_RX_NS_S 0
-#define TIMPANI_CDC_ANC2_RX_NS_M 0x7
-
-
-#define TIMPANI_CDC_ANC2_RX_NS_ANC2_DITHER_BP_S 2
-#define TIMPANI_CDC_ANC2_RX_NS_ANC2_DITHER_BP_M 0x4
-
-#define TIMPANI_CDC_ANC2_RX_NS_ANC2_DITHER_SHAPE_SEL_S 1
-#define TIMPANI_CDC_ANC2_RX_NS_ANC2_DITHER_SHAPE_SEL_M 0x2
-
-#define TIMPANI_CDC_ANC2_RX_NS_ANC2_DITHER_DLY_SEL_S 0
-#define TIMPANI_CDC_ANC2_RX_NS_ANC2_DITHER_DLY_SEL_M 0x1
-
-
-/* -- For CDC_ANC2_SPARE */
-#define TIMPANI_A_CDC_ANC2_SPARE (0xD4)
-#define TIMPANI_CDC_ANC2_SPARE_RWC "RW"
-#define TIMPANI_CDC_ANC2_SPARE_POR 0
-#define TIMPANI_CDC_ANC2_SPARE_S 0
-#define TIMPANI_CDC_ANC2_SPARE_M 0xFF
-
-
-#define TIMPANI_CDC_ANC2_SPARE_ANC2_SPARE_S 0
-#define TIMPANI_CDC_ANC2_SPARE_ANC2_SPARE_M 0xFF
-
-
-/* -- For CDC_ANC2_IIR_COEFF_PTR */
-#define TIMPANI_A_CDC_ANC2_IIR_COEFF_PTR (0xD5)
-#define TIMPANI_CDC_ANC2_IIR_COEFF_PTR_RWC "RW"
-#define TIMPANI_CDC_ANC2_IIR_COEFF_PTR_POR 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_PTR_M 0x1F
-
-
-#define TIMPANI_CDC_ANC2_IIR_COEFF_PTR_ANC2_IIR_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_PTR_ANC2_IIR_COEFF_PTR_M 0x1F
-
-
-/* -- For CDC_ANC2_IIR_COEFF_MSB */
-#define TIMPANI_A_CDC_ANC2_IIR_COEFF_MSB (0xD6)
-#define TIMPANI_CDC_ANC2_IIR_COEFF_MSB_RWC "RW"
-#define TIMPANI_CDC_ANC2_IIR_COEFF_MSB_POR 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_MSB_M 0x1
-
-
-#define TIMPANI_CDC_ANC2_IIR_COEFF_MSB_ANC2_IIR_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_MSB_ANC2_IIR_COEFF_MSB_M 0x1
-
-
-/* -- For CDC_ANC2_IIR_COEFF_LSB */
-#define TIMPANI_A_CDC_ANC2_IIR_COEFF_LSB (0xD7)
-#define TIMPANI_CDC_ANC2_IIR_COEFF_LSB_RWC "RW"
-#define TIMPANI_CDC_ANC2_IIR_COEFF_LSB_POR 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_LSB_M 0xFF
-
-
-#define TIMPANI_CDC_ANC2_IIR_COEFF_LSB_ANC2_IIR_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_LSB_ANC2_IIR_COEFF_LSB_M 0xFF
-
-
-/* -- For CDC_ANC2_IIR_COEFF_CTL */
-#define TIMPANI_A_CDC_ANC2_IIR_COEFF_CTL (0xD8)
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_RWC "RW"
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_POR 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_M 0x3
-
-
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_ADAPTIVE_S 1
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_ADAPTIVE_M 0x2
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_ADAPTIVE_ADAPTIVE 0x1
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_ADAPTIVE_NON_ADAPTIVE 0x0
-
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_EN_S 0
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_EN_M 0x1
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_EN_UPDATE 0x1
-#define TIMPANI_CDC_ANC2_IIR_COEFF_CTL_ANC2_IIR_COEFF_EN_NO_UPDATE 0x0
-
-
-/* -- For CDC_ANC2_LPF_COEFF_PTR */
-#define TIMPANI_A_CDC_ANC2_LPF_COEFF_PTR (0xD9)
-#define TIMPANI_CDC_ANC2_LPF_COEFF_PTR_RWC "RW"
-#define TIMPANI_CDC_ANC2_LPF_COEFF_PTR_POR 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_PTR_M 0xF
-
-
-#define TIMPANI_CDC_ANC2_LPF_COEFF_PTR_ANC2_LPF_COEFF_PTR_S 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_PTR_ANC2_LPF_COEFF_PTR_M 0xF
-
-
-/* -- For CDC_ANC2_LPF_COEFF_MSB */
-#define TIMPANI_A_CDC_ANC2_LPF_COEFF_MSB (0xDA)
-#define TIMPANI_CDC_ANC2_LPF_COEFF_MSB_RWC "RW"
-#define TIMPANI_CDC_ANC2_LPF_COEFF_MSB_POR 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_MSB_M 0xF
-
-
-#define TIMPANI_CDC_ANC2_LPF_COEFF_MSB_ANC2_LPF_COEFF_MSB_S 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_MSB_ANC2_LPF_COEFF_MSB_M 0xF
-
-
-/* -- For CDC_ANC2_LPF_COEFF_LSB */
-#define TIMPANI_A_CDC_ANC2_LPF_COEFF_LSB (0xDB)
-#define TIMPANI_CDC_ANC2_LPF_COEFF_LSB_RWC "RW"
-#define TIMPANI_CDC_ANC2_LPF_COEFF_LSB_POR 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_LSB_M 0xFF
-
-
-#define TIMPANI_CDC_ANC2_LPF_COEFF_LSB_ANC2_LPF_COEFF_LSB_S 0
-#define TIMPANI_CDC_ANC2_LPF_COEFF_LSB_ANC2_LPF_COEFF_LSB_M 0xFF
-
-
-/* -- For CDC_ANC2_SCALE_PTR */
-#define TIMPANI_A_CDC_ANC2_SCALE_PTR (0xDC)
-#define TIMPANI_CDC_ANC2_SCALE_PTR_RWC "RW"
-#define TIMPANI_CDC_ANC2_SCALE_PTR_POR 0
-#define TIMPANI_CDC_ANC2_SCALE_PTR_S 0
-#define TIMPANI_CDC_ANC2_SCALE_PTR_M 0x7
-
-
-#define TIMPANI_CDC_ANC2_SCALE_PTR_ANC2_SCALE_PTR_S 0
-#define TIMPANI_CDC_ANC2_SCALE_PTR_ANC2_SCALE_PTR_M 0x7
-
-
-/* -- For CDC_ANC2_SCALE */
-#define TIMPANI_A_CDC_ANC2_SCALE (0xDD)
-#define TIMPANI_CDC_ANC2_SCALE_RWC "RW"
-#define TIMPANI_CDC_ANC2_SCALE_POR 0
-#define TIMPANI_CDC_ANC2_SCALE_S 0
-#define TIMPANI_CDC_ANC2_SCALE_M 0xFF
-
-
-#define TIMPANI_CDC_ANC2_SCALE_ANC2_SCALE_S 0
-#define TIMPANI_CDC_ANC2_SCALE_ANC2_SCALE_M 0xFF
-
-
-/* -- For CDC_ANC2_DEBUG */
-#define TIMPANI_A_CDC_ANC2_DEBUG (0xDE)
-#define TIMPANI_CDC_ANC2_DEBUG_RWC "RW"
-#define TIMPANI_CDC_ANC2_DEBUG_POR 0
-#define TIMPANI_CDC_ANC2_DEBUG_S 0
-#define TIMPANI_CDC_ANC2_DEBUG_M 0xF
-
-
-#define TIMPANI_CDC_ANC2_DEBUG_ANC2_DEBUG_SEL_S 0
-#define TIMPANI_CDC_ANC2_DEBUG_ANC2_DEBUG_SEL_M 0xF
-
-
-/* -- For CDC_LINE_L_AVOL */
-#define TIMPANI_A_CDC_LINE_L_AVOL (0xE0)
-#define TIMPANI_CDC_LINE_L_AVOL_RWC "RW"
-#define TIMPANI_CDC_LINE_L_AVOL_POR 0xac
-#define TIMPANI_CDC_LINE_L_AVOL_S 0
-#define TIMPANI_CDC_LINE_L_AVOL_M 0xFF
-
-
-#define TIMPANI_CDC_LINE_L_AVOL_USER_GAIN_S 2
-#define TIMPANI_CDC_LINE_L_AVOL_USER_GAIN_M 0xFC
-
-#define TIMPANI_CDC_LINE_L_AVOL_DUMMY_S 0
-#define TIMPANI_CDC_LINE_L_AVOL_DUMMY_M 0x3
-
-
-/* -- For CDC_LINE_R_AVOL */
-#define TIMPANI_A_CDC_LINE_R_AVOL (0xE1)
-#define TIMPANI_CDC_LINE_R_AVOL_RWC "RW"
-#define TIMPANI_CDC_LINE_R_AVOL_POR 0xac
-#define TIMPANI_CDC_LINE_R_AVOL_S 0
-#define TIMPANI_CDC_LINE_R_AVOL_M 0xFF
-
-
-#define TIMPANI_CDC_LINE_R_AVOL_USER_GAIN_S 2
-#define TIMPANI_CDC_LINE_R_AVOL_USER_GAIN_M 0xFC
-
-#define TIMPANI_CDC_LINE_R_AVOL_DUMMY_S 0
-#define TIMPANI_CDC_LINE_R_AVOL_DUMMY_M 0x3
-
-
-/* -- For CDC_HPH_L_AVOL */
-#define TIMPANI_A_CDC_HPH_L_AVOL (0xE2)
-#define TIMPANI_CDC_HPH_L_AVOL_RWC "RW"
-#define TIMPANI_CDC_HPH_L_AVOL_POR 0xae
-#define TIMPANI_CDC_HPH_L_AVOL_S 0
-#define TIMPANI_CDC_HPH_L_AVOL_M 0xFF
-
-
-#define TIMPANI_CDC_HPH_L_AVOL_USER_GAIN_S 2
-#define TIMPANI_CDC_HPH_L_AVOL_USER_GAIN_M 0xFC
-
-#define TIMPANI_CDC_HPH_L_AVOL_MUTE_S 1
-#define TIMPANI_CDC_HPH_L_AVOL_MUTE_M 0x2
-#define TIMPANI_CDC_HPH_L_AVOL_MUTE_MUTE 0x1
-#define TIMPANI_CDC_HPH_L_AVOL_MUTE_UNMUTE 0x0
-
-#define TIMPANI_CDC_HPH_L_AVOL_DUMMY_S 0
-#define TIMPANI_CDC_HPH_L_AVOL_DUMMY_M 0x1
-
-
-/* -- For CDC_HPH_R_AVOL */
-#define TIMPANI_A_CDC_HPH_R_AVOL (0xE3)
-#define TIMPANI_CDC_HPH_R_AVOL_RWC "RW"
-#define TIMPANI_CDC_HPH_R_AVOL_POR 0xae
-#define TIMPANI_CDC_HPH_R_AVOL_S 0
-#define TIMPANI_CDC_HPH_R_AVOL_M 0xFF
-
-
-#define TIMPANI_CDC_HPH_R_AVOL_USER_GAIN_S 2
-#define TIMPANI_CDC_HPH_R_AVOL_USER_GAIN_M 0xFC
-
-#define TIMPANI_CDC_HPH_R_AVOL_MUTE_S 1
-#define TIMPANI_CDC_HPH_R_AVOL_MUTE_M 0x2
-#define TIMPANI_CDC_HPH_R_AVOL_MUTE_MUTE 0x1
-#define TIMPANI_CDC_HPH_R_AVOL_MUTE_UNMUTE 0x0
-
-#define TIMPANI_CDC_HPH_R_AVOL_DUMMY_S 0
-#define TIMPANI_CDC_HPH_R_AVOL_DUMMY_M 0x1
-
-
-/* -- For CDC_COMP_CTL1 */
-#define TIMPANI_A_CDC_COMP_CTL1 (0xE4)
-#define TIMPANI_CDC_COMP_CTL1_RWC "RW"
-#define TIMPANI_CDC_COMP_CTL1_POR 0
-#define TIMPANI_CDC_COMP_CTL1_S 0
-#define TIMPANI_CDC_COMP_CTL1_M 0xFF
-
-
-#define TIMPANI_CDC_COMP_CTL1_LO_CLK_EN_S 7
-#define TIMPANI_CDC_COMP_CTL1_LO_CLK_EN_M 0x80
-
-#define TIMPANI_CDC_COMP_CTL1_HPH_CLK_EN_S 6
-#define TIMPANI_CDC_COMP_CTL1_HPH_CLK_EN_M 0x40
-
-#define TIMPANI_CDC_COMP_CTL1_LO_SOFT_RESET_S 5
-#define TIMPANI_CDC_COMP_CTL1_LO_SOFT_RESET_M 0x20
-
-#define TIMPANI_CDC_COMP_CTL1_HPH_SOFT_RESET_S 4
-#define TIMPANI_CDC_COMP_CTL1_HPH_SOFT_RESET_M 0x10
-
-#define TIMPANI_CDC_COMP_CTL1_LO_R_EN_S 3
-#define TIMPANI_CDC_COMP_CTL1_LO_R_EN_M 0x8
-
-#define TIMPANI_CDC_COMP_CTL1_LO_L_EN_S 2
-#define TIMPANI_CDC_COMP_CTL1_LO_L_EN_M 0x4
-
-#define TIMPANI_CDC_COMP_CTL1_HPH_R_EN_S 1
-#define TIMPANI_CDC_COMP_CTL1_HPH_R_EN_M 0x2
-
-#define TIMPANI_CDC_COMP_CTL1_HPH_L_EN_S 0
-#define TIMPANI_CDC_COMP_CTL1_HPH_L_EN_M 0x1
-
-
-/* -- For CDC_COMP_CTL2 */
-#define TIMPANI_A_CDC_COMP_CTL2 (0xE5)
-#define TIMPANI_CDC_COMP_CTL2_RWC "RW"
-#define TIMPANI_CDC_COMP_CTL2_POR 0xe
-#define TIMPANI_CDC_COMP_CTL2_S 0
-#define TIMPANI_CDC_COMP_CTL2_M 0xF
-
-
-#define TIMPANI_CDC_COMP_CTL2_LINEOUT_IN_MUX_S 2
-#define TIMPANI_CDC_COMP_CTL2_LINEOUT_IN_MUX_M 0xC
-
-#define TIMPANI_CDC_COMP_CTL2_HPH_IN_MUX_S 0
-#define TIMPANI_CDC_COMP_CTL2_HPH_IN_MUX_M 0x3
-
-
-/* -- For CDC_COMP_PEAK_METER */
-#define TIMPANI_A_CDC_COMP_PEAK_METER (0xE6)
-#define TIMPANI_CDC_COMP_PEAK_METER_RWC "RW"
-#define TIMPANI_CDC_COMP_PEAK_METER_POR 0x9
-#define TIMPANI_CDC_COMP_PEAK_METER_S 0
-#define TIMPANI_CDC_COMP_PEAK_METER_M 0xF
-
-
-#define TIMPANI_CDC_COMP_PEAK_METER_TIME_OUT_S 0
-#define TIMPANI_CDC_COMP_PEAK_METER_TIME_OUT_M 0xF
-
-
-/* -- For CDC_COMP_LEVEL_METER_CTL1 */
-#define TIMPANI_A_CDC_COMP_LEVEL_METER_CTL1 (0xE7)
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL1_RWC "RW"
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL1_POR 0x7
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL1_S 0
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL1_M 0xF
-
-
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL1_DIV_FACTOR_S 0
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL1_DIV_FACTOR_M 0xF
-
-
-/* -- For CDC_COMP_LEVEL_METER_CTL2 */
-#define TIMPANI_A_CDC_COMP_LEVEL_METER_CTL2 (0xE8)
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL2_RWC "RW"
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL2_POR 0x28
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL2_S 0
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL2_M 0xFF
-
-
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL2_RESAMPLE_RATE_S 0
-#define TIMPANI_CDC_COMP_LEVEL_METER_CTL2_RESAMPLE_RATE_M 0xFF
-
-
-/* -- For CDC_COMP_ZONE_SELECT */
-#define TIMPANI_A_CDC_COMP_ZONE_SELECT (0xE9)
-#define TIMPANI_CDC_COMP_ZONE_SELECT_RWC "RW"
-#define TIMPANI_CDC_COMP_ZONE_SELECT_POR 0x3b
-#define TIMPANI_CDC_COMP_ZONE_SELECT_S 0
-#define TIMPANI_CDC_COMP_ZONE_SELECT_M 0x7F
-
-
-#define TIMPANI_CDC_COMP_ZONE_SELECT_ENTRY_S 3
-#define TIMPANI_CDC_COMP_ZONE_SELECT_ENTRY_M 0x78
-
-#define TIMPANI_CDC_COMP_ZONE_SELECT_SHIFT_S 0
-#define TIMPANI_CDC_COMP_ZONE_SELECT_SHIFT_M 0x7
-
-
-/* -- For CDC_COMP_ZC_MSB */
-#define TIMPANI_A_CDC_COMP_ZC_MSB (0xEA)
-#define TIMPANI_CDC_COMP_ZC_MSB_RWC "RW"
-#define TIMPANI_CDC_COMP_ZC_MSB_POR 0
-#define TIMPANI_CDC_COMP_ZC_MSB_S 0
-#define TIMPANI_CDC_COMP_ZC_MSB_M 0x7
-
-
-#define TIMPANI_CDC_COMP_ZC_MSB_DET_WINDOW_S 0
-#define TIMPANI_CDC_COMP_ZC_MSB_DET_WINDOW_M 0x7
-
-
-/* -- For CDC_COMP_ZC_LSB */
-#define TIMPANI_A_CDC_COMP_ZC_LSB (0xEB)
-#define TIMPANI_CDC_COMP_ZC_LSB_RWC "RW"
-#define TIMPANI_CDC_COMP_ZC_LSB_POR 0x1f
-#define TIMPANI_CDC_COMP_ZC_LSB_S 0
-#define TIMPANI_CDC_COMP_ZC_LSB_M 0xFF
-
-
-#define TIMPANI_CDC_COMP_ZC_LSB_DET_WINDOW_S 0
-#define TIMPANI_CDC_COMP_ZC_LSB_DET_WINDOW_M 0xFF
-
-
-/* -- For CDC_COMP_SHUT_DOWN */
-#define TIMPANI_A_CDC_COMP_SHUT_DOWN (0xEC)
-#define TIMPANI_CDC_COMP_SHUT_DOWN_RWC "RW"
-#define TIMPANI_CDC_COMP_SHUT_DOWN_POR 0x1b
-#define TIMPANI_CDC_COMP_SHUT_DOWN_S 0
-#define TIMPANI_CDC_COMP_SHUT_DOWN_M 0x3F
-
-
-#define TIMPANI_CDC_COMP_SHUT_DOWN_HPH_TIMEOUT_S 3
-#define TIMPANI_CDC_COMP_SHUT_DOWN_HPH_TIMEOUT_M 0x38
-
-#define TIMPANI_CDC_COMP_SHUT_DOWN_LO_TIMEOUT_S 0
-#define TIMPANI_CDC_COMP_SHUT_DOWN_LO_TIMEOUT_M 0x7
-
-
-/* -- For CDC_COMP_SHUT_DOWN_STATUS */
-#define TIMPANI_A_CDC_COMP_SHUT_DOWN_STATUS (0xED)
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_RWC "RW"
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_POR 0
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_S 0
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_M 0xF
-
-
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_LO_R_S 3
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_LO_R_M 0x8
-
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_LO_L_S 2
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_LO_L_M 0x4
-
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_HPH_R_S 1
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_HPH_R_M 0x2
-
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_HPH_L_S 0
-#define TIMPANI_CDC_COMP_SHUT_DOWN_STATUS_HPH_L_M 0x1
-
-
-/* -- For CDC_COMP_HALT */
-#define TIMPANI_A_CDC_COMP_HALT (0xEE)
-#define TIMPANI_CDC_COMP_HALT_RWC "RW"
-#define TIMPANI_CDC_COMP_HALT_POR 0
-#define TIMPANI_CDC_COMP_HALT_S 0
-#define TIMPANI_CDC_COMP_HALT_M 0x1
-
-
-#define TIMPANI_CDC_COMP_HALT_COMPANDER_HALT_S 0
-#define TIMPANI_CDC_COMP_HALT_COMPANDER_HALT_M 0x1
-
-
-#endif
diff --git a/original/linux/mfd/wcd9xxx/wcd9310_registers.h b/original/linux/mfd/wcd9xxx/wcd9310_registers.h
deleted file mode 100644
index 67c2a6b..0000000
--- a/original/linux/mfd/wcd9xxx/wcd9310_registers.h
+++ /dev/null
@@ -1,1117 +0,0 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-#ifndef TABLA_CODEC_DIGITAL_H
-
-#define TABLA_CODEC_DIGITAL_H
-#include <linux/mfd/wcd9xxx/wcd9xxx_registers.h>
-
-#define TABLA_A_CHIP_CTL WCD9XXX_A_CHIP_CTL
-#define TABLA_A_CHIP_CTL__POR WCD9XXX_A_CHIP_CTL__POR
-#define TABLA_A_CHIP_STATUS WCD9XXX_A_CHIP_STATUS
-#define TABLA_A_CHIP_STATUS__POR WCD9XXX_A_CHIP_STATUS__POR
-#define TABLA_A_CHIP_ID_BYTE_0 WCD9XXX_A_CHIP_ID_BYTE_0
-#define TABLA_A_CHIP_ID_BYTE_0__POR WCD9XXX_A_CHIP_ID_BYTE_0__POR
-#define TABLA_A_CHIP_ID_BYTE_1 WCD9XXX_A_CHIP_ID_BYTE_1
-#define TABLA_A_CHIP_ID_BYTE_1__POR WCD9XXX_A_CHIP_ID_BYTE_1__POR
-#define TABLA_A_CHIP_ID_BYTE_2 WCD9XXX_A_CHIP_ID_BYTE_2
-#define TABLA_A_CHIP_ID_BYTE_2__POR WCD9XXX_A_CHIP_ID_BYTE_2__POR
-#define TABLA_A_CHIP_ID_BYTE_3 WCD9XXX_A_CHIP_ID_BYTE_3
-#define TABLA_A_CHIP_ID_BYTE_3__POR WCD9XXX_A_CHIP_ID_BYTE_3__POR
-#define TABLA_A_CHIP_VERSION WCD9XXX_A_CHIP_VERSION
-#define TABLA_A_CHIP_VERSION__POR WCD9XXX_A_CHIP_VERSION__POR
-#define TABLA_A_SB_VERSION WCD9XXX_A_SB_VERSION
-#define TABLA_A_SB_VERSION__POR WCD9XXX_A_SB_VERSION__POR
-#define TABLA_A_SLAVE_ID_1 WCD9XXX_A_SLAVE_ID_1
-#define TABLA_A_SLAVE_ID_1__POR WCD9XXX_A_SLAVE_ID_1__POR
-#define TABLA_A_SLAVE_ID_2 WCD9XXX_A_SLAVE_ID_2
-#define TABLA_A_SLAVE_ID_2__POR WCD9XXX_A_SLAVE_ID_2__POR
-#define TABLA_A_SLAVE_ID_3 WCD9XXX_A_SLAVE_ID_3
-#define TABLA_A_SLAVE_ID_3__POR WCD9XXX_A_SLAVE_ID_3__POR
-#define TABLA_A_PIN_CTL_OE0 (0x10)
-#define TABLA_A_PIN_CTL_OE0__POR (0x00000000)
-#define TABLA_A_PIN_CTL_OE1 (0x11)
-#define TABLA_A_PIN_CTL_OE1__POR (0x00000000)
-#define TABLA_A_PIN_CTL_DATA0 (0x12)
-#define TABLA_A_PIN_CTL_DATA0__POR (0x00000000)
-#define TABLA_A_PIN_CTL_DATA1 (0x13)
-#define TABLA_A_PIN_CTL_DATA1__POR (0x00000000)
-#define TABLA_A_HDRIVE_GENERIC (0x18)
-#define TABLA_A_HDRIVE_GENERIC__POR (0x00000000)
-#define TABLA_A_HDRIVE_OVERRIDE (0x19)
-#define TABLA_A_HDRIVE_OVERRIDE__POR (0x00000008)
-#define TABLA_A_ANA_CSR_WAIT_STATE (0x20)
-#define TABLA_A_ANA_CSR_WAIT_STATE__POR (0x00000044)
-#define TABLA_A_PROCESS_MONITOR_CTL0 (0x40)
-#define TABLA_A_PROCESS_MONITOR_CTL0__POR (0x00000080)
-#define TABLA_A_PROCESS_MONITOR_CTL1 (0x41)
-#define TABLA_A_PROCESS_MONITOR_CTL1__POR (0x00000000)
-#define TABLA_A_PROCESS_MONITOR_CTL2 (0x42)
-#define TABLA_A_PROCESS_MONITOR_CTL2__POR (0x00000000)
-#define TABLA_A_PROCESS_MONITOR_CTL3 (0x43)
-#define TABLA_A_PROCESS_MONITOR_CTL3__POR (0x00000001)
-#define TABLA_A_QFUSE_CTL (0x48)
-#define TABLA_A_QFUSE_CTL__POR (0x00000000)
-#define TABLA_A_QFUSE_STATUS (0x49)
-#define TABLA_A_QFUSE_STATUS__POR (0x00000000)
-#define TABLA_A_QFUSE_DATA_OUT0 (0x4A)
-#define TABLA_A_QFUSE_DATA_OUT0__POR (0x00000000)
-#define TABLA_A_QFUSE_DATA_OUT1 (0x4B)
-#define TABLA_A_QFUSE_DATA_OUT1__POR (0x00000000)
-#define TABLA_A_QFUSE_DATA_OUT2 (0x4C)
-#define TABLA_A_QFUSE_DATA_OUT2__POR (0x00000000)
-#define TABLA_A_QFUSE_DATA_OUT3 (0x4D)
-#define TABLA_A_QFUSE_DATA_OUT3__POR (0x00000000)
-#define TABLA_A_CDC_CTL WCD9XXX_A_CDC_CTL
-#define TABLA_A_CDC_CTL__POR WCD9XXX_A_CDC_CTL__POR
-#define TABLA_A_LEAKAGE_CTL WCD9XXX_A_LEAKAGE_CTL
-#define TABLA_A_LEAKAGE_CTL__POR WCD9XXX_A_LEAKAGE_CTL__POR
-#define TABLA_A_INTR_MODE (0x90)
-#define TABLA_A_INTR_MODE__POR (0x00000000)
-#define TABLA_A_INTR_MASK0 (0x94)
-#define TABLA_A_INTR_MASK0__POR (0x000000ff)
-#define TABLA_A_INTR_MASK1 (0x95)
-#define TABLA_A_INTR_MASK1__POR (0x000000ff)
-#define TABLA_A_INTR_MASK2 (0x96)
-#define TABLA_A_INTR_MASK2__POR (0x000000ff)
-#define TABLA_A_INTR_STATUS0 (0x98)
-#define TABLA_A_INTR_STATUS0__POR (0x00000000)
-#define TABLA_A_INTR_STATUS1 (0x99)
-#define TABLA_A_INTR_STATUS1__POR (0x00000000)
-#define TABLA_A_INTR_STATUS2 (0x9A)
-#define TABLA_A_INTR_STATUS2__POR (0x00000000)
-#define TABLA_A_INTR_CLEAR0 (0x9C)
-#define TABLA_A_INTR_CLEAR0__POR (0x00000000)
-#define TABLA_A_INTR_CLEAR1 (0x9D)
-#define TABLA_A_INTR_CLEAR1__POR (0x00000000)
-#define TABLA_A_INTR_CLEAR2 (0x9E)
-#define TABLA_A_INTR_CLEAR2__POR (0x00000000)
-#define TABLA_A_INTR_LEVEL0 (0xA0)
-#define TABLA_A_INTR_LEVEL0__POR (0x00000001)
-#define TABLA_A_INTR_LEVEL1 (0xA1)
-#define TABLA_A_INTR_LEVEL1__POR (0x00000000)
-#define TABLA_A_INTR_LEVEL2 (0xA2)
-#define TABLA_A_INTR_LEVEL2__POR (0x00000000)
-#define TABLA_A_INTR_TEST0 (0xA4)
-#define TABLA_A_INTR_TEST0__POR (0x00000000)
-#define TABLA_A_INTR_TEST1 (0xA5)
-#define TABLA_A_INTR_TEST1__POR (0x00000000)
-#define TABLA_A_INTR_TEST2 (0xA6)
-#define TABLA_A_INTR_TEST2__POR (0x00000000)
-#define TABLA_A_INTR_SET0 (0xA8)
-#define TABLA_A_INTR_SET0__POR (0x00000000)
-#define TABLA_A_INTR_SET1 (0xA9)
-#define TABLA_A_INTR_SET1__POR (0x00000000)
-#define TABLA_A_INTR_SET2 (0xAA)
-#define TABLA_A_INTR_SET2__POR (0x00000000)
-#define TABLA_A_CDC_TX_I2S_SCK_MODE (0xC0)
-#define TABLA_A_CDC_TX_I2S_SCK_MODE__POR (0x00000000)
-#define TABLA_A_CDC_TX_I2S_WS_MODE (0xC1)
-#define TABLA_A_CDC_TX_I2S_WS_MODE__POR (0x00000000)
-#define TABLA_A_CDC_DMIC_DATA0_MODE (0xC4)
-#define TABLA_A_CDC_DMIC_DATA0_MODE__POR (0x00000000)
-#define TABLA_A_CDC_DMIC_CLK0_MODE (0xC5)
-#define TABLA_A_CDC_DMIC_CLK0_MODE__POR (0x00000000)
-#define TABLA_A_CDC_DMIC_DATA1_MODE (0xC6)
-#define TABLA_A_CDC_DMIC_DATA1_MODE__POR (0x00000000)
-#define TABLA_A_CDC_DMIC_CLK1_MODE (0xC7)
-#define TABLA_A_CDC_DMIC_CLK1_MODE__POR (0x00000000)
-#define TABLA_A_CDC_RX_I2S_SCK_MODE (0xC8)
-#define TABLA_A_CDC_RX_I2S_SCK_MODE__POR (0x00000000)
-#define TABLA_A_CDC_RX_I2S_WS_MODE (0xC9)
-#define TABLA_A_CDC_RX_I2S_WS_MODE__POR (0x00000000)
-#define TABLA_A_CDC_DMIC_DATA2_MODE (0xCA)
-#define TABLA_A_CDC_DMIC_DATA2_MODE__POR (0x00000000)
-#define TABLA_A_CDC_DMIC_CLK2_MODE (0xCB)
-#define TABLA_A_CDC_DMIC_CLK2_MODE__POR (0x00000000)
-#define TABLA_A_CDC_INTR_MODE (0xCC)
-#define TABLA_A_CDC_INTR_MODE__POR (0x00000000)
-#define TABLA_A_BIAS_REF_CTL (0x0100)
-#define TABLA_A_BIAS_REF_CTL__POR (0x0000001C)
-#define TABLA_A_BIAS_CENTRAL_BG_CTL (0x0101)
-#define TABLA_A_BIAS_CENTRAL_BG_CTL__POR (0x00000050)
-#define TABLA_A_BIAS_PRECHRG_CTL (0x0102)
-#define TABLA_A_BIAS_PRECHRG_CTL__POR (0x00000007)
-#define TABLA_A_BIAS_CURR_CTL_1 (0x0103)
-#define TABLA_A_BIAS_CURR_CTL_1__POR (0x00000052)
-#define TABLA_A_BIAS_CURR_CTL_2 (0x0104)
-#define TABLA_A_BIAS_CURR_CTL_2__POR (0x00000000)
-#define TABLA_A_BIAS_CONFIG_MODE_BG_CTL (0x0105)
-#define TABLA_A_BIAS_CONFIG_MODE_BG_CTL__POR (0x00000016)
-#define TABLA_A_BIAS_BG_STATUS (0x0106)
-#define TABLA_A_BIAS_BG_STATUS__POR (0x00000000)
-#define TABLA_A_CLK_BUFF_EN1 (0x0108)
-#define TABLA_A_CLK_BUFF_EN1__POR (0x00000004)
-#define TABLA_A_CLK_BUFF_EN2 (0x0109)
-#define TABLA_A_CLK_BUFF_EN2__POR (0x00000002)
-#define TABLA_A_LDO_H_MODE_1 (0x0110)
-#define TABLA_A_LDO_H_MODE_1__POR (0x00000065)
-#define TABLA_A_LDO_H_MODE_2 (0x0111)
-#define TABLA_A_LDO_H_MODE_2__POR (0x000000A8)
-#define TABLA_A_LDO_H_LOOP_CTL (0x0112)
-#define TABLA_A_LDO_H_LOOP_CTL__POR (0x0000006B)
-#define TABLA_A_LDO_H_COMP_1 (0x0113)
-#define TABLA_A_LDO_H_COMP_1__POR (0x00000084)
-#define TABLA_A_LDO_H_COMP_2 (0x0114)
-#define TABLA_A_LDO_H_COMP_2__POR (0x000000E0)
-#define TABLA_A_LDO_H_BIAS_1 (0x0115)
-#define TABLA_A_LDO_H_BIAS_1__POR (0x0000006D)
-#define TABLA_A_LDO_H_BIAS_2 (0x0116)
-#define TABLA_A_LDO_H_BIAS_2__POR (0x000000A5)
-#define TABLA_A_LDO_H_BIAS_3 (0x0117)
-#define TABLA_A_LDO_H_BIAS_3__POR (0x00000060)
-#define TABLA_A_LDO_L_MODE_1 (0x0118)
-#define TABLA_A_LDO_L_MODE_1__POR (0x00000028)
-#define TABLA_A_LDO_L_MODE_2 (0x0119)
-#define TABLA_A_LDO_L_MODE_2__POR (0x000000A8)
-#define TABLA_A_LDO_L_LOOP_CTL (0x011A)
-#define TABLA_A_LDO_L_LOOP_CTL__POR (0x0000006D)
-#define TABLA_A_LDO_L_COMP_1 (0x011B)
-#define TABLA_A_LDO_L_COMP_1__POR (0x00000031)
-#define TABLA_A_LDO_L_COMP_2 (0x011C)
-#define TABLA_A_LDO_L_COMP_2__POR (0x000000A0)
-#define TABLA_A_LDO_L_BIAS_1 (0x011D)
-#define TABLA_A_LDO_L_BIAS_1__POR (0x0000006D)
-#define TABLA_A_LDO_L_BIAS_2 (0x011E)
-#define TABLA_A_LDO_L_BIAS_2__POR (0x00000065)
-#define TABLA_A_LDO_L_BIAS_3 (0x011F)
-#define TABLA_A_LDO_L_BIAS_3__POR (0x00000050)
-#define TABLA_A_MICB_CFILT_1_CTL (0x0128)
-#define TABLA_A_MICB_CFILT_1_CTL__POR (0x00000040)
-#define TABLA_A_MICB_CFILT_1_VAL (0x0129)
-#define TABLA_A_MICB_CFILT_1_VAL__POR (0x00000080)
-#define TABLA_A_MICB_CFILT_1_PRECHRG (0x012A)
-#define TABLA_A_MICB_CFILT_1_PRECHRG__POR (0x00000038)
-#define TABLA_A_MICB_1_CTL (0x012B)
-#define TABLA_A_MICB_1_CTL__POR (0x00000016)
-#define TABLA_A_MICB_1_INT_RBIAS (0x012C)
-#define TABLA_A_MICB_1_INT_RBIAS__POR (0x00000000)
-#define TABLA_A_MICB_1_MBHC (0x012D)
-#define TABLA_A_MICB_1_MBHC__POR (0x00000001)
-#define TABLA_A_MICB_CFILT_2_CTL (0x012E)
-#define TABLA_A_MICB_CFILT_2_CTL__POR (0x00000040)
-#define TABLA_A_MICB_CFILT_2_VAL (0x012F)
-#define TABLA_A_MICB_CFILT_2_VAL__POR (0x00000080)
-#define TABLA_A_MICB_CFILT_2_PRECHRG (0x0130)
-#define TABLA_A_MICB_CFILT_2_PRECHRG__POR (0x00000038)
-#define TABLA_A_MICB_2_CTL (0x0131)
-#define TABLA_A_MICB_2_CTL__POR (0x00000016)
-#define TABLA_A_MICB_2_INT_RBIAS (0x0132)
-#define TABLA_A_MICB_2_INT_RBIAS__POR (0x00000000)
-#define TABLA_A_MICB_2_MBHC (0x0133)
-#define TABLA_A_MICB_2_MBHC__POR (0x00000000)
-#define TABLA_A_MICB_CFILT_3_CTL (0x0134)
-#define TABLA_A_MICB_CFILT_3_CTL__POR (0x00000040)
-#define TABLA_A_MICB_CFILT_3_VAL (0x0135)
-#define TABLA_A_MICB_CFILT_3_VAL__POR (0x00000080)
-#define TABLA_A_MICB_CFILT_3_PRECHRG (0x0136)
-#define TABLA_A_MICB_CFILT_3_PRECHRG__POR (0x00000038)
-#define TABLA_A_MICB_3_CTL (0x0137)
-#define TABLA_A_MICB_3_CTL__POR (0x00000016)
-#define TABLA_A_MICB_3_INT_RBIAS (0x0138)
-#define TABLA_A_MICB_3_INT_RBIAS__POR (0x00000000)
-#define TABLA_A_MICB_3_MBHC (0x0139)
-#define TABLA_A_MICB_3_MBHC__POR (0x00000000)
-#define TABLA_1_A_MICB_4_CTL (0x013A)
-#define TABLA_2_A_MICB_4_CTL (0x013D)
-#define TABLA_A_MICB_4_CTL__POR (0x00000016)
-#define TABLA_1_A_MICB_4_INT_RBIAS (0x013B)
-#define TABLA_2_A_MICB_4_INT_RBIAS (0x013E)
-#define TABLA_A_MICB_4_INT_RBIAS__POR (0x00000000)
-#define TABLA_1_A_MICB_4_MBHC (0x013C)
-#define TABLA_2_A_MICB_4_MBHC (0x013F)
-#define TABLA_A_MICB_4_MBHC__POR (0x00000001)
-#define TABLA_A_TX_COM_BIAS (0x014C)
-#define TABLA_A_TX_COM_BIAS__POR (0x000000E0)
-#define TABLA_A_MBHC_SCALING_MUX_1 (0x014E)
-#define TABLA_A_MBHC_SCALING_MUX_1__POR (0x00000000)
-#define TABLA_A_MBHC_SCALING_MUX_2 (0x014F)
-#define TABLA_A_MBHC_SCALING_MUX_2__POR (0x00000080)
-#define TABLA_A_TX_SUP_SWITCH_CTRL_1 (0x0151)
-#define TABLA_A_TX_SUP_SWITCH_CTRL_1__POR (0x00000000)
-#define TABLA_A_TX_SUP_SWITCH_CTRL_2 (0x0152)
-#define TABLA_A_TX_SUP_SWITCH_CTRL_2__POR (0x00000080)
-#define TABLA_A_TX_1_2_EN (0x0153)
-#define TABLA_A_TX_1_2_EN__POR (0x00000000)
-#define TABLA_A_TX_1_2_TEST_EN (0x0154)
-#define TABLA_A_TX_1_2_TEST_EN__POR (0x000000CC)
-#define TABLA_A_TX_1_2_ADC_CH1 (0x0155)
-#define TABLA_A_TX_1_2_ADC_CH1__POR (0x00000044)
-#define TABLA_A_TX_1_2_ADC_CH2 (0x0156)
-#define TABLA_A_TX_1_2_ADC_CH2__POR (0x00000044)
-#define TABLA_A_TX_1_2_ATEST_REFCTRL (0x0157)
-#define TABLA_A_TX_1_2_ATEST_REFCTRL__POR (0x00000000)
-#define TABLA_A_TX_1_2_TEST_CTL (0x0158)
-#define TABLA_A_TX_1_2_TEST_CTL__POR (0x00000038)
-#define TABLA_A_TX_1_2_TEST_BLOCK_EN (0x0159)
-#define TABLA_A_TX_1_2_TEST_BLOCK_EN__POR (0x000000FF)
-#define TABLA_A_TX_1_2_TXFE_CLKDIV (0x015A)
-#define TABLA_A_TX_1_2_TXFE_CLKDIV__POR (0x000000EE)
-#define TABLA_A_TX_1_2_SAR_ERR_CH1 (0x015B)
-#define TABLA_A_TX_1_2_SAR_ERR_CH1__POR (0x00000000)
-#define TABLA_A_TX_1_2_SAR_ERR_CH2 (0x015C)
-#define TABLA_A_TX_1_2_SAR_ERR_CH2__POR (0x00000000)
-#define TABLA_A_TX_3_4_EN (0x015D)
-#define TABLA_A_TX_3_4_EN__POR (0x00000000)
-#define TABLA_A_TX_3_4_TEST_EN (0x015E)
-#define TABLA_A_TX_3_4_TEST_EN__POR (0x000000CC)
-#define TABLA_A_TX_3_4_ADC_CH3 (0x015F)
-#define TABLA_A_TX_3_4_ADC_CH3__POR (0x00000044)
-#define TABLA_A_TX_3_4_ADC_CH4 (0x0160)
-#define TABLA_A_TX_3_4_ADC_CH4__POR (0x00000044)
-#define TABLA_A_TX_3_4_ATEST_REFCTRL (0x0161)
-#define TABLA_A_TX_3_4_ATEST_REFCTRL__POR (0x00000000)
-#define TABLA_A_TX_3_4_TEST_CTL (0x0162)
-#define TABLA_A_TX_3_4_TEST_CTL__POR (0x00000038)
-#define TABLA_A_TX_3_4_TEST_BLOCK_EN (0x0163)
-#define TABLA_A_TX_3_4_TEST_BLOCK_EN__POR (0x000000FF)
-#define TABLA_A_TX_3_4_TXFE_CKDIV (0x0164)
-#define TABLA_A_TX_3_4_TXFE_CKDIV__POR (0x000000EE)
-#define TABLA_A_TX_3_4_SAR_ERR_CH3 (0x0165)
-#define TABLA_A_TX_3_4_SAR_ERR_CH3__POR (0x00000000)
-#define TABLA_A_TX_3_4_SAR_ERR_CH4 (0x0166)
-#define TABLA_A_TX_3_4_SAR_ERR_CH4__POR (0x00000000)
-#define TABLA_A_TX_5_6_EN (0x0167)
-#define TABLA_A_TX_5_6_EN__POR (0x00000011)
-#define TABLA_A_TX_5_6_TEST_EN (0x0168)
-#define TABLA_A_TX_5_6_TEST_EN__POR (0x000000CC)
-#define TABLA_A_TX_5_6_ADC_CH5 (0x0169)
-#define TABLA_A_TX_5_6_ADC_CH5__POR (0x00000044)
-#define TABLA_A_TX_5_6_ADC_CH6 (0x016A)
-#define TABLA_A_TX_5_6_ADC_CH6__POR (0x00000044)
-#define TABLA_A_TX_5_6_ATEST_REFCTRL (0x016B)
-#define TABLA_A_TX_5_6_ATEST_REFCTRL__POR (0x00000000)
-#define TABLA_A_TX_5_6_TEST_CTL (0x016C)
-#define TABLA_A_TX_5_6_TEST_CTL__POR (0x00000038)
-#define TABLA_A_TX_5_6_TEST_BLOCK_EN (0x016D)
-#define TABLA_A_TX_5_6_TEST_BLOCK_EN__POR (0x000000FF)
-#define TABLA_A_TX_5_6_TXFE_CKDIV (0x016E)
-#define TABLA_A_TX_5_6_TXFE_CKDIV__POR (0x000000EE)
-#define TABLA_A_TX_5_6_SAR_ERR_CH5 (0x016F)
-#define TABLA_A_TX_5_6_SAR_ERR_CH5__POR (0x00000000)
-#define TABLA_A_TX_5_6_SAR_ERR_CH6 (0x0170)
-#define TABLA_A_TX_5_6_SAR_ERR_CH6__POR (0x00000000)
-#define TABLA_A_TX_7_MBHC_EN (0x0171)
-#define TABLA_A_TX_7_MBHC_EN__POR (0x0000000C)
-#define TABLA_A_TX_7_MBHC_ATEST_REFCTRL (0x0172)
-#define TABLA_A_TX_7_MBHC_ATEST_REFCTRL__POR (0x00000000)
-#define TABLA_A_TX_7_MBHC_ADC (0x0173)
-#define TABLA_A_TX_7_MBHC_ADC__POR (0x00000044)
-#define TABLA_A_TX_7_MBHC_TEST_CTL (0x0174)
-#define TABLA_A_TX_7_MBHC_TEST_CTL__POR (0x00000038)
-#define TABLA_A_TX_7_MBHC_SAR_ERR (0x0175)
-#define TABLA_A_TX_7_MBHC_SAR_ERR__POR (0x00000000)
-#define TABLA_A_TX_7_TXFE_CLKDIV (0x0176)
-#define TABLA_A_TX_7_TXFE_CLKDIV__POR (0x0000001C)
-#define TABLA_A_AUX_COM_CTL (0x0180)
-#define TABLA_A_AUX_COM_CTL__POR (0x00000034)
-#define TABLA_A_AUX_COM_ATEST (0x0181)
-#define TABLA_A_AUX_COM_ATEST__POR (0x00000000)
-#define TABLA_A_AUX_L_EN (0x0182)
-#define TABLA_A_AUX_L_EN__POR (0x00000000)
-#define TABLA_A_AUX_L_GAIN (0x0183)
-#define TABLA_A_AUX_L_GAIN__POR (0x0000001F)
-#define TABLA_A_AUX_L_PA_CONN (0x0184)
-#define TABLA_A_AUX_L_PA_CONN__POR (0x00000000)
-#define TABLA_A_AUX_L_PA_CONN_INV (0x0185)
-#define TABLA_A_AUX_L_PA_CONN_INV__POR (0x00000000)
-#define TABLA_A_AUX_R_EN (0x0186)
-#define TABLA_A_AUX_R_EN__POR (0x00000000)
-#define TABLA_A_AUX_R_GAIN (0x0187)
-#define TABLA_A_AUX_R_GAIN__POR (0x0000001F)
-#define TABLA_A_AUX_R_PA_CONN (0x0188)
-#define TABLA_A_AUX_R_PA_CONN__POR (0x00000000)
-#define TABLA_A_AUX_R_PA_CONN_INV (0x0189)
-#define TABLA_A_AUX_R_PA_CONN_INV__POR (0x00000000)
-#define TABLA_A_CP_EN (0x0192)
-#define TABLA_A_CP_EN__POR (0x000000E6)
-#define TABLA_A_CP_CLK (0x0193)
-#define TABLA_A_CP_CLK__POR (0x00000029)
-#define TABLA_A_CP_STATIC (0x0194)
-#define TABLA_A_CP_STATIC__POR (0x00000010)
-#define TABLA_A_CP_DCC1 (0x0195)
-#define TABLA_A_CP_DCC1__POR (0x00000052)
-#define TABLA_A_CP_DCC3 (0x0196)
-#define TABLA_A_CP_DCC3__POR (0x00000001)
-#define TABLA_A_CP_ATEST (0x0197)
-#define TABLA_A_CP_ATEST__POR (0x00000000)
-#define TABLA_A_CP_DTEST (0x0198)
-#define TABLA_A_CP_DTEST__POR (0x00000000)
-#define TABLA_A_RX_COM_TIMER_DIV (0x019E)
-#define TABLA_A_RX_COM_TIMER_DIV__POR (0x000000E8)
-#define TABLA_A_RX_COM_OCP_CTL (0x019F)
-#define TABLA_A_RX_COM_OCP_CTL__POR (0x0000001F)
-#define TABLA_A_RX_COM_OCP_COUNT (0x01A0)
-#define TABLA_A_RX_COM_OCP_COUNT__POR (0x00000077)
-#define TABLA_A_RX_COM_DAC_CTL (0x01A1)
-#define TABLA_A_RX_COM_DAC_CTL__POR (0x00000000)
-#define TABLA_A_RX_COM_BIAS (0x01A2)
-#define TABLA_A_RX_COM_BIAS__POR (0x00000000)
-#define TABLA_A_RX_HPH_BIAS_PA (0x01A6)
-#define TABLA_A_RX_HPH_BIAS_PA__POR (0x000000AA)
-#define TABLA_A_RX_HPH_BIAS_LDO (0x01A7)
-#define TABLA_A_RX_HPH_BIAS_LDO__POR (0x00000086)
-#define TABLA_A_RX_HPH_BIAS_CNP (0x01A8)
-#define TABLA_A_RX_HPH_BIAS_CNP__POR (0x0000008A)
-#define TABLA_A_RX_HPH_BIAS_WG (0x01A9)
-#define TABLA_A_RX_HPH_BIAS_WG__POR (0x00000060)
-#define TABLA_A_RX_HPH_OCP_CTL (0x01AA)
-#define TABLA_A_RX_HPH_OCP_CTL__POR (0x000000E8)
-#define TABLA_A_RX_HPH_CNP_EN (0x01AB)
-#define TABLA_A_RX_HPH_CNP_EN__POR (0x00000080)
-#define TABLA_A_RX_HPH_CNP_WG_CTL (0x01AC)
-#define TABLA_A_RX_HPH_CNP_WG_CTL__POR (0x000000DC)
-#define TABLA_A_RX_HPH_CNP_WG_TIME (0x01AD)
-#define TABLA_A_RX_HPH_CNP_WG_TIME__POR (0x00000028)
-#define TABLA_A_RX_HPH_L_GAIN (0x01AE)
-#define TABLA_A_RX_HPH_L_GAIN__POR (0x00000000)
-#define TABLA_A_RX_HPH_L_TEST (0x01AF)
-#define TABLA_A_RX_HPH_L_TEST__POR (0x00000001)
-#define TABLA_A_RX_HPH_L_PA_CTL (0x01B0)
-#define TABLA_A_RX_HPH_L_PA_CTL__POR (0x00000040)
-#define TABLA_A_RX_HPH_L_DAC_CTL (0x01B1)
-#define TABLA_A_RX_HPH_L_DAC_CTL__POR (0x00000000)
-#define TABLA_A_RX_HPH_L_ATEST (0x01B2)
-#define TABLA_A_RX_HPH_L_ATEST__POR (0x00000000)
-#define TABLA_A_RX_HPH_L_STATUS (0x01B3)
-#define TABLA_A_RX_HPH_L_STATUS__POR (0x00000004)
-#define TABLA_A_RX_HPH_R_GAIN (0x01B4)
-#define TABLA_A_RX_HPH_R_GAIN__POR (0x00000000)
-#define TABLA_A_RX_HPH_R_TEST (0x01B5)
-#define TABLA_A_RX_HPH_R_TEST__POR (0x00000001)
-#define TABLA_A_RX_HPH_R_PA_CTL (0x01B6)
-#define TABLA_A_RX_HPH_R_PA_CTL__POR (0x00000040)
-#define TABLA_A_RX_HPH_R_DAC_CTL (0x01B7)
-#define TABLA_A_RX_HPH_R_DAC_CTL__POR (0x00000000)
-#define TABLA_A_RX_HPH_R_ATEST (0x01B8)
-#define TABLA_A_RX_HPH_R_ATEST__POR (0x00000000)
-#define TABLA_A_RX_HPH_R_STATUS (0x01B9)
-#define TABLA_A_RX_HPH_R_STATUS__POR (0x00000004)
-#define TABLA_A_RX_EAR_BIAS_PA (0x01BA)
-#define TABLA_A_RX_EAR_BIAS_PA__POR (0x000000AA)
-#define TABLA_A_RX_EAR_BIAS_CMBUFF (0x01BB)
-#define TABLA_A_RX_EAR_BIAS_CMBUFF__POR (0x000000A0)
-#define TABLA_A_RX_EAR_EN (0x01BC)
-#define TABLA_A_RX_EAR_EN__POR (0x00000000)
-#define TABLA_A_RX_EAR_GAIN (0x01BD)
-#define TABLA_A_RX_EAR_GAIN__POR (0x00000008)
-#define TABLA_A_RX_EAR_CMBUFF (0x01BE)
-#define TABLA_A_RX_EAR_CMBUFF__POR (0x00000000)
-#define TABLA_A_RX_EAR_ICTL (0x01BF)
-#define TABLA_A_RX_EAR_ICTL__POR (0x00000040)
-#define TABLA_A_RX_EAR_CCOMP (0x01C0)
-#define TABLA_A_RX_EAR_CCOMP__POR (0x00000008)
-#define TABLA_A_RX_EAR_VCM (0x01C1)
-#define TABLA_A_RX_EAR_VCM__POR (0x00000000)
-#define TABLA_A_RX_EAR_CNP (0x01C2)
-#define TABLA_A_RX_EAR_CNP__POR (0x00000080)
-#define TABLA_A_RX_EAR_ATEST (0x01C3)
-#define TABLA_A_RX_EAR_ATEST__POR (0x00000000)
-#define TABLA_A_RX_EAR_STATUS (0x01C5)
-#define TABLA_A_RX_EAR_STATUS__POR (0x00000004)
-#define TABLA_A_RX_LINE_BIAS_PA (0x01C6)
-#define TABLA_A_RX_LINE_BIAS_PA__POR (0x000000AA)
-#define TABLA_A_RX_LINE_BIAS_DAC (0x01C7)
-#define TABLA_A_RX_LINE_BIAS_DAC__POR (0x000000A0)
-#define TABLA_A_RX_LINE_BIAS_CNP (0x01C8)
-#define TABLA_A_RX_LINE_BIAS_CNP__POR (0x0000003A)
-#define TABLA_A_RX_LINE_COM (0x01C9)
-#define TABLA_A_RX_LINE_COM__POR (0x00000000)
-#define TABLA_A_RX_LINE_CNP_EN (0x01CA)
-#define TABLA_A_RX_LINE_CNP_EN__POR (0x00000080)
-#define TABLA_A_RX_LINE_CNP_WG_CTL (0x01CB)
-#define TABLA_A_RX_LINE_CNP_WG_CTL__POR (0x0000001C)
-#define TABLA_A_RX_LINE_CNP_WG_TIME (0x01CC)
-#define TABLA_A_RX_LINE_CNP_WG_TIME__POR (0x00000064)
-#define TABLA_A_RX_LINE_1_GAIN (0x01CD)
-#define TABLA_A_RX_LINE_1_GAIN__POR (0x00000000)
-#define TABLA_A_RX_LINE_1_TEST (0x01CE)
-#define TABLA_A_RX_LINE_1_TEST__POR (0x00000000)
-#define TABLA_A_RX_LINE_1_DAC_CTL (0x01CF)
-#define TABLA_A_RX_LINE_1_DAC_CTL__POR (0x0000000C)
-#define TABLA_A_RX_LINE_1_STATUS (0x01D0)
-#define TABLA_A_RX_LINE_1_STATUS__POR (0x00000000)
-#define TABLA_A_RX_LINE_2_GAIN (0x01D1)
-#define TABLA_A_RX_LINE_2_GAIN__POR (0x00000000)
-#define TABLA_A_RX_LINE_2_TEST (0x01D2)
-#define TABLA_A_RX_LINE_2_TEST__POR (0x00000000)
-#define TABLA_A_RX_LINE_2_DAC_CTL (0x01D3)
-#define TABLA_A_RX_LINE_2_DAC_CTL__POR (0x0000000C)
-#define TABLA_A_RX_LINE_2_STATUS (0x01D4)
-#define TABLA_A_RX_LINE_2_STATUS__POR (0x00000000)
-#define TABLA_A_RX_LINE_3_GAIN (0x01D5)
-#define TABLA_A_RX_LINE_3_GAIN__POR (0x00000000)
-#define TABLA_A_RX_LINE_3_TEST (0x01D6)
-#define TABLA_A_RX_LINE_3_TEST__POR (0x00000000)
-#define TABLA_A_RX_LINE_3_DAC_CTL (0x01D7)
-#define TABLA_A_RX_LINE_3_DAC_CTL__POR (0x0000000C)
-#define TABLA_A_RX_LINE_3_STATUS (0x01D8)
-#define TABLA_A_RX_LINE_3_STATUS__POR (0x00000000)
-#define TABLA_A_RX_LINE_4_GAIN (0x01D9)
-#define TABLA_A_RX_LINE_4_GAIN__POR (0x00000000)
-#define TABLA_A_RX_LINE_4_TEST (0x01DA)
-#define TABLA_A_RX_LINE_4_TEST__POR (0x00000000)
-#define TABLA_A_RX_LINE_4_DAC_CTL (0x01DB)
-#define TABLA_A_RX_LINE_4_DAC_CTL__POR (0x0000000C)
-#define TABLA_A_RX_LINE_4_STATUS (0x01DC)
-#define TABLA_A_RX_LINE_4_STATUS__POR (0x00000000)
-#define TABLA_A_RX_LINE_5_GAIN (0x01DD)
-#define TABLA_A_RX_LINE_5_GAIN__POR (0x00000000)
-#define TABLA_A_RX_LINE_5_TEST (0x01DE)
-#define TABLA_A_RX_LINE_5_TEST__POR (0x00000000)
-#define TABLA_A_RX_LINE_5_DAC_CTL (0x01DF)
-#define TABLA_A_RX_LINE_5_DAC_CTL__POR (0x0000000C)
-#define TABLA_A_RX_LINE_5_STATUS (0x01E0)
-#define TABLA_A_RX_LINE_5_STATUS__POR (0x00000000)
-#define TABLA_A_RX_LINE_CNP_DBG (0x01EC)
-#define TABLA_A_RX_LINE_CNP_DBG__POR (0x00000000)
-#define TABLA_A_MBHC_HPH (0x01ED)
-#define TABLA_A_MBHC_HPH__POR (0x00000048)
-#define TABLA_A_CONFIG_MODE_FREQ (0x01F7)
-#define TABLA_A_CONFIG_MODE_FREQ__POR (0x00000047)
-#define TABLA_A_CONFIG_MODE_TEST (0x01F8)
-#define TABLA_A_CONFIG_MODE_TEST__POR (0x0000000A)
-#define TABLA_A_CONFIG_MODE_STATUS (0x01F9)
-#define TABLA_A_CONFIG_MODE_STATUS__POR (0x0000001C)
-#define TABLA_A_CONFIG_MODE_TUNER (0x01FA)
-#define TABLA_A_CONFIG_MODE_TUNER__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_CTL (0x00000200)
-#define TABLA_A_CDC_ANC1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_CTL (0x00000280)
-#define TABLA_A_CDC_ANC2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_SHIFT (0x00000201)
-#define TABLA_A_CDC_ANC1_SHIFT__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_SHIFT (0x00000281)
-#define TABLA_A_CDC_ANC2_SHIFT__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT1_B1_CTL (0x00000202)
-#define TABLA_A_CDC_ANC1_FILT1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT1_B1_CTL (0x00000282)
-#define TABLA_A_CDC_ANC2_FILT1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT1_B2_CTL (0x00000203)
-#define TABLA_A_CDC_ANC1_FILT1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT1_B2_CTL (0x00000283)
-#define TABLA_A_CDC_ANC2_FILT1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT1_B3_CTL (0x00000204)
-#define TABLA_A_CDC_ANC1_FILT1_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT1_B3_CTL (0x00000284)
-#define TABLA_A_CDC_ANC2_FILT1_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT1_B4_CTL (0x00000205)
-#define TABLA_A_CDC_ANC1_FILT1_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT1_B4_CTL (0x00000285)
-#define TABLA_A_CDC_ANC2_FILT1_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT2_B1_CTL (0x00000206)
-#define TABLA_A_CDC_ANC1_FILT2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT2_B1_CTL (0x00000286)
-#define TABLA_A_CDC_ANC2_FILT2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT2_B2_CTL (0x00000207)
-#define TABLA_A_CDC_ANC1_FILT2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT2_B2_CTL (0x00000287)
-#define TABLA_A_CDC_ANC2_FILT2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT2_B3_CTL (0x00000208)
-#define TABLA_A_CDC_ANC1_FILT2_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT2_B3_CTL (0x00000288)
-#define TABLA_A_CDC_ANC2_FILT2_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_SPARE (0x00000209)
-#define TABLA_A_CDC_ANC1_SPARE__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_SPARE (0x00000289)
-#define TABLA_A_CDC_ANC2_SPARE__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT3_CTL (0x0000020A)
-#define TABLA_A_CDC_ANC1_FILT3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT3_CTL (0x0000028A)
-#define TABLA_A_CDC_ANC2_FILT3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC1_FILT4_CTL (0x0000020B)
-#define TABLA_A_CDC_ANC1_FILT4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_ANC2_FILT4_CTL (0x0000028B)
-#define TABLA_A_CDC_ANC2_FILT4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX1_VOL_CTL_TIMER (0x00000220)
-#define TABLA_A_CDC_TX1_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX2_VOL_CTL_TIMER (0x00000228)
-#define TABLA_A_CDC_TX2_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX3_VOL_CTL_TIMER (0x00000230)
-#define TABLA_A_CDC_TX3_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX4_VOL_CTL_TIMER (0x00000238)
-#define TABLA_A_CDC_TX4_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX5_VOL_CTL_TIMER (0x00000240)
-#define TABLA_A_CDC_TX5_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX6_VOL_CTL_TIMER (0x00000248)
-#define TABLA_A_CDC_TX6_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX7_VOL_CTL_TIMER (0x00000250)
-#define TABLA_A_CDC_TX7_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX8_VOL_CTL_TIMER (0x00000258)
-#define TABLA_A_CDC_TX8_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX9_VOL_CTL_TIMER (0x00000260)
-#define TABLA_A_CDC_TX9_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX10_VOL_CTL_TIMER (0x00000268)
-#define TABLA_A_CDC_TX10_VOL_CTL_TIMER__POR (0x00000000)
-#define TABLA_A_CDC_TX1_VOL_CTL_GAIN (0x00000221)
-#define TABLA_A_CDC_TX1_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX2_VOL_CTL_GAIN (0x00000229)
-#define TABLA_A_CDC_TX2_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX3_VOL_CTL_GAIN (0x00000231)
-#define TABLA_A_CDC_TX3_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX4_VOL_CTL_GAIN (0x00000239)
-#define TABLA_A_CDC_TX4_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX5_VOL_CTL_GAIN (0x00000241)
-#define TABLA_A_CDC_TX5_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX6_VOL_CTL_GAIN (0x00000249)
-#define TABLA_A_CDC_TX6_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX7_VOL_CTL_GAIN (0x00000251)
-#define TABLA_A_CDC_TX7_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX8_VOL_CTL_GAIN (0x00000259)
-#define TABLA_A_CDC_TX8_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX9_VOL_CTL_GAIN (0x00000261)
-#define TABLA_A_CDC_TX9_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX10_VOL_CTL_GAIN (0x00000269)
-#define TABLA_A_CDC_TX10_VOL_CTL_GAIN__POR (0x00000000)
-#define TABLA_A_CDC_TX1_VOL_CTL_CFG (0x00000222)
-#define TABLA_A_CDC_TX1_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX2_VOL_CTL_CFG (0x0000022A)
-#define TABLA_A_CDC_TX2_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX3_VOL_CTL_CFG (0x00000232)
-#define TABLA_A_CDC_TX3_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX4_VOL_CTL_CFG (0x0000023A)
-#define TABLA_A_CDC_TX4_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX5_VOL_CTL_CFG (0x00000242)
-#define TABLA_A_CDC_TX5_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX6_VOL_CTL_CFG (0x0000024A)
-#define TABLA_A_CDC_TX6_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX7_VOL_CTL_CFG (0x00000252)
-#define TABLA_A_CDC_TX7_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX8_VOL_CTL_CFG (0x0000025A)
-#define TABLA_A_CDC_TX8_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX9_VOL_CTL_CFG (0x00000262)
-#define TABLA_A_CDC_TX9_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX10_VOL_CTL_CFG (0x0000026A)
-#define TABLA_A_CDC_TX10_VOL_CTL_CFG__POR (0x00000000)
-#define TABLA_A_CDC_TX1_MUX_CTL (0x00000223)
-#define TABLA_A_CDC_TX1_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX2_MUX_CTL (0x0000022B)
-#define TABLA_A_CDC_TX2_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX3_MUX_CTL (0x00000233)
-#define TABLA_A_CDC_TX3_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX4_MUX_CTL (0x0000023B)
-#define TABLA_A_CDC_TX4_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX5_MUX_CTL (0x00000243)
-#define TABLA_A_CDC_TX5_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX6_MUX_CTL (0x0000024B)
-#define TABLA_A_CDC_TX6_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX7_MUX_CTL (0x00000253)
-#define TABLA_A_CDC_TX7_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX8_MUX_CTL (0x0000025B)
-#define TABLA_A_CDC_TX8_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX9_MUX_CTL (0x00000263)
-#define TABLA_A_CDC_TX9_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX10_MUX_CTL (0x0000026B)
-#define TABLA_A_CDC_TX10_MUX_CTL__POR (0x00000008)
-#define TABLA_A_CDC_TX1_CLK_FS_CTL (0x00000224)
-#define TABLA_A_CDC_TX1_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX2_CLK_FS_CTL (0x0000022C)
-#define TABLA_A_CDC_TX2_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX3_CLK_FS_CTL (0x00000234)
-#define TABLA_A_CDC_TX3_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX4_CLK_FS_CTL (0x0000023C)
-#define TABLA_A_CDC_TX4_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX5_CLK_FS_CTL (0x00000244)
-#define TABLA_A_CDC_TX5_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX6_CLK_FS_CTL (0x0000024C)
-#define TABLA_A_CDC_TX6_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX7_CLK_FS_CTL (0x00000254)
-#define TABLA_A_CDC_TX7_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX8_CLK_FS_CTL (0x0000025C)
-#define TABLA_A_CDC_TX8_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX9_CLK_FS_CTL (0x00000264)
-#define TABLA_A_CDC_TX9_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX10_CLK_FS_CTL (0x0000026C)
-#define TABLA_A_CDC_TX10_CLK_FS_CTL__POR (0x00000003)
-#define TABLA_A_CDC_TX1_DMIC_CTL (0x00000225)
-#define TABLA_A_CDC_TX1_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX2_DMIC_CTL (0x0000022D)
-#define TABLA_A_CDC_TX2_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX3_DMIC_CTL (0x00000235)
-#define TABLA_A_CDC_TX3_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX4_DMIC_CTL (0x0000023D)
-#define TABLA_A_CDC_TX4_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX5_DMIC_CTL (0x00000245)
-#define TABLA_A_CDC_TX5_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX6_DMIC_CTL (0x0000024D)
-#define TABLA_A_CDC_TX6_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX7_DMIC_CTL (0x00000255)
-#define TABLA_A_CDC_TX7_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX8_DMIC_CTL (0x0000025D)
-#define TABLA_A_CDC_TX8_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX9_DMIC_CTL (0x00000265)
-#define TABLA_A_CDC_TX9_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TX10_DMIC_CTL (0x0000026D)
-#define TABLA_A_CDC_TX10_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_SRC1_PDA_CFG (0x000002A0)
-#define TABLA_A_CDC_SRC1_PDA_CFG__POR (0x00000000)
-#define TABLA_A_CDC_SRC2_PDA_CFG (0x000002A8)
-#define TABLA_A_CDC_SRC2_PDA_CFG__POR (0x00000000)
-#define TABLA_A_CDC_SRC1_FS_CTL (0x000002A1)
-#define TABLA_A_CDC_SRC1_FS_CTL__POR (0x0000001b)
-#define TABLA_A_CDC_SRC2_FS_CTL (0x000002A9)
-#define TABLA_A_CDC_SRC2_FS_CTL__POR (0x0000001b)
-#define TABLA_A_CDC_RX1_B1_CTL (0x000002B0)
-#define TABLA_A_CDC_RX1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_B1_CTL (0x000002B8)
-#define TABLA_A_CDC_RX2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_B1_CTL (0x000002C0)
-#define TABLA_A_CDC_RX3_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_B1_CTL (0x000002C8)
-#define TABLA_A_CDC_RX4_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_B1_CTL (0x000002D0)
-#define TABLA_A_CDC_RX5_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_B1_CTL (0x000002D8)
-#define TABLA_A_CDC_RX6_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_B1_CTL (0x000002E0)
-#define TABLA_A_CDC_RX7_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX1_B2_CTL (0x000002B1)
-#define TABLA_A_CDC_RX1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_B2_CTL (0x000002B9)
-#define TABLA_A_CDC_RX2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_B2_CTL (0x000002C1)
-#define TABLA_A_CDC_RX3_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_B2_CTL (0x000002C9)
-#define TABLA_A_CDC_RX4_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_B2_CTL (0x000002D1)
-#define TABLA_A_CDC_RX5_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_B2_CTL (0x000002D9)
-#define TABLA_A_CDC_RX6_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_B2_CTL (0x000002E1)
-#define TABLA_A_CDC_RX7_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX1_B3_CTL (0x000002B2)
-#define TABLA_A_CDC_RX1_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_B3_CTL (0x000002BA)
-#define TABLA_A_CDC_RX2_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_B3_CTL (0x000002C2)
-#define TABLA_A_CDC_RX3_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_B3_CTL (0x000002CA)
-#define TABLA_A_CDC_RX4_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_B3_CTL (0x000002D2)
-#define TABLA_A_CDC_RX5_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_B3_CTL (0x000002DA)
-#define TABLA_A_CDC_RX6_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_B3_CTL (0x000002E2)
-#define TABLA_A_CDC_RX7_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX1_B4_CTL (0x000002B3)
-#define TABLA_A_CDC_RX1_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_B4_CTL (0x000002BB)
-#define TABLA_A_CDC_RX2_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_B4_CTL (0x000002C3)
-#define TABLA_A_CDC_RX3_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_B4_CTL (0x000002CB)
-#define TABLA_A_CDC_RX4_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_B4_CTL (0x000002D3)
-#define TABLA_A_CDC_RX5_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_B4_CTL (0x000002DB)
-#define TABLA_A_CDC_RX6_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_B4_CTL (0x000002E3)
-#define TABLA_A_CDC_RX7_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX1_B5_CTL (0x000002B4)
-#define TABLA_A_CDC_RX1_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX2_B5_CTL (0x000002BC)
-#define TABLA_A_CDC_RX2_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX3_B5_CTL (0x000002C4)
-#define TABLA_A_CDC_RX3_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX4_B5_CTL (0x000002CC)
-#define TABLA_A_CDC_RX4_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX5_B5_CTL (0x000002D4)
-#define TABLA_A_CDC_RX5_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX6_B5_CTL (0x000002DC)
-#define TABLA_A_CDC_RX6_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX7_B5_CTL (0x000002E4)
-#define TABLA_A_CDC_RX7_B5_CTL__POR (0x00000060)
-#define TABLA_A_CDC_RX1_B6_CTL (0x000002B5)
-#define TABLA_A_CDC_RX1_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_B6_CTL (0x000002BD)
-#define TABLA_A_CDC_RX2_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_B6_CTL (0x000002C5)
-#define TABLA_A_CDC_RX3_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_B6_CTL (0x000002CD)
-#define TABLA_A_CDC_RX4_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_B6_CTL (0x000002D5)
-#define TABLA_A_CDC_RX5_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_B6_CTL (0x000002DD)
-#define TABLA_A_CDC_RX6_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_B6_CTL (0x000002E5)
-#define TABLA_A_CDC_RX7_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX1_VOL_CTL_B1_CTL (0x000002B6)
-#define TABLA_A_CDC_RX1_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_VOL_CTL_B1_CTL (0x000002BE)
-#define TABLA_A_CDC_RX2_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_VOL_CTL_B1_CTL (0x000002C6)
-#define TABLA_A_CDC_RX3_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_VOL_CTL_B1_CTL (0x000002CE)
-#define TABLA_A_CDC_RX4_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_VOL_CTL_B1_CTL (0x000002D6)
-#define TABLA_A_CDC_RX5_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_VOL_CTL_B1_CTL (0x000002DE)
-#define TABLA_A_CDC_RX6_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_VOL_CTL_B1_CTL (0x000002E6)
-#define TABLA_A_CDC_RX7_VOL_CTL_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX1_VOL_CTL_B2_CTL (0x000002B7)
-#define TABLA_A_CDC_RX1_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX2_VOL_CTL_B2_CTL (0x000002BF)
-#define TABLA_A_CDC_RX2_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX3_VOL_CTL_B2_CTL (0x000002C7)
-#define TABLA_A_CDC_RX3_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX4_VOL_CTL_B2_CTL (0x000002CF)
-#define TABLA_A_CDC_RX4_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX5_VOL_CTL_B2_CTL (0x000002D7)
-#define TABLA_A_CDC_RX5_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX6_VOL_CTL_B2_CTL (0x000002DF)
-#define TABLA_A_CDC_RX6_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_RX7_VOL_CTL_B2_CTL (0x000002E7)
-#define TABLA_A_CDC_RX7_VOL_CTL_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_ANC_RESET_CTL (0x00000300)
-#define TABLA_A_CDC_CLK_ANC_RESET_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_RX_RESET_CTL (0x00000301)
-#define TABLA_A_CDC_CLK_RX_RESET_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_TX_RESET_B1_CTL (0x00000302)
-#define TABLA_A_CDC_CLK_TX_RESET_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_TX_RESET_B2_CTL (0x00000303)
-#define TABLA_A_CDC_CLK_TX_RESET_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_DMIC_CTL (0x00000304)
-#define TABLA_A_CDC_CLK_DMIC_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_RX_I2S_CTL (0x00000305)
-#define TABLA_A_CDC_CLK_RX_I2S_CTL__POR (0x00000003)
-#define TABLA_A_CDC_CLK_TX_I2S_CTL (0x00000306)
-#define TABLA_A_CDC_CLK_TX_I2S_CTL__POR (0x00000003)
-#define TABLA_A_CDC_CLK_OTHR_RESET_CTL (0x00000307)
-#define TABLA_A_CDC_CLK_OTHR_RESET_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_TX_CLK_EN_B1_CTL (0x00000308)
-#define TABLA_A_CDC_CLK_TX_CLK_EN_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_TX_CLK_EN_B2_CTL (0x00000309)
-#define TABLA_A_CDC_CLK_TX_CLK_EN_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_OTHR_CTL (0x0000030A)
-#define TABLA_A_CDC_CLK_OTHR_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_RDAC_CLK_EN_CTL (0x0000030B)
-#define TABLA_A_CDC_CLK_RDAC_CLK_EN_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_ANC_CLK_EN_CTL (0x0000030C)
-#define TABLA_A_CDC_CLK_ANC_CLK_EN_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_RX_B1_CTL (0x0000030D)
-#define TABLA_A_CDC_CLK_RX_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_RX_B2_CTL (0x0000030E)
-#define TABLA_A_CDC_CLK_RX_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_MCLK_CTL (0x0000030F)
-#define TABLA_A_CDC_CLK_MCLK_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_PDM_CTL (0x00000310)
-#define TABLA_A_CDC_CLK_PDM_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLK_SD_CTL (0x00000311)
-#define TABLA_A_CDC_CLK_SD_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B1_CTL (0x00000320)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B1_CTL__POR (0x00000007)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B2_CTL (0x00000321)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B2_CTL__POR (0x00000013)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B3_CTL (0x00000322)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B3_CTL__POR (0x00000053)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B4_CTL (0x00000323)
-#define TABLA_A_CDC_CLSG_FREQ_THRESH_B4_CTL__POR (0x0000007f)
-#define TABLA_A_CDC_CLSG_GAIN_THRESH_CTL (0x00000324)
-#define TABLA_A_CDC_CLSG_GAIN_THRESH_CTL__POR (0x00000026)
-#define TABLA_A_CDC_CLSG_TIMER_B1_CFG (0x00000325)
-#define TABLA_A_CDC_CLSG_TIMER_B1_CFG__POR (0x0000000a)
-#define TABLA_A_CDC_CLSG_TIMER_B2_CFG (0x00000326)
-#define TABLA_A_CDC_CLSG_TIMER_B2_CFG__POR (0x00000000)
-#define TABLA_A_CDC_CLSG_CTL (0x00000327)
-#define TABLA_A_CDC_CLSG_CTL__POR (0x00000013)
-#define TABLA_A_CDC_IIR1_GAIN_B1_CTL (0x00000340)
-#define TABLA_A_CDC_IIR1_GAIN_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B1_CTL (0x00000350)
-#define TABLA_A_CDC_IIR2_GAIN_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B2_CTL (0x00000341)
-#define TABLA_A_CDC_IIR1_GAIN_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B2_CTL (0x00000351)
-#define TABLA_A_CDC_IIR2_GAIN_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B3_CTL (0x00000342)
-#define TABLA_A_CDC_IIR1_GAIN_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B3_CTL (0x00000352)
-#define TABLA_A_CDC_IIR2_GAIN_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B4_CTL (0x00000343)
-#define TABLA_A_CDC_IIR1_GAIN_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B4_CTL (0x00000353)
-#define TABLA_A_CDC_IIR2_GAIN_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B5_CTL (0x00000344)
-#define TABLA_A_CDC_IIR1_GAIN_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B5_CTL (0x00000354)
-#define TABLA_A_CDC_IIR2_GAIN_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B6_CTL (0x00000345)
-#define TABLA_A_CDC_IIR1_GAIN_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B6_CTL (0x00000355)
-#define TABLA_A_CDC_IIR2_GAIN_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B7_CTL (0x00000346)
-#define TABLA_A_CDC_IIR1_GAIN_B7_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B7_CTL (0x00000356)
-#define TABLA_A_CDC_IIR2_GAIN_B7_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_B8_CTL (0x00000347)
-#define TABLA_A_CDC_IIR1_GAIN_B8_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_B8_CTL (0x00000357)
-#define TABLA_A_CDC_IIR2_GAIN_B8_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_CTL (0x00000348)
-#define TABLA_A_CDC_IIR1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_CTL (0x00000358)
-#define TABLA_A_CDC_IIR2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_GAIN_TIMER_CTL (0x00000349)
-#define TABLA_A_CDC_IIR1_GAIN_TIMER_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_GAIN_TIMER_CTL (0x00000359)
-#define TABLA_A_CDC_IIR2_GAIN_TIMER_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_COEF_B1_CTL (0x0000034A)
-#define TABLA_A_CDC_IIR1_COEF_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_COEF_B1_CTL (0x0000035A)
-#define TABLA_A_CDC_IIR2_COEF_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_COEF_B2_CTL (0x0000034B)
-#define TABLA_A_CDC_IIR1_COEF_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_COEF_B2_CTL (0x0000035B)
-#define TABLA_A_CDC_IIR2_COEF_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_COEF_B3_CTL (0x0000034C)
-#define TABLA_A_CDC_IIR1_COEF_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_COEF_B3_CTL (0x0000035C)
-#define TABLA_A_CDC_IIR2_COEF_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_COEF_B4_CTL (0x0000034D)
-#define TABLA_A_CDC_IIR1_COEF_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_COEF_B4_CTL (0x0000035D)
-#define TABLA_A_CDC_IIR2_COEF_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR1_COEF_B5_CTL (0x0000034E)
-#define TABLA_A_CDC_IIR1_COEF_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_IIR2_COEF_B5_CTL (0x0000035E)
-#define TABLA_A_CDC_IIR2_COEF_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_TOP_GAIN_UPDATE (0x00000360)
-#define TABLA_A_CDC_TOP_GAIN_UPDATE__POR (0x00000000)
-#define TABLA_A_CDC_DEBUG_B1_CTL (0x00000368)
-#define TABLA_A_CDC_DEBUG_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_DEBUG_B2_CTL (0x00000369)
-#define TABLA_A_CDC_DEBUG_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_DEBUG_B3_CTL (0x0000036A)
-#define TABLA_A_CDC_DEBUG_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_DEBUG_B4_CTL (0x0000036B)
-#define TABLA_A_CDC_DEBUG_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_DEBUG_B5_CTL (0x0000036C)
-#define TABLA_A_CDC_DEBUG_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_DEBUG_B6_CTL (0x0000036D)
-#define TABLA_A_CDC_DEBUG_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_B1_CTL (0x00000370)
-#define TABLA_A_CDC_COMP1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_B2_CTL (0x00000371)
-#define TABLA_A_CDC_COMP1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_B3_CTL (0x00000372)
-#define TABLA_A_CDC_COMP1_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_B4_CTL (0x00000373)
-#define TABLA_A_CDC_COMP1_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_B5_CTL (0x00000374)
-#define TABLA_A_CDC_COMP1_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_B6_CTL (0x00000375)
-#define TABLA_A_CDC_COMP1_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_SHUT_DOWN_STATUS (0x00000376)
-#define TABLA_A_CDC_COMP1_SHUT_DOWN_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_COMP1_FS_CFG (0x00000377)
-#define TABLA_A_CDC_COMP1_FS_CFG__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_B1_CTL (0x00000378)
-#define TABLA_A_CDC_COMP2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_B2_CTL (0x00000379)
-#define TABLA_A_CDC_COMP2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_B3_CTL (0x0000037A)
-#define TABLA_A_CDC_COMP2_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_B4_CTL (0x0000037B)
-#define TABLA_A_CDC_COMP2_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_B5_CTL (0x0000037C)
-#define TABLA_A_CDC_COMP2_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_B6_CTL (0x0000037D)
-#define TABLA_A_CDC_COMP2_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_SHUT_DOWN_STATUS (0x0000037E)
-#define TABLA_A_CDC_COMP2_SHUT_DOWN_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_COMP2_FS_CFG (0x0000037F)
-#define TABLA_A_CDC_COMP2_FS_CFG__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX1_B1_CTL (0x00000380)
-#define TABLA_A_CDC_CONN_RX1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX1_B2_CTL (0x00000381)
-#define TABLA_A_CDC_CONN_RX1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX1_B3_CTL (0x00000382)
-#define TABLA_A_CDC_CONN_RX1_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX2_B1_CTL (0x00000383)
-#define TABLA_A_CDC_CONN_RX2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX2_B2_CTL (0x00000384)
-#define TABLA_A_CDC_CONN_RX2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX2_B3_CTL (0x00000385)
-#define TABLA_A_CDC_CONN_RX2_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX3_B1_CTL (0x00000386)
-#define TABLA_A_CDC_CONN_RX3_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX3_B2_CTL (0x00000387)
-#define TABLA_A_CDC_CONN_RX3_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX3_B3_CTL (0x00000388)
-#define TABLA_A_CDC_CONN_RX3_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX4_B1_CTL (0x00000389)
-#define TABLA_A_CDC_CONN_RX4_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX4_B2_CTL (0x0000038A)
-#define TABLA_A_CDC_CONN_RX4_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX5_B1_CTL (0x0000038B)
-#define TABLA_A_CDC_CONN_RX5_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX5_B2_CTL (0x0000038C)
-#define TABLA_A_CDC_CONN_RX5_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX6_B1_CTL (0x0000038D)
-#define TABLA_A_CDC_CONN_RX6_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX6_B2_CTL (0x0000038E)
-#define TABLA_A_CDC_CONN_RX6_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX7_B1_CTL (0x0000038F)
-#define TABLA_A_CDC_CONN_RX7_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX7_B2_CTL (0x00000390)
-#define TABLA_A_CDC_CONN_RX7_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_ANC_B1_CTL (0x00000391)
-#define TABLA_A_CDC_CONN_ANC_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_ANC_B2_CTL (0x00000392)
-#define TABLA_A_CDC_CONN_ANC_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_B1_CTL (0x00000393)
-#define TABLA_A_CDC_CONN_TX_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_B2_CTL (0x00000394)
-#define TABLA_A_CDC_CONN_TX_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_B3_CTL (0x00000395)
-#define TABLA_A_CDC_CONN_TX_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_B4_CTL (0x00000396)
-#define TABLA_A_CDC_CONN_TX_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ1_B1_CTL (0x00000397)
-#define TABLA_A_CDC_CONN_EQ1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ1_B2_CTL (0x00000398)
-#define TABLA_A_CDC_CONN_EQ1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ1_B3_CTL (0x00000399)
-#define TABLA_A_CDC_CONN_EQ1_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ1_B4_CTL (0x0000039A)
-#define TABLA_A_CDC_CONN_EQ1_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ2_B1_CTL (0x0000039B)
-#define TABLA_A_CDC_CONN_EQ2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ2_B2_CTL (0x0000039C)
-#define TABLA_A_CDC_CONN_EQ2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ2_B3_CTL (0x0000039D)
-#define TABLA_A_CDC_CONN_EQ2_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_EQ2_B4_CTL (0x0000039E)
-#define TABLA_A_CDC_CONN_EQ2_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_SRC1_B1_CTL (0x0000039F)
-#define TABLA_A_CDC_CONN_SRC1_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_SRC1_B2_CTL (0x000003A0)
-#define TABLA_A_CDC_CONN_SRC1_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_SRC2_B1_CTL (0x000003A1)
-#define TABLA_A_CDC_CONN_SRC2_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_SRC2_B2_CTL (0x000003A2)
-#define TABLA_A_CDC_CONN_SRC2_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B1_CTL (0x000003A3)
-#define TABLA_A_CDC_CONN_TX_SB_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B2_CTL (0x000003A4)
-#define TABLA_A_CDC_CONN_TX_SB_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B3_CTL (0x000003A5)
-#define TABLA_A_CDC_CONN_TX_SB_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B4_CTL (0x000003A6)
-#define TABLA_A_CDC_CONN_TX_SB_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B5_CTL (0x000003A7)
-#define TABLA_A_CDC_CONN_TX_SB_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B6_CTL (0x000003A8)
-#define TABLA_A_CDC_CONN_TX_SB_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B7_CTL (0x000003A9)
-#define TABLA_A_CDC_CONN_TX_SB_B7_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B8_CTL (0x000003AA)
-#define TABLA_A_CDC_CONN_TX_SB_B8_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B9_CTL (0x000003AB)
-#define TABLA_A_CDC_CONN_TX_SB_B9_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B10_CTL (0x000003AC)
-#define TABLA_A_CDC_CONN_TX_SB_B10_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_TX_SB_B11_CTL (0x000003AD)
-#define TABLA_A_CDC_CONN_TX_SB_B11_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX_SB_B1_CTL (0x000003AE)
-#define TABLA_A_CDC_CONN_RX_SB_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_RX_SB_B2_CTL (0x000003AF)
-#define TABLA_A_CDC_CONN_RX_SB_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_CLSG_CTL (0x000003B0)
-#define TABLA_A_CDC_CONN_CLSG_CTL__POR (0x00000000)
-#define TABLA_A_CDC_CONN_SPARE (0x000003B1)
-#define TABLA_A_CDC_CONN_SPARE__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_EN_CTL (0x000003C0)
-#define TABLA_A_CDC_MBHC_EN_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_FEATURE_B1_CFG (0x000003C1)
-#define TABLA_A_CDC_MBHC_FEATURE_B1_CFG__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_FEATURE_B2_CFG (0x000003C2)
-#define TABLA_A_CDC_MBHC_FEATURE_B2_CFG__POR (0x00000006)
-#define TABLA_A_CDC_MBHC_TIMER_B1_CTL (0x000003C3)
-#define TABLA_A_CDC_MBHC_TIMER_B1_CTL__POR (0x00000003)
-#define TABLA_A_CDC_MBHC_TIMER_B2_CTL (0x000003C4)
-#define TABLA_A_CDC_MBHC_TIMER_B2_CTL__POR (0x00000009)
-#define TABLA_A_CDC_MBHC_TIMER_B3_CTL (0x000003C5)
-#define TABLA_A_CDC_MBHC_TIMER_B3_CTL__POR (0x0000001e)
-#define TABLA_A_CDC_MBHC_TIMER_B4_CTL (0x000003C6)
-#define TABLA_A_CDC_MBHC_TIMER_B4_CTL__POR (0x00000045)
-#define TABLA_A_CDC_MBHC_TIMER_B5_CTL (0x000003C7)
-#define TABLA_A_CDC_MBHC_TIMER_B5_CTL__POR (0x00000004)
-#define TABLA_A_CDC_MBHC_TIMER_B6_CTL (0x000003C8)
-#define TABLA_A_CDC_MBHC_TIMER_B6_CTL__POR (0x00000078)
-#define TABLA_A_CDC_MBHC_B1_STATUS (0x000003C9)
-#define TABLA_A_CDC_MBHC_B1_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_B2_STATUS (0x000003CA)
-#define TABLA_A_CDC_MBHC_B2_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_B3_STATUS (0x000003CB)
-#define TABLA_A_CDC_MBHC_B3_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_B4_STATUS (0x000003CC)
-#define TABLA_A_CDC_MBHC_B4_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_B5_STATUS (0x000003CD)
-#define TABLA_A_CDC_MBHC_B5_STATUS__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_B1_CTL (0x000003CE)
-#define TABLA_A_CDC_MBHC_B1_CTL__POR (0x000000c0)
-#define TABLA_A_CDC_MBHC_B2_CTL (0x000003CF)
-#define TABLA_A_CDC_MBHC_B2_CTL__POR (0x0000005d)
-#define TABLA_A_CDC_MBHC_VOLT_B1_CTL (0x000003D0)
-#define TABLA_A_CDC_MBHC_VOLT_B1_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B2_CTL (0x000003D1)
-#define TABLA_A_CDC_MBHC_VOLT_B2_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B3_CTL (0x000003D2)
-#define TABLA_A_CDC_MBHC_VOLT_B3_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B4_CTL (0x000003D3)
-#define TABLA_A_CDC_MBHC_VOLT_B4_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B5_CTL (0x000003D4)
-#define TABLA_A_CDC_MBHC_VOLT_B5_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B6_CTL (0x000003D5)
-#define TABLA_A_CDC_MBHC_VOLT_B6_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B7_CTL (0x000003D6)
-#define TABLA_A_CDC_MBHC_VOLT_B7_CTL__POR (0x000000ff)
-#define TABLA_A_CDC_MBHC_VOLT_B8_CTL (0x000003D7)
-#define TABLA_A_CDC_MBHC_VOLT_B8_CTL__POR (0x00000007)
-#define TABLA_A_CDC_MBHC_VOLT_B9_CTL (0x000003D8)
-#define TABLA_A_CDC_MBHC_VOLT_B9_CTL__POR (0x000000ff)
-#define TABLA_A_CDC_MBHC_VOLT_B10_CTL (0x000003D9)
-#define TABLA_A_CDC_MBHC_VOLT_B10_CTL__POR (0x0000007f)
-#define TABLA_A_CDC_MBHC_VOLT_B11_CTL (0x000003DA)
-#define TABLA_A_CDC_MBHC_VOLT_B11_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_VOLT_B12_CTL (0x000003DB)
-#define TABLA_A_CDC_MBHC_VOLT_B12_CTL__POR (0x00000080)
-#define TABLA_A_CDC_MBHC_CLK_CTL (0x000003DC)
-#define TABLA_A_CDC_MBHC_CLK_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_INT_CTL (0x000003DD)
-#define TABLA_A_CDC_MBHC_INT_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_DEBUG_CTL (0x000003DE)
-#define TABLA_A_CDC_MBHC_DEBUG_CTL__POR (0x00000000)
-#define TABLA_A_CDC_MBHC_SPARE (0x000003DF)
-#define TABLA_A_CDC_MBHC_SPARE__POR (0x00000000)
-
-
-/* SLIMBUS Slave Registers */
-#define TABLA_SLIM_PGD_PORT_INT_EN0 (0x30)
-#define TABLA_SLIM_PGD_PORT_INT_STATUS0 (0x34)
-#define TABLA_SLIM_PGD_PORT_INT_CLR0 (0x38)
-#define TABLA_SLIM_PGD_PORT_INT_SOURCE0 (0x60)
-
-/* Macros for Packing Register Writes into a U32 */
-#define TABLA_PACKED_REG_SIZE sizeof(u32)
-
-#define TABLA_CODEC_PACK_ENTRY(reg, mask, val) ((val & 0xff)|\
- ((mask & 0xff) << 8)|((reg & 0xffff) << 16))
-
-#define TABLA_CODEC_UNPACK_ENTRY(packed, reg, mask, val) \
- do { \
- ((reg) = ((packed >> 16) & (0xffff))); \
- ((mask) = ((packed >> 8) & (0xff))); \
- ((val) = ((packed) & (0xff))); \
- } while (0);
-
-#endif
diff --git a/original/linux/mfd/wcd9xxx/wcd9xxx_registers.h b/original/linux/mfd/wcd9xxx/wcd9xxx_registers.h
deleted file mode 100644
index c66e953..0000000
--- a/original/linux/mfd/wcd9xxx/wcd9xxx_registers.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-#ifndef WCD9XXX_CODEC_DIGITAL_H
-
-#define WCD9XXX_CODEC_DIGITAL_H
-
-#define WCD9XXX_A_CHIP_CTL (0x00)
-#define WCD9XXX_A_CHIP_CTL__POR (0x00000000)
-#define WCD9XXX_A_CHIP_STATUS (0x01)
-#define WCD9XXX_A_CHIP_STATUS__POR (0x00000000)
-#define WCD9XXX_A_CHIP_ID_BYTE_0 (0x04)
-#define WCD9XXX_A_CHIP_ID_BYTE_0__POR (0x00000000)
-#define WCD9XXX_A_CHIP_ID_BYTE_1 (0x05)
-#define WCD9XXX_A_CHIP_ID_BYTE_1__POR (0x00000000)
-#define WCD9XXX_A_CHIP_ID_BYTE_2 (0x06)
-#define WCD9XXX_A_CHIP_ID_BYTE_2__POR (0x00000000)
-#define WCD9XXX_A_CHIP_ID_BYTE_3 (0x07)
-#define WCD9XXX_A_CHIP_ID_BYTE_3__POR (0x00000001)
-#define WCD9XXX_A_CHIP_VERSION (0x08)
-#define WCD9XXX_A_CHIP_VERSION__POR (0x00000020)
-#define WCD9XXX_A_SB_VERSION (0x09)
-#define WCD9XXX_A_SB_VERSION__POR (0x00000010)
-#define WCD9XXX_A_SLAVE_ID_1 (0x0C)
-#define WCD9XXX_A_SLAVE_ID_1__POR (0x00000077)
-#define WCD9XXX_A_SLAVE_ID_2 (0x0D)
-#define WCD9XXX_A_SLAVE_ID_2__POR (0x00000066)
-#define WCD9XXX_A_SLAVE_ID_3 (0x0E)
-#define WCD9XXX_A_SLAVE_ID_3__POR (0x00000055)
-#define WCD9XXX_A_CDC_CTL (0x80)
-#define WCD9XXX_A_CDC_CTL__POR (0x00000000)
-#define WCD9XXX_A_LEAKAGE_CTL (0x88)
-#define WCD9XXX_A_LEAKAGE_CTL__POR (0x00000004)
-#endif
diff --git a/original/linux/miscdevice.h b/original/linux/miscdevice.h
deleted file mode 100644
index b03cfb9..0000000
--- a/original/linux/miscdevice.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef _LINUX_MISCDEVICE_H
-#define _LINUX_MISCDEVICE_H
-#include <linux/module.h>
-#include <linux/major.h>
-
-#define PSMOUSE_MINOR 1
-#define MS_BUSMOUSE_MINOR 2
-#define ATIXL_BUSMOUSE_MINOR 3
-/*#define AMIGAMOUSE_MINOR 4 FIXME OBSOLETE */
-#define ATARIMOUSE_MINOR 5
-#define SUN_MOUSE_MINOR 6
-#define APOLLO_MOUSE_MINOR 7
-#define PC110PAD_MINOR 9
-/*#define ADB_MOUSE_MINOR 10 FIXME OBSOLETE */
-#define WATCHDOG_MINOR 130 /* Watchdog timer */
-#define TEMP_MINOR 131 /* Temperature Sensor */
-#define RTC_MINOR 135
-#define EFI_RTC_MINOR 136 /* EFI Time services */
-#define SUN_OPENPROM_MINOR 139
-#define DMAPI_MINOR 140 /* DMAPI */
-#define NVRAM_MINOR 144
-#define SGI_MMTIMER 153
-#define STORE_QUEUE_MINOR 155
-#define I2O_MINOR 166
-#define MICROCODE_MINOR 184
-#define MWAVE_MINOR 219 /* ACP/Mwave Modem */
-#define MPT_MINOR 220
-#define MISC_DYNAMIC_MINOR 255
-
-#define TUN_MINOR 200
-#define HPET_MINOR 228
-
-struct device;
-struct class_device;
-
-struct miscdevice {
- int minor;
- const char *name;
- const struct file_operations *fops;
- struct list_head list;
- struct device *dev;
- struct class_device *class;
-};
-
-extern int misc_register(struct miscdevice * misc);
-extern int misc_deregister(struct miscdevice * misc);
-
-#define MODULE_ALIAS_MISCDEV(minor) \
- MODULE_ALIAS("char-major-" __stringify(MISC_MAJOR) \
- "-" __stringify(minor))
-#endif
diff --git a/original/linux/mm.h b/original/linux/mm.h
deleted file mode 100644
index f0b135c..0000000
--- a/original/linux/mm.h
+++ /dev/null
@@ -1,1077 +0,0 @@
-#ifndef _LINUX_MM_H
-#define _LINUX_MM_H
-
-#include <linux/sched.h>
-#include <linux/errno.h>
-#include <linux/capability.h>
-
-#ifdef __KERNEL__
-
-#include <linux/gfp.h>
-#include <linux/list.h>
-#include <linux/mmzone.h>
-#include <linux/rbtree.h>
-#include <linux/prio_tree.h>
-#include <linux/fs.h>
-#include <linux/mutex.h>
-#include <linux/debug_locks.h>
-
-struct mempolicy;
-struct anon_vma;
-
-#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
-extern unsigned long max_mapnr;
-#endif
-
-extern unsigned long num_physpages;
-extern void * high_memory;
-extern unsigned long vmalloc_earlyreserve;
-extern int page_cluster;
-
-#ifdef CONFIG_SYSCTL
-extern int sysctl_legacy_va_layout;
-#else
-#define sysctl_legacy_va_layout 0
-#endif
-
-#include <asm/page.h>
-#include <asm/pgtable.h>
-#include <asm/processor.h>
-
-#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
-
-/*
- * Linux kernel virtual memory manager primitives.
- * The idea being to have a "virtual" mm in the same way
- * we have a virtual fs - giving a cleaner interface to the
- * mm details, and allowing different kinds of memory mappings
- * (from shared memory to executable loading to arbitrary
- * mmap() functions).
- */
-
-/*
- * This struct defines a memory VMM memory area. There is one of these
- * per VM-area/task. A VM area is any part of the process virtual memory
- * space that has a special rule for the page-fault handlers (ie a shared
- * library, the executable area etc).
- */
-struct vm_area_struct {
- struct mm_struct * vm_mm; /* The address space we belong to. */
- unsigned long vm_start; /* Our start address within vm_mm. */
- unsigned long vm_end; /* The first byte after our end address
- within vm_mm. */
-
- /* linked list of VM areas per task, sorted by address */
- struct vm_area_struct *vm_next;
-
- pgprot_t vm_page_prot; /* Access permissions of this VMA. */
- unsigned long vm_flags; /* Flags, listed below. */
-
- struct rb_node vm_rb;
-
- /*
- * For areas with an address space and backing store,
- * linkage into the address_space->i_mmap prio tree, or
- * linkage to the list of like vmas hanging off its node, or
- * linkage of vma in the address_space->i_mmap_nonlinear list.
- */
- union {
- struct {
- struct list_head list;
- void *parent; /* aligns with prio_tree_node parent */
- struct vm_area_struct *head;
- } vm_set;
-
- struct raw_prio_tree_node prio_tree_node;
- } shared;
-
- /*
- * A file's MAP_PRIVATE vma can be in both i_mmap tree and anon_vma
- * list, after a COW of one of the file pages. A MAP_SHARED vma
- * can only be in the i_mmap tree. An anonymous MAP_PRIVATE, stack
- * or brk vma (with NULL file) can only be in an anon_vma list.
- */
- struct list_head anon_vma_node; /* Serialized by anon_vma->lock */
- struct anon_vma *anon_vma; /* Serialized by page_table_lock */
-
- /* Function pointers to deal with this struct. */
- struct vm_operations_struct * vm_ops;
-
- /* Information about our backing store: */
- unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
- units, *not* PAGE_CACHE_SIZE */
- struct file * vm_file; /* File we map to (can be NULL). */
- void * vm_private_data; /* was vm_pte (shared mem) */
- unsigned long vm_truncate_count;/* truncate_count or restart_addr */
-
-#ifndef CONFIG_MMU
- atomic_t vm_usage; /* refcount (VMAs shared if !MMU) */
-#endif
-#ifdef CONFIG_NUMA
- struct mempolicy *vm_policy; /* NUMA policy for the VMA */
-#endif
-};
-
-/*
- * This struct defines the per-mm list of VMAs for uClinux. If CONFIG_MMU is
- * disabled, then there's a single shared list of VMAs maintained by the
- * system, and mm's subscribe to these individually
- */
-struct vm_list_struct {
- struct vm_list_struct *next;
- struct vm_area_struct *vma;
-};
-
-#ifndef CONFIG_MMU
-extern struct rb_root nommu_vma_tree;
-extern struct rw_semaphore nommu_vma_sem;
-
-extern unsigned int kobjsize(const void *objp);
-#endif
-
-/*
- * vm_flags..
- */
-#define VM_READ 0x00000001 /* currently active flags */
-#define VM_WRITE 0x00000002
-#define VM_EXEC 0x00000004
-#define VM_SHARED 0x00000008
-
-/* mprotect() hardcodes VM_MAYREAD >> 4 == VM_READ, and so for r/w/x bits. */
-#define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */
-#define VM_MAYWRITE 0x00000020
-#define VM_MAYEXEC 0x00000040
-#define VM_MAYSHARE 0x00000080
-
-#define VM_GROWSDOWN 0x00000100 /* general info on the segment */
-#define VM_GROWSUP 0x00000200
-#define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */
-#define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */
-
-#define VM_EXECUTABLE 0x00001000
-#define VM_LOCKED 0x00002000
-#define VM_IO 0x00004000 /* Memory mapped I/O or similar */
-
- /* Used by sys_madvise() */
-#define VM_SEQ_READ 0x00008000 /* App will access data sequentially */
-#define VM_RAND_READ 0x00010000 /* App will not benefit from clustered reads */
-
-#define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */
-#define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */
-#define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */
-#define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
-#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
-#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
-#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
-#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */
-
-#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
-#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
-#endif
-
-#ifdef CONFIG_STACK_GROWSUP
-#define VM_STACK_FLAGS (VM_GROWSUP | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
-#else
-#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
-#endif
-
-#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
-#define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK
-#define VM_NormalReadHint(v) (!((v)->vm_flags & VM_READHINTMASK))
-#define VM_SequentialReadHint(v) ((v)->vm_flags & VM_SEQ_READ)
-#define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ)
-
-/*
- * mapping from the currently active vm_flags protection bits (the
- * low four bits) to a page protection mask..
- */
-extern pgprot_t protection_map[16];
-
-
-/*
- * These are the virtual MM functions - opening of an area, closing and
- * unmapping it (needed to keep files on disk up-to-date etc), pointer
- * to the functions called when a no-page or a wp-page exception occurs.
- */
-struct vm_operations_struct {
- void (*open)(struct vm_area_struct * area);
- void (*close)(struct vm_area_struct * area);
- struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
- int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
-
- /* notification that a previously read-only page is about to become
- * writable, if an error is returned it will cause a SIGBUS */
- int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page);
-#ifdef CONFIG_NUMA
- int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
- struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
- unsigned long addr);
- int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from,
- const nodemask_t *to, unsigned long flags);
-#endif
-};
-
-struct mmu_gather;
-struct inode;
-
-/*
- * Each physical page in the system has a struct page associated with
- * it to keep track of whatever it is we are using the page for at the
- * moment. Note that we have no way to track which tasks are using
- * a page.
- */
-struct page {
- unsigned long flags; /* Atomic flags, some possibly
- * updated asynchronously */
- atomic_t _count; /* Usage count, see below. */
- atomic_t _mapcount; /* Count of ptes mapped in mms,
- * to show when page is mapped
- * & limit reverse map searches.
- */
- union {
- struct {
- unsigned long private; /* Mapping-private opaque data:
- * usually used for buffer_heads
- * if PagePrivate set; used for
- * swp_entry_t if PageSwapCache;
- * indicates order in the buddy
- * system if PG_buddy is set.
- */
- struct address_space *mapping; /* If low bit clear, points to
- * inode address_space, or NULL.
- * If page mapped as anonymous
- * memory, low bit is set, and
- * it points to anon_vma object:
- * see PAGE_MAPPING_ANON below.
- */
- };
-#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
- spinlock_t ptl;
-#endif
- };
- pgoff_t index; /* Our offset within mapping. */
- struct list_head lru; /* Pageout list, eg. active_list
- * protected by zone->lru_lock !
- */
- /*
- * On machines where all RAM is mapped into kernel address space,
- * we can simply calculate the virtual address. On machines with
- * highmem some memory is mapped into kernel virtual memory
- * dynamically, so we need a place to store that address.
- * Note that this field could be 16 bits on x86 ... ;)
- *
- * Architectures with slow multiplication can define
- * WANT_PAGE_VIRTUAL in asm/page.h
- */
-#if defined(WANT_PAGE_VIRTUAL)
- void *virtual; /* Kernel virtual address (NULL if
- not kmapped, ie. highmem) */
-#endif /* WANT_PAGE_VIRTUAL */
-};
-
-#define page_private(page) ((page)->private)
-#define set_page_private(page, v) ((page)->private = (v))
-
-/*
- * FIXME: take this include out, include page-flags.h in
- * files which need it (119 of them)
- */
-#include <linux/page-flags.h>
-
-/*
- * Methods to modify the page usage count.
- *
- * What counts for a page usage:
- * - cache mapping (page->mapping)
- * - private data (page->private)
- * - page mapped in a task's page tables, each mapping
- * is counted separately
- *
- * Also, many kernel routines increase the page count before a critical
- * routine so they can be sure the page doesn't go away from under them.
- */
-
-/*
- * Drop a ref, return true if the logical refcount fell to zero (the page has
- * no users)
- */
-static inline int put_page_testzero(struct page *page)
-{
- BUG_ON(atomic_read(&page->_count) == 0);
- return atomic_dec_and_test(&page->_count);
-}
-
-/*
- * Try to grab a ref unless the page has a refcount of zero, return false if
- * that is the case.
- */
-static inline int get_page_unless_zero(struct page *page)
-{
- return atomic_inc_not_zero(&page->_count);
-}
-
-extern void FASTCALL(__page_cache_release(struct page *));
-
-static inline int page_count(struct page *page)
-{
- if (unlikely(PageCompound(page)))
- page = (struct page *)page_private(page);
- return atomic_read(&page->_count);
-}
-
-static inline void get_page(struct page *page)
-{
- if (unlikely(PageCompound(page)))
- page = (struct page *)page_private(page);
- atomic_inc(&page->_count);
-}
-
-/*
- * Setup the page count before being freed into the page allocator for
- * the first time (boot or memory hotplug)
- */
-static inline void init_page_count(struct page *page)
-{
- atomic_set(&page->_count, 1);
-}
-
-void put_page(struct page *page);
-void put_pages_list(struct list_head *pages);
-
-void split_page(struct page *page, unsigned int order);
-
-/*
- * Multiple processes may "see" the same page. E.g. for untouched
- * mappings of /dev/null, all processes see the same page full of
- * zeroes, and text pages of executables and shared libraries have
- * only one copy in memory, at most, normally.
- *
- * For the non-reserved pages, page_count(page) denotes a reference count.
- * page_count() == 0 means the page is free. page->lru is then used for
- * freelist management in the buddy allocator.
- * page_count() == 1 means the page is used for exactly one purpose
- * (e.g. a private data page of one process).
- *
- * A page may be used for kmalloc() or anyone else who does a
- * __get_free_page(). In this case the page_count() is at least 1, and
- * all other fields are unused but should be 0 or NULL. The
- * management of this page is the responsibility of the one who uses
- * it.
- *
- * The other pages (we may call them "process pages") are completely
- * managed by the Linux memory manager: I/O, buffers, swapping etc.
- * The following discussion applies only to them.
- *
- * A page may belong to an inode's memory mapping. In this case,
- * page->mapping is the pointer to the inode, and page->index is the
- * file offset of the page, in units of PAGE_CACHE_SIZE.
- *
- * A page contains an opaque `private' member, which belongs to the
- * page's address_space. Usually, this is the address of a circular
- * list of the page's disk buffers.
- *
- * For pages belonging to inodes, the page_count() is the number of
- * attaches, plus 1 if `private' contains something, plus one for
- * the page cache itself.
- *
- * Instead of keeping dirty/clean pages in per address-space lists, we instead
- * now tag pages as dirty/under writeback in the radix tree.
- *
- * There is also a per-mapping radix tree mapping index to the page
- * in memory if present. The tree is rooted at mapping->root.
- *
- * All process pages can do I/O:
- * - inode pages may need to be read from disk,
- * - inode pages which have been modified and are MAP_SHARED may need
- * to be written to disk,
- * - private pages which have been modified may need to be swapped out
- * to swap space and (later) to be read back into memory.
- */
-
-/*
- * The zone field is never updated after free_area_init_core()
- * sets it, so none of the operations on it need to be atomic.
- */
-
-
-/*
- * page->flags layout:
- *
- * There are three possibilities for how page->flags get
- * laid out. The first is for the normal case, without
- * sparsemem. The second is for sparsemem when there is
- * plenty of space for node and section. The last is when
- * we have run out of space and have to fall back to an
- * alternate (slower) way of determining the node.
- *
- * No sparsemem: | NODE | ZONE | ... | FLAGS |
- * with space for node: | SECTION | NODE | ZONE | ... | FLAGS |
- * no space for node: | SECTION | ZONE | ... | FLAGS |
- */
-#ifdef CONFIG_SPARSEMEM
-#define SECTIONS_WIDTH SECTIONS_SHIFT
-#else
-#define SECTIONS_WIDTH 0
-#endif
-
-#define ZONES_WIDTH ZONES_SHIFT
-
-#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= FLAGS_RESERVED
-#define NODES_WIDTH NODES_SHIFT
-#else
-#define NODES_WIDTH 0
-#endif
-
-/* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */
-#define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH)
-#define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH)
-#define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
-
-/*
- * We are going to use the flags for the page to node mapping if its in
- * there. This includes the case where there is no node, so it is implicit.
- */
-#define FLAGS_HAS_NODE (NODES_WIDTH > 0 || NODES_SHIFT == 0)
-
-#ifndef PFN_SECTION_SHIFT
-#define PFN_SECTION_SHIFT 0
-#endif
-
-/*
- * Define the bit shifts to access each section. For non-existant
- * sections we define the shift as 0; that plus a 0 mask ensures
- * the compiler will optimise away reference to them.
- */
-#define SECTIONS_PGSHIFT (SECTIONS_PGOFF * (SECTIONS_WIDTH != 0))
-#define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0))
-#define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0))
-
-/* NODE:ZONE or SECTION:ZONE is used to lookup the zone from a page. */
-#if FLAGS_HAS_NODE
-#define ZONETABLE_SHIFT (NODES_SHIFT + ZONES_SHIFT)
-#else
-#define ZONETABLE_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
-#endif
-#define ZONETABLE_PGSHIFT ZONES_PGSHIFT
-
-#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
-#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
-#endif
-
-#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
-#define NODES_MASK ((1UL << NODES_WIDTH) - 1)
-#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
-#define ZONETABLE_MASK ((1UL << ZONETABLE_SHIFT) - 1)
-
-static inline unsigned long page_zonenum(struct page *page)
-{
- return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
-}
-
-struct zone;
-extern struct zone *zone_table[];
-
-static inline int page_zone_id(struct page *page)
-{
- return (page->flags >> ZONETABLE_PGSHIFT) & ZONETABLE_MASK;
-}
-static inline struct zone *page_zone(struct page *page)
-{
- return zone_table[page_zone_id(page)];
-}
-
-static inline unsigned long page_to_nid(struct page *page)
-{
- if (FLAGS_HAS_NODE)
- return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
- else
- return page_zone(page)->zone_pgdat->node_id;
-}
-static inline unsigned long page_to_section(struct page *page)
-{
- return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
-}
-
-static inline void set_page_zone(struct page *page, unsigned long zone)
-{
- page->flags &= ~(ZONES_MASK << ZONES_PGSHIFT);
- page->flags |= (zone & ZONES_MASK) << ZONES_PGSHIFT;
-}
-static inline void set_page_node(struct page *page, unsigned long node)
-{
- page->flags &= ~(NODES_MASK << NODES_PGSHIFT);
- page->flags |= (node & NODES_MASK) << NODES_PGSHIFT;
-}
-static inline void set_page_section(struct page *page, unsigned long section)
-{
- page->flags &= ~(SECTIONS_MASK << SECTIONS_PGSHIFT);
- page->flags |= (section & SECTIONS_MASK) << SECTIONS_PGSHIFT;
-}
-
-static inline void set_page_links(struct page *page, unsigned long zone,
- unsigned long node, unsigned long pfn)
-{
- set_page_zone(page, zone);
- set_page_node(page, node);
- set_page_section(page, pfn_to_section_nr(pfn));
-}
-
-/*
- * Some inline functions in vmstat.h depend on page_zone()
- */
-#include <linux/vmstat.h>
-
-#ifndef CONFIG_DISCONTIGMEM
-/* The array of struct pages - for discontigmem use pgdat->lmem_map */
-extern struct page *mem_map;
-#endif
-
-static __always_inline void *lowmem_page_address(struct page *page)
-{
- return __va(page_to_pfn(page) << PAGE_SHIFT);
-}
-
-#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
-#define HASHED_PAGE_VIRTUAL
-#endif
-
-#if defined(WANT_PAGE_VIRTUAL)
-#define page_address(page) ((page)->virtual)
-#define set_page_address(page, address) \
- do { \
- (page)->virtual = (address); \
- } while(0)
-#define page_address_init() do { } while(0)
-#endif
-
-#if defined(HASHED_PAGE_VIRTUAL)
-void *page_address(struct page *page);
-void set_page_address(struct page *page, void *virtual);
-void page_address_init(void);
-#endif
-
-#if !defined(HASHED_PAGE_VIRTUAL) && !defined(WANT_PAGE_VIRTUAL)
-#define page_address(page) lowmem_page_address(page)
-#define set_page_address(page, address) do { } while(0)
-#define page_address_init() do { } while(0)
-#endif
-
-/*
- * On an anonymous page mapped into a user virtual memory area,
- * page->mapping points to its anon_vma, not to a struct address_space;
- * with the PAGE_MAPPING_ANON bit set to distinguish it.
- *
- * Please note that, confusingly, "page_mapping" refers to the inode
- * address_space which maps the page from disk; whereas "page_mapped"
- * refers to user virtual address space into which the page is mapped.
- */
-#define PAGE_MAPPING_ANON 1
-
-extern struct address_space swapper_space;
-static inline struct address_space *page_mapping(struct page *page)
-{
- struct address_space *mapping = page->mapping;
-
- if (unlikely(PageSwapCache(page)))
- mapping = &swapper_space;
- else if (unlikely((unsigned long)mapping & PAGE_MAPPING_ANON))
- mapping = NULL;
- return mapping;
-}
-
-static inline int PageAnon(struct page *page)
-{
- return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0;
-}
-
-/*
- * Return the pagecache index of the passed page. Regular pagecache pages
- * use ->index whereas swapcache pages use ->private
- */
-static inline pgoff_t page_index(struct page *page)
-{
- if (unlikely(PageSwapCache(page)))
- return page_private(page);
- return page->index;
-}
-
-/*
- * The atomic page->_mapcount, like _count, starts from -1:
- * so that transitions both from it and to it can be tracked,
- * using atomic_inc_and_test and atomic_add_negative(-1).
- */
-static inline void reset_page_mapcount(struct page *page)
-{
- atomic_set(&(page)->_mapcount, -1);
-}
-
-static inline int page_mapcount(struct page *page)
-{
- return atomic_read(&(page)->_mapcount) + 1;
-}
-
-/*
- * Return true if this page is mapped into pagetables.
- */
-static inline int page_mapped(struct page *page)
-{
- return atomic_read(&(page)->_mapcount) >= 0;
-}
-
-/*
- * Error return values for the *_nopage functions
- */
-#define NOPAGE_SIGBUS (NULL)
-#define NOPAGE_OOM ((struct page *) (-1))
-
-/*
- * Different kinds of faults, as returned by handle_mm_fault().
- * Used to decide whether a process gets delivered SIGBUS or
- * just gets major/minor fault counters bumped up.
- */
-#define VM_FAULT_OOM 0x00
-#define VM_FAULT_SIGBUS 0x01
-#define VM_FAULT_MINOR 0x02
-#define VM_FAULT_MAJOR 0x03
-
-/*
- * Special case for get_user_pages.
- * Must be in a distinct bit from the above VM_FAULT_ flags.
- */
-#define VM_FAULT_WRITE 0x10
-
-#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
-
-extern void show_free_areas(void);
-
-#ifdef CONFIG_SHMEM
-struct page *shmem_nopage(struct vm_area_struct *vma,
- unsigned long address, int *type);
-int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
-struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
- unsigned long addr);
-int shmem_lock(struct file *file, int lock, struct user_struct *user);
-#else
-#define shmem_nopage filemap_nopage
-
-static inline int shmem_lock(struct file *file, int lock,
- struct user_struct *user)
-{
- return 0;
-}
-
-static inline int shmem_set_policy(struct vm_area_struct *vma,
- struct mempolicy *new)
-{
- return 0;
-}
-
-static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
- unsigned long addr)
-{
- return NULL;
-}
-#endif
-struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
-extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
-
-int shmem_zero_setup(struct vm_area_struct *);
-
-#ifndef CONFIG_MMU
-extern unsigned long shmem_get_unmapped_area(struct file *file,
- unsigned long addr,
- unsigned long len,
- unsigned long pgoff,
- unsigned long flags);
-#endif
-
-static inline int can_do_mlock(void)
-{
- if (capable(CAP_IPC_LOCK))
- return 1;
- if (current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur != 0)
- return 1;
- return 0;
-}
-extern int user_shm_lock(size_t, struct user_struct *);
-extern void user_shm_unlock(size_t, struct user_struct *);
-
-/*
- * Parameter block passed down to zap_pte_range in exceptional cases.
- */
-struct zap_details {
- struct vm_area_struct *nonlinear_vma; /* Check page->index if set */
- struct address_space *check_mapping; /* Check page->mapping if set */
- pgoff_t first_index; /* Lowest page->index to unmap */
- pgoff_t last_index; /* Highest page->index to unmap */
- spinlock_t *i_mmap_lock; /* For unmap_mapping_range: */
- unsigned long truncate_count; /* Compare vm_truncate_count */
-};
-
-struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t);
-unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address,
- unsigned long size, struct zap_details *);
-unsigned long unmap_vmas(struct mmu_gather **tlb,
- struct vm_area_struct *start_vma, unsigned long start_addr,
- unsigned long end_addr, unsigned long *nr_accounted,
- struct zap_details *);
-void free_pgd_range(struct mmu_gather **tlb, unsigned long addr,
- unsigned long end, unsigned long floor, unsigned long ceiling);
-void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma,
- unsigned long floor, unsigned long ceiling);
-int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
- struct vm_area_struct *vma);
-int zeromap_page_range(struct vm_area_struct *vma, unsigned long from,
- unsigned long size, pgprot_t prot);
-void unmap_mapping_range(struct address_space *mapping,
- loff_t const holebegin, loff_t const holelen, int even_cows);
-
-static inline void unmap_shared_mapping_range(struct address_space *mapping,
- loff_t const holebegin, loff_t const holelen)
-{
- unmap_mapping_range(mapping, holebegin, holelen, 0);
-}
-
-extern int vmtruncate(struct inode * inode, loff_t offset);
-extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end);
-extern int install_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, struct page *page, pgprot_t prot);
-extern int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, unsigned long pgoff, pgprot_t prot);
-
-#ifdef CONFIG_MMU
-extern int __handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma,
- unsigned long address, int write_access);
-
-static inline int handle_mm_fault(struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long address,
- int write_access)
-{
- return __handle_mm_fault(mm, vma, address, write_access) &
- (~VM_FAULT_WRITE);
-}
-#else
-static inline int handle_mm_fault(struct mm_struct *mm,
- struct vm_area_struct *vma, unsigned long address,
- int write_access)
-{
- /* should never happen if there's no MMU */
- BUG();
- return VM_FAULT_SIGBUS;
-}
-#endif
-
-extern int make_pages_present(unsigned long addr, unsigned long end);
-extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
-void install_arg_page(struct vm_area_struct *, struct page *, unsigned long);
-
-int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
- int len, int write, int force, struct page **pages, struct vm_area_struct **vmas);
-void print_bad_pte(struct vm_area_struct *, pte_t, unsigned long);
-
-int __set_page_dirty_buffers(struct page *page);
-int __set_page_dirty_nobuffers(struct page *page);
-int redirty_page_for_writepage(struct writeback_control *wbc,
- struct page *page);
-int FASTCALL(set_page_dirty(struct page *page));
-int set_page_dirty_lock(struct page *page);
-int clear_page_dirty_for_io(struct page *page);
-
-extern unsigned long do_mremap(unsigned long addr,
- unsigned long old_len, unsigned long new_len,
- unsigned long flags, unsigned long new_addr);
-
-/*
- * Prototype to add a shrinker callback for ageable caches.
- *
- * These functions are passed a count `nr_to_scan' and a gfpmask. They should
- * scan `nr_to_scan' objects, attempting to free them.
- *
- * The callback must return the number of objects which remain in the cache.
- *
- * The callback will be passed nr_to_scan == 0 when the VM is querying the
- * cache size, so a fastpath for that case is appropriate.
- */
-typedef int (*shrinker_t)(int nr_to_scan, gfp_t gfp_mask);
-
-/*
- * Add an aging callback. The int is the number of 'seeks' it takes
- * to recreate one of the objects that these functions age.
- */
-
-#define DEFAULT_SEEKS 2
-struct shrinker;
-extern struct shrinker *set_shrinker(int, shrinker_t);
-extern void remove_shrinker(struct shrinker *shrinker);
-
-extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl));
-
-int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address);
-int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
-int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address);
-int __pte_alloc_kernel(pmd_t *pmd, unsigned long address);
-
-/*
- * The following ifdef needed to get the 4level-fixup.h header to work.
- * Remove it when 4level-fixup.h has been removed.
- */
-#if defined(CONFIG_MMU) && !defined(__ARCH_HAS_4LEVEL_HACK)
-static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
-{
- return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))?
- NULL: pud_offset(pgd, address);
-}
-
-static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
-{
- return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))?
- NULL: pmd_offset(pud, address);
-}
-#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
-
-#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
-/*
- * We tuck a spinlock to guard each pagetable page into its struct page,
- * at page->private, with BUILD_BUG_ON to make sure that this will not
- * overflow into the next struct page (as it might with DEBUG_SPINLOCK).
- * When freeing, reset page->mapping so free_pages_check won't complain.
- */
-#define __pte_lockptr(page) &((page)->ptl)
-#define pte_lock_init(_page) do { \
- spin_lock_init(__pte_lockptr(_page)); \
-} while (0)
-#define pte_lock_deinit(page) ((page)->mapping = NULL)
-#define pte_lockptr(mm, pmd) ({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));})
-#else
-/*
- * We use mm->page_table_lock to guard all pagetable pages of the mm.
- */
-#define pte_lock_init(page) do {} while (0)
-#define pte_lock_deinit(page) do {} while (0)
-#define pte_lockptr(mm, pmd) ({(void)(pmd); &(mm)->page_table_lock;})
-#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
-
-#define pte_offset_map_lock(mm, pmd, address, ptlp) \
-({ \
- spinlock_t *__ptl = pte_lockptr(mm, pmd); \
- pte_t *__pte = pte_offset_map(pmd, address); \
- *(ptlp) = __ptl; \
- spin_lock(__ptl); \
- __pte; \
-})
-
-#define pte_unmap_unlock(pte, ptl) do { \
- spin_unlock(ptl); \
- pte_unmap(pte); \
-} while (0)
-
-#define pte_alloc_map(mm, pmd, address) \
- ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \
- NULL: pte_offset_map(pmd, address))
-
-#define pte_alloc_map_lock(mm, pmd, address, ptlp) \
- ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \
- NULL: pte_offset_map_lock(mm, pmd, address, ptlp))
-
-#define pte_alloc_kernel(pmd, address) \
- ((unlikely(!pmd_present(*(pmd))) && __pte_alloc_kernel(pmd, address))? \
- NULL: pte_offset_kernel(pmd, address))
-
-extern void free_area_init(unsigned long * zones_size);
-extern void free_area_init_node(int nid, pg_data_t *pgdat,
- unsigned long * zones_size, unsigned long zone_start_pfn,
- unsigned long *zholes_size);
-extern void memmap_init_zone(unsigned long, int, unsigned long, unsigned long);
-extern void setup_per_zone_pages_min(void);
-extern void mem_init(void);
-extern void show_mem(void);
-extern void si_meminfo(struct sysinfo * val);
-extern void si_meminfo_node(struct sysinfo *val, int nid);
-
-#ifdef CONFIG_NUMA
-extern void setup_per_cpu_pageset(void);
-#else
-static inline void setup_per_cpu_pageset(void) {}
-#endif
-
-/* prio_tree.c */
-void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
-void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
-void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
-struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
- struct prio_tree_iter *iter);
-
-#define vma_prio_tree_foreach(vma, iter, root, begin, end) \
- for (prio_tree_iter_init(iter, root, begin, end), vma = NULL; \
- (vma = vma_prio_tree_next(vma, iter)); )
-
-static inline void vma_nonlinear_insert(struct vm_area_struct *vma,
- struct list_head *list)
-{
- vma->shared.vm_set.parent = NULL;
- list_add_tail(&vma->shared.vm_set.list, list);
-}
-
-/* mmap.c */
-extern int __vm_enough_memory(long pages, int cap_sys_admin);
-extern void vma_adjust(struct vm_area_struct *vma, unsigned long start,
- unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert);
-extern struct vm_area_struct *vma_merge(struct mm_struct *,
- struct vm_area_struct *prev, unsigned long addr, unsigned long end,
- unsigned long vm_flags, struct anon_vma *, struct file *, pgoff_t,
- struct mempolicy *);
-extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
-extern int split_vma(struct mm_struct *,
- struct vm_area_struct *, unsigned long addr, int new_below);
-extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
-extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
- struct rb_node **, struct rb_node *);
-extern void unlink_file_vma(struct vm_area_struct *);
-extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
- unsigned long addr, unsigned long len, pgoff_t pgoff);
-extern void exit_mmap(struct mm_struct *);
-extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
-
-extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
-
-extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
- unsigned long len, unsigned long prot,
- unsigned long flag, unsigned long pgoff);
-
-static inline unsigned long do_mmap(struct file *file, unsigned long addr,
- unsigned long len, unsigned long prot,
- unsigned long flag, unsigned long offset)
-{
- unsigned long ret = -EINVAL;
- if ((offset + PAGE_ALIGN(len)) < offset)
- goto out;
- if (!(offset & ~PAGE_MASK))
- ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT);
-out:
- return ret;
-}
-
-extern int do_munmap(struct mm_struct *, unsigned long, size_t);
-
-extern unsigned long do_brk(unsigned long, unsigned long);
-
-/* filemap.c */
-extern unsigned long page_unuse(struct page *);
-extern void truncate_inode_pages(struct address_space *, loff_t);
-extern void truncate_inode_pages_range(struct address_space *,
- loff_t lstart, loff_t lend);
-
-/* generic vm_area_ops exported for stackable file systems */
-extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
-extern int filemap_populate(struct vm_area_struct *, unsigned long,
- unsigned long, pgprot_t, unsigned long, int);
-
-/* mm/page-writeback.c */
-int write_one_page(struct page *page, int wait);
-
-/* readahead.c */
-#define VM_MAX_READAHEAD 128 /* kbytes */
-#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
-#define VM_MAX_CACHE_HIT 256 /* max pages in a row in cache before
- * turning readahead off */
-
-int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
- pgoff_t offset, unsigned long nr_to_read);
-int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
- pgoff_t offset, unsigned long nr_to_read);
-unsigned long page_cache_readahead(struct address_space *mapping,
- struct file_ra_state *ra,
- struct file *filp,
- pgoff_t offset,
- unsigned long size);
-void handle_ra_miss(struct address_space *mapping,
- struct file_ra_state *ra, pgoff_t offset);
-unsigned long max_sane_readahead(unsigned long nr);
-
-/* Do stack extension */
-extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
-#ifdef CONFIG_IA64
-extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
-#endif
-
-/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
-extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
-extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
- struct vm_area_struct **pprev);
-
-/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
- NULL if none. Assume start_addr < end_addr. */
-static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
-{
- struct vm_area_struct * vma = find_vma(mm,start_addr);
-
- if (vma && end_addr <= vma->vm_start)
- vma = NULL;
- return vma;
-}
-
-static inline unsigned long vma_pages(struct vm_area_struct *vma)
-{
- return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
-}
-
-struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
-struct page *vmalloc_to_page(void *addr);
-unsigned long vmalloc_to_pfn(void *addr);
-int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
- unsigned long pfn, unsigned long size, pgprot_t);
-int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
-
-struct page *follow_page(struct vm_area_struct *, unsigned long address,
- unsigned int foll_flags);
-#define FOLL_WRITE 0x01 /* check pte is writable */
-#define FOLL_TOUCH 0x02 /* mark page accessed */
-#define FOLL_GET 0x04 /* do get_page on page */
-#define FOLL_ANON 0x08 /* give ZERO_PAGE if no pgtable */
-
-#ifdef CONFIG_PROC_FS
-void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
-#else
-static inline void vm_stat_account(struct mm_struct *mm,
- unsigned long flags, struct file *file, long pages)
-{
-}
-#endif /* CONFIG_PROC_FS */
-
-#ifndef CONFIG_DEBUG_PAGEALLOC
-static inline void
-kernel_map_pages(struct page *page, int numpages, int enable)
-{
- if (!PageHighMem(page) && !enable)
- debug_check_no_locks_freed(page_address(page),
- numpages * PAGE_SIZE);
-}
-#endif
-
-extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk);
-#ifdef __HAVE_ARCH_GATE_AREA
-int in_gate_area_no_task(unsigned long addr);
-int in_gate_area(struct task_struct *task, unsigned long addr);
-#else
-int in_gate_area_no_task(unsigned long addr);
-#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
-#endif /* __HAVE_ARCH_GATE_AREA */
-
-/* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */
-#define OOM_DISABLE -17
-
-int drop_caches_sysctl_handler(struct ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-unsigned long shrink_slab(unsigned long scanned, gfp_t gfp_mask,
- unsigned long lru_pages);
-void drop_pagecache(void);
-void drop_slab(void);
-
-#ifndef CONFIG_MMU
-#define randomize_va_space 0
-#else
-extern int randomize_va_space;
-#endif
-
-const char *arch_vma_name(struct vm_area_struct *vma);
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_MM_H */
diff --git a/original/linux/mmc/card.h b/original/linux/mmc/card.h
deleted file mode 100644
index 991a373..0000000
--- a/original/linux/mmc/card.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * linux/include/linux/mmc/card.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.
- *
- * Card driver specific definitions.
- */
-#ifndef LINUX_MMC_CARD_H
-#define LINUX_MMC_CARD_H
-
-#include <linux/mmc/mmc.h>
-
-struct mmc_cid {
- unsigned int manfid;
- char prod_name[8];
- unsigned int serial;
- unsigned short oemid;
- unsigned short year;
- unsigned char hwrev;
- unsigned char fwrev;
- unsigned char month;
-};
-
-struct mmc_csd {
- unsigned char mmca_vsn;
- unsigned short cmdclass;
- unsigned short tacc_clks;
- unsigned int tacc_ns;
- unsigned int r2w_factor;
- unsigned int max_dtr;
- unsigned int read_blkbits;
- unsigned int write_blkbits;
- unsigned int capacity;
- unsigned int read_partial:1,
- read_misalign:1,
- write_partial:1,
- write_misalign:1;
-};
-
-struct sd_scr {
- unsigned char sda_vsn;
- unsigned char bus_widths;
-#define SD_SCR_BUS_WIDTH_1 (1<<0)
-#define SD_SCR_BUS_WIDTH_4 (1<<2)
-};
-
-struct mmc_host;
-
-/*
- * MMC device
- */
-struct mmc_card {
- struct list_head node; /* node in hosts devices list */
- struct mmc_host *host; /* the host this device belongs to */
- struct device dev; /* the device */
- unsigned int rca; /* relative card address of device */
- unsigned int state; /* (our) card state */
-#define MMC_STATE_PRESENT (1<<0) /* present in sysfs */
-#define MMC_STATE_DEAD (1<<1) /* device no longer in stack */
-#define MMC_STATE_BAD (1<<2) /* unrecognised device */
-#define MMC_STATE_SDCARD (1<<3) /* is an SD card */
-#define MMC_STATE_READONLY (1<<4) /* card is read-only */
- u32 raw_cid[4]; /* raw card CID */
- u32 raw_csd[4]; /* raw card CSD */
- u32 raw_scr[2]; /* raw card SCR */
- struct mmc_cid cid; /* card identification */
- struct mmc_csd csd; /* card specific */
- struct sd_scr scr; /* extra SD information */
-};
-
-#define mmc_card_present(c) ((c)->state & MMC_STATE_PRESENT)
-#define mmc_card_dead(c) ((c)->state & MMC_STATE_DEAD)
-#define mmc_card_bad(c) ((c)->state & MMC_STATE_BAD)
-#define mmc_card_sd(c) ((c)->state & MMC_STATE_SDCARD)
-#define mmc_card_readonly(c) ((c)->state & MMC_STATE_READONLY)
-
-#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
-#define mmc_card_set_dead(c) ((c)->state |= MMC_STATE_DEAD)
-#define mmc_card_set_bad(c) ((c)->state |= MMC_STATE_BAD)
-#define mmc_card_set_sd(c) ((c)->state |= MMC_STATE_SDCARD)
-#define mmc_card_set_readonly(c) ((c)->state |= MMC_STATE_READONLY)
-
-#define mmc_card_name(c) ((c)->cid.prod_name)
-#define mmc_card_id(c) ((c)->dev.bus_id)
-
-#define mmc_list_to_card(l) container_of(l, struct mmc_card, node)
-#define mmc_get_drvdata(c) dev_get_drvdata(&(c)->dev)
-#define mmc_set_drvdata(c,d) dev_set_drvdata(&(c)->dev, d)
-
-/*
- * MMC device driver (e.g., Flash card, I/O card...)
- */
-struct mmc_driver {
- struct device_driver drv;
- int (*probe)(struct mmc_card *);
- void (*remove)(struct mmc_card *);
- int (*suspend)(struct mmc_card *, pm_message_t);
- int (*resume)(struct mmc_card *);
-};
-
-extern int mmc_register_driver(struct mmc_driver *);
-extern void mmc_unregister_driver(struct mmc_driver *);
-
-static inline int mmc_card_claim_host(struct mmc_card *card)
-{
- return __mmc_claim_host(card->host, card);
-}
-
-#define mmc_card_release_host(c) mmc_release_host((c)->host)
-
-#endif
diff --git a/original/linux/mmc/host.h b/original/linux/mmc/host.h
deleted file mode 100644
index ba095ae..0000000
--- a/original/linux/mmc/host.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * linux/include/linux/mmc/host.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.
- *
- * Host driver specific definitions.
- */
-#ifndef LINUX_MMC_HOST_H
-#define LINUX_MMC_HOST_H
-
-#include <linux/mmc/mmc.h>
-
-struct mmc_ios {
- unsigned int clock; /* clock rate */
- unsigned short vdd;
-
-#define MMC_VDD_150 0
-#define MMC_VDD_155 1
-#define MMC_VDD_160 2
-#define MMC_VDD_165 3
-#define MMC_VDD_170 4
-#define MMC_VDD_180 5
-#define MMC_VDD_190 6
-#define MMC_VDD_200 7
-#define MMC_VDD_210 8
-#define MMC_VDD_220 9
-#define MMC_VDD_230 10
-#define MMC_VDD_240 11
-#define MMC_VDD_250 12
-#define MMC_VDD_260 13
-#define MMC_VDD_270 14
-#define MMC_VDD_280 15
-#define MMC_VDD_290 16
-#define MMC_VDD_300 17
-#define MMC_VDD_310 18
-#define MMC_VDD_320 19
-#define MMC_VDD_330 20
-#define MMC_VDD_340 21
-#define MMC_VDD_350 22
-#define MMC_VDD_360 23
-
- unsigned char bus_mode; /* command output mode */
-
-#define MMC_BUSMODE_OPENDRAIN 1
-#define MMC_BUSMODE_PUSHPULL 2
-
- unsigned char chip_select; /* SPI chip select */
-
-#define MMC_CS_DONTCARE 0
-#define MMC_CS_HIGH 1
-#define MMC_CS_LOW 2
-
- unsigned char power_mode; /* power supply mode */
-
-#define MMC_POWER_OFF 0
-#define MMC_POWER_UP 1
-#define MMC_POWER_ON 2
-
- unsigned char bus_width; /* data bus width */
-
-#define MMC_BUS_WIDTH_1 0
-#define MMC_BUS_WIDTH_4 2
-};
-
-struct mmc_host_ops {
- void (*request)(struct mmc_host *host, struct mmc_request *req);
- void (*set_ios)(struct mmc_host *host, struct mmc_ios *ios);
- int (*get_ro)(struct mmc_host *host);
-};
-
-struct mmc_card;
-struct device;
-
-struct mmc_host {
- struct device *dev;
- struct class_device class_dev;
- int index;
- const struct mmc_host_ops *ops;
- unsigned int f_min;
- unsigned int f_max;
- u32 ocr_avail;
-
- unsigned long caps; /* Host capabilities */
-
-#define MMC_CAP_4_BIT_DATA (1 << 0) /* Can the host do 4 bit transfers */
-
- /* host specific block data */
- unsigned int max_seg_size; /* see blk_queue_max_segment_size */
- unsigned short max_hw_segs; /* see blk_queue_max_hw_segments */
- unsigned short max_phys_segs; /* see blk_queue_max_phys_segments */
- unsigned short max_sectors; /* see blk_queue_max_sectors */
- unsigned short unused;
-
- /* private data */
- struct mmc_ios ios; /* current io bus settings */
- u32 ocr; /* the current OCR setting */
-
- unsigned int mode; /* current card mode of host */
-#define MMC_MODE_MMC 0
-#define MMC_MODE_SD 1
-
- struct list_head cards; /* devices attached to this host */
-
- wait_queue_head_t wq;
- spinlock_t lock; /* card_busy lock */
- struct mmc_card *card_busy; /* the MMC card claiming host */
- struct mmc_card *card_selected; /* the selected MMC card */
-
- struct work_struct detect;
-
- unsigned long private[0] ____cacheline_aligned;
-};
-
-extern struct mmc_host *mmc_alloc_host(int extra, struct device *);
-extern int mmc_add_host(struct mmc_host *);
-extern void mmc_remove_host(struct mmc_host *);
-extern void mmc_free_host(struct mmc_host *);
-
-static inline void *mmc_priv(struct mmc_host *host)
-{
- return (void *)host->private;
-}
-
-#define mmc_dev(x) ((x)->dev)
-#define mmc_hostname(x) ((x)->class_dev.class_id)
-
-extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
-extern int mmc_resume_host(struct mmc_host *);
-
-extern void mmc_detect_change(struct mmc_host *, unsigned long delay);
-extern void mmc_request_done(struct mmc_host *, struct mmc_request *);
-
-#endif
-
diff --git a/original/linux/mmc/mmc.h b/original/linux/mmc/mmc.h
deleted file mode 100644
index 627e2c0..0000000
--- a/original/linux/mmc/mmc.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * linux/include/linux/mmc/mmc.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.
- */
-#ifndef MMC_H
-#define MMC_H
-
-#include <linux/list.h>
-#include <linux/interrupt.h>
-#include <linux/device.h>
-
-struct request;
-struct mmc_data;
-struct mmc_request;
-
-struct mmc_command {
- u32 opcode;
- u32 arg;
- u32 resp[4];
- unsigned int flags; /* expected response type */
-#define MMC_RSP_PRESENT (1 << 0)
-#define MMC_RSP_136 (1 << 1) /* 136 bit response */
-#define MMC_RSP_CRC (1 << 2) /* expect valid crc */
-#define MMC_RSP_BUSY (1 << 3) /* card may send busy */
-#define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */
-#define MMC_CMD_MASK (3 << 5) /* command type */
-#define MMC_CMD_AC (0 << 5)
-#define MMC_CMD_ADTC (1 << 5)
-#define MMC_CMD_BC (2 << 5)
-#define MMC_CMD_BCR (3 << 5)
-
-/*
- * These are the response types, and correspond to valid bit
- * patterns of the above flags. One additional valid pattern
- * is all zeros, which means we don't expect a response.
- */
-#define MMC_RSP_NONE (0)
-#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
-#define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
-#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
-#define MMC_RSP_R3 (MMC_RSP_PRESENT)
-#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC)
-
-#define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))
-
-/*
- * These are the command types.
- */
-#define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK)
-
- unsigned int retries; /* max number of retries */
- unsigned int error; /* command error */
-
-#define MMC_ERR_NONE 0
-#define MMC_ERR_TIMEOUT 1
-#define MMC_ERR_BADCRC 2
-#define MMC_ERR_FIFO 3
-#define MMC_ERR_FAILED 4
-#define MMC_ERR_INVALID 5
-
- struct mmc_data *data; /* data segment associated with cmd */
- struct mmc_request *mrq; /* associated request */
-};
-
-struct mmc_data {
- unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */
- unsigned int timeout_clks; /* data timeout (in clocks) */
- unsigned int blksz_bits; /* data block size */
- unsigned int blksz; /* data block size */
- unsigned int blocks; /* number of blocks */
- unsigned int error; /* data error */
- unsigned int flags;
-
-#define MMC_DATA_WRITE (1 << 8)
-#define MMC_DATA_READ (1 << 9)
-#define MMC_DATA_STREAM (1 << 10)
-#define MMC_DATA_MULTI (1 << 11)
-
- unsigned int bytes_xfered;
-
- struct mmc_command *stop; /* stop command */
- struct mmc_request *mrq; /* associated request */
-
- unsigned int sg_len; /* size of scatter list */
- struct scatterlist *sg; /* I/O scatter list */
-};
-
-struct mmc_request {
- struct mmc_command *cmd;
- struct mmc_data *data;
- struct mmc_command *stop;
-
- void *done_data; /* completion data */
- void (*done)(struct mmc_request *);/* completion function */
-};
-
-struct mmc_host;
-struct mmc_card;
-
-extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *);
-extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int);
-extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int,
- struct mmc_command *, int);
-
-extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int);
-
-extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card);
-
-static inline void mmc_claim_host(struct mmc_host *host)
-{
- __mmc_claim_host(host, (struct mmc_card *)-1);
-}
-
-extern void mmc_release_host(struct mmc_host *host);
-
-#endif
diff --git a/original/linux/mmzone.h b/original/linux/mmzone.h
deleted file mode 100644
index f45163c..0000000
--- a/original/linux/mmzone.h
+++ /dev/null
@@ -1,641 +0,0 @@
-#ifndef _LINUX_MMZONE_H
-#define _LINUX_MMZONE_H
-
-#ifdef __KERNEL__
-#ifndef __ASSEMBLY__
-
-#include <linux/spinlock.h>
-#include <linux/list.h>
-#include <linux/wait.h>
-#include <linux/cache.h>
-#include <linux/threads.h>
-#include <linux/numa.h>
-#include <linux/init.h>
-#include <linux/seqlock.h>
-#include <linux/nodemask.h>
-#include <asm/atomic.h>
-#include <asm/page.h>
-
-/* Free memory management - zoned buddy allocator. */
-#ifndef CONFIG_FORCE_MAX_ZONEORDER
-#define MAX_ORDER 11
-#else
-#define MAX_ORDER CONFIG_FORCE_MAX_ZONEORDER
-#endif
-#define MAX_ORDER_NR_PAGES (1 << (MAX_ORDER - 1))
-
-struct free_area {
- struct list_head free_list;
- unsigned long nr_free;
-};
-
-struct pglist_data;
-
-/*
- * zone->lock and zone->lru_lock are two of the hottest locks in the kernel.
- * So add a wild amount of padding here to ensure that they fall into separate
- * cachelines. There are very few zone structures in the machine, so space
- * consumption is not a concern here.
- */
-#if defined(CONFIG_SMP)
-struct zone_padding {
- char x[0];
-} ____cacheline_internodealigned_in_smp;
-#define ZONE_PADDING(name) struct zone_padding name;
-#else
-#define ZONE_PADDING(name)
-#endif
-
-enum zone_stat_item {
- NR_ANON_PAGES, /* Mapped anonymous pages */
- NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
- only modified from process context */
- NR_FILE_PAGES,
- NR_SLAB, /* Pages used by slab allocator */
- NR_PAGETABLE, /* used for pagetables */
- NR_FILE_DIRTY,
- NR_WRITEBACK,
- NR_UNSTABLE_NFS, /* NFS unstable pages */
- NR_BOUNCE,
-#ifdef CONFIG_NUMA
- NUMA_HIT, /* allocated in intended node */
- NUMA_MISS, /* allocated in non intended node */
- NUMA_FOREIGN, /* was intended here, hit elsewhere */
- NUMA_INTERLEAVE_HIT, /* interleaver preferred this zone */
- NUMA_LOCAL, /* allocation from local node */
- NUMA_OTHER, /* allocation from other node */
-#endif
- NR_VM_ZONE_STAT_ITEMS };
-
-struct per_cpu_pages {
- int count; /* number of pages in the list */
- int high; /* high watermark, emptying needed */
- int batch; /* chunk size for buddy add/remove */
- struct list_head list; /* the list of pages */
-};
-
-struct per_cpu_pageset {
- struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */
-#ifdef CONFIG_SMP
- s8 stat_threshold;
- s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
-#endif
-} ____cacheline_aligned_in_smp;
-
-#ifdef CONFIG_NUMA
-#define zone_pcp(__z, __cpu) ((__z)->pageset[(__cpu)])
-#else
-#define zone_pcp(__z, __cpu) (&(__z)->pageset[(__cpu)])
-#endif
-
-#define ZONE_DMA 0
-#define ZONE_DMA32 1
-#define ZONE_NORMAL 2
-#define ZONE_HIGHMEM 3
-
-#define MAX_NR_ZONES 4 /* Sync this with ZONES_SHIFT */
-#define ZONES_SHIFT 2 /* ceil(log2(MAX_NR_ZONES)) */
-
-
-/*
- * When a memory allocation must conform to specific limitations (such
- * as being suitable for DMA) the caller will pass in hints to the
- * allocator in the gfp_mask, in the zone modifier bits. These bits
- * are used to select a priority ordered list of memory zones which
- * match the requested limits. GFP_ZONEMASK defines which bits within
- * the gfp_mask should be considered as zone modifiers. Each valid
- * combination of the zone modifier bits has a corresponding list
- * of zones (in node_zonelists). Thus for two zone modifiers there
- * will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will
- * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible
- * combinations of zone modifiers in "zone modifier space".
- *
- * As an optimisation any zone modifier bits which are only valid when
- * no other zone modifier bits are set (loners) should be placed in
- * the highest order bits of this field. This allows us to reduce the
- * extent of the zonelists thus saving space. For example in the case
- * of three zone modifier bits, we could require up to eight zonelists.
- * If the left most zone modifier is a "loner" then the highest valid
- * zonelist would be four allowing us to allocate only five zonelists.
- * Use the first form for GFP_ZONETYPES when the left most bit is not
- * a "loner", otherwise use the second.
- *
- * NOTE! Make sure this matches the zones in <linux/gfp.h>
- */
-#define GFP_ZONEMASK 0x07
-/* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */
-#define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */
-
-/*
- * On machines where it is needed (eg PCs) we divide physical memory
- * into multiple physical zones. On a 32bit PC we have 4 zones:
- *
- * ZONE_DMA < 16 MB ISA DMA capable memory
- * ZONE_DMA32 0 MB Empty
- * ZONE_NORMAL 16-896 MB direct mapped by the kernel
- * ZONE_HIGHMEM > 896 MB only page cache and user processes
- */
-
-struct zone {
- /* Fields commonly accessed by the page allocator */
- unsigned long free_pages;
- unsigned long pages_min, pages_low, pages_high;
- /*
- * We don't know if the memory that we're going to allocate will be freeable
- * or/and it will be released eventually, so to avoid totally wasting several
- * GB of ram we must reserve some of the lower zone memory (otherwise we risk
- * to run OOM on the lower zones despite there's tons of freeable ram
- * on the higher zones). This array is recalculated at runtime if the
- * sysctl_lowmem_reserve_ratio sysctl changes.
- */
- unsigned long lowmem_reserve[MAX_NR_ZONES];
-
-#ifdef CONFIG_NUMA
- /*
- * zone reclaim becomes active if more unmapped pages exist.
- */
- unsigned long min_unmapped_ratio;
- struct per_cpu_pageset *pageset[NR_CPUS];
-#else
- struct per_cpu_pageset pageset[NR_CPUS];
-#endif
- /*
- * free areas of different sizes
- */
- spinlock_t lock;
-#ifdef CONFIG_MEMORY_HOTPLUG
- /* see spanned/present_pages for more description */
- seqlock_t span_seqlock;
-#endif
- struct free_area free_area[MAX_ORDER];
-
-
- ZONE_PADDING(_pad1_)
-
- /* Fields commonly accessed by the page reclaim scanner */
- spinlock_t lru_lock;
- struct list_head active_list;
- struct list_head inactive_list;
- unsigned long nr_scan_active;
- unsigned long nr_scan_inactive;
- unsigned long nr_active;
- unsigned long nr_inactive;
- unsigned long pages_scanned; /* since last reclaim */
- int all_unreclaimable; /* All pages pinned */
-
- /* A count of how many reclaimers are scanning this zone */
- atomic_t reclaim_in_progress;
-
- /* Zone statistics */
- atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS];
-
- /*
- * prev_priority holds the scanning priority for this zone. It is
- * defined as the scanning priority at which we achieved our reclaim
- * target at the previous try_to_free_pages() or balance_pgdat()
- * invokation.
- *
- * We use prev_priority as a measure of how much stress page reclaim is
- * under - it drives the swappiness decision: whether to unmap mapped
- * pages.
- *
- * temp_priority is used to remember the scanning priority at which
- * this zone was successfully refilled to free_pages == pages_high.
- *
- * Access to both these fields is quite racy even on uniprocessor. But
- * it is expected to average out OK.
- */
- int temp_priority;
- int prev_priority;
-
-
- ZONE_PADDING(_pad2_)
- /* Rarely used or read-mostly fields */
-
- /*
- * wait_table -- the array holding the hash table
- * wait_table_hash_nr_entries -- the size of the hash table array
- * wait_table_bits -- wait_table_size == (1 << wait_table_bits)
- *
- * The purpose of all these is to keep track of the people
- * waiting for a page to become available and make them
- * runnable again when possible. The trouble is that this
- * consumes a lot of space, especially when so few things
- * wait on pages at a given time. So instead of using
- * per-page waitqueues, we use a waitqueue hash table.
- *
- * The bucket discipline is to sleep on the same queue when
- * colliding and wake all in that wait queue when removing.
- * When something wakes, it must check to be sure its page is
- * truly available, a la thundering herd. The cost of a
- * collision is great, but given the expected load of the
- * table, they should be so rare as to be outweighed by the
- * benefits from the saved space.
- *
- * __wait_on_page_locked() and unlock_page() in mm/filemap.c, are the
- * primary users of these fields, and in mm/page_alloc.c
- * free_area_init_core() performs the initialization of them.
- */
- wait_queue_head_t * wait_table;
- unsigned long wait_table_hash_nr_entries;
- unsigned long wait_table_bits;
-
- /*
- * Discontig memory support fields.
- */
- struct pglist_data *zone_pgdat;
- /* zone_start_pfn == zone_start_paddr >> PAGE_SHIFT */
- unsigned long zone_start_pfn;
-
- /*
- * zone_start_pfn, spanned_pages and present_pages are all
- * protected by span_seqlock. It is a seqlock because it has
- * to be read outside of zone->lock, and it is done in the main
- * allocator path. But, it is written quite infrequently.
- *
- * The lock is declared along with zone->lock because it is
- * frequently read in proximity to zone->lock. It's good to
- * give them a chance of being in the same cacheline.
- */
- unsigned long spanned_pages; /* total size, including holes */
- unsigned long present_pages; /* amount of memory (excluding holes) */
-
- /*
- * rarely used fields:
- */
- char *name;
-} ____cacheline_internodealigned_in_smp;
-
-
-/*
- * The "priority" of VM scanning is how much of the queues we will scan in one
- * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
- * queues ("queue_length >> 12") during an aging round.
- */
-#define DEF_PRIORITY 12
-
-/*
- * One allocation request operates on a zonelist. A zonelist
- * is a list of zones, the first one is the 'goal' of the
- * allocation, the other zones are fallback zones, in decreasing
- * priority.
- *
- * Right now a zonelist takes up less than a cacheline. We never
- * modify it apart from boot-up, and only a few indices are used,
- * so despite the zonelist table being relatively big, the cache
- * footprint of this construct is very small.
- */
-struct zonelist {
- struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited
-};
-
-
-/*
- * The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
- * (mostly NUMA machines?) to denote a higher-level memory zone than the
- * zone denotes.
- *
- * On NUMA machines, each NUMA node would have a pg_data_t to describe
- * it's memory layout.
- *
- * Memory statistics and page replacement data structures are maintained on a
- * per-zone basis.
- */
-struct bootmem_data;
-typedef struct pglist_data {
- struct zone node_zones[MAX_NR_ZONES];
- struct zonelist node_zonelists[GFP_ZONETYPES];
- int nr_zones;
-#ifdef CONFIG_FLAT_NODE_MEM_MAP
- struct page *node_mem_map;
-#endif
- struct bootmem_data *bdata;
-#ifdef CONFIG_MEMORY_HOTPLUG
- /*
- * Must be held any time you expect node_start_pfn, node_present_pages
- * or node_spanned_pages stay constant. Holding this will also
- * guarantee that any pfn_valid() stays that way.
- *
- * Nests above zone->lock and zone->size_seqlock.
- */
- spinlock_t node_size_lock;
-#endif
- unsigned long node_start_pfn;
- unsigned long node_present_pages; /* total number of physical pages */
- unsigned long node_spanned_pages; /* total size of physical page
- range, including holes */
- int node_id;
- wait_queue_head_t kswapd_wait;
- struct task_struct *kswapd;
- int kswapd_max_order;
-} pg_data_t;
-
-#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)
-#define node_spanned_pages(nid) (NODE_DATA(nid)->node_spanned_pages)
-#ifdef CONFIG_FLAT_NODE_MEM_MAP
-#define pgdat_page_nr(pgdat, pagenr) ((pgdat)->node_mem_map + (pagenr))
-#else
-#define pgdat_page_nr(pgdat, pagenr) pfn_to_page((pgdat)->node_start_pfn + (pagenr))
-#endif
-#define nid_page_nr(nid, pagenr) pgdat_page_nr(NODE_DATA(nid),(pagenr))
-
-#include <linux/memory_hotplug.h>
-
-void __get_zone_counts(unsigned long *active, unsigned long *inactive,
- unsigned long *free, struct pglist_data *pgdat);
-void get_zone_counts(unsigned long *active, unsigned long *inactive,
- unsigned long *free);
-void build_all_zonelists(void);
-void wakeup_kswapd(struct zone *zone, int order);
-int zone_watermark_ok(struct zone *z, int order, unsigned long mark,
- int classzone_idx, int alloc_flags);
-
-extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn,
- unsigned long size);
-
-#ifdef CONFIG_HAVE_MEMORY_PRESENT
-void memory_present(int nid, unsigned long start, unsigned long end);
-#else
-static inline void memory_present(int nid, unsigned long start, unsigned long end) {}
-#endif
-
-#ifdef CONFIG_NEED_NODE_MEMMAP_SIZE
-unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
-#endif
-
-/*
- * zone_idx() returns 0 for the ZONE_DMA zone, 1 for the ZONE_NORMAL zone, etc.
- */
-#define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones)
-
-static inline int populated_zone(struct zone *zone)
-{
- return (!!zone->present_pages);
-}
-
-static inline int is_highmem_idx(int idx)
-{
- return (idx == ZONE_HIGHMEM);
-}
-
-static inline int is_normal_idx(int idx)
-{
- return (idx == ZONE_NORMAL);
-}
-
-/**
- * is_highmem - helper function to quickly check if a struct zone is a
- * highmem zone or not. This is an attempt to keep references
- * to ZONE_{DMA/NORMAL/HIGHMEM/etc} in general code to a minimum.
- * @zone - pointer to struct zone variable
- */
-static inline int is_highmem(struct zone *zone)
-{
- return zone == zone->zone_pgdat->node_zones + ZONE_HIGHMEM;
-}
-
-static inline int is_normal(struct zone *zone)
-{
- return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL;
-}
-
-static inline int is_dma32(struct zone *zone)
-{
- return zone == zone->zone_pgdat->node_zones + ZONE_DMA32;
-}
-
-static inline int is_dma(struct zone *zone)
-{
- return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
-}
-
-/* These two functions are used to setup the per zone pages min values */
-struct ctl_table;
-struct file;
-int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
-int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int,
- struct file *, void __user *, size_t *, loff_t *);
-
-#include <linux/topology.h>
-/* Returns the number of the current Node. */
-#ifndef numa_node_id
-#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
-#endif
-
-#ifndef CONFIG_NEED_MULTIPLE_NODES
-
-extern struct pglist_data contig_page_data;
-#define NODE_DATA(nid) (&contig_page_data)
-#define NODE_MEM_MAP(nid) mem_map
-#define MAX_NODES_SHIFT 1
-
-#else /* CONFIG_NEED_MULTIPLE_NODES */
-
-#include <asm/mmzone.h>
-
-#endif /* !CONFIG_NEED_MULTIPLE_NODES */
-
-extern struct pglist_data *first_online_pgdat(void);
-extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat);
-extern struct zone *next_zone(struct zone *zone);
-
-/**
- * for_each_pgdat - helper macro to iterate over all nodes
- * @pgdat - pointer to a pg_data_t variable
- */
-#define for_each_online_pgdat(pgdat) \
- for (pgdat = first_online_pgdat(); \
- pgdat; \
- pgdat = next_online_pgdat(pgdat))
-/**
- * for_each_zone - helper macro to iterate over all memory zones
- * @zone - pointer to struct zone variable
- *
- * The user only needs to declare the zone variable, for_each_zone
- * fills it in.
- */
-#define for_each_zone(zone) \
- for (zone = (first_online_pgdat())->node_zones; \
- zone; \
- zone = next_zone(zone))
-
-#ifdef CONFIG_SPARSEMEM
-#include <asm/sparsemem.h>
-#endif
-
-#if BITS_PER_LONG == 32
-/*
- * with 32 bit page->flags field, we reserve 9 bits for node/zone info.
- * there are 4 zones (3 bits) and this leaves 9-3=6 bits for nodes.
- */
-#define FLAGS_RESERVED 9
-
-#elif BITS_PER_LONG == 64
-/*
- * with 64 bit flags field, there's plenty of room.
- */
-#define FLAGS_RESERVED 32
-
-#else
-
-#error BITS_PER_LONG not defined
-
-#endif
-
-#ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
-#define early_pfn_to_nid(nid) (0UL)
-#endif
-
-#ifdef CONFIG_FLATMEM
-#define pfn_to_nid(pfn) (0)
-#endif
-
-#define pfn_to_section_nr(pfn) ((pfn) >> PFN_SECTION_SHIFT)
-#define section_nr_to_pfn(sec) ((sec) << PFN_SECTION_SHIFT)
-
-#ifdef CONFIG_SPARSEMEM
-
-/*
- * SECTION_SHIFT #bits space required to store a section #
- *
- * PA_SECTION_SHIFT physical address to/from section number
- * PFN_SECTION_SHIFT pfn to/from section number
- */
-#define SECTIONS_SHIFT (MAX_PHYSMEM_BITS - SECTION_SIZE_BITS)
-
-#define PA_SECTION_SHIFT (SECTION_SIZE_BITS)
-#define PFN_SECTION_SHIFT (SECTION_SIZE_BITS - PAGE_SHIFT)
-
-#define NR_MEM_SECTIONS (1UL << SECTIONS_SHIFT)
-
-#define PAGES_PER_SECTION (1UL << PFN_SECTION_SHIFT)
-#define PAGE_SECTION_MASK (~(PAGES_PER_SECTION-1))
-
-#if (MAX_ORDER - 1 + PAGE_SHIFT) > SECTION_SIZE_BITS
-#error Allocator MAX_ORDER exceeds SECTION_SIZE
-#endif
-
-struct page;
-struct mem_section {
- /*
- * This is, logically, a pointer to an array of struct
- * pages. However, it is stored with some other magic.
- * (see sparse.c::sparse_init_one_section())
- *
- * Additionally during early boot we encode node id of
- * the location of the section here to guide allocation.
- * (see sparse.c::memory_present())
- *
- * Making it a UL at least makes someone do a cast
- * before using it wrong.
- */
- unsigned long section_mem_map;
-};
-
-#ifdef CONFIG_SPARSEMEM_EXTREME
-#define SECTIONS_PER_ROOT (PAGE_SIZE / sizeof (struct mem_section))
-#else
-#define SECTIONS_PER_ROOT 1
-#endif
-
-#define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT)
-#define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT)
-#define SECTION_ROOT_MASK (SECTIONS_PER_ROOT - 1)
-
-#ifdef CONFIG_SPARSEMEM_EXTREME
-extern struct mem_section *mem_section[NR_SECTION_ROOTS];
-#else
-extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
-#endif
-
-static inline struct mem_section *__nr_to_section(unsigned long nr)
-{
- if (!mem_section[SECTION_NR_TO_ROOT(nr)])
- return NULL;
- return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK];
-}
-extern int __section_nr(struct mem_section* ms);
-
-/*
- * We use the lower bits of the mem_map pointer to store
- * a little bit of information. There should be at least
- * 3 bits here due to 32-bit alignment.
- */
-#define SECTION_MARKED_PRESENT (1UL<<0)
-#define SECTION_HAS_MEM_MAP (1UL<<1)
-#define SECTION_MAP_LAST_BIT (1UL<<2)
-#define SECTION_MAP_MASK (~(SECTION_MAP_LAST_BIT-1))
-#define SECTION_NID_SHIFT 2
-
-static inline struct page *__section_mem_map_addr(struct mem_section *section)
-{
- unsigned long map = section->section_mem_map;
- map &= SECTION_MAP_MASK;
- return (struct page *)map;
-}
-
-static inline int valid_section(struct mem_section *section)
-{
- return (section && (section->section_mem_map & SECTION_MARKED_PRESENT));
-}
-
-static inline int section_has_mem_map(struct mem_section *section)
-{
- return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP));
-}
-
-static inline int valid_section_nr(unsigned long nr)
-{
- return valid_section(__nr_to_section(nr));
-}
-
-static inline struct mem_section *__pfn_to_section(unsigned long pfn)
-{
- return __nr_to_section(pfn_to_section_nr(pfn));
-}
-
-static inline int pfn_valid(unsigned long pfn)
-{
- if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
- return 0;
- return valid_section(__nr_to_section(pfn_to_section_nr(pfn)));
-}
-
-/*
- * These are _only_ used during initialisation, therefore they
- * can use __initdata ... They could have names to indicate
- * this restriction.
- */
-#ifdef CONFIG_NUMA
-#define pfn_to_nid(pfn) \
-({ \
- unsigned long __pfn_to_nid_pfn = (pfn); \
- page_to_nid(pfn_to_page(__pfn_to_nid_pfn)); \
-})
-#else
-#define pfn_to_nid(pfn) (0)
-#endif
-
-#define early_pfn_valid(pfn) pfn_valid(pfn)
-void sparse_init(void);
-#else
-#define sparse_init() do {} while (0)
-#define sparse_index_init(_sec, _nid) do {} while (0)
-#endif /* CONFIG_SPARSEMEM */
-
-#ifndef early_pfn_valid
-#define early_pfn_valid(pfn) (1)
-#endif
-
-void memory_present(int nid, unsigned long start, unsigned long end);
-unsigned long __init node_memmap_size_bytes(int, unsigned long, unsigned long);
-
-#endif /* !__ASSEMBLY__ */
-#endif /* __KERNEL__ */
-#endif /* _LINUX_MMZONE_H */
diff --git a/original/linux/mod_devicetable.h b/original/linux/mod_devicetable.h
deleted file mode 100644
index f697770..0000000
--- a/original/linux/mod_devicetable.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Device tables which are exported to userspace via
- * scripts/mod/file2alias.c. You must keep that file in sync with this
- * header.
- */
-
-#ifndef LINUX_MOD_DEVICETABLE_H
-#define LINUX_MOD_DEVICETABLE_H
-
-#ifdef __KERNEL__
-#include <linux/types.h>
-typedef unsigned long kernel_ulong_t;
-#endif
-
-#define PCI_ANY_ID (~0)
-
-struct pci_device_id {
- __u32 vendor, device; /* Vendor and device ID or PCI_ANY_ID*/
- __u32 subvendor, subdevice; /* Subsystem ID's or PCI_ANY_ID */
- __u32 class, class_mask; /* (class,subclass,prog-if) triplet */
- kernel_ulong_t driver_data; /* Data private to the driver */
-};
-
-
-#define IEEE1394_MATCH_VENDOR_ID 0x0001
-#define IEEE1394_MATCH_MODEL_ID 0x0002
-#define IEEE1394_MATCH_SPECIFIER_ID 0x0004
-#define IEEE1394_MATCH_VERSION 0x0008
-
-struct ieee1394_device_id {
- __u32 match_flags;
- __u32 vendor_id;
- __u32 model_id;
- __u32 specifier_id;
- __u32 version;
- kernel_ulong_t driver_data
- __attribute__((aligned(sizeof(kernel_ulong_t))));
-};
-
-
-/*
- * Device table entry for "new style" table-driven USB drivers.
- * User mode code can read these tables to choose which modules to load.
- * Declare the table as a MODULE_DEVICE_TABLE.
- *
- * A probe() parameter will point to a matching entry from this table.
- * Use the driver_info field for each match to hold information tied
- * to that match: device quirks, etc.
- *
- * Terminate the driver's table with an all-zeroes entry.
- * Use the flag values to control which fields are compared.
- */
-
-/**
- * struct usb_device_id - identifies USB devices for probing and hotplugging
- * @match_flags: Bit mask controlling of the other fields are used to match
- * against new devices. Any field except for driver_info may be used,
- * although some only make sense in conjunction with other fields.
- * This is usually set by a USB_DEVICE_*() macro, which sets all
- * other fields in this structure except for driver_info.
- * @idVendor: USB vendor ID for a device; numbers are assigned
- * by the USB forum to its members.
- * @idProduct: Vendor-assigned product ID.
- * @bcdDevice_lo: Low end of range of vendor-assigned product version numbers.
- * This is also used to identify individual product versions, for
- * a range consisting of a single device.
- * @bcdDevice_hi: High end of version number range. The range of product
- * versions is inclusive.
- * @bDeviceClass: Class of device; numbers are assigned
- * by the USB forum. Products may choose to implement classes,
- * or be vendor-specific. Device classes specify behavior of all
- * the interfaces on a devices.
- * @bDeviceSubClass: Subclass of device; associated with bDeviceClass.
- * @bDeviceProtocol: Protocol of device; associated with bDeviceClass.
- * @bInterfaceClass: Class of interface; numbers are assigned
- * by the USB forum. Products may choose to implement classes,
- * or be vendor-specific. Interface classes specify behavior only
- * of a given interface; other interfaces may support other classes.
- * @bInterfaceSubClass: Subclass of interface; associated with bInterfaceClass.
- * @bInterfaceProtocol: Protocol of interface; associated with bInterfaceClass.
- * @driver_info: Holds information used by the driver. Usually it holds
- * a pointer to a descriptor understood by the driver, or perhaps
- * device flags.
- *
- * In most cases, drivers will create a table of device IDs by using
- * USB_DEVICE(), or similar macros designed for that purpose.
- * They will then export it to userspace using MODULE_DEVICE_TABLE(),
- * and provide it to the USB core through their usb_driver structure.
- *
- * See the usb_match_id() function for information about how matches are
- * performed. Briefly, you will normally use one of several macros to help
- * construct these entries. Each entry you provide will either identify
- * one or more specific products, or will identify a class of products
- * which have agreed to behave the same. You should put the more specific
- * matches towards the beginning of your table, so that driver_info can
- * record quirks of specific products.
- */
-struct usb_device_id {
- /* which fields to match against? */
- __u16 match_flags;
-
- /* Used for product specific matches; range is inclusive */
- __u16 idVendor;
- __u16 idProduct;
- __u16 bcdDevice_lo;
- __u16 bcdDevice_hi;
-
- /* Used for device class matches */
- __u8 bDeviceClass;
- __u8 bDeviceSubClass;
- __u8 bDeviceProtocol;
-
- /* Used for interface class matches */
- __u8 bInterfaceClass;
- __u8 bInterfaceSubClass;
- __u8 bInterfaceProtocol;
-
- /* not matched against */
- kernel_ulong_t driver_info;
-};
-
-/* Some useful macros to use to create struct usb_device_id */
-#define USB_DEVICE_ID_MATCH_VENDOR 0x0001
-#define USB_DEVICE_ID_MATCH_PRODUCT 0x0002
-#define USB_DEVICE_ID_MATCH_DEV_LO 0x0004
-#define USB_DEVICE_ID_MATCH_DEV_HI 0x0008
-#define USB_DEVICE_ID_MATCH_DEV_CLASS 0x0010
-#define USB_DEVICE_ID_MATCH_DEV_SUBCLASS 0x0020
-#define USB_DEVICE_ID_MATCH_DEV_PROTOCOL 0x0040
-#define USB_DEVICE_ID_MATCH_INT_CLASS 0x0080
-#define USB_DEVICE_ID_MATCH_INT_SUBCLASS 0x0100
-#define USB_DEVICE_ID_MATCH_INT_PROTOCOL 0x0200
-
-/* s390 CCW devices */
-struct ccw_device_id {
- __u16 match_flags; /* which fields to match against */
-
- __u16 cu_type; /* control unit type */
- __u16 dev_type; /* device type */
- __u8 cu_model; /* control unit model */
- __u8 dev_model; /* device model */
-
- kernel_ulong_t driver_info;
-};
-
-#define CCW_DEVICE_ID_MATCH_CU_TYPE 0x01
-#define CCW_DEVICE_ID_MATCH_CU_MODEL 0x02
-#define CCW_DEVICE_ID_MATCH_DEVICE_TYPE 0x04
-#define CCW_DEVICE_ID_MATCH_DEVICE_MODEL 0x08
-
-
-#define PNP_ID_LEN 8
-#define PNP_MAX_DEVICES 8
-
-struct pnp_device_id {
- __u8 id[PNP_ID_LEN];
- kernel_ulong_t driver_data;
-};
-
-struct pnp_card_device_id {
- __u8 id[PNP_ID_LEN];
- kernel_ulong_t driver_data;
- struct {
- __u8 id[PNP_ID_LEN];
- } devs[PNP_MAX_DEVICES];
-};
-
-
-#define SERIO_ANY 0xff
-
-struct serio_device_id {
- __u8 type;
- __u8 extra;
- __u8 id;
- __u8 proto;
-};
-
-/*
- * Struct used for matching a device
- */
-struct of_device_id
-{
- char name[32];
- char type[32];
- char compatible[128];
-#ifdef __KERNEL__
- void *data;
-#else
- kernel_ulong_t data;
-#endif
-};
-
-/* VIO */
-struct vio_device_id {
- char type[32];
- char compat[32];
-};
-
-/* PCMCIA */
-
-struct pcmcia_device_id {
- __u16 match_flags;
-
- __u16 manf_id;
- __u16 card_id;
-
- __u8 func_id;
-
- /* for real multi-function devices */
- __u8 function;
-
- /* for pseudo multi-function devices */
- __u8 device_no;
-
- __u32 prod_id_hash[4]
- __attribute__((aligned(sizeof(__u32))));
-
- /* not matched against in kernelspace*/
-#ifdef __KERNEL__
- const char * prod_id[4];
-#else
- kernel_ulong_t prod_id[4]
- __attribute__((aligned(sizeof(kernel_ulong_t))));
-#endif
-
- /* not matched against */
- kernel_ulong_t driver_info;
-#ifdef __KERNEL__
- char * cisfile;
-#else
- kernel_ulong_t cisfile;
-#endif
-};
-
-#define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001
-#define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002
-#define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004
-#define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008
-#define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010
-#define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020
-#define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040
-#define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080
-#define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100
-#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200
-#define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400
-
-/* I2C */
-struct i2c_device_id {
- __u16 id;
-};
-
-/* Input */
-#define INPUT_DEVICE_ID_EV_MAX 0x1f
-#define INPUT_DEVICE_ID_KEY_MAX 0x1ff
-#define INPUT_DEVICE_ID_REL_MAX 0x0f
-#define INPUT_DEVICE_ID_ABS_MAX 0x3f
-#define INPUT_DEVICE_ID_MSC_MAX 0x07
-#define INPUT_DEVICE_ID_LED_MAX 0x0f
-#define INPUT_DEVICE_ID_SND_MAX 0x07
-#define INPUT_DEVICE_ID_FF_MAX 0x7f
-#define INPUT_DEVICE_ID_SW_MAX 0x0f
-
-#define INPUT_DEVICE_ID_MATCH_BUS 1
-#define INPUT_DEVICE_ID_MATCH_VENDOR 2
-#define INPUT_DEVICE_ID_MATCH_PRODUCT 4
-#define INPUT_DEVICE_ID_MATCH_VERSION 8
-
-#define INPUT_DEVICE_ID_MATCH_EVBIT 0x0010
-#define INPUT_DEVICE_ID_MATCH_KEYBIT 0x0020
-#define INPUT_DEVICE_ID_MATCH_RELBIT 0x0040
-#define INPUT_DEVICE_ID_MATCH_ABSBIT 0x0080
-#define INPUT_DEVICE_ID_MATCH_MSCIT 0x0100
-#define INPUT_DEVICE_ID_MATCH_LEDBIT 0x0200
-#define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400
-#define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800
-#define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
-
-struct input_device_id {
-
- kernel_ulong_t flags;
-
- __u16 bustype;
- __u16 vendor;
- __u16 product;
- __u16 version;
-
- kernel_ulong_t evbit[INPUT_DEVICE_ID_EV_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t keybit[INPUT_DEVICE_ID_KEY_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t relbit[INPUT_DEVICE_ID_REL_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t absbit[INPUT_DEVICE_ID_ABS_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t mscbit[INPUT_DEVICE_ID_MSC_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t ledbit[INPUT_DEVICE_ID_LED_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
- kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
-
- kernel_ulong_t driver_info;
-};
-
-#endif /* LINUX_MOD_DEVICETABLE_H */
diff --git a/original/linux/module.h b/original/linux/module.h
deleted file mode 100644
index 0dfb794..0000000
--- a/original/linux/module.h
+++ /dev/null
@@ -1,588 +0,0 @@
-#ifndef _LINUX_MODULE_H
-#define _LINUX_MODULE_H
-/*
- * Dynamic loading of modules into the kernel.
- *
- * Rewritten by Richard Henderson <rth@tamu.edu> Dec 1996
- * Rewritten again by Rusty Russell, 2002
- */
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/list.h>
-#include <linux/stat.h>
-#include <linux/compiler.h>
-#include <linux/cache.h>
-#include <linux/kmod.h>
-#include <linux/elf.h>
-#include <linux/stringify.h>
-#include <linux/kobject.h>
-#include <linux/moduleparam.h>
-#include <asm/local.h>
-
-#include <asm/module.h>
-
-/* Not Yet Implemented */
-#define MODULE_SUPPORTED_DEVICE(name)
-
-/* v850 toolchain uses a `_' prefix for all user symbols */
-#ifndef MODULE_SYMBOL_PREFIX
-#define MODULE_SYMBOL_PREFIX ""
-#endif
-
-#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
-
-struct kernel_symbol
-{
- unsigned long value;
- const char *name;
-};
-
-struct modversion_info
-{
- unsigned long crc;
- char name[MODULE_NAME_LEN];
-};
-
-struct module;
-
-struct module_attribute {
- struct attribute attr;
- ssize_t (*show)(struct module_attribute *, struct module *, char *);
- ssize_t (*store)(struct module_attribute *, struct module *,
- const char *, size_t count);
- void (*setup)(struct module *, const char *);
- int (*test)(struct module *);
- void (*free)(struct module *);
-};
-
-struct module_kobject
-{
- struct kobject kobj;
- struct module *mod;
-};
-
-/* These are either module local, or the kernel's dummy ones. */
-extern int init_module(void);
-extern void cleanup_module(void);
-
-/* Archs provide a method of finding the correct exception table. */
-struct exception_table_entry;
-
-const struct exception_table_entry *
-search_extable(const struct exception_table_entry *first,
- const struct exception_table_entry *last,
- unsigned long value);
-void sort_extable(struct exception_table_entry *start,
- struct exception_table_entry *finish);
-void sort_main_extable(void);
-
-extern struct subsystem module_subsys;
-
-#ifdef MODULE
-#define MODULE_GENERIC_TABLE(gtype,name) \
-extern const struct gtype##_id __mod_##gtype##_table \
- __attribute__ ((unused, alias(__stringify(name))))
-
-extern struct module __this_module;
-#define THIS_MODULE (&__this_module)
-#else /* !MODULE */
-#define MODULE_GENERIC_TABLE(gtype,name)
-#define THIS_MODULE ((struct module *)0)
-#endif
-
-/* Generic info of form tag = "info" */
-#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
-
-/* For userspace: you can also call me... */
-#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
-
-/*
- * The following license idents are currently accepted as indicating free
- * software modules
- *
- * "GPL" [GNU Public License v2 or later]
- * "GPL v2" [GNU Public License v2]
- * "GPL and additional rights" [GNU Public License v2 rights and more]
- * "Dual BSD/GPL" [GNU Public License v2
- * or BSD license choice]
- * "Dual MIT/GPL" [GNU Public License v2
- * or MIT license choice]
- * "Dual MPL/GPL" [GNU Public License v2
- * or Mozilla license choice]
- *
- * The following other idents are available
- *
- * "Proprietary" [Non free products]
- *
- * There are dual licensed components, but when running with Linux it is the
- * GPL that is relevant so this is a non issue. Similarly LGPL linked with GPL
- * is a GPL combined work.
- *
- * This exists for several reasons
- * 1. So modinfo can show license info for users wanting to vet their setup
- * is free
- * 2. So the community can ignore bug reports including proprietary modules
- * 3. So vendors can do likewise based on their own policies
- */
-#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
-
-/* Author, ideally of form NAME <EMAIL>[, NAME <EMAIL>]*[ and NAME <EMAIL>] */
-#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
-
-/* What your module does. */
-#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
-
-/* One for each parameter, describing how to use it. Some files do
- multiple of these per line, so can't just use MODULE_INFO. */
-#define MODULE_PARM_DESC(_parm, desc) \
- __MODULE_INFO(parm, _parm, #_parm ":" desc)
-
-#define MODULE_DEVICE_TABLE(type,name) \
- MODULE_GENERIC_TABLE(type##_device,name)
-
-/* Version of form [<epoch>:]<version>[-<extra-version>].
- Or for CVS/RCS ID version, everything but the number is stripped.
- <epoch>: A (small) unsigned integer which allows you to start versions
- anew. If not mentioned, it's zero. eg. "2:1.0" is after
- "1:2.0".
- <version>: The <version> may contain only alphanumerics and the
- character `.'. Ordered by numeric sort for numeric parts,
- ascii sort for ascii parts (as per RPM or DEB algorithm).
- <extraversion>: Like <version>, but inserted for local
- customizations, eg "rh3" or "rusty1".
-
- Using this automatically adds a checksum of the .c files and the
- local headers in "srcversion".
-*/
-#define MODULE_VERSION(_version) MODULE_INFO(version, _version)
-
-/* Given an address, look for it in the exception tables */
-const struct exception_table_entry *search_exception_tables(unsigned long add);
-
-struct notifier_block;
-
-#ifdef CONFIG_MODULES
-
-/* Get/put a kernel symbol (calls must be symmetric) */
-void *__symbol_get(const char *symbol);
-void *__symbol_get_gpl(const char *symbol);
-#define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x)))
-
-#ifndef __GENKSYMS__
-#ifdef CONFIG_MODVERSIONS
-/* Mark the CRC weak since genksyms apparently decides not to
- * generate a checksums for some symbols */
-#define __CRC_SYMBOL(sym, sec) \
- extern void *__crc_##sym __attribute__((weak)); \
- static const unsigned long __kcrctab_##sym \
- __attribute_used__ \
- __attribute__((section("__kcrctab" sec), unused)) \
- = (unsigned long) &__crc_##sym;
-#else
-#define __CRC_SYMBOL(sym, sec)
-#endif
-
-/* For every exported symbol, place a struct in the __ksymtab section */
-#define __EXPORT_SYMBOL(sym, sec) \
- extern typeof(sym) sym; \
- __CRC_SYMBOL(sym, sec) \
- static const char __kstrtab_##sym[] \
- __attribute__((section("__ksymtab_strings"))) \
- = MODULE_SYMBOL_PREFIX #sym; \
- static const struct kernel_symbol __ksymtab_##sym \
- __attribute_used__ \
- __attribute__((section("__ksymtab" sec), unused)) \
- = { (unsigned long)&sym, __kstrtab_##sym }
-
-#define EXPORT_SYMBOL(sym) \
- __EXPORT_SYMBOL(sym, "")
-
-#define EXPORT_SYMBOL_GPL(sym) \
- __EXPORT_SYMBOL(sym, "_gpl")
-
-#define EXPORT_SYMBOL_GPL_FUTURE(sym) \
- __EXPORT_SYMBOL(sym, "_gpl_future")
-
-
-#ifdef CONFIG_UNUSED_SYMBOLS
-#define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused")
-#define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl")
-#else
-#define EXPORT_UNUSED_SYMBOL(sym)
-#define EXPORT_UNUSED_SYMBOL_GPL(sym)
-#endif
-
-#endif
-
-struct module_ref
-{
- local_t count;
-} ____cacheline_aligned;
-
-enum module_state
-{
- MODULE_STATE_LIVE,
- MODULE_STATE_COMING,
- MODULE_STATE_GOING,
-};
-
-/* Similar stuff for section attributes. */
-#define MODULE_SECT_NAME_LEN 32
-struct module_sect_attr
-{
- struct module_attribute mattr;
- char name[MODULE_SECT_NAME_LEN];
- unsigned long address;
-};
-
-struct module_sect_attrs
-{
- struct attribute_group grp;
- struct module_sect_attr attrs[0];
-};
-
-struct module_param_attrs;
-
-struct module
-{
- enum module_state state;
-
- /* Member of list of modules */
- struct list_head list;
-
- /* Unique handle for this module */
- char name[MODULE_NAME_LEN];
-
- /* Sysfs stuff. */
- struct module_kobject mkobj;
- struct module_param_attrs *param_attrs;
- struct module_attribute *modinfo_attrs;
- const char *version;
- const char *srcversion;
-
- /* Exported symbols */
- const struct kernel_symbol *syms;
- unsigned int num_syms;
- const unsigned long *crcs;
-
- /* GPL-only exported symbols. */
- const struct kernel_symbol *gpl_syms;
- unsigned int num_gpl_syms;
- const unsigned long *gpl_crcs;
-
- /* unused exported symbols. */
- const struct kernel_symbol *unused_syms;
- unsigned int num_unused_syms;
- const unsigned long *unused_crcs;
- /* GPL-only, unused exported symbols. */
- const struct kernel_symbol *unused_gpl_syms;
- unsigned int num_unused_gpl_syms;
- const unsigned long *unused_gpl_crcs;
-
- /* symbols that will be GPL-only in the near future. */
- const struct kernel_symbol *gpl_future_syms;
- unsigned int num_gpl_future_syms;
- const unsigned long *gpl_future_crcs;
-
- /* Exception table */
- unsigned int num_exentries;
- const struct exception_table_entry *extable;
-
- /* Startup function. */
- int (*init)(void);
-
- /* If this is non-NULL, vfree after init() returns */
- void *module_init;
-
- /* Here is the actual code + data, vfree'd on unload. */
- void *module_core;
-
- /* Here are the sizes of the init and core sections */
- unsigned long init_size, core_size;
-
- /* The size of the executable code in each section. */
- unsigned long init_text_size, core_text_size;
-
- /* The handle returned from unwind_add_table. */
- void *unwind_info;
-
- /* Arch-specific module values */
- struct mod_arch_specific arch;
-
- /* Am I unsafe to unload? */
- int unsafe;
-
- /* Am I GPL-compatible */
- int license_gplok;
-
-#ifdef CONFIG_MODULE_UNLOAD
- /* Reference counts */
- struct module_ref ref[NR_CPUS];
-
- /* What modules depend on me? */
- struct list_head modules_which_use_me;
-
- /* Who is waiting for us to be unloaded */
- struct task_struct *waiter;
-
- /* Destruction function. */
- void (*exit)(void);
-#endif
-
-#ifdef CONFIG_KALLSYMS
- /* We keep the symbol and string tables for kallsyms. */
- Elf_Sym *symtab;
- unsigned long num_symtab;
- char *strtab;
-
- /* Section attributes */
- struct module_sect_attrs *sect_attrs;
-#endif
-
- /* Per-cpu data. */
- void *percpu;
-
- /* The command line arguments (may be mangled). People like
- keeping pointers to this stuff */
- char *args;
-};
-
-/* FIXME: It'd be nice to isolate modules during init, too, so they
- aren't used before they (may) fail. But presently too much code
- (IDE & SCSI) require entry into the module during init.*/
-static inline int module_is_live(struct module *mod)
-{
- return mod->state != MODULE_STATE_GOING;
-}
-
-/* Is this address in a module? (second is with no locks, for oops) */
-struct module *module_text_address(unsigned long addr);
-struct module *__module_text_address(unsigned long addr);
-int is_module_address(unsigned long addr);
-
-/* Returns module and fills in value, defined and namebuf, or NULL if
- symnum out of range. */
-struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
- char *type, char *name, size_t namelen);
-
-/* Look for this name: can be of form module:name. */
-unsigned long module_kallsyms_lookup_name(const char *name);
-
-int is_exported(const char *name, const struct module *mod);
-
-extern void __module_put_and_exit(struct module *mod, long code)
- __attribute__((noreturn));
-#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
-
-#ifdef CONFIG_MODULE_UNLOAD
-unsigned int module_refcount(struct module *mod);
-void __symbol_put(const char *symbol);
-#define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x)
-void symbol_put_addr(void *addr);
-
-/* Sometimes we know we already have a refcount, and it's easier not
- to handle the error case (which only happens with rmmod --wait). */
-static inline void __module_get(struct module *module)
-{
- if (module) {
- BUG_ON(module_refcount(module) == 0);
- local_inc(&module->ref[get_cpu()].count);
- put_cpu();
- }
-}
-
-static inline int try_module_get(struct module *module)
-{
- int ret = 1;
-
- if (module) {
- unsigned int cpu = get_cpu();
- if (likely(module_is_live(module)))
- local_inc(&module->ref[cpu].count);
- else
- ret = 0;
- put_cpu();
- }
- return ret;
-}
-
-static inline void module_put(struct module *module)
-{
- if (module) {
- unsigned int cpu = get_cpu();
- local_dec(&module->ref[cpu].count);
- /* Maybe they're waiting for us to drop reference? */
- if (unlikely(!module_is_live(module)))
- wake_up_process(module->waiter);
- put_cpu();
- }
-}
-
-#else /*!CONFIG_MODULE_UNLOAD*/
-static inline int try_module_get(struct module *module)
-{
- return !module || module_is_live(module);
-}
-static inline void module_put(struct module *module)
-{
-}
-static inline void __module_get(struct module *module)
-{
-}
-#define symbol_put(x) do { } while(0)
-#define symbol_put_addr(p) do { } while(0)
-
-#endif /* CONFIG_MODULE_UNLOAD */
-
-/* This is a #define so the string doesn't get put in every .o file */
-#define module_name(mod) \
-({ \
- struct module *__mod = (mod); \
- __mod ? __mod->name : "kernel"; \
-})
-
-#define __unsafe(mod) \
-do { \
- if (mod && !(mod)->unsafe) { \
- printk(KERN_WARNING \
- "Module %s cannot be unloaded due to unsafe usage in" \
- " %s:%u\n", (mod)->name, __FILE__, __LINE__); \
- (mod)->unsafe = 1; \
- } \
-} while(0)
-
-/* For kallsyms to ask for address resolution. NULL means not found. */
-const char *module_address_lookup(unsigned long addr,
- unsigned long *symbolsize,
- unsigned long *offset,
- char **modname);
-
-/* For extable.c to search modules' exception tables. */
-const struct exception_table_entry *search_module_extables(unsigned long addr);
-
-int register_module_notifier(struct notifier_block * nb);
-int unregister_module_notifier(struct notifier_block * nb);
-
-extern void print_modules(void);
-
-struct device_driver;
-void module_add_driver(struct module *, struct device_driver *);
-void module_remove_driver(struct device_driver *);
-
-#else /* !CONFIG_MODULES... */
-#define EXPORT_SYMBOL(sym)
-#define EXPORT_SYMBOL_GPL(sym)
-#define EXPORT_SYMBOL_GPL_FUTURE(sym)
-#define EXPORT_UNUSED_SYMBOL(sym)
-#define EXPORT_UNUSED_SYMBOL_GPL(sym)
-
-/* Given an address, look for it in the exception tables. */
-static inline const struct exception_table_entry *
-search_module_extables(unsigned long addr)
-{
- return NULL;
-}
-
-/* Is this address in a module? */
-static inline struct module *module_text_address(unsigned long addr)
-{
- return NULL;
-}
-
-/* Is this address in a module? (don't take a lock, we're oopsing) */
-static inline struct module *__module_text_address(unsigned long addr)
-{
- return NULL;
-}
-
-static inline int is_module_address(unsigned long addr)
-{
- return 0;
-}
-
-/* Get/put a kernel symbol (calls should be symmetric) */
-#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
-#define symbol_put(x) do { } while(0)
-#define symbol_put_addr(x) do { } while(0)
-
-static inline void __module_get(struct module *module)
-{
-}
-
-static inline int try_module_get(struct module *module)
-{
- return 1;
-}
-
-static inline void module_put(struct module *module)
-{
-}
-
-#define module_name(mod) "kernel"
-
-#define __unsafe(mod)
-
-/* For kallsyms to ask for address resolution. NULL means not found. */
-static inline const char *module_address_lookup(unsigned long addr,
- unsigned long *symbolsize,
- unsigned long *offset,
- char **modname)
-{
- return NULL;
-}
-
-static inline struct module *module_get_kallsym(unsigned int symnum,
- unsigned long *value,
- char *type, char *name,
- size_t namelen)
-{
- return NULL;
-}
-
-static inline unsigned long module_kallsyms_lookup_name(const char *name)
-{
- return 0;
-}
-
-static inline int is_exported(const char *name, const struct module *mod)
-{
- return 0;
-}
-
-static inline int register_module_notifier(struct notifier_block * nb)
-{
- /* no events will happen anyway, so this can always succeed */
- return 0;
-}
-
-static inline int unregister_module_notifier(struct notifier_block * nb)
-{
- return 0;
-}
-
-#define module_put_and_exit(code) do_exit(code)
-
-static inline void print_modules(void)
-{
-}
-
-struct device_driver;
-struct module;
-
-static inline void module_add_driver(struct module *module, struct device_driver *driver)
-{
-}
-
-static inline void module_remove_driver(struct device_driver *driver)
-{
-}
-
-#endif /* CONFIG_MODULES */
-
-#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
-
-/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
-
-#define __MODULE_STRING(x) __stringify(x)
-
-#endif /* _LINUX_MODULE_H */
diff --git a/original/linux/moduleparam.h b/original/linux/moduleparam.h
deleted file mode 100644
index 7c0c2c1..0000000
--- a/original/linux/moduleparam.h
+++ /dev/null
@@ -1,175 +0,0 @@
-#ifndef _LINUX_MODULE_PARAMS_H
-#define _LINUX_MODULE_PARAMS_H
-/* (C) Copyright 2001, 2002 Rusty Russell IBM Corporation */
-#include <linux/init.h>
-#include <linux/stringify.h>
-#include <linux/kernel.h>
-
-/* You can override this manually, but generally this should match the
- module name. */
-#ifdef MODULE
-#define MODULE_PARAM_PREFIX /* empty */
-#else
-#define MODULE_PARAM_PREFIX KBUILD_MODNAME "."
-#endif
-
-#ifdef MODULE
-#define ___module_cat(a,b) __mod_ ## a ## b
-#define __module_cat(a,b) ___module_cat(a,b)
-#define __MODULE_INFO(tag, name, info) \
-static const char __module_cat(name,__LINE__)[] \
- __attribute_used__ \
- __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
-#else /* !MODULE */
-#define __MODULE_INFO(tag, name, info)
-#endif
-#define __MODULE_PARM_TYPE(name, _type) \
- __MODULE_INFO(parmtype, name##type, #name ":" _type)
-
-struct kernel_param;
-
-/* Returns 0, or -errno. arg is in kp->arg. */
-typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
-/* Returns length written or -errno. Buffer is 4k (ie. be short!) */
-typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
-
-struct kernel_param {
- const char *name;
- unsigned int perm;
- param_set_fn set;
- param_get_fn get;
- void *arg;
-};
-
-/* Special one for strings we want to copy into */
-struct kparam_string {
- unsigned int maxlen;
- char *string;
-};
-
-/* Special one for arrays */
-struct kparam_array
-{
- unsigned int max;
- unsigned int *num;
- param_set_fn set;
- param_get_fn get;
- unsigned int elemsize;
- void *elem;
-};
-
-/* This is the fundamental function for registering boot/module
- parameters. perm sets the visibility in driverfs: 000 means it's
- not there, read bits mean it's readable, write bits mean it's
- writable. */
-#define __module_param_call(prefix, name, set, get, arg, perm) \
- static char __param_str_##name[] = prefix #name; \
- static struct kernel_param const __param_##name \
- __attribute_used__ \
- __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
- = { __param_str_##name, perm, set, get, arg }
-
-#define module_param_call(name, set, get, arg, perm) \
- __module_param_call(MODULE_PARAM_PREFIX, name, set, get, arg, perm)
-
-/* Helper functions: type is byte, short, ushort, int, uint, long,
- ulong, charp, bool or invbool, or XXX if you define param_get_XXX,
- param_set_XXX and param_check_XXX. */
-#define module_param_named(name, value, type, perm) \
- param_check_##type(name, &(value)); \
- module_param_call(name, param_set_##type, param_get_##type, &value, perm); \
- __MODULE_PARM_TYPE(name, #type)
-
-#define module_param(name, type, perm) \
- module_param_named(name, name, type, perm)
-
-/* Actually copy string: maxlen param is usually sizeof(string). */
-#define module_param_string(name, string, len, perm) \
- static struct kparam_string __param_string_##name \
- = { len, string }; \
- module_param_call(name, param_set_copystring, param_get_string, \
- &__param_string_##name, perm); \
- __MODULE_PARM_TYPE(name, "string")
-
-/* Called on module insert or kernel boot */
-extern int parse_args(const char *name,
- char *args,
- struct kernel_param *params,
- unsigned num,
- int (*unknown)(char *param, char *val));
-
-/* All the helper functions */
-/* The macros to do compile-time type checking stolen from Jakub
- Jelinek, who IIRC came up with this idea for the 2.4 module init code. */
-#define __param_check(name, p, type) \
- static inline type *__check_##name(void) { return(p); }
-
-extern int param_set_byte(const char *val, struct kernel_param *kp);
-extern int param_get_byte(char *buffer, struct kernel_param *kp);
-#define param_check_byte(name, p) __param_check(name, p, unsigned char)
-
-extern int param_set_short(const char *val, struct kernel_param *kp);
-extern int param_get_short(char *buffer, struct kernel_param *kp);
-#define param_check_short(name, p) __param_check(name, p, short)
-
-extern int param_set_ushort(const char *val, struct kernel_param *kp);
-extern int param_get_ushort(char *buffer, struct kernel_param *kp);
-#define param_check_ushort(name, p) __param_check(name, p, unsigned short)
-
-extern int param_set_int(const char *val, struct kernel_param *kp);
-extern int param_get_int(char *buffer, struct kernel_param *kp);
-#define param_check_int(name, p) __param_check(name, p, int)
-
-extern int param_set_uint(const char *val, struct kernel_param *kp);
-extern int param_get_uint(char *buffer, struct kernel_param *kp);
-#define param_check_uint(name, p) __param_check(name, p, unsigned int)
-
-extern int param_set_long(const char *val, struct kernel_param *kp);
-extern int param_get_long(char *buffer, struct kernel_param *kp);
-#define param_check_long(name, p) __param_check(name, p, long)
-
-extern int param_set_ulong(const char *val, struct kernel_param *kp);
-extern int param_get_ulong(char *buffer, struct kernel_param *kp);
-#define param_check_ulong(name, p) __param_check(name, p, unsigned long)
-
-extern int param_set_charp(const char *val, struct kernel_param *kp);
-extern int param_get_charp(char *buffer, struct kernel_param *kp);
-#define param_check_charp(name, p) __param_check(name, p, char *)
-
-extern int param_set_bool(const char *val, struct kernel_param *kp);
-extern int param_get_bool(char *buffer, struct kernel_param *kp);
-#define param_check_bool(name, p) __param_check(name, p, int)
-
-extern int param_set_invbool(const char *val, struct kernel_param *kp);
-extern int param_get_invbool(char *buffer, struct kernel_param *kp);
-#define param_check_invbool(name, p) __param_check(name, p, int)
-
-/* Comma-separated array: *nump is set to number they actually specified. */
-#define module_param_array_named(name, array, type, nump, perm) \
- static struct kparam_array __param_arr_##name \
- = { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\
- sizeof(array[0]), array }; \
- module_param_call(name, param_array_set, param_array_get, \
- &__param_arr_##name, perm); \
- __MODULE_PARM_TYPE(name, "array of " #type)
-
-#define module_param_array(name, type, nump, perm) \
- module_param_array_named(name, name, type, nump, perm)
-
-extern int param_array_set(const char *val, struct kernel_param *kp);
-extern int param_array_get(char *buffer, struct kernel_param *kp);
-
-extern int param_set_copystring(const char *val, struct kernel_param *kp);
-extern int param_get_string(char *buffer, struct kernel_param *kp);
-
-/* for exporting parameters in /sys/parameters */
-
-struct module;
-
-extern int module_param_sysfs_setup(struct module *mod,
- struct kernel_param *kparam,
- unsigned int num_params);
-
-extern void module_param_sysfs_remove(struct module *mod);
-
-#endif /* _LINUX_MODULE_PARAMS_H */
diff --git a/original/linux/mount.h b/original/linux/mount.h
deleted file mode 100644
index 403d1a9..0000000
--- a/original/linux/mount.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Definitions for mount interface. This describes the in the kernel build
- * linkedlist with mounted filesystems.
- *
- * Author: Marco van Wieringen <mvw@planets.elm.net>
- *
- * Version: $Id: mount.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $
- *
- */
-#ifndef _LINUX_MOUNT_H
-#define _LINUX_MOUNT_H
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <asm/atomic.h>
-
-struct super_block;
-struct vfsmount;
-struct dentry;
-struct namespace;
-
-#define MNT_NOSUID 0x01
-#define MNT_NODEV 0x02
-#define MNT_NOEXEC 0x04
-#define MNT_NOATIME 0x08
-#define MNT_NODIRATIME 0x10
-
-#define MNT_SHRINKABLE 0x100
-
-#define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */
-#define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */
-#define MNT_PNODE_MASK 0x3000 /* propogation flag mask */
-
-struct vfsmount {
- struct list_head mnt_hash;
- struct vfsmount *mnt_parent; /* fs we are mounted on */
- struct dentry *mnt_mountpoint; /* dentry of mountpoint */
- struct dentry *mnt_root; /* root of the mounted tree */
- struct super_block *mnt_sb; /* pointer to superblock */
- struct list_head mnt_mounts; /* list of children, anchored here */
- struct list_head mnt_child; /* and going through their mnt_child */
- atomic_t mnt_count;
- int mnt_flags;
- int mnt_expiry_mark; /* true if marked for expiry */
- char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
- struct list_head mnt_list;
- struct list_head mnt_expire; /* link in fs-specific expiry list */
- struct list_head mnt_share; /* circular list of shared mounts */
- struct list_head mnt_slave_list;/* list of slave mounts */
- struct list_head mnt_slave; /* slave list entry */
- struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
- struct namespace *mnt_namespace; /* containing namespace */
- int mnt_pinned;
-};
-
-static inline struct vfsmount *mntget(struct vfsmount *mnt)
-{
- if (mnt)
- atomic_inc(&mnt->mnt_count);
- return mnt;
-}
-
-extern void mntput_no_expire(struct vfsmount *mnt);
-extern void mnt_pin(struct vfsmount *mnt);
-extern void mnt_unpin(struct vfsmount *mnt);
-
-static inline void mntput(struct vfsmount *mnt)
-{
- if (mnt) {
- mnt->mnt_expiry_mark = 0;
- mntput_no_expire(mnt);
- }
-}
-
-extern void free_vfsmnt(struct vfsmount *mnt);
-extern struct vfsmount *alloc_vfsmnt(const char *name);
-extern struct vfsmount *do_kern_mount(const char *fstype, int flags,
- const char *name, void *data);
-
-struct file_system_type;
-extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
- int flags, const char *name,
- void *data);
-
-struct nameidata;
-
-extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
- int mnt_flags, struct list_head *fslist);
-
-extern void mark_mounts_for_expiry(struct list_head *mounts);
-extern void shrink_submounts(struct vfsmount *mountpoint, struct list_head *mounts);
-
-extern spinlock_t vfsmount_lock;
-extern dev_t name_to_dev_t(char *name);
-
-#endif
-#endif /* _LINUX_MOUNT_H */
diff --git a/original/linux/mroute6.h b/original/linux/mroute6.h
deleted file mode 100644
index 6091ab7..0000000
--- a/original/linux/mroute6.h
+++ /dev/null
@@ -1,266 +0,0 @@
-#ifndef __LINUX_MROUTE6_H
-#define __LINUX_MROUTE6_H
-
-#include <linux/types.h>
-#include <linux/sockios.h>
-
-/*
- * Based on the MROUTING 3.5 defines primarily to keep
- * source compatibility with BSD.
- *
- * See the pim6sd code for the original history.
- *
- * Protocol Independent Multicast (PIM) data structures included
- * Carlos Picoto (cap@di.fc.ul.pt)
- *
- */
-
-#define MRT6_BASE 200
-#define MRT6_INIT (MRT6_BASE) /* Activate the kernel mroute code */
-#define MRT6_DONE (MRT6_BASE+1) /* Shutdown the kernel mroute */
-#define MRT6_ADD_MIF (MRT6_BASE+2) /* Add a virtual interface */
-#define MRT6_DEL_MIF (MRT6_BASE+3) /* Delete a virtual interface */
-#define MRT6_ADD_MFC (MRT6_BASE+4) /* Add a multicast forwarding entry */
-#define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */
-#define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */
-#define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */
-#define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */
-#define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */
-
-#define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */
-#define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1)
-#define SIOCGETRPF (SIOCPROTOPRIVATE+2)
-
-#define MAXMIFS 32
-typedef unsigned long mifbitmap_t; /* User mode code depends on this lot */
-typedef unsigned short mifi_t;
-#define ALL_MIFS ((mifi_t)(-1))
-
-#ifndef IF_SETSIZE
-#define IF_SETSIZE 256
-#endif
-
-typedef __u32 if_mask;
-#define NIFBITS (sizeof(if_mask) * 8) /* bits per mask */
-
-#if !defined(__KERNEL__) && !defined(DIV_ROUND_UP)
-#define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y))
-#endif
-
-typedef struct if_set {
- if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
-} if_set;
-
-#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS)))
-#define IF_CLR(n, p) ((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS)))
-#define IF_ISSET(n, p) ((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS)))
-#define IF_COPY(f, t) bcopy(f, t, sizeof(*(f)))
-#define IF_ZERO(p) bzero(p, sizeof(*(p)))
-
-/*
- * Passed by mrouted for an MRT_ADD_MIF - again we use the
- * mrouted 3.6 structures for compatibility
- */
-
-struct mif6ctl {
- mifi_t mif6c_mifi; /* Index of MIF */
- unsigned char mif6c_flags; /* MIFF_ flags */
- unsigned char vifc_threshold; /* ttl limit */
- __u16 mif6c_pifi; /* the index of the physical IF */
- unsigned int vifc_rate_limit; /* Rate limiter values (NI) */
-};
-
-#define MIFF_REGISTER 0x1 /* register vif */
-
-/*
- * Cache manipulation structures for mrouted and PIMd
- */
-
-struct mf6cctl {
- struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */
- struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */
- mifi_t mf6cc_parent; /* Where it arrived */
- struct if_set mf6cc_ifset; /* Where it is going */
-};
-
-/*
- * Group count retrieval for pim6sd
- */
-
-struct sioc_sg_req6 {
- struct sockaddr_in6 src;
- struct sockaddr_in6 grp;
- unsigned long pktcnt;
- unsigned long bytecnt;
- unsigned long wrong_if;
-};
-
-/*
- * To get vif packet counts
- */
-
-struct sioc_mif_req6 {
- mifi_t mifi; /* Which iface */
- unsigned long icount; /* In packets */
- unsigned long ocount; /* Out packets */
- unsigned long ibytes; /* In bytes */
- unsigned long obytes; /* Out bytes */
-};
-
-/*
- * That's all usermode folks
- */
-
-#ifdef __KERNEL__
-
-#include <linux/pim.h>
-#include <linux/skbuff.h> /* for struct sk_buff_head */
-#include <net/net_namespace.h>
-
-#ifdef CONFIG_IPV6_MROUTE
-static inline int ip6_mroute_opt(int opt)
-{
- return (opt >= MRT6_BASE) && (opt <= MRT6_BASE + 10);
-}
-#else
-static inline int ip6_mroute_opt(int opt)
-{
- return 0;
-}
-#endif
-
-struct sock;
-
-#ifdef CONFIG_IPV6_MROUTE
-extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
-extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
-extern int ip6_mr_input(struct sk_buff *skb);
-extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg);
-extern int ip6_mr_init(void);
-extern void ip6_mr_cleanup(void);
-#else
-static inline
-int ip6_mroute_setsockopt(struct sock *sock,
- int optname, char __user *optval, unsigned int optlen)
-{
- return -ENOPROTOOPT;
-}
-
-static inline
-int ip6_mroute_getsockopt(struct sock *sock,
- int optname, char __user *optval, int __user *optlen)
-{
- return -ENOPROTOOPT;
-}
-
-static inline
-int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg)
-{
- return -ENOIOCTLCMD;
-}
-
-static inline int ip6_mr_init(void)
-{
- return 0;
-}
-
-static inline void ip6_mr_cleanup(void)
-{
- return;
-}
-#endif
-
-struct mif_device {
- struct net_device *dev; /* Device we are using */
- unsigned long bytes_in,bytes_out;
- unsigned long pkt_in,pkt_out; /* Statistics */
- unsigned long rate_limit; /* Traffic shaping (NI) */
- unsigned char threshold; /* TTL threshold */
- unsigned short flags; /* Control flags */
- int link; /* Physical interface index */
-};
-
-#define VIFF_STATIC 0x8000
-
-struct mfc6_cache {
- struct list_head list;
- struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */
- struct in6_addr mf6c_origin; /* Source of packet */
- mifi_t mf6c_parent; /* Source interface */
- int mfc_flags; /* Flags on line */
-
- union {
- struct {
- unsigned long expires;
- struct sk_buff_head unresolved; /* Unresolved buffers */
- } unres;
- struct {
- unsigned long last_assert;
- int minvif;
- int maxvif;
- unsigned long bytes;
- unsigned long pkt;
- unsigned long wrong_if;
- unsigned char ttls[MAXMIFS]; /* TTL thresholds */
- } res;
- } mfc_un;
-};
-
-#define MFC_STATIC 1
-#define MFC_NOTIFY 2
-
-#define MFC6_LINES 64
-
-#define MFC6_HASH(a, g) (((__force u32)(a)->s6_addr32[0] ^ \
- (__force u32)(a)->s6_addr32[1] ^ \
- (__force u32)(a)->s6_addr32[2] ^ \
- (__force u32)(a)->s6_addr32[3] ^ \
- (__force u32)(g)->s6_addr32[0] ^ \
- (__force u32)(g)->s6_addr32[1] ^ \
- (__force u32)(g)->s6_addr32[2] ^ \
- (__force u32)(g)->s6_addr32[3]) % MFC6_LINES)
-
-#define MFC_ASSERT_THRESH (3*HZ) /* Maximal freq. of asserts */
-
-#endif
-
-#ifdef __KERNEL__
-struct rtmsg;
-extern int ip6mr_get_route(struct net *net, struct sk_buff *skb,
- struct rtmsg *rtm, int nowait);
-
-#ifdef CONFIG_IPV6_MROUTE
-extern struct sock *mroute6_socket(struct net *net, struct sk_buff *skb);
-extern int ip6mr_sk_done(struct sock *sk);
-#else
-static inline struct sock *mroute6_socket(struct net *net, struct sk_buff *skb)
-{
- return NULL;
-}
-static inline int ip6mr_sk_done(struct sock *sk)
-{
- return 0;
-}
-#endif
-#endif
-
-/*
- * Structure used to communicate from kernel to multicast router.
- * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{}
- * used for IPv4 implementation). This is because this structure will be passed via an
- * IPv6 raw socket, on wich an application will only receiver the payload i.e the data after
- * the IPv6 header and all the extension headers. (See section 3 of RFC 3542)
- */
-
-struct mrt6msg {
-#define MRT6MSG_NOCACHE 1
-#define MRT6MSG_WRONGMIF 2
-#define MRT6MSG_WHOLEPKT 3 /* used for use level encap */
- __u8 im6_mbz; /* must be zero */
- __u8 im6_msgtype; /* what type of message */
- __u16 im6_mif; /* mif rec'd on */
- __u32 im6_pad; /* padding for 64 bit arch */
- struct in6_addr im6_src, im6_dst;
-};
-
-#endif
diff --git a/original/linux/msdos_fs.h b/original/linux/msdos_fs.h
deleted file mode 100644
index ffcb64b..0000000
--- a/original/linux/msdos_fs.h
+++ /dev/null
@@ -1,447 +0,0 @@
-#ifndef _LINUX_MSDOS_FS_H
-#define _LINUX_MSDOS_FS_H
-
-#include <linux/magic.h>
-
-/*
- * The MS-DOS filesystem constants/structures
- */
-#include <asm/byteorder.h>
-
-#define SECTOR_SIZE 512 /* sector size (bytes) */
-#define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */
-#define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */
-#define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */
-#define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
-#define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */
-#define CF_LE_W(v) le16_to_cpu(v)
-#define CF_LE_L(v) le32_to_cpu(v)
-#define CT_LE_W(v) cpu_to_le16(v)
-#define CT_LE_L(v) cpu_to_le32(v)
-
-
-#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
-#define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */
-
-/* directory limit */
-#define FAT_MAX_DIR_ENTRIES (65536)
-#define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS)
-
-#define ATTR_NONE 0 /* no attribute bits */
-#define ATTR_RO 1 /* read-only */
-#define ATTR_HIDDEN 2 /* hidden */
-#define ATTR_SYS 4 /* system */
-#define ATTR_VOLUME 8 /* volume label */
-#define ATTR_DIR 16 /* directory */
-#define ATTR_ARCH 32 /* archived */
-
-/* attribute bits that are copied "as is" */
-#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
-/* bits that are used by the Windows 95/Windows NT extended FAT */
-#define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
-
-#define CASE_LOWER_BASE 8 /* base is lower case */
-#define CASE_LOWER_EXT 16 /* extension is lower case */
-
-#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
-#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
-
-/* valid file mode bits */
-#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
-/* Convert attribute bits and a mask to the UNIX mode. */
-#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
-
-#define MSDOS_NAME 11 /* maximum name length */
-#define MSDOS_LONGNAME 256 /* maximum name length */
-#define MSDOS_SLOTS 21 /* max # of slots for short and long names */
-#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
-#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
-
-/* media of boot sector */
-#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
-#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
- MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
-
-/* start of data cluster's entry (number of reserved clusters) */
-#define FAT_START_ENT 2
-
-/* maximum number of clusters */
-#define MAX_FAT12 0xFF4
-#define MAX_FAT16 0xFFF4
-#define MAX_FAT32 0x0FFFFFF6
-#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : \
- MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12)
-
-/* bad cluster mark */
-#define BAD_FAT12 0xFF7
-#define BAD_FAT16 0xFFF7
-#define BAD_FAT32 0x0FFFFFF7
-
-/* standard EOF */
-#define EOF_FAT12 0xFFF
-#define EOF_FAT16 0xFFFF
-#define EOF_FAT32 0x0FFFFFFF
-
-#define FAT_ENT_FREE (0)
-#define FAT_ENT_BAD (BAD_FAT32)
-#define FAT_ENT_EOF (EOF_FAT32)
-
-#define FAT_FSINFO_SIG1 0x41615252
-#define FAT_FSINFO_SIG2 0x61417272
-#define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \
- && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2)
-
-/*
- * ioctl commands
- */
-#define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct dirent [2])
-#define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct dirent [2])
-/* <linux/videotext.h> has used 0x72 ('r') in collision, so skip a few */
-#define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32)
-#define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
-#define VFAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x12, __u32)
-
-/*
- * vfat shortname flags
- */
-#define VFAT_SFN_DISPLAY_LOWER 0x0001 /* convert to lowercase for display */
-#define VFAT_SFN_DISPLAY_WIN95 0x0002 /* emulate win95 rule for display */
-#define VFAT_SFN_DISPLAY_WINNT 0x0004 /* emulate winnt rule for display */
-#define VFAT_SFN_CREATE_WIN95 0x0100 /* emulate win95 rule for create */
-#define VFAT_SFN_CREATE_WINNT 0x0200 /* emulate winnt rule for create */
-
-struct fat_boot_sector {
- __u8 ignored[3]; /* Boot strap short or near jump */
- __u8 system_id[8]; /* Name - can be used to special case
- partition manager volumes */
- __u8 sector_size[2]; /* bytes per logical sector */
- __u8 sec_per_clus; /* sectors/cluster */
- __le16 reserved; /* reserved sectors */
- __u8 fats; /* number of FATs */
- __u8 dir_entries[2]; /* root directory entries */
- __u8 sectors[2]; /* number of sectors */
- __u8 media; /* media code */
- __le16 fat_length; /* sectors/FAT */
- __le16 secs_track; /* sectors per track */
- __le16 heads; /* number of heads */
- __le32 hidden; /* hidden sectors (unused) */
- __le32 total_sect; /* number of sectors (if sectors == 0) */
-
- /* The following fields are only used by FAT32 */
- __le32 fat32_length; /* sectors/FAT */
- __le16 flags; /* bit 8: fat mirroring, low 4: active fat */
- __u8 version[2]; /* major, minor filesystem version */
- __le32 root_cluster; /* first cluster in root directory */
- __le16 info_sector; /* filesystem info sector */
- __le16 backup_boot; /* backup boot sector */
- __le16 reserved2[6]; /* Unused */
-};
-
-struct fat_boot_fsinfo {
- __le32 signature1; /* 0x41615252L */
- __le32 reserved1[120]; /* Nothing as far as I can tell */
- __le32 signature2; /* 0x61417272L */
- __le32 free_clusters; /* Free cluster count. -1 if unknown */
- __le32 next_cluster; /* Most recently allocated cluster */
- __le32 reserved2[4];
-};
-
-struct fat_boot_bsx {
- __u8 drive; /* drive number */
- __u8 reserved1;
- __u8 signature; /* extended boot signature */
- __u8 vol_id[4]; /* volume ID */
- __u8 vol_label[11]; /* volume label */
- __u8 type[8]; /* file system type */
-};
-#define FAT16_BSX_OFFSET 36 /* offset of fat_boot_bsx in FAT12 and FAT16 */
-#define FAT32_BSX_OFFSET 64 /* offset of fat_boot_bsx in FAT32 */
-
-struct msdos_dir_entry {
- __u8 name[MSDOS_NAME];/* name and extension */
- __u8 attr; /* attribute bits */
- __u8 lcase; /* Case for base and extension */
- __u8 ctime_cs; /* Creation time, centiseconds (0-199) */
- __le16 ctime; /* Creation time */
- __le16 cdate; /* Creation date */
- __le16 adate; /* Last access date */
- __le16 starthi; /* High 16 bits of cluster in FAT32 */
- __le16 time,date,start;/* time, date and first cluster */
- __le32 size; /* file size (in bytes) */
-};
-
-/* Up to 13 characters of the name */
-struct msdos_dir_slot {
- __u8 id; /* sequence number for slot */
- __u8 name0_4[10]; /* first 5 characters in name */
- __u8 attr; /* attribute byte */
- __u8 reserved; /* always 0 */
- __u8 alias_checksum; /* checksum for 8.3 alias */
- __u8 name5_10[12]; /* 6 more characters in name */
- __le16 start; /* starting cluster number, 0 in long slots */
- __u8 name11_12[4]; /* last 2 characters in name */
-};
-
-struct fat_slot_info {
- loff_t i_pos; /* on-disk position of directory entry */
- loff_t slot_off; /* offset for slot or de start */
- int nr_slots; /* number of slots + 1(de) in filename */
- struct msdos_dir_entry *de;
- struct buffer_head *bh;
-};
-
-#ifdef __KERNEL__
-
-#include <linux/buffer_head.h>
-#include <linux/string.h>
-#include <linux/nls.h>
-#include <linux/fs.h>
-#include <linux/mutex.h>
-
-struct fat_mount_options {
- uid_t fs_uid;
- gid_t fs_gid;
- unsigned short fs_fmask;
- unsigned short fs_dmask;
- unsigned short codepage; /* Codepage for shortname conversions */
- char *iocharset; /* Charset used for filename input/display */
- unsigned short shortname; /* flags for shortname display/create rule */
- unsigned char name_check; /* r = relaxed, n = normal, s = strict */
- unsigned quiet:1, /* set = fake successful chmods and chowns */
- showexec:1, /* set = only set x bit for com/exe/bat */
- sys_immutable:1, /* set = system files are immutable */
- dotsOK:1, /* set = hidden and system files are named '.filename' */
- isvfat:1, /* 0=no vfat long filename support, 1=vfat support */
- utf8:1, /* Use of UTF-8 character set (Default) */
- unicode_xlate:1, /* create escape sequences for unhandled Unicode */
- numtail:1, /* Does first alias have a numeric '~1' type tail? */
- atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */
- flush:1, /* write things quickly */
- nocase:1, /* Does this need case conversion? 0=need case conversion*/
- usefree:1; /* Use free_clusters for FAT32 */
-};
-
-#define FAT_HASH_BITS 8
-#define FAT_HASH_SIZE (1UL << FAT_HASH_BITS)
-#define FAT_HASH_MASK (FAT_HASH_SIZE-1)
-
-/*
- * MS-DOS file system in-core superblock data
- */
-struct msdos_sb_info {
- unsigned short sec_per_clus; /* sectors/cluster */
- unsigned short cluster_bits; /* log2(cluster_size) */
- unsigned int cluster_size; /* cluster size */
- unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */
- unsigned short fat_start;
- unsigned long fat_length; /* FAT start & length (sec.) */
- unsigned long dir_start;
- unsigned short dir_entries; /* root dir start & entries */
- unsigned long data_start; /* first data sector */
- unsigned long max_cluster; /* maximum cluster number */
- unsigned long root_cluster; /* first cluster of the root directory */
- unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */
- struct mutex fat_lock;
- unsigned int prev_free; /* previously allocated cluster number */
- unsigned int free_clusters; /* -1 if undefined */
- struct fat_mount_options options;
- struct nls_table *nls_disk; /* Codepage used on disk */
- struct nls_table *nls_io; /* Charset used for input and display */
- const void *dir_ops; /* Opaque; default directory operations */
- int dir_per_block; /* dir entries per block */
- int dir_per_block_bits; /* log2(dir_per_block) */
- unsigned long vol_id; /* volume ID */
-
- int fatent_shift;
- struct fatent_operations *fatent_ops;
-
- spinlock_t inode_hash_lock;
- struct hlist_head inode_hashtable[FAT_HASH_SIZE];
-};
-
-#define FAT_CACHE_VALID 0 /* special case for valid cache */
-
-/*
- * MS-DOS file system inode data in memory
- */
-struct msdos_inode_info {
- spinlock_t cache_lru_lock;
- struct list_head cache_lru;
- int nr_caches;
- /* for avoiding the race between fat_free() and fat_get_cluster() */
- unsigned int cache_valid_id;
-
- loff_t mmu_private;
- int i_start; /* first cluster or 0 */
- int i_logstart; /* logical first cluster */
- int i_attrs; /* unused attribute bits */
- loff_t i_pos; /* on-disk position of directory entry or 0 */
- struct hlist_node i_fat_hash; /* hash by i_location */
- struct inode vfs_inode;
-};
-
-static inline struct msdos_sb_info *MSDOS_SB(struct super_block *sb)
-{
- return sb->s_fs_info;
-}
-
-static inline struct msdos_inode_info *MSDOS_I(struct inode *inode)
-{
- return container_of(inode, struct msdos_inode_info, vfs_inode);
-}
-
-/* Return the FAT attribute byte for this inode */
-static inline u8 fat_attr(struct inode *inode)
-{
- return ((inode->i_mode & S_IWUGO) ? ATTR_NONE : ATTR_RO) |
- (S_ISDIR(inode->i_mode) ? ATTR_DIR : ATTR_NONE) |
- MSDOS_I(inode)->i_attrs;
-}
-
-static inline unsigned char fat_checksum(const __u8 *name)
-{
- unsigned char s = name[0];
- s = (s<<7) + (s>>1) + name[1]; s = (s<<7) + (s>>1) + name[2];
- s = (s<<7) + (s>>1) + name[3]; s = (s<<7) + (s>>1) + name[4];
- s = (s<<7) + (s>>1) + name[5]; s = (s<<7) + (s>>1) + name[6];
- s = (s<<7) + (s>>1) + name[7]; s = (s<<7) + (s>>1) + name[8];
- s = (s<<7) + (s>>1) + name[9]; s = (s<<7) + (s>>1) + name[10];
- return s;
-}
-
-static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus)
-{
- return ((sector_t)clus - FAT_START_ENT) * sbi->sec_per_clus
- + sbi->data_start;
-}
-
-static inline void fat16_towchar(wchar_t *dst, const __u8 *src, size_t len)
-{
-#ifdef __BIG_ENDIAN
- while (len--) {
- *dst++ = src[0] | (src[1] << 8);
- src += 2;
- }
-#else
- memcpy(dst, src, len * 2);
-#endif
-}
-
-static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len)
-{
-#ifdef __BIG_ENDIAN
- while (len--) {
- dst[0] = *src & 0x00FF;
- dst[1] = (*src & 0xFF00) >> 8;
- dst += 2;
- src++;
- }
-#else
- memcpy(dst, src, len * 2);
-#endif
-}
-
-/* fat/cache.c */
-extern void fat_cache_inval_inode(struct inode *inode);
-extern int fat_get_cluster(struct inode *inode, int cluster,
- int *fclus, int *dclus);
-extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys,
- unsigned long *mapped_blocks);
-
-/* fat/dir.c */
-extern const struct file_operations fat_dir_operations;
-extern int fat_search_long(struct inode *inode, const unsigned char *name,
- int name_len, struct fat_slot_info *sinfo);
-extern int fat_dir_empty(struct inode *dir);
-extern int fat_subdirs(struct inode *dir);
-extern int fat_scan(struct inode *dir, const unsigned char *name,
- struct fat_slot_info *sinfo);
-extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh,
- struct msdos_dir_entry **de, loff_t *i_pos);
-extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts);
-extern int fat_add_entries(struct inode *dir, void *slots, int nr_slots,
- struct fat_slot_info *sinfo);
-extern int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo);
-
-/* fat/fatent.c */
-struct fat_entry {
- int entry;
- union {
- u8 *ent12_p[2];
- __le16 *ent16_p;
- __le32 *ent32_p;
- } u;
- int nr_bhs;
- struct buffer_head *bhs[2];
-};
-
-static inline void fatent_init(struct fat_entry *fatent)
-{
- fatent->nr_bhs = 0;
- fatent->entry = 0;
- fatent->u.ent32_p = NULL;
- fatent->bhs[0] = fatent->bhs[1] = NULL;
-}
-
-static inline void fatent_set_entry(struct fat_entry *fatent, int entry)
-{
- fatent->entry = entry;
- fatent->u.ent32_p = NULL;
-}
-
-static inline void fatent_brelse(struct fat_entry *fatent)
-{
- int i;
- fatent->u.ent32_p = NULL;
- for (i = 0; i < fatent->nr_bhs; i++)
- brelse(fatent->bhs[i]);
- fatent->nr_bhs = 0;
- fatent->bhs[0] = fatent->bhs[1] = NULL;
-}
-
-extern void fat_ent_access_init(struct super_block *sb);
-extern int fat_ent_read(struct inode *inode, struct fat_entry *fatent,
- int entry);
-extern int fat_ent_write(struct inode *inode, struct fat_entry *fatent,
- int new, int wait);
-extern int fat_alloc_clusters(struct inode *inode, int *cluster,
- int nr_cluster);
-extern int fat_free_clusters(struct inode *inode, int cluster);
-extern int fat_count_free_clusters(struct super_block *sb);
-
-/* fat/file.c */
-extern int fat_generic_ioctl(struct inode *inode, struct file *filp,
- unsigned int cmd, unsigned long arg);
-extern const struct file_operations fat_file_operations;
-extern const struct inode_operations fat_file_inode_operations;
-extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
-extern void fat_truncate(struct inode *inode);
-extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
- struct kstat *stat);
-
-/* fat/inode.c */
-extern void fat_attach(struct inode *inode, loff_t i_pos);
-extern void fat_detach(struct inode *inode);
-extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos);
-extern struct inode *fat_build_inode(struct super_block *sb,
- struct msdos_dir_entry *de, loff_t i_pos);
-extern int fat_sync_inode(struct inode *inode);
-extern int fat_fill_super(struct super_block *sb, void *data, int silent,
- const struct inode_operations *fs_dir_inode_ops, int isvfat);
-
-extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
- struct inode *i2);
-/* fat/misc.c */
-extern void fat_fs_panic(struct super_block *s, const char *fmt, ...);
-extern void fat_clusters_flush(struct super_block *sb);
-extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
-extern int date_dos2unix(unsigned short time, unsigned short date);
-extern void fat_date_unix2dos(int unix_date, __le16 *time, __le16 *date);
-extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs);
-
-int fat_cache_init(void);
-void fat_cache_destroy(void);
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/msg.h b/original/linux/msg.h
deleted file mode 100644
index acc7c17..0000000
--- a/original/linux/msg.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#ifndef _LINUX_MSG_H
-#define _LINUX_MSG_H
-
-#include <linux/ipc.h>
-
-/* ipcs ctl commands */
-#define MSG_STAT 11
-#define MSG_INFO 12
-
-/* msgrcv options */
-#define MSG_NOERROR 010000 /* no error if message is too big */
-#define MSG_EXCEPT 020000 /* recv any msg except of specified type.*/
-
-/* Obsolete, used only for backwards compatibility and libc5 compiles */
-struct msqid_ds {
- struct ipc_perm msg_perm;
- struct msg *msg_first; /* first message on queue,unused */
- struct msg *msg_last; /* last message in queue,unused */
- __kernel_time_t msg_stime; /* last msgsnd time */
- __kernel_time_t msg_rtime; /* last msgrcv time */
- __kernel_time_t msg_ctime; /* last change time */
- unsigned long msg_lcbytes; /* Reuse junk fields for 32 bit */
- unsigned long msg_lqbytes; /* ditto */
- unsigned short msg_cbytes; /* current number of bytes on queue */
- unsigned short msg_qnum; /* number of messages in queue */
- unsigned short msg_qbytes; /* max number of bytes on queue */
- __kernel_ipc_pid_t msg_lspid; /* pid of last msgsnd */
- __kernel_ipc_pid_t msg_lrpid; /* last receive pid */
-};
-
-/* Include the definition of msqid64_ds */
-#include <asm/msgbuf.h>
-
-/* message buffer for msgsnd and msgrcv calls */
-struct msgbuf {
- long mtype; /* type of message */
- char mtext[1]; /* message text */
-};
-
-/* buffer for msgctl calls IPC_INFO, MSG_INFO */
-struct msginfo {
- int msgpool;
- int msgmap;
- int msgmax;
- int msgmnb;
- int msgmni;
- int msgssz;
- int msgtql;
- unsigned short msgseg;
-};
-
-#define MSGMNI 16 /* <= IPCMNI */ /* max # of msg queue identifiers */
-#define MSGMAX 8192 /* <= INT_MAX */ /* max size of message (bytes) */
-#define MSGMNB 16384 /* <= INT_MAX */ /* default max size of a message queue */
-
-/* unused */
-#define MSGPOOL (MSGMNI*MSGMNB/1024) /* size in kilobytes of message pool */
-#define MSGTQL MSGMNB /* number of system message headers */
-#define MSGMAP MSGMNB /* number of entries in message map */
-#define MSGSSZ 16 /* message segment size */
-#define __MSGSEG ((MSGPOOL*1024)/ MSGSSZ) /* max no. of segments */
-#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
-
-#ifdef __KERNEL__
-#include <linux/list.h>
-
-/* one msg_msg structure for each message */
-struct msg_msg {
- struct list_head m_list;
- long m_type;
- int m_ts; /* message text size */
- struct msg_msgseg* next;
- void *security;
- /* the actual message follows immediately */
-};
-
-/* one msq_queue structure for each present queue on the system */
-struct msg_queue {
- struct kern_ipc_perm q_perm;
- int q_id;
- time_t q_stime; /* last msgsnd time */
- time_t q_rtime; /* last msgrcv time */
- time_t q_ctime; /* last change time */
- unsigned long q_cbytes; /* current number of bytes on queue */
- unsigned long q_qnum; /* number of messages in queue */
- unsigned long q_qbytes; /* max number of bytes on queue */
- pid_t q_lspid; /* pid of last msgsnd */
- pid_t q_lrpid; /* last receive pid */
-
- struct list_head q_messages;
- struct list_head q_receivers;
- struct list_head q_senders;
-};
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_MSG_H */
diff --git a/original/linux/mt9t013.h b/original/linux/mt9t013.h
deleted file mode 100644
index d5454d0..0000000
--- a/original/linux/mt9t013.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2007, 2008 HTC, Inc
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list
- * of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this
- * list of conditions and the following disclaimer in the documentation and/or other
- * materials provided with the distribution.
- * Neither the name of the HTC,Inc nor the names of its contributors may be used
- * to endorse or promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE
- */
-
-#ifndef CAMERA_MT9T013_H
-#define CAMERA_MT9T013_H
-#include <linux/cdev.h>
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <asm/sizes.h>
-
-/*************************************************************
-* IOCTL define
-*************************************************************/
-
-#define MT9T013_I2C_IOCTL_MAGIC 'm'
-
-#define MT9T013_I2C_IOCTL_W \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 0, unsigned)
-
-#define MT9T013_I2C_IOCTL_R \
- _IOR(MT9T013_I2C_IOCTL_MAGIC, 1, unsigned)
-
-#define MT9T013_I2C_IOCTL_AF_W \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 2, unsigned)
-
-#define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 3)
-
-#define MT9T013_I2C_IOCTL_CAMIF_PAD_REG_RESET_2 \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 4)
-
-#define CAMERA_CONFIGURE_GPIOS \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 7)
-
-#define CAMERA_UNCONFIGURE_GPIOS \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 8)
-
-#define CAMERA_LENS_POWER_ON \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 9)
-
-#define CAMERA_LENS_POWER_OFF \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 10)
-
-#define MT9T013_I2C_IOCTL_CAMIF_APPS_RESET \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 11)
-
-/* Replacement ioctls() for the clkrgm_sec RPCs. */
-
-#define CAMIO_VFE_MDC_CLK 1 /* enable, disable */
-#define CAMIO_MDC_CLK 2 /* enable, disable */
-#define CAMIO_VFE_CLK 3 /* clk_select, freq_prog */
-
-#define MT9T013_I2C_IOCTL_CLK_ENABLE \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 12, unsigned)
-
-#define MT9T013_I2C_IOCTL_CLK_DISABLE \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 13, unsigned)
-
-#define MT9T013_I2C_IOCTL_CLK_SELECT \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 14, unsigned)
-
-#define MT9T013_I2C_IOCTL_CLK_FREQ_PROG \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 15, unsigned)
-
-#define CAMSENSOR_REG_INIT 0<<0
-#define CAMSENSOR_REG_UPDATE_PERIODIC 1<<0
-#define CAMSENSOR_TYPE_PREVIEW 0<<1
-#define CAMSENSOR_TYPE_SNAPSHOT 1<<1
-
-#define MT9T013_I2C_IOCTL_SENSOR_SETTING \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 16, uint32_t)
-
-struct mt9t013_reg_struct
-{
- uint16_t vt_pix_clk_div; /* 0x0300 */
- uint16_t vt_sys_clk_div; /* 0x0302 */
- uint16_t pre_pll_clk_div; /* 0x0304 */
- uint16_t pll_multiplier; /* 0x0306 */
- uint16_t op_pix_clk_div; /* 0x0308 */
- uint16_t op_sys_clk_div; /* 0x030A */
- uint16_t scale_m; /* 0x0404 */
- uint16_t row_speed; /* 0x3016 */
- uint16_t x_addr_start; /* 0x3004 */
- uint16_t x_addr_end; /* 0x3008 */
- uint16_t y_addr_start; /* 0x3002 */
- uint16_t y_addr_end; /* 0x3006 */
- uint16_t read_mode; /* 0x3040 */
- uint16_t x_output_size ; /* 0x034C */
- uint16_t y_output_size; /* 0x034E */
- uint16_t line_length_pck; /* 0x300C */
- uint16_t frame_length_lines; /* 0x300A */
- uint16_t coarse_integration_time; /* 0x3012 */
- uint16_t fine_integration_time; /* 0x3014 */
-};
-
-struct mt9t013_reg_pat {
- struct mt9t013_reg_struct reg[2];
-};
-
-#define MT9T013_I2C_IOCTL_GET_REGISTERS \
- _IOR(MT9T013_I2C_IOCTL_MAGIC, 17, struct mt9t013_reg_pat *)
-
-struct mt9t013_exposure_gain {
- uint16_t gain;
- uint16_t line;
- uint32_t mode;
-};
-
-#define MT9T013_I2C_IOCTL_EXPOSURE_GAIN \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 18, struct exposure_gain *)
-
-#define MT9T013_I2C_IOCTL_MOVE_FOCUS \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 19, uint32_t)
-
-#define MT9T013_I2C_IOCTL_SET_DEFAULT_FOCUS \
- _IOW(MT9T013_I2C_IOCTL_MAGIC, 20, uint32_t)
-
-#define MT9T013_I2C_IOCTL_POWER_DOWN \
- _IO(MT9T013_I2C_IOCTL_MAGIC, 21)
-
-struct mt9t013_init {
- int preview; /* in: 1 for preview, 0 for capture */
- uint16_t chipid; /* out: chip id */
-};
-
-#define MT9T013_I2C_IOCTL_INIT \
- _IOWR(MT9T013_I2C_IOCTL_MAGIC, 22, struct mt9t013_init *)
-
-#endif
-
diff --git a/original/linux/mtd/bbm.h b/original/linux/mtd/bbm.h
deleted file mode 100644
index 1221b7c..0000000
--- a/original/linux/mtd/bbm.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * linux/include/linux/mtd/bbm.h
- *
- * NAND family Bad Block Management (BBM) header file
- * - Bad Block Table (BBT) implementation
- *
- * Copyright (c) 2005 Samsung Electronics
- * Kyungmin Park <kyungmin.park@samsung.com>
- *
- * Copyright (c) 2000-2005
- * Thomas Gleixner <tglx@linuxtronix.de>
- *
- */
-#ifndef __LINUX_MTD_BBM_H
-#define __LINUX_MTD_BBM_H
-
-/* The maximum number of NAND chips in an array */
-#define NAND_MAX_CHIPS 8
-
-/**
- * struct nand_bbt_descr - bad block table descriptor
- * @options: options for this descriptor
- * @pages: the page(s) where we find the bbt, used with
- * option BBT_ABSPAGE when bbt is searched,
- * then we store the found bbts pages here.
- * Its an array and supports up to 8 chips now
- * @offs: offset of the pattern in the oob area of the page
- * @veroffs: offset of the bbt version counter in the oob area of the page
- * @version: version read from the bbt page during scan
- * @len: length of the pattern, if 0 no pattern check is performed
- * @maxblocks: maximum number of blocks to search for a bbt. This
- * number of blocks is reserved at the end of the device
- * where the tables are written.
- * @reserved_block_code: if non-0, this pattern denotes a reserved
- * (rather than bad) block in the stored bbt
- * @pattern: pattern to identify bad block table or factory marked
- * good / bad blocks, can be NULL, if len = 0
- *
- * Descriptor for the bad block table marker and the descriptor for the
- * pattern which identifies good and bad blocks. The assumption is made
- * that the pattern and the version count are always located in the oob area
- * of the first block.
- */
-struct nand_bbt_descr {
- int options;
- int pages[NAND_MAX_CHIPS];
- int offs;
- int veroffs;
- uint8_t version[NAND_MAX_CHIPS];
- int len;
- int maxblocks;
- int reserved_block_code;
- uint8_t *pattern;
-};
-
-/* Options for the bad block table descriptors */
-
-/* The number of bits used per block in the bbt on the device */
-#define NAND_BBT_NRBITS_MSK 0x0000000F
-#define NAND_BBT_1BIT 0x00000001
-#define NAND_BBT_2BIT 0x00000002
-#define NAND_BBT_4BIT 0x00000004
-#define NAND_BBT_8BIT 0x00000008
-/* The bad block table is in the last good block of the device */
-#define NAND_BBT_LASTBLOCK 0x00000010
-/* The bbt is at the given page, else we must scan for the bbt */
-#define NAND_BBT_ABSPAGE 0x00000020
-/* The bbt is at the given page, else we must scan for the bbt */
-#define NAND_BBT_SEARCH 0x00000040
-/* bbt is stored per chip on multichip devices */
-#define NAND_BBT_PERCHIP 0x00000080
-/* bbt has a version counter at offset veroffs */
-#define NAND_BBT_VERSION 0x00000100
-/* Create a bbt if none axists */
-#define NAND_BBT_CREATE 0x00000200
-/* Search good / bad pattern through all pages of a block */
-#define NAND_BBT_SCANALLPAGES 0x00000400
-/* Scan block empty during good / bad block scan */
-#define NAND_BBT_SCANEMPTY 0x00000800
-/* Write bbt if neccecary */
-#define NAND_BBT_WRITE 0x00001000
-/* Read and write back block contents when writing bbt */
-#define NAND_BBT_SAVECONTENT 0x00002000
-/* Search good / bad pattern on the first and the second page */
-#define NAND_BBT_SCAN2NDPAGE 0x00004000
-
-/* The maximum number of blocks to scan for a bbt */
-#define NAND_BBT_SCAN_MAXBLOCKS 4
-
-/*
- * Constants for oob configuration
- */
-#define ONENAND_BADBLOCK_POS 0
-
-/**
- * struct bbm_info - [GENERIC] Bad Block Table data structure
- * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
- * @badblockpos: [INTERN] position of the bad block marker in the oob area
- * @options: options for this descriptor
- * @bbt: [INTERN] bad block table pointer
- * @isbad_bbt: function to determine if a block is bad
- * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for
- * initial bad block scan
- * @priv: [OPTIONAL] pointer to private bbm date
- */
-struct bbm_info {
- int bbt_erase_shift;
- int badblockpos;
- int options;
-
- uint8_t *bbt;
-
- int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
-
- /* TODO Add more NAND specific fileds */
- struct nand_bbt_descr *badblock_pattern;
-
- void *priv;
-};
-
-/* OneNAND BBT interface */
-extern int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
-extern int onenand_default_bbt(struct mtd_info *mtd);
-
-#endif /* __LINUX_MTD_BBM_H */
diff --git a/original/linux/mtd/blktrans.h b/original/linux/mtd/blktrans.h
deleted file mode 100644
index 72fc68c..0000000
--- a/original/linux/mtd/blktrans.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * $Id: blktrans.h,v 1.6 2005/11/07 11:14:54 gleixner Exp $
- *
- * (C) 2003 David Woodhouse <dwmw2@infradead.org>
- *
- * Interface to Linux block layer for MTD 'translation layers'.
- *
- */
-
-#ifndef __MTD_TRANS_H__
-#define __MTD_TRANS_H__
-
-#include <linux/mutex.h>
-
-struct hd_geometry;
-struct mtd_info;
-struct mtd_blktrans_ops;
-struct file;
-struct inode;
-
-struct mtd_blktrans_dev {
- struct mtd_blktrans_ops *tr;
- struct list_head list;
- struct mtd_info *mtd;
- struct mutex lock;
- int devnum;
- int blksize;
- unsigned long size;
- int readonly;
- void *blkcore_priv; /* gendisk in 2.5, devfs_handle in 2.4 */
-};
-
-struct blkcore_priv; /* Differs for 2.4 and 2.5 kernels; private */
-
-struct mtd_blktrans_ops {
- char *name;
- int major;
- int part_bits;
-
- /* Access functions */
- int (*readsect)(struct mtd_blktrans_dev *dev,
- unsigned long block, char *buffer);
- int (*writesect)(struct mtd_blktrans_dev *dev,
- unsigned long block, char *buffer);
-
- /* Block layer ioctls */
- int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo);
- int (*flush)(struct mtd_blktrans_dev *dev);
-
- /* Called with mtd_table_mutex held; no race with add/remove */
- int (*open)(struct mtd_blktrans_dev *dev);
- int (*release)(struct mtd_blktrans_dev *dev);
-
- /* Called on {de,}registration and on subsequent addition/removal
- of devices, with mtd_table_mutex held. */
- void (*add_mtd)(struct mtd_blktrans_ops *tr, struct mtd_info *mtd);
- void (*remove_dev)(struct mtd_blktrans_dev *dev);
-
- struct list_head devs;
- struct list_head list;
- struct module *owner;
-
- struct mtd_blkcore_priv *blkcore_priv;
-};
-
-extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr);
-extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr);
-extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
-extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev);
-
-
-#endif /* __MTD_TRANS_H__ */
diff --git a/original/linux/mtd/cfi.h b/original/linux/mtd/cfi.h
deleted file mode 100644
index 123948b..0000000
--- a/original/linux/mtd/cfi.h
+++ /dev/null
@@ -1,491 +0,0 @@
-
-/* Common Flash Interface structures
- * See http://support.intel.com/design/flash/technote/index.htm
- * $Id: cfi.h,v 1.57 2005/11/15 23:28:17 tpoynor Exp $
- */
-
-#ifndef __MTD_CFI_H__
-#define __MTD_CFI_H__
-
-#include <linux/delay.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
-#include <linux/mtd/flashchip.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/cfi_endian.h>
-
-#ifdef CONFIG_MTD_CFI_I1
-#define cfi_interleave(cfi) 1
-#define cfi_interleave_is_1(cfi) (cfi_interleave(cfi) == 1)
-#else
-#define cfi_interleave_is_1(cfi) (0)
-#endif
-
-#ifdef CONFIG_MTD_CFI_I2
-# ifdef cfi_interleave
-# undef cfi_interleave
-# define cfi_interleave(cfi) ((cfi)->interleave)
-# else
-# define cfi_interleave(cfi) 2
-# endif
-#define cfi_interleave_is_2(cfi) (cfi_interleave(cfi) == 2)
-#else
-#define cfi_interleave_is_2(cfi) (0)
-#endif
-
-#ifdef CONFIG_MTD_CFI_I4
-# ifdef cfi_interleave
-# undef cfi_interleave
-# define cfi_interleave(cfi) ((cfi)->interleave)
-# else
-# define cfi_interleave(cfi) 4
-# endif
-#define cfi_interleave_is_4(cfi) (cfi_interleave(cfi) == 4)
-#else
-#define cfi_interleave_is_4(cfi) (0)
-#endif
-
-#ifdef CONFIG_MTD_CFI_I8
-# ifdef cfi_interleave
-# undef cfi_interleave
-# define cfi_interleave(cfi) ((cfi)->interleave)
-# else
-# define cfi_interleave(cfi) 8
-# endif
-#define cfi_interleave_is_8(cfi) (cfi_interleave(cfi) == 8)
-#else
-#define cfi_interleave_is_8(cfi) (0)
-#endif
-
-static inline int cfi_interleave_supported(int i)
-{
- switch (i) {
-#ifdef CONFIG_MTD_CFI_I1
- case 1:
-#endif
-#ifdef CONFIG_MTD_CFI_I2
- case 2:
-#endif
-#ifdef CONFIG_MTD_CFI_I4
- case 4:
-#endif
-#ifdef CONFIG_MTD_CFI_I8
- case 8:
-#endif
- return 1;
-
- default:
- return 0;
- }
-}
-
-
-/* NB: these values must represents the number of bytes needed to meet the
- * device type (x8, x16, x32). Eg. a 32 bit device is 4 x 8 bytes.
- * These numbers are used in calculations.
- */
-#define CFI_DEVICETYPE_X8 (8 / 8)
-#define CFI_DEVICETYPE_X16 (16 / 8)
-#define CFI_DEVICETYPE_X32 (32 / 8)
-#define CFI_DEVICETYPE_X64 (64 / 8)
-
-/* NB: We keep these structures in memory in HOST byteorder, except
- * where individually noted.
- */
-
-/* Basic Query Structure */
-struct cfi_ident {
- uint8_t qry[3];
- uint16_t P_ID;
- uint16_t P_ADR;
- uint16_t A_ID;
- uint16_t A_ADR;
- uint8_t VccMin;
- uint8_t VccMax;
- uint8_t VppMin;
- uint8_t VppMax;
- uint8_t WordWriteTimeoutTyp;
- uint8_t BufWriteTimeoutTyp;
- uint8_t BlockEraseTimeoutTyp;
- uint8_t ChipEraseTimeoutTyp;
- uint8_t WordWriteTimeoutMax;
- uint8_t BufWriteTimeoutMax;
- uint8_t BlockEraseTimeoutMax;
- uint8_t ChipEraseTimeoutMax;
- uint8_t DevSize;
- uint16_t InterfaceDesc;
- uint16_t MaxBufWriteSize;
- uint8_t NumEraseRegions;
- uint32_t EraseRegionInfo[0]; /* Not host ordered */
-} __attribute__((packed));
-
-/* Extended Query Structure for both PRI and ALT */
-
-struct cfi_extquery {
- uint8_t pri[3];
- uint8_t MajorVersion;
- uint8_t MinorVersion;
-} __attribute__((packed));
-
-/* Vendor-Specific PRI for Intel/Sharp Extended Command Set (0x0001) */
-
-struct cfi_pri_intelext {
- uint8_t pri[3];
- uint8_t MajorVersion;
- uint8_t MinorVersion;
- uint32_t FeatureSupport; /* if bit 31 is set then an additional uint32_t feature
- block follows - FIXME - not currently supported */
- uint8_t SuspendCmdSupport;
- uint16_t BlkStatusRegMask;
- uint8_t VccOptimal;
- uint8_t VppOptimal;
- uint8_t NumProtectionFields;
- uint16_t ProtRegAddr;
- uint8_t FactProtRegSize;
- uint8_t UserProtRegSize;
- uint8_t extra[0];
-} __attribute__((packed));
-
-struct cfi_intelext_otpinfo {
- uint32_t ProtRegAddr;
- uint16_t FactGroups;
- uint8_t FactProtRegSize;
- uint16_t UserGroups;
- uint8_t UserProtRegSize;
-} __attribute__((packed));
-
-struct cfi_intelext_blockinfo {
- uint16_t NumIdentBlocks;
- uint16_t BlockSize;
- uint16_t MinBlockEraseCycles;
- uint8_t BitsPerCell;
- uint8_t BlockCap;
-} __attribute__((packed));
-
-struct cfi_intelext_regioninfo {
- uint16_t NumIdentPartitions;
- uint8_t NumOpAllowed;
- uint8_t NumOpAllowedSimProgMode;
- uint8_t NumOpAllowedSimEraMode;
- uint8_t NumBlockTypes;
- struct cfi_intelext_blockinfo BlockTypes[1];
-} __attribute__((packed));
-
-struct cfi_intelext_programming_regioninfo {
- uint8_t ProgRegShift;
- uint8_t Reserved1;
- uint8_t ControlValid;
- uint8_t Reserved2;
- uint8_t ControlInvalid;
- uint8_t Reserved3;
-} __attribute__((packed));
-
-/* Vendor-Specific PRI for AMD/Fujitsu Extended Command Set (0x0002) */
-
-struct cfi_pri_amdstd {
- uint8_t pri[3];
- uint8_t MajorVersion;
- uint8_t MinorVersion;
- uint8_t SiliconRevision; /* bits 1-0: Address Sensitive Unlock */
- uint8_t EraseSuspend;
- uint8_t BlkProt;
- uint8_t TmpBlkUnprotect;
- uint8_t BlkProtUnprot;
- uint8_t SimultaneousOps;
- uint8_t BurstMode;
- uint8_t PageMode;
- uint8_t VppMin;
- uint8_t VppMax;
- uint8_t TopBottom;
-} __attribute__((packed));
-
-/* Vendor-Specific PRI for Atmel chips (command set 0x0002) */
-
-struct cfi_pri_atmel {
- uint8_t pri[3];
- uint8_t MajorVersion;
- uint8_t MinorVersion;
- uint8_t Features;
- uint8_t BottomBoot;
- uint8_t BurstMode;
- uint8_t PageMode;
-} __attribute__((packed));
-
-struct cfi_pri_query {
- uint8_t NumFields;
- uint32_t ProtField[1]; /* Not host ordered */
-} __attribute__((packed));
-
-struct cfi_bri_query {
- uint8_t PageModeReadCap;
- uint8_t NumFields;
- uint32_t ConfField[1]; /* Not host ordered */
-} __attribute__((packed));
-
-#define P_ID_NONE 0x0000
-#define P_ID_INTEL_EXT 0x0001
-#define P_ID_AMD_STD 0x0002
-#define P_ID_INTEL_STD 0x0003
-#define P_ID_AMD_EXT 0x0004
-#define P_ID_WINBOND 0x0006
-#define P_ID_ST_ADV 0x0020
-#define P_ID_MITSUBISHI_STD 0x0100
-#define P_ID_MITSUBISHI_EXT 0x0101
-#define P_ID_SST_PAGE 0x0102
-#define P_ID_INTEL_PERFORMANCE 0x0200
-#define P_ID_INTEL_DATA 0x0210
-#define P_ID_RESERVED 0xffff
-
-
-#define CFI_MODE_CFI 1
-#define CFI_MODE_JEDEC 0
-
-struct cfi_private {
- uint16_t cmdset;
- void *cmdset_priv;
- int interleave;
- int device_type;
- int cfi_mode; /* Are we a JEDEC device pretending to be CFI? */
- int addr_unlock1;
- int addr_unlock2;
- struct mtd_info *(*cmdset_setup)(struct map_info *);
- struct cfi_ident *cfiq; /* For now only one. We insist that all devs
- must be of the same type. */
- int mfr, id;
- int numchips;
- unsigned long chipshift; /* Because they're of the same type */
- const char *im_name; /* inter_module name for cmdset_setup */
- struct flchip chips[0]; /* per-chip data structure for each chip */
-};
-
-/*
- * Returns the command address according to the given geometry.
- */
-static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, int interleave, int type)
-{
- return (cmd_ofs * type) * interleave;
-}
-
-/*
- * Transforms the CFI command for the given geometry (bus width & interleave).
- * It looks too long to be inline, but in the common case it should almost all
- * get optimised away.
- */
-static inline map_word cfi_build_cmd(u_long cmd, struct map_info *map, struct cfi_private *cfi)
-{
- map_word val = { {0} };
- int wordwidth, words_per_bus, chip_mode, chips_per_word;
- unsigned long onecmd;
- int i;
-
- /* We do it this way to give the compiler a fighting chance
- of optimising away all the crap for 'bankwidth' larger than
- an unsigned long, in the common case where that support is
- disabled */
- if (map_bankwidth_is_large(map)) {
- wordwidth = sizeof(unsigned long);
- words_per_bus = (map_bankwidth(map)) / wordwidth; // i.e. normally 1
- } else {
- wordwidth = map_bankwidth(map);
- words_per_bus = 1;
- }
-
- chip_mode = map_bankwidth(map) / cfi_interleave(cfi);
- chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map);
-
- /* First, determine what the bit-pattern should be for a single
- device, according to chip mode and endianness... */
- switch (chip_mode) {
- default: BUG();
- case 1:
- onecmd = cmd;
- break;
- case 2:
- onecmd = cpu_to_cfi16(cmd);
- break;
- case 4:
- onecmd = cpu_to_cfi32(cmd);
- break;
- }
-
- /* Now replicate it across the size of an unsigned long, or
- just to the bus width as appropriate */
- switch (chips_per_word) {
- default: BUG();
-#if BITS_PER_LONG >= 64
- case 8:
- onecmd |= (onecmd << (chip_mode * 32));
-#endif
- case 4:
- onecmd |= (onecmd << (chip_mode * 16));
- case 2:
- onecmd |= (onecmd << (chip_mode * 8));
- case 1:
- ;
- }
-
- /* And finally, for the multi-word case, replicate it
- in all words in the structure */
- for (i=0; i < words_per_bus; i++) {
- val.x[i] = onecmd;
- }
-
- return val;
-}
-#define CMD(x) cfi_build_cmd((x), map, cfi)
-
-
-static inline unsigned long cfi_merge_status(map_word val, struct map_info *map,
- struct cfi_private *cfi)
-{
- int wordwidth, words_per_bus, chip_mode, chips_per_word;
- unsigned long onestat, res = 0;
- int i;
-
- /* We do it this way to give the compiler a fighting chance
- of optimising away all the crap for 'bankwidth' larger than
- an unsigned long, in the common case where that support is
- disabled */
- if (map_bankwidth_is_large(map)) {
- wordwidth = sizeof(unsigned long);
- words_per_bus = (map_bankwidth(map)) / wordwidth; // i.e. normally 1
- } else {
- wordwidth = map_bankwidth(map);
- words_per_bus = 1;
- }
-
- chip_mode = map_bankwidth(map) / cfi_interleave(cfi);
- chips_per_word = wordwidth * cfi_interleave(cfi) / map_bankwidth(map);
-
- onestat = val.x[0];
- /* Or all status words together */
- for (i=1; i < words_per_bus; i++) {
- onestat |= val.x[i];
- }
-
- res = onestat;
- switch(chips_per_word) {
- default: BUG();
-#if BITS_PER_LONG >= 64
- case 8:
- res |= (onestat >> (chip_mode * 32));
-#endif
- case 4:
- res |= (onestat >> (chip_mode * 16));
- case 2:
- res |= (onestat >> (chip_mode * 8));
- case 1:
- ;
- }
-
- /* Last, determine what the bit-pattern should be for a single
- device, according to chip mode and endianness... */
- switch (chip_mode) {
- case 1:
- break;
- case 2:
- res = cfi16_to_cpu(res);
- break;
- case 4:
- res = cfi32_to_cpu(res);
- break;
- default: BUG();
- }
- return res;
-}
-
-#define MERGESTATUS(x) cfi_merge_status((x), map, cfi)
-
-
-/*
- * Sends a CFI command to a bank of flash for the given geometry.
- *
- * Returns the offset in flash where the command was written.
- * If prev_val is non-null, it will be set to the value at the command address,
- * before the command was written.
- */
-static inline uint32_t cfi_send_gen_cmd(u_char cmd, uint32_t cmd_addr, uint32_t base,
- struct map_info *map, struct cfi_private *cfi,
- int type, map_word *prev_val)
-{
- map_word val;
- uint32_t addr = base + cfi_build_cmd_addr(cmd_addr, cfi_interleave(cfi), type);
-
- val = cfi_build_cmd(cmd, map, cfi);
-
- if (prev_val)
- *prev_val = map_read(map, addr);
-
- map_write(map, val, addr);
-
- return addr - base;
-}
-
-static inline uint8_t cfi_read_query(struct map_info *map, uint32_t addr)
-{
- map_word val = map_read(map, addr);
-
- if (map_bankwidth_is_1(map)) {
- return val.x[0];
- } else if (map_bankwidth_is_2(map)) {
- return cfi16_to_cpu(val.x[0]);
- } else {
- /* No point in a 64-bit byteswap since that would just be
- swapping the responses from different chips, and we are
- only interested in one chip (a representative sample) */
- return cfi32_to_cpu(val.x[0]);
- }
-}
-
-static inline uint16_t cfi_read_query16(struct map_info *map, uint32_t addr)
-{
- map_word val = map_read(map, addr);
-
- if (map_bankwidth_is_1(map)) {
- return val.x[0] & 0xff;
- } else if (map_bankwidth_is_2(map)) {
- return cfi16_to_cpu(val.x[0]);
- } else {
- /* No point in a 64-bit byteswap since that would just be
- swapping the responses from different chips, and we are
- only interested in one chip (a representative sample) */
- return cfi32_to_cpu(val.x[0]);
- }
-}
-
-static inline void cfi_udelay(int us)
-{
- if (us >= 1000) {
- msleep((us+999)/1000);
- } else {
- udelay(us);
- cond_resched();
- }
-}
-
-struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t size,
- const char* name);
-struct cfi_fixup {
- uint16_t mfr;
- uint16_t id;
- void (*fixup)(struct mtd_info *mtd, void* param);
- void* param;
-};
-
-#define CFI_MFR_ANY 0xffff
-#define CFI_ID_ANY 0xffff
-
-#define CFI_MFR_AMD 0x0001
-#define CFI_MFR_ATMEL 0x001F
-#define CFI_MFR_ST 0x0020 /* STMicroelectronics */
-
-void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup* fixups);
-
-typedef int (*varsize_frob_t)(struct map_info *map, struct flchip *chip,
- unsigned long adr, int len, void *thunk);
-
-int cfi_varsize_frob(struct mtd_info *mtd, varsize_frob_t frob,
- loff_t ofs, size_t len, void *thunk);
-
-
-#endif /* __MTD_CFI_H__ */
diff --git a/original/linux/mtd/cfi_endian.h b/original/linux/mtd/cfi_endian.h
deleted file mode 100644
index 25724f7..0000000
--- a/original/linux/mtd/cfi_endian.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * $Id: cfi_endian.h,v 1.11 2002/01/30 23:20:48 awozniak Exp $
- *
- */
-
-#include <asm/byteorder.h>
-
-#ifndef CONFIG_MTD_CFI_ADV_OPTIONS
-
-#define CFI_HOST_ENDIAN
-
-#else
-
-#ifdef CONFIG_MTD_CFI_NOSWAP
-#define CFI_HOST_ENDIAN
-#endif
-
-#ifdef CONFIG_MTD_CFI_LE_BYTE_SWAP
-#define CFI_LITTLE_ENDIAN
-#endif
-
-#ifdef CONFIG_MTD_CFI_BE_BYTE_SWAP
-#define CFI_BIG_ENDIAN
-#endif
-
-#endif
-
-#if defined(CFI_LITTLE_ENDIAN)
-#define cpu_to_cfi8(x) (x)
-#define cfi8_to_cpu(x) (x)
-#define cpu_to_cfi16(x) cpu_to_le16(x)
-#define cpu_to_cfi32(x) cpu_to_le32(x)
-#define cpu_to_cfi64(x) cpu_to_le64(x)
-#define cfi16_to_cpu(x) le16_to_cpu(x)
-#define cfi32_to_cpu(x) le32_to_cpu(x)
-#define cfi64_to_cpu(x) le64_to_cpu(x)
-#elif defined (CFI_BIG_ENDIAN)
-#define cpu_to_cfi8(x) (x)
-#define cfi8_to_cpu(x) (x)
-#define cpu_to_cfi16(x) cpu_to_be16(x)
-#define cpu_to_cfi32(x) cpu_to_be32(x)
-#define cpu_to_cfi64(x) cpu_to_be64(x)
-#define cfi16_to_cpu(x) be16_to_cpu(x)
-#define cfi32_to_cpu(x) be32_to_cpu(x)
-#define cfi64_to_cpu(x) be64_to_cpu(x)
-#elif defined (CFI_HOST_ENDIAN)
-#define cpu_to_cfi8(x) (x)
-#define cfi8_to_cpu(x) (x)
-#define cpu_to_cfi16(x) (x)
-#define cpu_to_cfi32(x) (x)
-#define cpu_to_cfi64(x) (x)
-#define cfi16_to_cpu(x) (x)
-#define cfi32_to_cpu(x) (x)
-#define cfi64_to_cpu(x) (x)
-#else
-#error No CFI endianness defined
-#endif
diff --git a/original/linux/mtd/compatmac.h b/original/linux/mtd/compatmac.h
deleted file mode 100644
index 7d1300d..0000000
--- a/original/linux/mtd/compatmac.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-#ifndef __LINUX_MTD_COMPATMAC_H__
-#define __LINUX_MTD_COMPATMAC_H__
-
-/* Nothing to see here. We write 2.5-compatible code and this
- file makes it all OK in older kernels, but it's empty in _current_
- kernels. Include guard just to make GCC ignore it in future inclusions
- anyway... */
-
-#endif /* __LINUX_MTD_COMPATMAC_H__ */
diff --git a/original/linux/mtd/flashchip.h b/original/linux/mtd/flashchip.h
deleted file mode 100644
index a293a3b..0000000
--- a/original/linux/mtd/flashchip.h
+++ /dev/null
@@ -1,90 +0,0 @@
-
-/*
- * struct flchip definition
- *
- * Contains information about the location and state of a given flash device
- *
- * (C) 2000 Red Hat. GPLd.
- *
- * $Id: flashchip.h,v 1.18 2005/11/07 11:14:54 gleixner Exp $
- *
- */
-
-#ifndef __MTD_FLASHCHIP_H__
-#define __MTD_FLASHCHIP_H__
-
-/* For spinlocks. sched.h includes spinlock.h from whichever directory it
- * happens to be in - so we don't have to care whether we're on 2.2, which
- * has asm/spinlock.h, or 2.4, which has linux/spinlock.h
- */
-#include <linux/sched.h>
-
-typedef enum {
- FL_READY,
- FL_STATUS,
- FL_CFI_QUERY,
- FL_JEDEC_QUERY,
- FL_ERASING,
- FL_ERASE_SUSPENDING,
- FL_ERASE_SUSPENDED,
- FL_WRITING,
- FL_WRITING_TO_BUFFER,
- FL_OTP_WRITE,
- FL_WRITE_SUSPENDING,
- FL_WRITE_SUSPENDED,
- FL_PM_SUSPENDED,
- FL_SYNCING,
- FL_UNLOADING,
- FL_LOCKING,
- FL_UNLOCKING,
- FL_POINT,
- FL_XIP_WHILE_ERASING,
- FL_XIP_WHILE_WRITING,
- FL_UNKNOWN
-} flstate_t;
-
-
-
-/* NOTE: confusingly, this can be used to refer to more than one chip at a time,
- if they're interleaved. This can even refer to individual partitions on
- the same physical chip when present. */
-
-struct flchip {
- unsigned long start; /* Offset within the map */
- // unsigned long len;
- /* We omit len for now, because when we group them together
- we insist that they're all of the same size, and the chip size
- is held in the next level up. If we get more versatile later,
- it'll make it a damn sight harder to find which chip we want from
- a given offset, and we'll want to add the per-chip length field
- back in.
- */
- int ref_point_counter;
- flstate_t state;
- flstate_t oldstate;
-
- unsigned int write_suspended:1;
- unsigned int erase_suspended:1;
- unsigned long in_progress_block_addr;
-
- spinlock_t *mutex;
- spinlock_t _spinlock; /* We do it like this because sometimes they'll be shared. */
- wait_queue_head_t wq; /* Wait on here when we're waiting for the chip
- to be ready */
- int word_write_time;
- int buffer_write_time;
- int erase_time;
-
- void *priv;
-};
-
-/* This is used to handle contention on write/erase operations
- between partitions of the same physical chip. */
-struct flchip_shared {
- spinlock_t lock;
- struct flchip *writing;
- struct flchip *erasing;
-};
-
-
-#endif /* __MTD_FLASHCHIP_H__ */
diff --git a/original/linux/mtd/map.h b/original/linux/mtd/map.h
deleted file mode 100644
index 28d461d..0000000
--- a/original/linux/mtd/map.h
+++ /dev/null
@@ -1,436 +0,0 @@
-
-/* Overhauled routines for dealing with different mmap regions of flash */
-/* $Id: map.h,v 1.54 2005/11/07 11:14:54 gleixner Exp $ */
-
-#ifndef __LINUX_MTD_MAP_H__
-#define __LINUX_MTD_MAP_H__
-
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/string.h>
-
-#include <linux/mtd/compatmac.h>
-
-#include <asm/unaligned.h>
-#include <asm/system.h>
-#include <asm/io.h>
-
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_1
-#define map_bankwidth(map) 1
-#define map_bankwidth_is_1(map) (map_bankwidth(map) == 1)
-#define map_bankwidth_is_large(map) (0)
-#define map_words(map) (1)
-#define MAX_MAP_BANKWIDTH 1
-#else
-#define map_bankwidth_is_1(map) (0)
-#endif
-
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_2
-# ifdef map_bankwidth
-# undef map_bankwidth
-# define map_bankwidth(map) ((map)->bankwidth)
-# else
-# define map_bankwidth(map) 2
-# define map_bankwidth_is_large(map) (0)
-# define map_words(map) (1)
-# endif
-#define map_bankwidth_is_2(map) (map_bankwidth(map) == 2)
-#undef MAX_MAP_BANKWIDTH
-#define MAX_MAP_BANKWIDTH 2
-#else
-#define map_bankwidth_is_2(map) (0)
-#endif
-
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_4
-# ifdef map_bankwidth
-# undef map_bankwidth
-# define map_bankwidth(map) ((map)->bankwidth)
-# else
-# define map_bankwidth(map) 4
-# define map_bankwidth_is_large(map) (0)
-# define map_words(map) (1)
-# endif
-#define map_bankwidth_is_4(map) (map_bankwidth(map) == 4)
-#undef MAX_MAP_BANKWIDTH
-#define MAX_MAP_BANKWIDTH 4
-#else
-#define map_bankwidth_is_4(map) (0)
-#endif
-
-/* ensure we never evaluate anything shorted than an unsigned long
- * to zero, and ensure we'll never miss the end of an comparison (bjd) */
-
-#define map_calc_words(map) ((map_bankwidth(map) + (sizeof(unsigned long)-1))/ sizeof(unsigned long))
-
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_8
-# ifdef map_bankwidth
-# undef map_bankwidth
-# define map_bankwidth(map) ((map)->bankwidth)
-# if BITS_PER_LONG < 64
-# undef map_bankwidth_is_large
-# define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8)
-# undef map_words
-# define map_words(map) map_calc_words(map)
-# endif
-# else
-# define map_bankwidth(map) 8
-# define map_bankwidth_is_large(map) (BITS_PER_LONG < 64)
-# define map_words(map) map_calc_words(map)
-# endif
-#define map_bankwidth_is_8(map) (map_bankwidth(map) == 8)
-#undef MAX_MAP_BANKWIDTH
-#define MAX_MAP_BANKWIDTH 8
-#else
-#define map_bankwidth_is_8(map) (0)
-#endif
-
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_16
-# ifdef map_bankwidth
-# undef map_bankwidth
-# define map_bankwidth(map) ((map)->bankwidth)
-# undef map_bankwidth_is_large
-# define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8)
-# undef map_words
-# define map_words(map) map_calc_words(map)
-# else
-# define map_bankwidth(map) 16
-# define map_bankwidth_is_large(map) (1)
-# define map_words(map) map_calc_words(map)
-# endif
-#define map_bankwidth_is_16(map) (map_bankwidth(map) == 16)
-#undef MAX_MAP_BANKWIDTH
-#define MAX_MAP_BANKWIDTH 16
-#else
-#define map_bankwidth_is_16(map) (0)
-#endif
-
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_32
-# ifdef map_bankwidth
-# undef map_bankwidth
-# define map_bankwidth(map) ((map)->bankwidth)
-# undef map_bankwidth_is_large
-# define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8)
-# undef map_words
-# define map_words(map) map_calc_words(map)
-# else
-# define map_bankwidth(map) 32
-# define map_bankwidth_is_large(map) (1)
-# define map_words(map) map_calc_words(map)
-# endif
-#define map_bankwidth_is_32(map) (map_bankwidth(map) == 32)
-#undef MAX_MAP_BANKWIDTH
-#define MAX_MAP_BANKWIDTH 32
-#else
-#define map_bankwidth_is_32(map) (0)
-#endif
-
-#ifndef map_bankwidth
-#error "No bus width supported. What's the point?"
-#endif
-
-static inline int map_bankwidth_supported(int w)
-{
- switch (w) {
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_1
- case 1:
-#endif
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_2
- case 2:
-#endif
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_4
- case 4:
-#endif
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_8
- case 8:
-#endif
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_16
- case 16:
-#endif
-#ifdef CONFIG_MTD_MAP_BANK_WIDTH_32
- case 32:
-#endif
- return 1;
-
- default:
- return 0;
- }
-}
-
-#define MAX_MAP_LONGS ( ((MAX_MAP_BANKWIDTH*8) + BITS_PER_LONG - 1) / BITS_PER_LONG )
-
-typedef union {
- unsigned long x[MAX_MAP_LONGS];
-} map_word;
-
-/* The map stuff is very simple. You fill in your struct map_info with
- a handful of routines for accessing the device, making sure they handle
- paging etc. correctly if your device needs it. Then you pass it off
- to a chip probe routine -- either JEDEC or CFI probe or both -- via
- do_map_probe(). If a chip is recognised, the probe code will invoke the
- appropriate chip driver (if present) and return a struct mtd_info.
- At which point, you fill in the mtd->module with your own module
- address, and register it with the MTD core code. Or you could partition
- it and register the partitions instead, or keep it for your own private
- use; whatever.
-
- The mtd->priv field will point to the struct map_info, and any further
- private data required by the chip driver is linked from the
- mtd->priv->fldrv_priv field. This allows the map driver to get at
- the destructor function map->fldrv_destroy() when it's tired
- of living.
-*/
-
-struct map_info {
- char *name;
- unsigned long size;
- unsigned long phys;
-#define NO_XIP (-1UL)
-
- void __iomem *virt;
- void *cached;
-
- int bankwidth; /* in octets. This isn't necessarily the width
- of actual bus cycles -- it's the repeat interval
- in bytes, before you are talking to the first chip again.
- */
-
-#ifdef CONFIG_MTD_COMPLEX_MAPPINGS
- map_word (*read)(struct map_info *, unsigned long);
- void (*copy_from)(struct map_info *, void *, unsigned long, ssize_t);
-
- void (*write)(struct map_info *, const map_word, unsigned long);
- void (*copy_to)(struct map_info *, unsigned long, const void *, ssize_t);
-
- /* We can perhaps put in 'point' and 'unpoint' methods, if we really
- want to enable XIP for non-linear mappings. Not yet though. */
-#endif
- /* It's possible for the map driver to use cached memory in its
- copy_from implementation (and _only_ with copy_from). However,
- when the chip driver knows some flash area has changed contents,
- it will signal it to the map driver through this routine to let
- the map driver invalidate the corresponding cache as needed.
- If there is no cache to care about this can be set to NULL. */
- void (*inval_cache)(struct map_info *, unsigned long, ssize_t);
-
- /* set_vpp() must handle being reentered -- enable, enable, disable
- must leave it enabled. */
- void (*set_vpp)(struct map_info *, int);
-
- unsigned long map_priv_1;
- unsigned long map_priv_2;
- void *fldrv_priv;
- struct mtd_chip_driver *fldrv;
-};
-
-struct mtd_chip_driver {
- struct mtd_info *(*probe)(struct map_info *map);
- void (*destroy)(struct mtd_info *);
- struct module *module;
- char *name;
- struct list_head list;
-};
-
-void register_mtd_chip_driver(struct mtd_chip_driver *);
-void unregister_mtd_chip_driver(struct mtd_chip_driver *);
-
-struct mtd_info *do_map_probe(const char *name, struct map_info *map);
-void map_destroy(struct mtd_info *mtd);
-
-#define ENABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 1); } while(0)
-#define DISABLE_VPP(map) do { if(map->set_vpp) map->set_vpp(map, 0); } while(0)
-
-#define INVALIDATE_CACHED_RANGE(map, from, size) \
- do { if(map->inval_cache) map->inval_cache(map, from, size); } while(0)
-
-
-static inline int map_word_equal(struct map_info *map, map_word val1, map_word val2)
-{
- int i;
- for (i=0; i<map_words(map); i++) {
- if (val1.x[i] != val2.x[i])
- return 0;
- }
- return 1;
-}
-
-static inline map_word map_word_and(struct map_info *map, map_word val1, map_word val2)
-{
- map_word r;
- int i;
-
- for (i=0; i<map_words(map); i++) {
- r.x[i] = val1.x[i] & val2.x[i];
- }
- return r;
-}
-
-static inline map_word map_word_clr(struct map_info *map, map_word val1, map_word val2)
-{
- map_word r;
- int i;
-
- for (i=0; i<map_words(map); i++) {
- r.x[i] = val1.x[i] & ~val2.x[i];
- }
- return r;
-}
-
-static inline map_word map_word_or(struct map_info *map, map_word val1, map_word val2)
-{
- map_word r;
- int i;
-
- for (i=0; i<map_words(map); i++) {
- r.x[i] = val1.x[i] | val2.x[i];
- }
- return r;
-}
-
-#define map_word_andequal(m, a, b, z) map_word_equal(m, z, map_word_and(m, a, b))
-
-static inline int map_word_bitsset(struct map_info *map, map_word val1, map_word val2)
-{
- int i;
-
- for (i=0; i<map_words(map); i++) {
- if (val1.x[i] & val2.x[i])
- return 1;
- }
- return 0;
-}
-
-static inline map_word map_word_load(struct map_info *map, const void *ptr)
-{
- map_word r;
-
- if (map_bankwidth_is_1(map))
- r.x[0] = *(unsigned char *)ptr;
- else if (map_bankwidth_is_2(map))
- r.x[0] = get_unaligned((uint16_t *)ptr);
- else if (map_bankwidth_is_4(map))
- r.x[0] = get_unaligned((uint32_t *)ptr);
-#if BITS_PER_LONG >= 64
- else if (map_bankwidth_is_8(map))
- r.x[0] = get_unaligned((uint64_t *)ptr);
-#endif
- else if (map_bankwidth_is_large(map))
- memcpy(r.x, ptr, map->bankwidth);
-
- return r;
-}
-
-static inline map_word map_word_load_partial(struct map_info *map, map_word orig, const unsigned char *buf, int start, int len)
-{
- int i;
-
- if (map_bankwidth_is_large(map)) {
- char *dest = (char *)&orig;
- memcpy(dest+start, buf, len);
- } else {
- for (i=start; i < start+len; i++) {
- int bitpos;
-#ifdef __LITTLE_ENDIAN
- bitpos = i*8;
-#else /* __BIG_ENDIAN */
- bitpos = (map_bankwidth(map)-1-i)*8;
-#endif
- orig.x[0] &= ~(0xff << bitpos);
- orig.x[0] |= buf[i-start] << bitpos;
- }
- }
- return orig;
-}
-
-#if BITS_PER_LONG < 64
-#define MAP_FF_LIMIT 4
-#else
-#define MAP_FF_LIMIT 8
-#endif
-
-static inline map_word map_word_ff(struct map_info *map)
-{
- map_word r;
- int i;
-
- if (map_bankwidth(map) < MAP_FF_LIMIT) {
- int bw = 8 * map_bankwidth(map);
- r.x[0] = (1 << bw) - 1;
- } else {
- for (i=0; i<map_words(map); i++)
- r.x[i] = ~0UL;
- }
- return r;
-}
-
-static inline map_word inline_map_read(struct map_info *map, unsigned long ofs)
-{
- map_word r;
-
- if (map_bankwidth_is_1(map))
- r.x[0] = __raw_readb(map->virt + ofs);
- else if (map_bankwidth_is_2(map))
- r.x[0] = __raw_readw(map->virt + ofs);
- else if (map_bankwidth_is_4(map))
- r.x[0] = __raw_readl(map->virt + ofs);
-#if BITS_PER_LONG >= 64
- else if (map_bankwidth_is_8(map))
- r.x[0] = __raw_readq(map->virt + ofs);
-#endif
- else if (map_bankwidth_is_large(map))
- memcpy_fromio(r.x, map->virt+ofs, map->bankwidth);
-
- return r;
-}
-
-static inline void inline_map_write(struct map_info *map, const map_word datum, unsigned long ofs)
-{
- if (map_bankwidth_is_1(map))
- __raw_writeb(datum.x[0], map->virt + ofs);
- else if (map_bankwidth_is_2(map))
- __raw_writew(datum.x[0], map->virt + ofs);
- else if (map_bankwidth_is_4(map))
- __raw_writel(datum.x[0], map->virt + ofs);
-#if BITS_PER_LONG >= 64
- else if (map_bankwidth_is_8(map))
- __raw_writeq(datum.x[0], map->virt + ofs);
-#endif
- else if (map_bankwidth_is_large(map))
- memcpy_toio(map->virt+ofs, datum.x, map->bankwidth);
- mb();
-}
-
-static inline void inline_map_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
-{
- if (map->cached)
- memcpy(to, (char *)map->cached + from, len);
- else
- memcpy_fromio(to, map->virt + from, len);
-}
-
-static inline void inline_map_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
-{
- memcpy_toio(map->virt + to, from, len);
-}
-
-#ifdef CONFIG_MTD_COMPLEX_MAPPINGS
-#define map_read(map, ofs) (map)->read(map, ofs)
-#define map_copy_from(map, to, from, len) (map)->copy_from(map, to, from, len)
-#define map_write(map, datum, ofs) (map)->write(map, datum, ofs)
-#define map_copy_to(map, to, from, len) (map)->copy_to(map, to, from, len)
-
-extern void simple_map_init(struct map_info *);
-#define map_is_linear(map) (map->phys != NO_XIP)
-
-#else
-#define map_read(map, ofs) inline_map_read(map, ofs)
-#define map_copy_from(map, to, from, len) inline_map_copy_from(map, to, from, len)
-#define map_write(map, datum, ofs) inline_map_write(map, datum, ofs)
-#define map_copy_to(map, to, from, len) inline_map_copy_to(map, to, from, len)
-
-
-#define simple_map_init(map) BUG_ON(!map_bankwidth_supported((map)->bankwidth))
-#define map_is_linear(map) ({ (void)(map); 1; })
-
-#endif /* !CONFIG_MTD_COMPLEX_MAPPINGS */
-
-#endif /* __LINUX_MTD_MAP_H__ */
diff --git a/original/linux/mtd/mtd.h b/original/linux/mtd/mtd.h
deleted file mode 100644
index 94a443d..0000000
--- a/original/linux/mtd/mtd.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * $Id: mtd.h,v 1.61 2005/11/07 11:14:54 gleixner Exp $
- *
- * Copyright (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> et al.
- *
- * Released under GPL
- */
-
-#ifndef __MTD_MTD_H__
-#define __MTD_MTD_H__
-
-#ifndef __KERNEL__
-#error This is a kernel header. Perhaps include mtd-user.h instead?
-#endif
-
-#include <linux/types.h>
-#include <linux/module.h>
-#include <linux/uio.h>
-#include <linux/notifier.h>
-
-#include <linux/mtd/compatmac.h>
-#include <mtd/mtd-abi.h>
-
-#define MTD_CHAR_MAJOR 90
-#define MTD_BLOCK_MAJOR 31
-#define MAX_MTD_DEVICES 16
-
-#define MTD_ERASE_PENDING 0x01
-#define MTD_ERASING 0x02
-#define MTD_ERASE_SUSPEND 0x04
-#define MTD_ERASE_DONE 0x08
-#define MTD_ERASE_FAILED 0x10
-
-/* If the erase fails, fail_addr might indicate exactly which block failed. If
- fail_addr = 0xffffffff, the failure was not at the device level or was not
- specific to any particular block. */
-struct erase_info {
- struct mtd_info *mtd;
- u_int32_t addr;
- u_int32_t len;
- u_int32_t fail_addr;
- u_long time;
- u_long retries;
- u_int dev;
- u_int cell;
- void (*callback) (struct erase_info *self);
- u_long priv;
- u_char state;
- struct erase_info *next;
-};
-
-struct mtd_erase_region_info {
- u_int32_t offset; /* At which this region starts, from the beginning of the MTD */
- u_int32_t erasesize; /* For this region */
- u_int32_t numblocks; /* Number of blocks of erasesize in this region */
-};
-
-/*
- * oob operation modes
- *
- * MTD_OOB_PLACE: oob data are placed at the given offset
- * MTD_OOB_AUTO: oob data are automatically placed at the free areas
- * which are defined by the ecclayout
- * MTD_OOB_RAW: mode to read raw data+oob in one chunk. The oob data
- * is inserted into the data. Thats a raw image of the
- * flash contents.
- */
-typedef enum {
- MTD_OOB_PLACE,
- MTD_OOB_AUTO,
- MTD_OOB_RAW,
-} mtd_oob_mode_t;
-
-/**
- * struct mtd_oob_ops - oob operation operands
- * @mode: operation mode
- *
- * @len: number of bytes to write/read. When a data buffer is given
- * (datbuf != NULL) this is the number of data bytes. When
- * no data buffer is available this is the number of oob bytes.
- *
- * @retlen: number of bytes written/read. When a data buffer is given
- * (datbuf != NULL) this is the number of data bytes. When
- * no data buffer is available this is the number of oob bytes.
- *
- * @ooblen: number of oob bytes per page
- * @ooboffs: offset of oob data in the oob area (only relevant when
- * mode = MTD_OOB_PLACE)
- * @datbuf: data buffer - if NULL only oob data are read/written
- * @oobbuf: oob data buffer
- */
-struct mtd_oob_ops {
- mtd_oob_mode_t mode;
- size_t len;
- size_t retlen;
- size_t ooblen;
- uint32_t ooboffs;
- uint8_t *datbuf;
- uint8_t *oobbuf;
-};
-
-struct mtd_info {
- u_char type;
- u_int32_t flags;
- u_int32_t size; // Total size of the MTD
-
- /* "Major" erase size for the device. Naïve users may take this
- * to be the only erase size available, or may use the more detailed
- * information below if they desire
- */
- u_int32_t erasesize;
- /* Minimal writable flash unit size. In case of NOR flash it is 1 (even
- * though individual bits can be cleared), in case of NAND flash it is
- * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR
- * it is of ECC block size, etc. It is illegal to have writesize = 0.
- * Any driver registering a struct mtd_info must ensure a writesize of
- * 1 or larger.
- */
- u_int32_t writesize;
-
- u_int32_t oobsize; // Amount of OOB data per block (e.g. 16)
- u_int32_t ecctype;
- u_int32_t eccsize;
-
- /*
- * Reuse some of the above unused fields in the case of NOR flash
- * with configurable programming regions to avoid modifying the
- * user visible structure layout/size. Only valid when the
- * MTD_PROGRAM_REGIONS flag is set.
- * (Maybe we should have an union for those?)
- */
-#define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize
-#define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype
-
- // Kernel-only stuff starts here.
- char *name;
- int index;
-
- /* ecc layout structure pointer - read only ! */
- struct nand_ecclayout *ecclayout;
-
- /* Data for variable erase regions. If numeraseregions is zero,
- * it means that the whole device has erasesize as given above.
- */
- int numeraseregions;
- struct mtd_erase_region_info *eraseregions;
-
- /* This really shouldn't be here. It can go away in 2.5 */
- u_int32_t bank_size;
-
- int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
-
- /* This stuff for eXecute-In-Place */
- int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
-
- /* We probably shouldn't allow XIP if the unpoint isn't a NULL */
- void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len);
-
-
- int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
- int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
-
- int (*read_oob) (struct mtd_info *mtd, loff_t from,
- struct mtd_oob_ops *ops);
- int (*write_oob) (struct mtd_info *mtd, loff_t to,
- struct mtd_oob_ops *ops);
-
- /*
- * Methods to access the protection register area, present in some
- * flash devices. The user data is one time programmable but the
- * factory data is read only.
- */
- int (*get_fact_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
- int (*read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
- int (*get_user_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
- int (*read_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
- int (*write_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
- int (*lock_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len);
-
- /* kvec-based read/write methods.
- NB: The 'count' parameter is the number of _vectors_, each of
- which contains an (ofs, len) tuple.
- */
- int (*writev) (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen);
-
- /* Sync */
- void (*sync) (struct mtd_info *mtd);
-
- /* Chip-supported device locking */
- int (*lock) (struct mtd_info *mtd, loff_t ofs, size_t len);
- int (*unlock) (struct mtd_info *mtd, loff_t ofs, size_t len);
-
- /* Power Management functions */
- int (*suspend) (struct mtd_info *mtd);
- void (*resume) (struct mtd_info *mtd);
-
- /* Bad block management functions */
- int (*block_isbad) (struct mtd_info *mtd, loff_t ofs);
- int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
-
- struct notifier_block reboot_notifier; /* default mode before reboot */
-
- /* ECC status information */
- struct mtd_ecc_stats ecc_stats;
-
- void *priv;
-
- struct module *owner;
- int usecount;
-};
-
-
- /* Kernel-side ioctl definitions */
-
-extern int add_mtd_device(struct mtd_info *mtd);
-extern int del_mtd_device (struct mtd_info *mtd);
-
-extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
-
-extern void put_mtd_device(struct mtd_info *mtd);
-
-
-struct mtd_notifier {
- void (*add)(struct mtd_info *mtd);
- void (*remove)(struct mtd_info *mtd);
- struct list_head list;
-};
-
-
-extern void register_mtd_user (struct mtd_notifier *new);
-extern int unregister_mtd_user (struct mtd_notifier *old);
-
-int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
- unsigned long count, loff_t to, size_t *retlen);
-
-int default_mtd_readv(struct mtd_info *mtd, struct kvec *vecs,
- unsigned long count, loff_t from, size_t *retlen);
-
-#ifdef CONFIG_MTD_PARTITIONS
-void mtd_erase_callback(struct erase_info *instr);
-#else
-static inline void mtd_erase_callback(struct erase_info *instr)
-{
- if (instr->callback)
- instr->callback(instr);
-}
-#endif
-
-/*
- * Debugging macro and defines
- */
-#define MTD_DEBUG_LEVEL0 (0) /* Quiet */
-#define MTD_DEBUG_LEVEL1 (1) /* Audible */
-#define MTD_DEBUG_LEVEL2 (2) /* Loud */
-#define MTD_DEBUG_LEVEL3 (3) /* Noisy */
-
-#ifdef CONFIG_MTD_DEBUG
-#define DEBUG(n, args...) \
- do { \
- if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
- printk(KERN_INFO args); \
- } while(0)
-#else /* CONFIG_MTD_DEBUG */
-#define DEBUG(n, args...) do { } while(0)
-
-#endif /* CONFIG_MTD_DEBUG */
-
-#endif /* __MTD_MTD_H__ */
diff --git a/original/linux/mtd/nand.h b/original/linux/mtd/nand.h
deleted file mode 100644
index 0b4cd2f..0000000
--- a/original/linux/mtd/nand.h
+++ /dev/null
@@ -1,573 +0,0 @@
-/*
- * linux/include/linux/mtd/nand.h
- *
- * Copyright (c) 2000 David Woodhouse <dwmw2@mvhi.com>
- * Steven J. Hill <sjhill@realitydiluted.com>
- * Thomas Gleixner <tglx@linutronix.de>
- *
- * $Id: nand.h,v 1.74 2005/09/15 13:58:50 vwool Exp $
- *
- * 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.
- *
- * Info:
- * Contains standard defines and IDs for NAND flash devices
- *
- * Changelog:
- * See git changelog.
- */
-#ifndef __LINUX_MTD_NAND_H
-#define __LINUX_MTD_NAND_H
-
-#include <linux/wait.h>
-#include <linux/spinlock.h>
-#include <linux/mtd/mtd.h>
-
-struct mtd_info;
-/* Scan and identify a NAND device */
-extern int nand_scan (struct mtd_info *mtd, int max_chips);
-/* Free resources held by the NAND device */
-extern void nand_release (struct mtd_info *mtd);
-
-/* The maximum number of NAND chips in an array */
-#define NAND_MAX_CHIPS 8
-
-/* This constant declares the max. oobsize / page, which
- * is supported now. If you add a chip with bigger oobsize/page
- * adjust this accordingly.
- */
-#define NAND_MAX_OOBSIZE 64
-#define NAND_MAX_PAGESIZE 2048
-
-/*
- * Constants for hardware specific CLE/ALE/NCE function
- *
- * These are bits which can be or'ed to set/clear multiple
- * bits in one go.
- */
-/* Select the chip by setting nCE to low */
-#define NAND_NCE 0x01
-/* Select the command latch by setting CLE to high */
-#define NAND_CLE 0x02
-/* Select the address latch by setting ALE to high */
-#define NAND_ALE 0x04
-
-#define NAND_CTRL_CLE (NAND_NCE | NAND_CLE)
-#define NAND_CTRL_ALE (NAND_NCE | NAND_ALE)
-#define NAND_CTRL_CHANGE 0x80
-
-/*
- * Standard NAND flash commands
- */
-#define NAND_CMD_READ0 0
-#define NAND_CMD_READ1 1
-#define NAND_CMD_RNDOUT 5
-#define NAND_CMD_PAGEPROG 0x10
-#define NAND_CMD_READOOB 0x50
-#define NAND_CMD_ERASE1 0x60
-#define NAND_CMD_STATUS 0x70
-#define NAND_CMD_STATUS_MULTI 0x71
-#define NAND_CMD_SEQIN 0x80
-#define NAND_CMD_RNDIN 0x85
-#define NAND_CMD_READID 0x90
-#define NAND_CMD_ERASE2 0xd0
-#define NAND_CMD_RESET 0xff
-
-/* Extended commands for large page devices */
-#define NAND_CMD_READSTART 0x30
-#define NAND_CMD_RNDOUTSTART 0xE0
-#define NAND_CMD_CACHEDPROG 0x15
-
-/* Extended commands for AG-AND device */
-/*
- * Note: the command for NAND_CMD_DEPLETE1 is really 0x00 but
- * there is no way to distinguish that from NAND_CMD_READ0
- * until the remaining sequence of commands has been completed
- * so add a high order bit and mask it off in the command.
- */
-#define NAND_CMD_DEPLETE1 0x100
-#define NAND_CMD_DEPLETE2 0x38
-#define NAND_CMD_STATUS_MULTI 0x71
-#define NAND_CMD_STATUS_ERROR 0x72
-/* multi-bank error status (banks 0-3) */
-#define NAND_CMD_STATUS_ERROR0 0x73
-#define NAND_CMD_STATUS_ERROR1 0x74
-#define NAND_CMD_STATUS_ERROR2 0x75
-#define NAND_CMD_STATUS_ERROR3 0x76
-#define NAND_CMD_STATUS_RESET 0x7f
-#define NAND_CMD_STATUS_CLEAR 0xff
-
-#define NAND_CMD_NONE -1
-
-/* Status bits */
-#define NAND_STATUS_FAIL 0x01
-#define NAND_STATUS_FAIL_N1 0x02
-#define NAND_STATUS_TRUE_READY 0x20
-#define NAND_STATUS_READY 0x40
-#define NAND_STATUS_WP 0x80
-
-/*
- * Constants for ECC_MODES
- */
-typedef enum {
- NAND_ECC_NONE,
- NAND_ECC_SOFT,
- NAND_ECC_HW,
- NAND_ECC_HW_SYNDROME,
-} nand_ecc_modes_t;
-
-/*
- * Constants for Hardware ECC
- */
-/* Reset Hardware ECC for read */
-#define NAND_ECC_READ 0
-/* Reset Hardware ECC for write */
-#define NAND_ECC_WRITE 1
-/* Enable Hardware ECC before syndrom is read back from flash */
-#define NAND_ECC_READSYN 2
-
-/* Bit mask for flags passed to do_nand_read_ecc */
-#define NAND_GET_DEVICE 0x80
-
-
-/* Option constants for bizarre disfunctionality and real
-* features
-*/
-/* Chip can not auto increment pages */
-#define NAND_NO_AUTOINCR 0x00000001
-/* Buswitdh is 16 bit */
-#define NAND_BUSWIDTH_16 0x00000002
-/* Device supports partial programming without padding */
-#define NAND_NO_PADDING 0x00000004
-/* Chip has cache program function */
-#define NAND_CACHEPRG 0x00000008
-/* Chip has copy back function */
-#define NAND_COPYBACK 0x00000010
-/* AND Chip which has 4 banks and a confusing page / block
- * assignment. See Renesas datasheet for further information */
-#define NAND_IS_AND 0x00000020
-/* Chip has a array of 4 pages which can be read without
- * additional ready /busy waits */
-#define NAND_4PAGE_ARRAY 0x00000040
-/* Chip requires that BBT is periodically rewritten to prevent
- * bits from adjacent blocks from 'leaking' in altering data.
- * This happens with the Renesas AG-AND chips, possibly others. */
-#define BBT_AUTO_REFRESH 0x00000080
-/* Chip does not require ready check on read. True
- * for all large page devices, as they do not support
- * autoincrement.*/
-#define NAND_NO_READRDY 0x00000100
-
-/* Options valid for Samsung large page devices */
-#define NAND_SAMSUNG_LP_OPTIONS \
- (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK)
-
-/* Macros to identify the above */
-#define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR))
-#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
-#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
-#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
-
-/* Mask to zero out the chip options, which come from the id table */
-#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
-
-/* Non chip related options */
-/* Use a flash based bad block table. This option is passed to the
- * default bad block table function. */
-#define NAND_USE_FLASH_BBT 0x00010000
-/* This option skips the bbt scan during initialization. */
-#define NAND_SKIP_BBTSCAN 0x00020000
-
-/* Options set by nand scan */
-/* Nand scan has allocated controller struct */
-#define NAND_CONTROLLER_ALLOC 0x80000000
-
-
-/*
- * nand_state_t - chip states
- * Enumeration for NAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING,
- FL_CACHEDPRG,
- FL_PM_SUSPENDED,
-} nand_state_t;
-
-/* Keep gcc happy */
-struct nand_chip;
-
-/**
- * struct nand_hw_control - Control structure for hardware controller (e.g ECC generator) shared among independent devices
- * @lock: protection lock
- * @active: the mtd device which holds the controller currently
- * @wq: wait queue to sleep on if a NAND operation is in progress
- * used instead of the per chip wait queue when a hw controller is available
- */
-struct nand_hw_control {
- spinlock_t lock;
- struct nand_chip *active;
- wait_queue_head_t wq;
-};
-
-/**
- * struct nand_ecc_ctrl - Control structure for ecc
- * @mode: ecc mode
- * @steps: number of ecc steps per page
- * @size: data bytes per ecc step
- * @bytes: ecc bytes per step
- * @total: total number of ecc bytes per page
- * @prepad: padding information for syndrome based ecc generators
- * @postpad: padding information for syndrome based ecc generators
- * @layout: ECC layout control struct pointer
- * @hwctl: function to control hardware ecc generator. Must only
- * be provided if an hardware ECC is available
- * @calculate: function for ecc calculation or readback from ecc hardware
- * @correct: function for ecc correction, matching to ecc generator (sw/hw)
- * @read_page: function to read a page according to the ecc generator requirements
- * @write_page: function to write a page according to the ecc generator requirements
- * @read_oob: function to read chip OOB data
- * @write_oob: function to write chip OOB data
- */
-struct nand_ecc_ctrl {
- nand_ecc_modes_t mode;
- int steps;
- int size;
- int bytes;
- int total;
- int prepad;
- int postpad;
- struct nand_ecclayout *layout;
- void (*hwctl)(struct mtd_info *mtd, int mode);
- int (*calculate)(struct mtd_info *mtd,
- const uint8_t *dat,
- uint8_t *ecc_code);
- int (*correct)(struct mtd_info *mtd, uint8_t *dat,
- uint8_t *read_ecc,
- uint8_t *calc_ecc);
- int (*read_page)(struct mtd_info *mtd,
- struct nand_chip *chip,
- uint8_t *buf);
- void (*write_page)(struct mtd_info *mtd,
- struct nand_chip *chip,
- const uint8_t *buf);
- int (*read_oob)(struct mtd_info *mtd,
- struct nand_chip *chip,
- int page,
- int sndcmd);
- int (*write_oob)(struct mtd_info *mtd,
- struct nand_chip *chip,
- int page);
-};
-
-/**
- * struct nand_buffers - buffer structure for read/write
- * @ecccalc: buffer for calculated ecc
- * @ecccode: buffer for ecc read from flash
- * @oobwbuf: buffer for write oob data
- * @databuf: buffer for data - dynamically sized
- * @oobrbuf: buffer to read oob data
- *
- * Do not change the order of buffers. databuf and oobrbuf must be in
- * consecutive order.
- */
-struct nand_buffers {
- uint8_t ecccalc[NAND_MAX_OOBSIZE];
- uint8_t ecccode[NAND_MAX_OOBSIZE];
- uint8_t oobwbuf[NAND_MAX_OOBSIZE];
- uint8_t databuf[NAND_MAX_PAGESIZE];
- uint8_t oobrbuf[NAND_MAX_OOBSIZE];
-};
-
-/**
- * struct nand_chip - NAND Private Flash Chip Data
- * @IO_ADDR_R: [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device
- * @IO_ADDR_W: [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device
- * @read_byte: [REPLACEABLE] read one byte from the chip
- * @read_word: [REPLACEABLE] read one word from the chip
- * @write_buf: [REPLACEABLE] write data from the buffer to the chip
- * @read_buf: [REPLACEABLE] read data from the chip into the buffer
- * @verify_buf: [REPLACEABLE] verify buffer contents against the chip data
- * @select_chip: [REPLACEABLE] select chip nr
- * @block_bad: [REPLACEABLE] check, if the block is bad
- * @block_markbad: [REPLACEABLE] mark the block bad
- * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific funtion for controlling
- * ALE/CLE/nCE. Also used to write command and address
- * @dev_ready: [BOARDSPECIFIC] hardwarespecific function for accesing device ready/busy line
- * If set to NULL no access to ready/busy is available and the ready/busy information
- * is read from the chip status register
- * @cmdfunc: [REPLACEABLE] hardwarespecific function for writing commands to the chip
- * @waitfunc: [REPLACEABLE] hardwarespecific function for wait on ready
- * @ecc: [BOARDSPECIFIC] ecc control ctructure
- * @buffers: buffer structure for read/write
- * @hwcontrol: platform-specific hardware control structure
- * @ops: oob operation operands
- * @erase_cmd: [INTERN] erase command write function, selectable due to AND support
- * @scan_bbt: [REPLACEABLE] function to scan bad block table
- * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR)
- * @wq: [INTERN] wait queue to sleep on if a NAND operation is in progress
- * @state: [INTERN] the current state of the NAND device
- * @oob_poi: poison value buffer
- * @page_shift: [INTERN] number of address bits in a page (column address bits)
- * @phys_erase_shift: [INTERN] number of address bits in a physical eraseblock
- * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
- * @chip_shift: [INTERN] number of address bits in one chip
- * @datbuf: [INTERN] internal buffer for one page + oob
- * @oobbuf: [INTERN] oob buffer for one eraseblock
- * @oobdirty: [INTERN] indicates that oob_buf must be reinitialized
- * @data_poi: [INTERN] pointer to a data buffer
- * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about
- * special functionality. See the defines for further explanation
- * @badblockpos: [INTERN] position of the bad block marker in the oob area
- * @numchips: [INTERN] number of physical chips
- * @chipsize: [INTERN] the size of one chip for multichip arrays
- * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1
- * @pagebuf: [INTERN] holds the pagenumber which is currently in data_buf
- * @ecclayout: [REPLACEABLE] the default ecc placement scheme
- * @bbt: [INTERN] bad block table pointer
- * @bbt_td: [REPLACEABLE] bad block table descriptor for flash lookup
- * @bbt_md: [REPLACEABLE] bad block table mirror descriptor
- * @badblock_pattern: [REPLACEABLE] bad block scan pattern used for initial bad block scan
- * @controller: [REPLACEABLE] a pointer to a hardware controller structure
- * which is shared among multiple independend devices
- * @priv: [OPTIONAL] pointer to private chip date
- * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks
- * (determine if errors are correctable)
- */
-
-struct nand_chip {
- void __iomem *IO_ADDR_R;
- void __iomem *IO_ADDR_W;
-
- uint8_t (*read_byte)(struct mtd_info *mtd);
- u16 (*read_word)(struct mtd_info *mtd);
- void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
- void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len);
- int (*verify_buf)(struct mtd_info *mtd, const uint8_t *buf, int len);
- void (*select_chip)(struct mtd_info *mtd, int chip);
- int (*block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip);
- int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
- void (*cmd_ctrl)(struct mtd_info *mtd, int dat,
- unsigned int ctrl);
- int (*dev_ready)(struct mtd_info *mtd);
- void (*cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr);
- int (*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
- void (*erase_cmd)(struct mtd_info *mtd, int page);
- int (*scan_bbt)(struct mtd_info *mtd);
- int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page);
-
- int chip_delay;
- unsigned int options;
-
- int page_shift;
- int phys_erase_shift;
- int bbt_erase_shift;
- int chip_shift;
- int numchips;
- unsigned long chipsize;
- int pagemask;
- int pagebuf;
- int badblockpos;
-
- nand_state_t state;
-
- uint8_t *oob_poi;
- struct nand_hw_control *controller;
- struct nand_ecclayout *ecclayout;
-
- struct nand_ecc_ctrl ecc;
- struct nand_buffers buffers;
- struct nand_hw_control hwcontrol;
-
- struct mtd_oob_ops ops;
-
- uint8_t *bbt;
- struct nand_bbt_descr *bbt_td;
- struct nand_bbt_descr *bbt_md;
-
- struct nand_bbt_descr *badblock_pattern;
-
- void *priv;
-};
-
-/*
- * NAND Flash Manufacturer ID Codes
- */
-#define NAND_MFR_TOSHIBA 0x98
-#define NAND_MFR_SAMSUNG 0xec
-#define NAND_MFR_FUJITSU 0x04
-#define NAND_MFR_NATIONAL 0x8f
-#define NAND_MFR_RENESAS 0x07
-#define NAND_MFR_STMICRO 0x20
-#define NAND_MFR_HYNIX 0xad
-
-/**
- * struct nand_flash_dev - NAND Flash Device ID Structure
- * @name: Identify the device type
- * @id: device ID code
- * @pagesize: Pagesize in bytes. Either 256 or 512 or 0
- * If the pagesize is 0, then the real pagesize
- * and the eraseize are determined from the
- * extended id bytes in the chip
- * @erasesize: Size of an erase block in the flash device.
- * @chipsize: Total chipsize in Mega Bytes
- * @options: Bitfield to store chip relevant options
- */
-struct nand_flash_dev {
- char *name;
- int id;
- unsigned long pagesize;
- unsigned long chipsize;
- unsigned long erasesize;
- unsigned long options;
-};
-
-/**
- * struct nand_manufacturers - NAND Flash Manufacturer ID Structure
- * @name: Manufacturer name
- * @id: manufacturer ID code of device.
-*/
-struct nand_manufacturers {
- int id;
- char * name;
-};
-
-extern struct nand_flash_dev nand_flash_ids[];
-extern struct nand_manufacturers nand_manuf_ids[];
-
-/**
- * struct nand_bbt_descr - bad block table descriptor
- * @options: options for this descriptor
- * @pages: the page(s) where we find the bbt, used with option BBT_ABSPAGE
- * when bbt is searched, then we store the found bbts pages here.
- * Its an array and supports up to 8 chips now
- * @offs: offset of the pattern in the oob area of the page
- * @veroffs: offset of the bbt version counter in the oob are of the page
- * @version: version read from the bbt page during scan
- * @len: length of the pattern, if 0 no pattern check is performed
- * @maxblocks: maximum number of blocks to search for a bbt. This number of
- * blocks is reserved at the end of the device where the tables are
- * written.
- * @reserved_block_code: if non-0, this pattern denotes a reserved (rather than
- * bad) block in the stored bbt
- * @pattern: pattern to identify bad block table or factory marked good /
- * bad blocks, can be NULL, if len = 0
- *
- * Descriptor for the bad block table marker and the descriptor for the
- * pattern which identifies good and bad blocks. The assumption is made
- * that the pattern and the version count are always located in the oob area
- * of the first block.
- */
-struct nand_bbt_descr {
- int options;
- int pages[NAND_MAX_CHIPS];
- int offs;
- int veroffs;
- uint8_t version[NAND_MAX_CHIPS];
- int len;
- int maxblocks;
- int reserved_block_code;
- uint8_t *pattern;
-};
-
-/* Options for the bad block table descriptors */
-
-/* The number of bits used per block in the bbt on the device */
-#define NAND_BBT_NRBITS_MSK 0x0000000F
-#define NAND_BBT_1BIT 0x00000001
-#define NAND_BBT_2BIT 0x00000002
-#define NAND_BBT_4BIT 0x00000004
-#define NAND_BBT_8BIT 0x00000008
-/* The bad block table is in the last good block of the device */
-#define NAND_BBT_LASTBLOCK 0x00000010
-/* The bbt is at the given page, else we must scan for the bbt */
-#define NAND_BBT_ABSPAGE 0x00000020
-/* The bbt is at the given page, else we must scan for the bbt */
-#define NAND_BBT_SEARCH 0x00000040
-/* bbt is stored per chip on multichip devices */
-#define NAND_BBT_PERCHIP 0x00000080
-/* bbt has a version counter at offset veroffs */
-#define NAND_BBT_VERSION 0x00000100
-/* Create a bbt if none axists */
-#define NAND_BBT_CREATE 0x00000200
-/* Search good / bad pattern through all pages of a block */
-#define NAND_BBT_SCANALLPAGES 0x00000400
-/* Scan block empty during good / bad block scan */
-#define NAND_BBT_SCANEMPTY 0x00000800
-/* Write bbt if neccecary */
-#define NAND_BBT_WRITE 0x00001000
-/* Read and write back block contents when writing bbt */
-#define NAND_BBT_SAVECONTENT 0x00002000
-/* Search good / bad pattern on the first and the second page */
-#define NAND_BBT_SCAN2NDPAGE 0x00004000
-
-/* The maximum number of blocks to scan for a bbt */
-#define NAND_BBT_SCAN_MAXBLOCKS 4
-
-extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
-extern int nand_update_bbt(struct mtd_info *mtd, loff_t offs);
-extern int nand_default_bbt(struct mtd_info *mtd);
-extern int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt);
-extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
- int allowbbt);
-extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
- size_t * retlen, uint8_t * buf);
-
-/*
-* Constants for oob configuration
-*/
-#define NAND_SMALL_BADBLOCK_POS 5
-#define NAND_LARGE_BADBLOCK_POS 0
-
-/**
- * struct platform_nand_chip - chip level device structure
- * @nr_chips: max. number of chips to scan for
- * @chip_offset: chip number offset
- * @nr_partitions: number of partitions pointed to by partitions (or zero)
- * @partitions: mtd partition list
- * @chip_delay: R/B delay value in us
- * @options: Option flags, e.g. 16bit buswidth
- * @ecclayout: ecc layout info structure
- * @priv: hardware controller specific settings
- */
-struct platform_nand_chip {
- int nr_chips;
- int chip_offset;
- int nr_partitions;
- struct mtd_partition *partitions;
- struct nand_ecclayout *ecclayout;
- int chip_delay;
- unsigned int options;
- void *priv;
-};
-
-/**
- * struct platform_nand_ctrl - controller level device structure
- * @hwcontrol: platform specific hardware control structure
- * @dev_ready: platform specific function to read ready/busy pin
- * @select_chip: platform specific chip select function
- * @priv: private data to transport driver specific settings
- *
- * All fields are optional and depend on the hardware driver requirements
- */
-struct platform_nand_ctrl {
- void (*hwcontrol)(struct mtd_info *mtd, int cmd);
- int (*dev_ready)(struct mtd_info *mtd);
- void (*select_chip)(struct mtd_info *mtd, int chip);
- void *priv;
-};
-
-/* Some helpers to access the data structures */
-static inline
-struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
-{
- struct nand_chip *chip = mtd->priv;
-
- return chip->priv;
-}
-
-#endif /* __LINUX_MTD_NAND_H */
diff --git a/original/linux/mtd/nand_ecc.h b/original/linux/mtd/nand_ecc.h
deleted file mode 100644
index 12c5bc3..0000000
--- a/original/linux/mtd/nand_ecc.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * drivers/mtd/nand_ecc.h
- *
- * Copyright (C) 2000 Steven J. Hill (sjhill@realitydiluted.com)
- *
- * $Id: nand_ecc.h,v 1.4 2004/06/17 02:35:02 dbrown Exp $
- *
- * 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.
- *
- * This file is the header for the ECC algorithm.
- */
-
-#ifndef __MTD_NAND_ECC_H__
-#define __MTD_NAND_ECC_H__
-
-struct mtd_info;
-
-/*
- * Calculate 3 byte ECC code for 256 byte block
- */
-int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code);
-
-/*
- * Detect and correct a 1 bit error for 256 byte block
- */
-int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc);
-
-#endif /* __MTD_NAND_ECC_H__ */
diff --git a/original/linux/mtd/nftl.h b/original/linux/mtd/nftl.h
deleted file mode 100644
index bcf2fb3..0000000
--- a/original/linux/mtd/nftl.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * $Id: nftl.h,v 1.16 2004/06/30 14:49:00 dbrown Exp $
- *
- * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
- */
-
-#ifndef __MTD_NFTL_H__
-#define __MTD_NFTL_H__
-
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/blktrans.h>
-
-#include <mtd/nftl-user.h>
-
-/* these info are used in ReplUnitTable */
-#define BLOCK_NIL 0xffff /* last block of a chain */
-#define BLOCK_FREE 0xfffe /* free block */
-#define BLOCK_NOTEXPLORED 0xfffd /* non explored block, only used during mounting */
-#define BLOCK_RESERVED 0xfffc /* bios block or bad block */
-
-struct NFTLrecord {
- struct mtd_blktrans_dev mbd;
- __u16 MediaUnit, SpareMediaUnit;
- __u32 EraseSize;
- struct NFTLMediaHeader MediaHdr;
- int usecount;
- unsigned char heads;
- unsigned char sectors;
- unsigned short cylinders;
- __u16 numvunits;
- __u16 lastEUN; /* should be suppressed */
- __u16 numfreeEUNs;
- __u16 LastFreeEUN; /* To speed up finding a free EUN */
- int head,sect,cyl;
- __u16 *EUNtable; /* [numvunits]: First EUN for each virtual unit */
- __u16 *ReplUnitTable; /* [numEUNs]: ReplUnitNumber for each */
- unsigned int nb_blocks; /* number of physical blocks */
- unsigned int nb_boot_blocks; /* number of blocks used by the bios */
- struct erase_info instr;
- struct nand_ecclayout oobinfo;
-};
-
-int NFTL_mount(struct NFTLrecord *s);
-int NFTL_formatblock(struct NFTLrecord *s, int block);
-
-#ifndef NFTL_MAJOR
-#define NFTL_MAJOR 93
-#endif
-
-#define MAX_NFTLS 16
-#define MAX_SECTORS_PER_UNIT 64
-#define NFTL_PARTN_BITS 4
-
-#endif /* __MTD_NFTL_H__ */
diff --git a/original/linux/mtd/onenand_regs.h b/original/linux/mtd/onenand_regs.h
deleted file mode 100644
index 4a72818..0000000
--- a/original/linux/mtd/onenand_regs.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * linux/include/linux/mtd/onenand_regs.h
- *
- * OneNAND Register header file
- *
- * Copyright (C) 2005 Samsung Electronics
- *
- * 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.
- */
-
-#ifndef __ONENAND_REG_H
-#define __ONENAND_REG_H
-
-/* Memory Address Map Translation (Word order) */
-#define ONENAND_MEMORY_MAP(x) ((x) << 1)
-
-/*
- * External BufferRAM area
- */
-#define ONENAND_BOOTRAM ONENAND_MEMORY_MAP(0x0000)
-#define ONENAND_DATARAM ONENAND_MEMORY_MAP(0x0200)
-#define ONENAND_SPARERAM ONENAND_MEMORY_MAP(0x8010)
-
-/*
- * OneNAND Registers
- */
-#define ONENAND_REG_MANUFACTURER_ID ONENAND_MEMORY_MAP(0xF000)
-#define ONENAND_REG_DEVICE_ID ONENAND_MEMORY_MAP(0xF001)
-#define ONENAND_REG_VERSION_ID ONENAND_MEMORY_MAP(0xF002)
-#define ONENAND_REG_DATA_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF003)
-#define ONENAND_REG_BOOT_BUFFER_SIZE ONENAND_MEMORY_MAP(0xF004)
-#define ONENAND_REG_NUM_BUFFERS ONENAND_MEMORY_MAP(0xF005)
-#define ONENAND_REG_TECHNOLOGY ONENAND_MEMORY_MAP(0xF006)
-
-#define ONENAND_REG_START_ADDRESS1 ONENAND_MEMORY_MAP(0xF100)
-#define ONENAND_REG_START_ADDRESS2 ONENAND_MEMORY_MAP(0xF101)
-#define ONENAND_REG_START_ADDRESS3 ONENAND_MEMORY_MAP(0xF102)
-#define ONENAND_REG_START_ADDRESS4 ONENAND_MEMORY_MAP(0xF103)
-#define ONENAND_REG_START_ADDRESS5 ONENAND_MEMORY_MAP(0xF104)
-#define ONENAND_REG_START_ADDRESS6 ONENAND_MEMORY_MAP(0xF105)
-#define ONENAND_REG_START_ADDRESS7 ONENAND_MEMORY_MAP(0xF106)
-#define ONENAND_REG_START_ADDRESS8 ONENAND_MEMORY_MAP(0xF107)
-
-#define ONENAND_REG_START_BUFFER ONENAND_MEMORY_MAP(0xF200)
-#define ONENAND_REG_COMMAND ONENAND_MEMORY_MAP(0xF220)
-#define ONENAND_REG_SYS_CFG1 ONENAND_MEMORY_MAP(0xF221)
-#define ONENAND_REG_SYS_CFG2 ONENAND_MEMORY_MAP(0xF222)
-#define ONENAND_REG_CTRL_STATUS ONENAND_MEMORY_MAP(0xF240)
-#define ONENAND_REG_INTERRUPT ONENAND_MEMORY_MAP(0xF241)
-#define ONENAND_REG_START_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24C)
-#define ONENAND_REG_END_BLOCK_ADDRESS ONENAND_MEMORY_MAP(0xF24D)
-#define ONENAND_REG_WP_STATUS ONENAND_MEMORY_MAP(0xF24E)
-
-#define ONENAND_REG_ECC_STATUS ONENAND_MEMORY_MAP(0xFF00)
-#define ONENAND_REG_ECC_M0 ONENAND_MEMORY_MAP(0xFF01)
-#define ONENAND_REG_ECC_S0 ONENAND_MEMORY_MAP(0xFF02)
-#define ONENAND_REG_ECC_M1 ONENAND_MEMORY_MAP(0xFF03)
-#define ONENAND_REG_ECC_S1 ONENAND_MEMORY_MAP(0xFF04)
-#define ONENAND_REG_ECC_M2 ONENAND_MEMORY_MAP(0xFF05)
-#define ONENAND_REG_ECC_S2 ONENAND_MEMORY_MAP(0xFF06)
-#define ONENAND_REG_ECC_M3 ONENAND_MEMORY_MAP(0xFF07)
-#define ONENAND_REG_ECC_S3 ONENAND_MEMORY_MAP(0xFF08)
-
-/*
- * Device ID Register F001h (R)
- */
-#define ONENAND_DEVICE_DENSITY_SHIFT (4)
-#define ONENAND_DEVICE_IS_DDP (1 << 3)
-#define ONENAND_DEVICE_IS_DEMUX (1 << 2)
-#define ONENAND_DEVICE_VCC_MASK (0x3)
-
-#define ONENAND_DEVICE_DENSITY_512Mb (0x002)
-
-/*
- * Version ID Register F002h (R)
- */
-#define ONENAND_VERSION_PROCESS_SHIFT (8)
-
-/*
- * Start Address 1 F100h (R/W)
- */
-#define ONENAND_DDP_SHIFT (15)
-
-/*
- * Start Address 8 F107h (R/W)
- */
-#define ONENAND_FPA_MASK (0x3f)
-#define ONENAND_FPA_SHIFT (2)
-#define ONENAND_FSA_MASK (0x03)
-
-/*
- * Start Buffer Register F200h (R/W)
- */
-#define ONENAND_BSA_MASK (0x03)
-#define ONENAND_BSA_SHIFT (8)
-#define ONENAND_BSA_BOOTRAM (0 << 2)
-#define ONENAND_BSA_DATARAM0 (2 << 2)
-#define ONENAND_BSA_DATARAM1 (3 << 2)
-#define ONENAND_BSC_MASK (0x03)
-
-/*
- * Command Register F220h (R/W)
- */
-#define ONENAND_CMD_READ (0x00)
-#define ONENAND_CMD_READOOB (0x13)
-#define ONENAND_CMD_PROG (0x80)
-#define ONENAND_CMD_PROGOOB (0x1A)
-#define ONENAND_CMD_UNLOCK (0x23)
-#define ONENAND_CMD_LOCK (0x2A)
-#define ONENAND_CMD_LOCK_TIGHT (0x2C)
-#define ONENAND_CMD_ERASE (0x94)
-#define ONENAND_CMD_RESET (0xF0)
-#define ONENAND_CMD_OTP_ACCESS (0x65)
-#define ONENAND_CMD_READID (0x90)
-
-/* NOTE: Those are not *REAL* commands */
-#define ONENAND_CMD_BUFFERRAM (0x1978)
-
-/*
- * System Configuration 1 Register F221h (R, R/W)
- */
-#define ONENAND_SYS_CFG1_SYNC_READ (1 << 15)
-#define ONENAND_SYS_CFG1_BRL_7 (7 << 12)
-#define ONENAND_SYS_CFG1_BRL_6 (6 << 12)
-#define ONENAND_SYS_CFG1_BRL_5 (5 << 12)
-#define ONENAND_SYS_CFG1_BRL_4 (4 << 12)
-#define ONENAND_SYS_CFG1_BRL_3 (3 << 12)
-#define ONENAND_SYS_CFG1_BRL_10 (2 << 12)
-#define ONENAND_SYS_CFG1_BRL_9 (1 << 12)
-#define ONENAND_SYS_CFG1_BRL_8 (0 << 12)
-#define ONENAND_SYS_CFG1_BRL_SHIFT (12)
-#define ONENAND_SYS_CFG1_BL_32 (4 << 9)
-#define ONENAND_SYS_CFG1_BL_16 (3 << 9)
-#define ONENAND_SYS_CFG1_BL_8 (2 << 9)
-#define ONENAND_SYS_CFG1_BL_4 (1 << 9)
-#define ONENAND_SYS_CFG1_BL_CONT (0 << 9)
-#define ONENAND_SYS_CFG1_BL_SHIFT (9)
-#define ONENAND_SYS_CFG1_NO_ECC (1 << 8)
-#define ONENAND_SYS_CFG1_RDY (1 << 7)
-#define ONENAND_SYS_CFG1_INT (1 << 6)
-#define ONENAND_SYS_CFG1_IOBE (1 << 5)
-#define ONENAND_SYS_CFG1_RDY_CONF (1 << 4)
-
-/*
- * Controller Status Register F240h (R)
- */
-#define ONENAND_CTRL_ONGO (1 << 15)
-#define ONENAND_CTRL_LOCK (1 << 14)
-#define ONENAND_CTRL_LOAD (1 << 13)
-#define ONENAND_CTRL_PROGRAM (1 << 12)
-#define ONENAND_CTRL_ERASE (1 << 11)
-#define ONENAND_CTRL_ERROR (1 << 10)
-#define ONENAND_CTRL_RSTB (1 << 7)
-#define ONENAND_CTRL_OTP_L (1 << 6)
-#define ONENAND_CTRL_OTP_BL (1 << 5)
-
-/*
- * Interrupt Status Register F241h (R)
- */
-#define ONENAND_INT_MASTER (1 << 15)
-#define ONENAND_INT_READ (1 << 7)
-#define ONENAND_INT_WRITE (1 << 6)
-#define ONENAND_INT_ERASE (1 << 5)
-#define ONENAND_INT_RESET (1 << 4)
-#define ONENAND_INT_CLEAR (0 << 0)
-
-/*
- * NAND Flash Write Protection Status Register F24Eh (R)
- */
-#define ONENAND_WP_US (1 << 2)
-#define ONENAND_WP_LS (1 << 1)
-#define ONENAND_WP_LTS (1 << 0)
-
-/*
- * ECC Status Reigser FF00h (R)
- */
-#define ONENAND_ECC_1BIT (1 << 0)
-#define ONENAND_ECC_2BIT (1 << 1)
-#define ONENAND_ECC_2BIT_ALL (0xAAAA)
-
-/*
- * One-Time Programmable (OTP)
- */
-#define ONENAND_OTP_LOCK_OFFSET (14)
-
-#endif /* __ONENAND_REG_H */
diff --git a/original/linux/mtd/partitions.h b/original/linux/mtd/partitions.h
deleted file mode 100644
index da6b3d6..0000000
--- a/original/linux/mtd/partitions.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * MTD partitioning layer definitions
- *
- * (C) 2000 Nicolas Pitre <nico@cam.org>
- *
- * This code is GPL
- *
- * $Id: partitions.h,v 1.17 2005/11/07 11:14:55 gleixner Exp $
- */
-
-#ifndef MTD_PARTITIONS_H
-#define MTD_PARTITIONS_H
-
-#include <linux/types.h>
-
-
-/*
- * Partition definition structure:
- *
- * An array of struct partition is passed along with a MTD object to
- * add_mtd_partitions() to create them.
- *
- * For each partition, these fields are available:
- * name: string that will be used to label the partition's MTD device.
- * size: the partition size; if defined as MTDPART_SIZ_FULL, the partition
- * will extend to the end of the master MTD device.
- * offset: absolute starting position within the master MTD device; if
- * defined as MTDPART_OFS_APPEND, the partition will start where the
- * previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block.
- * mask_flags: contains flags that have to be masked (removed) from the
- * master MTD flag set for the corresponding MTD partition.
- * For example, to force a read-only partition, simply adding
- * MTD_WRITEABLE to the mask_flags will do the trick.
- *
- * Note: writeable partitions require their size and offset be
- * erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK).
- */
-
-struct mtd_partition {
- char *name; /* identifier string */
- u_int32_t size; /* partition size */
- u_int32_t offset; /* offset within the master MTD space */
- u_int32_t mask_flags; /* master MTD flags to mask out for this partition */
- struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/
- struct mtd_info **mtdp; /* pointer to store the MTD object */
-};
-
-#define MTDPART_OFS_NXTBLK (-2)
-#define MTDPART_OFS_APPEND (-1)
-#define MTDPART_SIZ_FULL (0)
-
-
-int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
-int del_mtd_partitions(struct mtd_info *);
-
-/*
- * Functions dealing with the various ways of partitioning the space
- */
-
-struct mtd_part_parser {
- struct list_head list;
- struct module *owner;
- const char *name;
- int (*parse_fn)(struct mtd_info *, struct mtd_partition **, unsigned long);
-};
-
-extern int register_mtd_parser(struct mtd_part_parser *parser);
-extern int deregister_mtd_parser(struct mtd_part_parser *parser);
-extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
- struct mtd_partition **pparts, unsigned long origin);
-
-#define put_partition_parser(p) do { module_put((p)->owner); } while(0)
-
-#endif
-
diff --git a/original/linux/mtio.h b/original/linux/mtio.h
deleted file mode 100644
index 8c66151..0000000
--- a/original/linux/mtio.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * linux/mtio.h header file for Linux. Written by H. Bergman
- *
- * Modified for special ioctls provided by zftape in September 1997
- * by C.-J. Heine.
- */
-
-#ifndef _LINUX_MTIO_H
-#define _LINUX_MTIO_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <linux/qic117.h>
-
-/*
- * Structures and definitions for mag tape io control commands
- */
-
-/* structure for MTIOCTOP - mag tape op command */
-struct mtop {
- short mt_op; /* operations defined below */
- int mt_count; /* how many of them */
-};
-
-/* Magnetic Tape operations [Not all operations supported by all drivers]: */
-#define MTRESET 0 /* +reset drive in case of problems */
-#define MTFSF 1 /* forward space over FileMark,
- * position at first record of next file
- */
-#define MTBSF 2 /* backward space FileMark (position before FM) */
-#define MTFSR 3 /* forward space record */
-#define MTBSR 4 /* backward space record */
-#define MTWEOF 5 /* write an end-of-file record (mark) */
-#define MTREW 6 /* rewind */
-#define MTOFFL 7 /* rewind and put the drive offline (eject?) */
-#define MTNOP 8 /* no op, set status only (read with MTIOCGET) */
-#define MTRETEN 9 /* retension tape */
-#define MTBSFM 10 /* +backward space FileMark, position at FM */
-#define MTFSFM 11 /* +forward space FileMark, position at FM */
-#define MTEOM 12 /* goto end of recorded media (for appending files).
- * MTEOM positions after the last FM, ready for
- * appending another file.
- */
-#define MTERASE 13 /* erase tape -- be careful! */
-
-#define MTRAS1 14 /* run self test 1 (nondestructive) */
-#define MTRAS2 15 /* run self test 2 (destructive) */
-#define MTRAS3 16 /* reserved for self test 3 */
-
-#define MTSETBLK 20 /* set block length (SCSI) */
-#define MTSETDENSITY 21 /* set tape density (SCSI) */
-#define MTSEEK 22 /* seek to block (Tandberg, etc.) */
-#define MTTELL 23 /* tell block (Tandberg, etc.) */
-#define MTSETDRVBUFFER 24 /* set the drive buffering according to SCSI-2 */
- /* ordinary buffered operation with code 1 */
-#define MTFSS 25 /* space forward over setmarks */
-#define MTBSS 26 /* space backward over setmarks */
-#define MTWSM 27 /* write setmarks */
-
-#define MTLOCK 28 /* lock the drive door */
-#define MTUNLOCK 29 /* unlock the drive door */
-#define MTLOAD 30 /* execute the SCSI load command */
-#define MTUNLOAD 31 /* execute the SCSI unload command */
-#define MTCOMPRESSION 32/* control compression with SCSI mode page 15 */
-#define MTSETPART 33 /* Change the active tape partition */
-#define MTMKPART 34 /* Format the tape with one or two partitions */
-
-/* structure for MTIOCGET - mag tape get status command */
-
-struct mtget {
- long mt_type; /* type of magtape device */
- long mt_resid; /* residual count: (not sure)
- * number of bytes ignored, or
- * number of files not skipped, or
- * number of records not skipped.
- */
- /* the following registers are device dependent */
- long mt_dsreg; /* status register */
- long mt_gstat; /* generic (device independent) status */
- long mt_erreg; /* error register */
- /* The next two fields are not always used */
- __kernel_daddr_t mt_fileno; /* number of current file on tape */
- __kernel_daddr_t mt_blkno; /* current block number */
-};
-
-
-
-/*
- * Constants for mt_type. Not all of these are supported,
- * and these are not all of the ones that are supported.
- */
-#define MT_ISUNKNOWN 0x01
-#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer */
-#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02 */
-#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02? */
-#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?) */
-#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24 */
-#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02 */
-#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L */
-#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L */
-#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller */
-#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features */
-#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24 */
-#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive, Teac DC-1 card (Wangtek type) */
-#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40) */
-#define MT_ISDDS1 0x51 /* DDS device without partitions */
-#define MT_ISDDS2 0x52 /* DDS device with partitions */
-#define MT_ISONSTREAM_SC 0x61 /* OnStream SCSI tape drives (SC-x0)
- and SCSI emulated (DI, DP, USB) */
-#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit */
-#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit */
-
-/* QIC-40/80/3010/3020 ftape supported drives.
- * 20bit vendor ID + 0x800000 (see ftape-vendors.h)
- */
-#define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */
-#define MT_ISFTAPE_FLAG 0x800000
-
-struct mt_tape_info {
- long t_type; /* device type id (mt_type) */
- char *t_name; /* descriptive name */
-};
-
-#define MT_TAPE_INFO { \
- {MT_ISUNKNOWN, "Unknown type of tape device"}, \
- {MT_ISQIC02, "Generic QIC-02 tape streamer"}, \
- {MT_ISWT5150, "Wangtek 5150, QIC-150"}, \
- {MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \
- {MT_ISCMSJ500, "CMS Jumbo 500"}, \
- {MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \
- {MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \
- {MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \
- {MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \
- {MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \
- {MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \
- {MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \
- {MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \
- {MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \
- {MT_ISONSTREAM_SC, "OnStream SC-, DI-, DP-, or USB tape drive"}, \
- {MT_ISSCSI1, "Generic SCSI-1 tape"}, \
- {MT_ISSCSI2, "Generic SCSI-2 tape"}, \
- {0, NULL} \
-}
-
-
-/* structure for MTIOCPOS - mag tape get position command */
-
-struct mtpos {
- long mt_blkno; /* current block number */
-};
-
-
-/* structure for MTIOCVOLINFO, query information about the volume
- * currently positioned at (zftape)
- */
-struct mtvolinfo {
- unsigned int mt_volno; /* vol-number */
- unsigned int mt_blksz; /* blocksize used when recording */
- unsigned int mt_rawsize; /* raw tape space consumed, in kb */
- unsigned int mt_size; /* volume size after decompression, in kb */
- unsigned int mt_cmpr:1; /* this volume has been compressed */
-};
-
-/* raw access to a floppy drive, read and write an arbitrary segment.
- * For ftape/zftape to support formatting etc.
- */
-#define MT_FT_RD_SINGLE 0
-#define MT_FT_RD_AHEAD 1
-#define MT_FT_WR_ASYNC 0 /* start tape only when all buffers are full */
-#define MT_FT_WR_MULTI 1 /* start tape, continue until buffers are empty */
-#define MT_FT_WR_SINGLE 2 /* write a single segment and stop afterwards */
-#define MT_FT_WR_DELETE 3 /* write deleted data marks, one segment at time */
-
-struct mtftseg
-{
- unsigned mt_segno; /* the segment to read or write */
- unsigned mt_mode; /* modes for read/write (sync/async etc.) */
- int mt_result; /* result of r/w request, not of the ioctl */
- void __user *mt_data; /* User space buffer: must be 29kb */
-};
-
-/* get tape capacity (ftape/zftape)
- */
-struct mttapesize {
- unsigned long mt_capacity; /* entire, uncompressed capacity
- * of a cartridge
- */
- unsigned long mt_used; /* what has been used so far, raw
- * uncompressed amount
- */
-};
-
-/* possible values of the ftfmt_op field
- */
-#define FTFMT_SET_PARMS 1 /* set software parms */
-#define FTFMT_GET_PARMS 2 /* get software parms */
-#define FTFMT_FORMAT_TRACK 3 /* start formatting a tape track */
-#define FTFMT_STATUS 4 /* monitor formatting a tape track */
-#define FTFMT_VERIFY 5 /* verify the given segment */
-
-struct ftfmtparms {
- unsigned char ft_qicstd; /* QIC-40/QIC-80/QIC-3010/QIC-3020 */
- unsigned char ft_fmtcode; /* Refer to the QIC specs */
- unsigned char ft_fhm; /* floppy head max */
- unsigned char ft_ftm; /* floppy track max */
- unsigned short ft_spt; /* segments per track */
- unsigned short ft_tpc; /* tracks per cartridge */
-};
-
-struct ftfmttrack {
- unsigned int ft_track; /* track to format */
- unsigned char ft_gap3; /* size of gap3, for FORMAT_TRK */
-};
-
-struct ftfmtstatus {
- unsigned int ft_segment; /* segment currently being formatted */
-};
-
-struct ftfmtverify {
- unsigned int ft_segment; /* segment to verify */
- unsigned long ft_bsm; /* bsm as result of VERIFY cmd */
-};
-
-struct mtftformat {
- unsigned int fmt_op; /* operation to perform */
- union fmt_arg {
- struct ftfmtparms fmt_parms; /* format parameters */
- struct ftfmttrack fmt_track; /* ctrl while formatting */
- struct ftfmtstatus fmt_status;
- struct ftfmtverify fmt_verify; /* for verifying */
- } fmt_arg;
-};
-
-struct mtftcmd {
- unsigned int ft_wait_before; /* timeout to wait for drive to get ready
- * before command is sent. Milliseconds
- */
- qic117_cmd_t ft_cmd; /* command to send */
- unsigned char ft_parm_cnt; /* zero: no parm is sent. */
- unsigned char ft_parms[3]; /* parameter(s) to send to
- * the drive. The parms are nibbles
- * driver sends cmd + 2 step pulses */
- unsigned int ft_result_bits; /* if non zero, number of bits
- * returned by the tape drive
- */
- unsigned int ft_result; /* the result returned by the tape drive*/
- unsigned int ft_wait_after; /* timeout to wait for drive to get ready
- * after command is sent. 0: don't wait */
- int ft_status; /* status returned by ready wait
- * undefined if timeout was 0.
- */
- int ft_error; /* error code if error status was set by
- * command
- */
-};
-
-/* mag tape io control commands */
-#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
-#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
-#define MTIOCPOS _IOR('m', 3, struct mtpos) /* get tape position */
-
-/* The next two are used by the QIC-02 driver for runtime reconfiguration.
- * See tpqic02.h for struct mtconfiginfo.
- */
-#define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* get tape config */
-#define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* set tape config */
-
-/* the next six are used by the floppy ftape drivers and its frontends
- * sorry, but MTIOCTOP commands are write only.
- */
-#define MTIOCRDFTSEG _IOWR('m', 6, struct mtftseg) /* read a segment */
-#define MTIOCWRFTSEG _IOWR('m', 7, struct mtftseg) /* write a segment */
-#define MTIOCVOLINFO _IOR('m', 8, struct mtvolinfo) /* info about volume */
-#define MTIOCGETSIZE _IOR('m', 9, struct mttapesize)/* get cartridge size*/
-#define MTIOCFTFORMAT _IOWR('m', 10, struct mtftformat) /* format ftape */
-#define MTIOCFTCMD _IOWR('m', 11, struct mtftcmd) /* send QIC-117 cmd */
-
-/* Generic Mag Tape (device independent) status macros for examining
- * mt_gstat -- HP-UX compatible.
- * There is room for more generic status bits here, but I don't
- * know which of them are reserved. At least three or so should
- * be added to make this really useful.
- */
-#define GMT_EOF(x) ((x) & 0x80000000)
-#define GMT_BOT(x) ((x) & 0x40000000)
-#define GMT_EOT(x) ((x) & 0x20000000)
-#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
-#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
-#define GMT_WR_PROT(x) ((x) & 0x04000000)
-/* #define GMT_ ? ((x) & 0x02000000) */
-#define GMT_ONLINE(x) ((x) & 0x01000000)
-#define GMT_D_6250(x) ((x) & 0x00800000)
-#define GMT_D_1600(x) ((x) & 0x00400000)
-#define GMT_D_800(x) ((x) & 0x00200000)
-/* #define GMT_ ? ((x) & 0x00100000) */
-/* #define GMT_ ? ((x) & 0x00080000) */
-#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* door open (no tape) */
-/* #define GMT_ ? ((x) & 0x00020000) */
-#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* immediate report mode */
-#define GMT_CLN(x) ((x) & 0x00008000) /* cleaning requested */
-/* 15 generic status bits unused */
-
-
-/* SCSI-tape specific definitions */
-/* Bitfield shifts in the status */
-#define MT_ST_BLKSIZE_SHIFT 0
-#define MT_ST_BLKSIZE_MASK 0xffffff
-#define MT_ST_DENSITY_SHIFT 24
-#define MT_ST_DENSITY_MASK 0xff000000
-
-#define MT_ST_SOFTERR_SHIFT 0
-#define MT_ST_SOFTERR_MASK 0xffff
-
-/* Bitfields for the MTSETDRVBUFFER ioctl */
-#define MT_ST_OPTIONS 0xf0000000
-#define MT_ST_BOOLEANS 0x10000000
-#define MT_ST_SETBOOLEANS 0x30000000
-#define MT_ST_CLEARBOOLEANS 0x40000000
-#define MT_ST_WRITE_THRESHOLD 0x20000000
-#define MT_ST_DEF_BLKSIZE 0x50000000
-#define MT_ST_DEF_OPTIONS 0x60000000
-#define MT_ST_TIMEOUTS 0x70000000
-#define MT_ST_SET_TIMEOUT (MT_ST_TIMEOUTS | 0x000000)
-#define MT_ST_SET_LONG_TIMEOUT (MT_ST_TIMEOUTS | 0x100000)
-#define MT_ST_SET_CLN 0x80000000
-
-#define MT_ST_BUFFER_WRITES 0x1
-#define MT_ST_ASYNC_WRITES 0x2
-#define MT_ST_READ_AHEAD 0x4
-#define MT_ST_DEBUGGING 0x8
-#define MT_ST_TWO_FM 0x10
-#define MT_ST_FAST_MTEOM 0x20
-#define MT_ST_AUTO_LOCK 0x40
-#define MT_ST_DEF_WRITES 0x80
-#define MT_ST_CAN_BSR 0x100
-#define MT_ST_NO_BLKLIMS 0x200
-#define MT_ST_CAN_PARTITIONS 0x400
-#define MT_ST_SCSI2LOGICAL 0x800
-#define MT_ST_SYSV 0x1000
-#define MT_ST_NOWAIT 0x2000
-
-/* The mode parameters to be controlled. Parameter chosen with bits 20-28 */
-#define MT_ST_CLEAR_DEFAULT 0xfffff
-#define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000)
-#define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000)
-#define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000)
-
-/* The offset for the arguments for the special HP changer load command. */
-#define MT_ST_HPLOADER_OFFSET 10000
-
-#endif /* _LINUX_MTIO_H */
diff --git a/original/linux/mutex-debug.h b/original/linux/mutex-debug.h
deleted file mode 100644
index 2537285..0000000
--- a/original/linux/mutex-debug.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __LINUX_MUTEX_DEBUG_H
-#define __LINUX_MUTEX_DEBUG_H
-
-#include <linux/linkage.h>
-#include <linux/lockdep.h>
-
-/*
- * Mutexes - debugging helpers:
- */
-
-#define __DEBUG_MUTEX_INITIALIZER(lockname) \
- , .magic = &lockname
-
-#define mutex_init(mutex) \
-do { \
- static struct lock_class_key __key; \
- \
- __mutex_init((mutex), #mutex, &__key); \
-} while (0)
-
-extern void FASTCALL(mutex_destroy(struct mutex *lock));
-
-#endif
diff --git a/original/linux/mutex.h b/original/linux/mutex.h
deleted file mode 100644
index 27c48da..0000000
--- a/original/linux/mutex.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Mutexes: blocking mutual exclusion locks
- *
- * started by Ingo Molnar:
- *
- * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
- *
- * This file contains the main data structure and API definitions.
- */
-#ifndef __LINUX_MUTEX_H
-#define __LINUX_MUTEX_H
-
-#include <linux/list.h>
-#include <linux/spinlock_types.h>
-#include <linux/linkage.h>
-#include <linux/lockdep.h>
-
-#include <asm/atomic.h>
-
-/*
- * Simple, straightforward mutexes with strict semantics:
- *
- * - only one task can hold the mutex at a time
- * - only the owner can unlock the mutex
- * - multiple unlocks are not permitted
- * - recursive locking is not permitted
- * - a mutex object must be initialized via the API
- * - a mutex object must not be initialized via memset or copying
- * - task may not exit with mutex held
- * - memory areas where held locks reside must not be freed
- * - held mutexes must not be reinitialized
- * - mutexes may not be used in irq contexts
- *
- * These semantics are fully enforced when DEBUG_MUTEXES is
- * enabled. Furthermore, besides enforcing the above rules, the mutex
- * debugging code also implements a number of additional features
- * that make lock debugging easier and faster:
- *
- * - uses symbolic names of mutexes, whenever they are printed in debug output
- * - point-of-acquire tracking, symbolic lookup of function names
- * - list of all locks held in the system, printout of them
- * - owner tracking
- * - detects self-recursing locks and prints out all relevant info
- * - detects multi-task circular deadlocks and prints out all affected
- * locks and tasks (and only those tasks)
- */
-struct mutex {
- /* 1: unlocked, 0: locked, negative: locked, possible waiters */
- atomic_t count;
- spinlock_t wait_lock;
- struct list_head wait_list;
-#ifdef CONFIG_DEBUG_MUTEXES
- struct thread_info *owner;
- const char *name;
- void *magic;
-#endif
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
- struct lockdep_map dep_map;
-#endif
-};
-
-/*
- * This is the control structure for tasks blocked on mutex,
- * which resides on the blocked task's kernel stack:
- */
-struct mutex_waiter {
- struct list_head list;
- struct task_struct *task;
-#ifdef CONFIG_DEBUG_MUTEXES
- struct mutex *lock;
- void *magic;
-#endif
-};
-
-#ifdef CONFIG_DEBUG_MUTEXES
-# include <linux/mutex-debug.h>
-#else
-# define __DEBUG_MUTEX_INITIALIZER(lockname)
-# define mutex_init(mutex) \
-do { \
- static struct lock_class_key __key; \
- \
- __mutex_init((mutex), #mutex, &__key); \
-} while (0)
-# define mutex_destroy(mutex) do { } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \
- , .dep_map = { .name = #lockname }
-#else
-# define __DEP_MAP_MUTEX_INITIALIZER(lockname)
-#endif
-
-#define __MUTEX_INITIALIZER(lockname) \
- { .count = ATOMIC_INIT(1) \
- , .wait_lock = SPIN_LOCK_UNLOCKED \
- , .wait_list = LIST_HEAD_INIT(lockname.wait_list) \
- __DEBUG_MUTEX_INITIALIZER(lockname) \
- __DEP_MAP_MUTEX_INITIALIZER(lockname) }
-
-#define DEFINE_MUTEX(mutexname) \
- struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
-
-extern void __mutex_init(struct mutex *lock, const char *name,
- struct lock_class_key *key);
-
-/***
- * mutex_is_locked - is the mutex locked
- * @lock: the mutex to be queried
- *
- * Returns 1 if the mutex is locked, 0 if unlocked.
- */
-static inline int fastcall mutex_is_locked(struct mutex *lock)
-{
- return atomic_read(&lock->count) != 1;
-}
-
-/*
- * See kernel/mutex.c for detailed documentation of these APIs.
- * Also see Documentation/mutex-design.txt.
- */
-extern void fastcall mutex_lock(struct mutex *lock);
-extern int fastcall mutex_lock_interruptible(struct mutex *lock);
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
-#else
-# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
-#endif
-
-/*
- * NOTE: mutex_trylock() follows the spin_trylock() convention,
- * not the down_trylock() convention!
- */
-extern int fastcall mutex_trylock(struct mutex *lock);
-extern void fastcall mutex_unlock(struct mutex *lock);
-
-#endif
diff --git a/original/linux/ncp.h b/original/linux/ncp.h
deleted file mode 100644
index 99f0ade..0000000
--- a/original/linux/ncp.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * ncp.h
- *
- * Copyright (C) 1995 by Volker Lendecke
- * Modified for sparc by J.F. Chadima
- * Modified for __constant_ntoh by Frank A. Vorstenbosch
- *
- */
-
-#ifndef _LINUX_NCP_H
-#define _LINUX_NCP_H
-
-#include <linux/types.h>
-
-#define NCP_PTYPE (0x11)
-#define NCP_PORT (0x0451)
-
-#define NCP_ALLOC_SLOT_REQUEST (0x1111)
-#define NCP_REQUEST (0x2222)
-#define NCP_DEALLOC_SLOT_REQUEST (0x5555)
-
-struct ncp_request_header {
- __u16 type;
- __u8 sequence;
- __u8 conn_low;
- __u8 task;
- __u8 conn_high;
- __u8 function;
- __u8 data[0];
-} __attribute__((packed));
-
-#define NCP_REPLY (0x3333)
-#define NCP_WATCHDOG (0x3E3E)
-#define NCP_POSITIVE_ACK (0x9999)
-
-struct ncp_reply_header {
- __u16 type;
- __u8 sequence;
- __u8 conn_low;
- __u8 task;
- __u8 conn_high;
- __u8 completion_code;
- __u8 connection_state;
- __u8 data[0];
-} __attribute__((packed));
-
-#define NCP_VOLNAME_LEN (16)
-#define NCP_NUMBER_OF_VOLUMES (256)
-struct ncp_volume_info {
- __u32 total_blocks;
- __u32 free_blocks;
- __u32 purgeable_blocks;
- __u32 not_yet_purgeable_blocks;
- __u32 total_dir_entries;
- __u32 available_dir_entries;
- __u8 sectors_per_block;
- char volume_name[NCP_VOLNAME_LEN + 1];
-};
-
-#define AR_READ (cpu_to_le16(1))
-#define AR_WRITE (cpu_to_le16(2))
-#define AR_EXCLUSIVE (cpu_to_le16(0x20))
-
-#define NCP_FILE_ID_LEN 6
-
-/* Defines for Name Spaces */
-#define NW_NS_DOS 0
-#define NW_NS_MAC 1
-#define NW_NS_NFS 2
-#define NW_NS_FTAM 3
-#define NW_NS_OS2 4
-
-/* Defines for ReturnInformationMask */
-#define RIM_NAME (cpu_to_le32(1))
-#define RIM_SPACE_ALLOCATED (cpu_to_le32(2))
-#define RIM_ATTRIBUTES (cpu_to_le32(4))
-#define RIM_DATA_SIZE (cpu_to_le32(8))
-#define RIM_TOTAL_SIZE (cpu_to_le32(0x10))
-#define RIM_EXT_ATTR_INFO (cpu_to_le32(0x20))
-#define RIM_ARCHIVE (cpu_to_le32(0x40))
-#define RIM_MODIFY (cpu_to_le32(0x80))
-#define RIM_CREATION (cpu_to_le32(0x100))
-#define RIM_OWNING_NAMESPACE (cpu_to_le32(0x200))
-#define RIM_DIRECTORY (cpu_to_le32(0x400))
-#define RIM_RIGHTS (cpu_to_le32(0x800))
-#define RIM_ALL (cpu_to_le32(0xFFF))
-#define RIM_COMPRESSED_INFO (cpu_to_le32(0x80000000))
-
-/* Defines for NSInfoBitMask */
-#define NSIBM_NFS_NAME 0x0001
-#define NSIBM_NFS_MODE 0x0002
-#define NSIBM_NFS_GID 0x0004
-#define NSIBM_NFS_NLINKS 0x0008
-#define NSIBM_NFS_RDEV 0x0010
-#define NSIBM_NFS_LINK 0x0020
-#define NSIBM_NFS_CREATED 0x0040
-#define NSIBM_NFS_UID 0x0080
-#define NSIBM_NFS_ACSFLAG 0x0100
-#define NSIBM_NFS_MYFLAG 0x0200
-
-/* open/create modes */
-#define OC_MODE_OPEN 0x01
-#define OC_MODE_TRUNCATE 0x02
-#define OC_MODE_REPLACE 0x02
-#define OC_MODE_CREATE 0x08
-
-/* open/create results */
-#define OC_ACTION_NONE 0x00
-#define OC_ACTION_OPEN 0x01
-#define OC_ACTION_CREATE 0x02
-#define OC_ACTION_TRUNCATE 0x04
-#define OC_ACTION_REPLACE 0x04
-
-/* access rights attributes */
-#ifndef AR_READ_ONLY
-#define AR_READ_ONLY 0x0001
-#define AR_WRITE_ONLY 0x0002
-#define AR_DENY_READ 0x0004
-#define AR_DENY_WRITE 0x0008
-#define AR_COMPATIBILITY 0x0010
-#define AR_WRITE_THROUGH 0x0040
-#define AR_OPEN_COMPRESSED 0x0100
-#endif
-
-struct nw_nfs_info {
- __u32 mode;
- __u32 rdev;
-};
-
-struct nw_info_struct {
- __u32 spaceAlloc;
- __le32 attributes;
- __u16 flags;
- __le32 dataStreamSize;
- __le32 totalStreamSize;
- __u16 numberOfStreams;
- __le16 creationTime;
- __le16 creationDate;
- __u32 creatorID;
- __le16 modifyTime;
- __le16 modifyDate;
- __u32 modifierID;
- __le16 lastAccessDate;
- __u16 archiveTime;
- __u16 archiveDate;
- __u32 archiverID;
- __u16 inheritedRightsMask;
- __le32 dirEntNum;
- __le32 DosDirNum;
- __u32 volNumber;
- __u32 EADataSize;
- __u32 EAKeyCount;
- __u32 EAKeySize;
- __u32 NSCreator;
- __u8 nameLen;
- __u8 entryName[256];
- /* libncp may depend on there being nothing after entryName */
-#ifdef __KERNEL__
- struct nw_nfs_info nfs;
-#endif
-} __attribute__((packed));
-
-/* modify mask - use with MODIFY_DOS_INFO structure */
-#define DM_ATTRIBUTES (cpu_to_le32(0x02))
-#define DM_CREATE_DATE (cpu_to_le32(0x04))
-#define DM_CREATE_TIME (cpu_to_le32(0x08))
-#define DM_CREATOR_ID (cpu_to_le32(0x10))
-#define DM_ARCHIVE_DATE (cpu_to_le32(0x20))
-#define DM_ARCHIVE_TIME (cpu_to_le32(0x40))
-#define DM_ARCHIVER_ID (cpu_to_le32(0x80))
-#define DM_MODIFY_DATE (cpu_to_le32(0x0100))
-#define DM_MODIFY_TIME (cpu_to_le32(0x0200))
-#define DM_MODIFIER_ID (cpu_to_le32(0x0400))
-#define DM_LAST_ACCESS_DATE (cpu_to_le32(0x0800))
-#define DM_INHERITED_RIGHTS_MASK (cpu_to_le32(0x1000))
-#define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000))
-
-struct nw_modify_dos_info {
- __le32 attributes;
- __le16 creationDate;
- __le16 creationTime;
- __u32 creatorID;
- __le16 modifyDate;
- __le16 modifyTime;
- __u32 modifierID;
- __u16 archiveDate;
- __u16 archiveTime;
- __u32 archiverID;
- __le16 lastAccessDate;
- __u16 inheritanceGrantMask;
- __u16 inheritanceRevokeMask;
- __u32 maximumSpace;
-} __attribute__((packed));
-
-struct nw_search_sequence {
- __u8 volNumber;
- __u32 dirBase;
- __u32 sequence;
-} __attribute__((packed));
-
-#endif /* _LINUX_NCP_H */
diff --git a/original/linux/ncp_mount.h b/original/linux/ncp_mount.h
deleted file mode 100644
index f46bddc..0000000
--- a/original/linux/ncp_mount.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * ncp_mount.h
- *
- * Copyright (C) 1995, 1996 by Volker Lendecke
- *
- */
-
-#ifndef _LINUX_NCP_MOUNT_H
-#define _LINUX_NCP_MOUNT_H
-
-#include <linux/types.h>
-#include <linux/ncp.h>
-
-#define NCP_MOUNT_VERSION 3 /* Binary */
-
-/* Values for flags */
-#define NCP_MOUNT_SOFT 0x0001
-#define NCP_MOUNT_INTR 0x0002
-#define NCP_MOUNT_STRONG 0x0004 /* enable delete/rename of r/o files */
-#define NCP_MOUNT_NO_OS2 0x0008 /* do not use OS/2 (LONG) namespace */
-#define NCP_MOUNT_NO_NFS 0x0010 /* do not use NFS namespace */
-#define NCP_MOUNT_EXTRAS 0x0020
-#define NCP_MOUNT_SYMLINKS 0x0040 /* enable symlinks */
-#define NCP_MOUNT_NFS_EXTRAS 0x0080 /* Enable use of NFS NS meta-info */
-
-struct ncp_mount_data {
- int version;
- unsigned int ncp_fd; /* The socket to the ncp port */
- __kernel_uid_t mounted_uid; /* Who may umount() this filesystem? */
- __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */
-
- unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
- unsigned int time_out; /* How long should I wait after
- sending a NCP request? */
- unsigned int retry_count; /* And how often should I retry? */
- unsigned int flags;
-
- __kernel_uid_t uid;
- __kernel_gid_t gid;
- __kernel_mode_t file_mode;
- __kernel_mode_t dir_mode;
-};
-
-#define NCP_MOUNT_VERSION_V4 (4) /* Binary or text */
-
-struct ncp_mount_data_v4 {
- int version;
- unsigned long flags; /* NCP_MOUNT_* flags */
- /* MIPS uses long __kernel_uid_t, but... */
- /* we neever pass -1, so it is safe */
- unsigned long mounted_uid; /* Who may umount() this filesystem? */
- /* MIPS uses long __kernel_pid_t */
- long wdog_pid; /* Who cares for our watchdog packets? */
-
- unsigned int ncp_fd; /* The socket to the ncp port */
- unsigned int time_out; /* How long should I wait after
- sending a NCP request? */
- unsigned int retry_count; /* And how often should I retry? */
-
- /* MIPS uses long __kernel_uid_t... */
- /* we never pass -1, so it is safe */
- unsigned long uid;
- unsigned long gid;
- /* MIPS uses unsigned long __kernel_mode_t */
- unsigned long file_mode;
- unsigned long dir_mode;
-};
-
-#define NCP_MOUNT_VERSION_V5 (5) /* Text only */
-
-#ifdef __KERNEL__
-
-struct ncp_mount_data_kernel {
- unsigned long flags; /* NCP_MOUNT_* flags */
- unsigned int int_flags; /* internal flags */
-#define NCP_IMOUNT_LOGGEDIN_POSSIBLE 0x0001
- __kernel_uid32_t mounted_uid; /* Who may umount() this filesystem? */
- __kernel_pid_t wdog_pid; /* Who cares for our watchdog packets? */
- unsigned int ncp_fd; /* The socket to the ncp port */
- unsigned int time_out; /* How long should I wait after
- sending a NCP request? */
- unsigned int retry_count; /* And how often should I retry? */
- unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
- __kernel_uid32_t uid;
- __kernel_gid32_t gid;
- __kernel_mode_t file_mode;
- __kernel_mode_t dir_mode;
- int info_fd;
-};
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/ncp_no.h b/original/linux/ncp_no.h
deleted file mode 100644
index f56a696..0000000
--- a/original/linux/ncp_no.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _NCP_NO
-#define _NCP_NO
-
-/* these define the attribute byte as seen by NCP */
-#define aRONLY (__constant_cpu_to_le32(1))
-#define aHIDDEN (__constant_cpu_to_le32(2))
-#define aSYSTEM (__constant_cpu_to_le32(4))
-#define aEXECUTE (__constant_cpu_to_le32(8))
-#define aDIR (__constant_cpu_to_le32(0x10))
-#define aARCH (__constant_cpu_to_le32(0x20))
-#define aSHARED (__constant_cpu_to_le32(0x80))
-#define aDONTSUBALLOCATE (__constant_cpu_to_le32(1L<<11))
-#define aTRANSACTIONAL (__constant_cpu_to_le32(1L<<12))
-#define aPURGE (__constant_cpu_to_le32(1L<<16))
-#define aRENAMEINHIBIT (__constant_cpu_to_le32(1L<<17))
-#define aDELETEINHIBIT (__constant_cpu_to_le32(1L<<18))
-#define aDONTCOMPRESS (__constant_cpu_to_le32(1L<<27))
-
-#endif /* _NCP_NO */
diff --git a/original/linux/neighbour.h b/original/linux/neighbour.h
deleted file mode 100644
index 12c9de1..0000000
--- a/original/linux/neighbour.h
+++ /dev/null
@@ -1,161 +0,0 @@
-#ifndef __LINUX_NEIGHBOUR_H
-#define __LINUX_NEIGHBOUR_H
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-
-struct ndmsg
-{
- __u8 ndm_family;
- __u8 ndm_pad1;
- __u16 ndm_pad2;
- __s32 ndm_ifindex;
- __u16 ndm_state;
- __u8 ndm_flags;
- __u8 ndm_type;
-};
-
-enum
-{
- NDA_UNSPEC,
- NDA_DST,
- NDA_LLADDR,
- NDA_CACHEINFO,
- NDA_PROBES,
- __NDA_MAX
-};
-
-#define NDA_MAX (__NDA_MAX - 1)
-
-/*
- * Neighbor Cache Entry Flags
- */
-
-#define NTF_USE 0x01
-#define NTF_PROXY 0x08 /* == ATF_PUBL */
-#define NTF_ROUTER 0x80
-
-/*
- * Neighbor Cache Entry States.
- */
-
-#define NUD_INCOMPLETE 0x01
-#define NUD_REACHABLE 0x02
-#define NUD_STALE 0x04
-#define NUD_DELAY 0x08
-#define NUD_PROBE 0x10
-#define NUD_FAILED 0x20
-
-/* Dummy states */
-#define NUD_NOARP 0x40
-#define NUD_PERMANENT 0x80
-#define NUD_NONE 0x00
-
-/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change
- and make no address resolution or NUD.
- NUD_PERMANENT is also cannot be deleted by garbage collectors.
- */
-
-struct nda_cacheinfo
-{
- __u32 ndm_confirmed;
- __u32 ndm_used;
- __u32 ndm_updated;
- __u32 ndm_refcnt;
-};
-
-/*****************************************************************
- * Neighbour tables specific messages.
- *
- * To retrieve the neighbour tables send RTM_GETNEIGHTBL with the
- * NLM_F_DUMP flag set. Every neighbour table configuration is
- * spread over multiple messages to avoid running into message
- * size limits on systems with many interfaces. The first message
- * in the sequence transports all not device specific data such as
- * statistics, configuration, and the default parameter set.
- * This message is followed by 0..n messages carrying device
- * specific parameter sets.
- * Although the ordering should be sufficient, NDTA_NAME can be
- * used to identify sequences. The initial message can be identified
- * by checking for NDTA_CONFIG. The device specific messages do
- * not contain this TLV but have NDTPA_IFINDEX set to the
- * corresponding interface index.
- *
- * To change neighbour table attributes, send RTM_SETNEIGHTBL
- * with NDTA_NAME set. Changeable attribute include NDTA_THRESH[1-3],
- * NDTA_GC_INTERVAL, and all TLVs in NDTA_PARMS unless marked
- * otherwise. Device specific parameter sets can be changed by
- * setting NDTPA_IFINDEX to the interface index of the corresponding
- * device.
- ****/
-
-struct ndt_stats
-{
- __u64 ndts_allocs;
- __u64 ndts_destroys;
- __u64 ndts_hash_grows;
- __u64 ndts_res_failed;
- __u64 ndts_lookups;
- __u64 ndts_hits;
- __u64 ndts_rcv_probes_mcast;
- __u64 ndts_rcv_probes_ucast;
- __u64 ndts_periodic_gc_runs;
- __u64 ndts_forced_gc_runs;
-};
-
-enum {
- NDTPA_UNSPEC,
- NDTPA_IFINDEX, /* u32, unchangeable */
- NDTPA_REFCNT, /* u32, read-only */
- NDTPA_REACHABLE_TIME, /* u64, read-only, msecs */
- NDTPA_BASE_REACHABLE_TIME, /* u64, msecs */
- NDTPA_RETRANS_TIME, /* u64, msecs */
- NDTPA_GC_STALETIME, /* u64, msecs */
- NDTPA_DELAY_PROBE_TIME, /* u64, msecs */
- NDTPA_QUEUE_LEN, /* u32 */
- NDTPA_APP_PROBES, /* u32 */
- NDTPA_UCAST_PROBES, /* u32 */
- NDTPA_MCAST_PROBES, /* u32 */
- NDTPA_ANYCAST_DELAY, /* u64, msecs */
- NDTPA_PROXY_DELAY, /* u64, msecs */
- NDTPA_PROXY_QLEN, /* u32 */
- NDTPA_LOCKTIME, /* u64, msecs */
- __NDTPA_MAX
-};
-#define NDTPA_MAX (__NDTPA_MAX - 1)
-
-struct ndtmsg
-{
- __u8 ndtm_family;
- __u8 ndtm_pad1;
- __u16 ndtm_pad2;
-};
-
-struct ndt_config
-{
- __u16 ndtc_key_len;
- __u16 ndtc_entry_size;
- __u32 ndtc_entries;
- __u32 ndtc_last_flush; /* delta to now in msecs */
- __u32 ndtc_last_rand; /* delta to now in msecs */
- __u32 ndtc_hash_rnd;
- __u32 ndtc_hash_mask;
- __u32 ndtc_hash_chain_gc;
- __u32 ndtc_proxy_qlen;
-};
-
-enum {
- NDTA_UNSPEC,
- NDTA_NAME, /* char *, unchangeable */
- NDTA_THRESH1, /* u32 */
- NDTA_THRESH2, /* u32 */
- NDTA_THRESH3, /* u32 */
- NDTA_CONFIG, /* struct ndt_config, read-only */
- NDTA_PARMS, /* nested TLV NDTPA_* */
- NDTA_STATS, /* struct ndt_stats, read-only */
- NDTA_GC_INTERVAL, /* u64, msecs */
- __NDTA_MAX
-};
-#define NDTA_MAX (__NDTA_MAX - 1)
-
-#endif
diff --git a/original/linux/net.h b/original/linux/net.h
deleted file mode 100644
index b20c53c..0000000
--- a/original/linux/net.h
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * NET An implementation of the SOCKET network access protocol.
- * This is the master header file for the Linux NET layer,
- * or, in plain English: the networking handling part of the
- * kernel.
- *
- * Version: @(#)net.h 1.0.3 05/25/93
- *
- * Authors: Orest Zborowski, <obz@Kodak.COM>
- * Ross Biro
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_NET_H
-#define _LINUX_NET_H
-
-#include <linux/wait.h>
-#include <asm/socket.h>
-
-struct poll_table_struct;
-struct inode;
-
-#define NPROTO 32 /* should be enough for now.. */
-
-#define SYS_SOCKET 1 /* sys_socket(2) */
-#define SYS_BIND 2 /* sys_bind(2) */
-#define SYS_CONNECT 3 /* sys_connect(2) */
-#define SYS_LISTEN 4 /* sys_listen(2) */
-#define SYS_ACCEPT 5 /* sys_accept(2) */
-#define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */
-#define SYS_GETPEERNAME 7 /* sys_getpeername(2) */
-#define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */
-#define SYS_SEND 9 /* sys_send(2) */
-#define SYS_RECV 10 /* sys_recv(2) */
-#define SYS_SENDTO 11 /* sys_sendto(2) */
-#define SYS_RECVFROM 12 /* sys_recvfrom(2) */
-#define SYS_SHUTDOWN 13 /* sys_shutdown(2) */
-#define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */
-#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */
-#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
-#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
-
-typedef enum {
- SS_FREE = 0, /* not allocated */
- SS_UNCONNECTED, /* unconnected to any socket */
- SS_CONNECTING, /* in process of connecting */
- SS_CONNECTED, /* connected to socket */
- SS_DISCONNECTING /* in process of disconnecting */
-} socket_state;
-
-#define __SO_ACCEPTCON (1 << 16) /* performed a listen */
-
-#ifdef __KERNEL__
-#include <linux/stringify.h>
-
-#define SOCK_ASYNC_NOSPACE 0
-#define SOCK_ASYNC_WAITDATA 1
-#define SOCK_NOSPACE 2
-#define SOCK_PASSCRED 3
-#define SOCK_PASSSEC 4
-
-#ifndef ARCH_HAS_SOCKET_TYPES
-/**
- * enum sock_type - Socket types
- * @SOCK_STREAM: stream (connection) socket
- * @SOCK_DGRAM: datagram (conn.less) socket
- * @SOCK_RAW: raw socket
- * @SOCK_RDM: reliably-delivered message
- * @SOCK_SEQPACKET: sequential packet socket
- * @SOCK_DCCP: Datagram Congestion Control Protocol socket
- * @SOCK_PACKET: linux specific way of getting packets at the dev level.
- * For writing rarp and other similar things on the user level.
- *
- * When adding some new socket type please
- * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS
- * overrides this enum for binary compat reasons.
- */
-enum sock_type {
- SOCK_STREAM = 1,
- SOCK_DGRAM = 2,
- SOCK_RAW = 3,
- SOCK_RDM = 4,
- SOCK_SEQPACKET = 5,
- SOCK_DCCP = 6,
- SOCK_PACKET = 10,
-};
-
-#define SOCK_MAX (SOCK_PACKET + 1)
-
-#endif /* ARCH_HAS_SOCKET_TYPES */
-
-/**
- * struct socket - general BSD socket
- * @state: socket state (%SS_CONNECTED, etc)
- * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
- * @ops: protocol specific socket operations
- * @fasync_list: Asynchronous wake up list
- * @file: File back pointer for gc
- * @sk: internal networking protocol agnostic socket representation
- * @wait: wait queue for several uses
- * @type: socket type (%SOCK_STREAM, etc)
- */
-struct socket {
- socket_state state;
- unsigned long flags;
- const struct proto_ops *ops;
- struct fasync_struct *fasync_list;
- struct file *file;
- struct sock *sk;
- wait_queue_head_t wait;
- short type;
-};
-
-struct vm_area_struct;
-struct page;
-struct kiocb;
-struct sockaddr;
-struct msghdr;
-struct module;
-
-struct proto_ops {
- int family;
- struct module *owner;
- int (*release) (struct socket *sock);
- int (*bind) (struct socket *sock,
- struct sockaddr *myaddr,
- int sockaddr_len);
- int (*connect) (struct socket *sock,
- struct sockaddr *vaddr,
- int sockaddr_len, int flags);
- int (*socketpair)(struct socket *sock1,
- struct socket *sock2);
- int (*accept) (struct socket *sock,
- struct socket *newsock, int flags);
- int (*getname) (struct socket *sock,
- struct sockaddr *addr,
- int *sockaddr_len, int peer);
- unsigned int (*poll) (struct file *file, struct socket *sock,
- struct poll_table_struct *wait);
- int (*ioctl) (struct socket *sock, unsigned int cmd,
- unsigned long arg);
- int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
- unsigned long arg);
- int (*listen) (struct socket *sock, int len);
- int (*shutdown) (struct socket *sock, int flags);
- int (*setsockopt)(struct socket *sock, int level,
- int optname, char __user *optval, int optlen);
- int (*getsockopt)(struct socket *sock, int level,
- int optname, char __user *optval, int __user *optlen);
- int (*compat_setsockopt)(struct socket *sock, int level,
- int optname, char __user *optval, int optlen);
- int (*compat_getsockopt)(struct socket *sock, int level,
- int optname, char __user *optval, int __user *optlen);
- int (*sendmsg) (struct kiocb *iocb, struct socket *sock,
- struct msghdr *m, size_t total_len);
- int (*recvmsg) (struct kiocb *iocb, struct socket *sock,
- struct msghdr *m, size_t total_len,
- int flags);
- int (*mmap) (struct file *file, struct socket *sock,
- struct vm_area_struct * vma);
- ssize_t (*sendpage) (struct socket *sock, struct page *page,
- int offset, size_t size, int flags);
-};
-
-struct net_proto_family {
- int family;
- int (*create)(struct socket *sock, int protocol);
- /* These are counters for the number of different methods of
- each we support */
- short authentication;
- short encryption;
- short encrypt_net;
- struct module *owner;
-};
-
-struct iovec;
-struct kvec;
-
-extern int sock_wake_async(struct socket *sk, int how, int band);
-extern int sock_register(struct net_proto_family *fam);
-extern int sock_unregister(int family);
-extern int sock_create(int family, int type, int proto,
- struct socket **res);
-extern int sock_create_kern(int family, int type, int proto,
- struct socket **res);
-extern int sock_create_lite(int family, int type, int proto,
- struct socket **res);
-extern void sock_release(struct socket *sock);
-extern int sock_sendmsg(struct socket *sock, struct msghdr *msg,
- size_t len);
-extern int sock_recvmsg(struct socket *sock, struct msghdr *msg,
- size_t size, int flags);
-extern int sock_map_fd(struct socket *sock);
-extern struct socket *sockfd_lookup(int fd, int *err);
-#define sockfd_put(sock) fput(sock->file)
-extern int net_ratelimit(void);
-extern unsigned long net_random(void);
-extern void net_srandom(unsigned long);
-extern void net_random_init(void);
-
-extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
- struct kvec *vec, size_t num, size_t len);
-extern int kernel_recvmsg(struct socket *sock, struct msghdr *msg,
- struct kvec *vec, size_t num,
- size_t len, int flags);
-
-#ifndef CONFIG_SMP
-#define SOCKOPS_WRAPPED(name) name
-#define SOCKOPS_WRAP(name, fam)
-#else
-
-#define SOCKOPS_WRAPPED(name) __unlocked_##name
-
-#define SOCKCALL_WRAP(name, call, parms, args) \
-static int __lock_##name##_##call parms \
-{ \
- int ret; \
- lock_kernel(); \
- ret = __unlocked_##name##_ops.call args ;\
- unlock_kernel(); \
- return ret; \
-}
-
-#define SOCKCALL_UWRAP(name, call, parms, args) \
-static unsigned int __lock_##name##_##call parms \
-{ \
- int ret; \
- lock_kernel(); \
- ret = __unlocked_##name##_ops.call args ;\
- unlock_kernel(); \
- return ret; \
-}
-
-
-#define SOCKOPS_WRAP(name, fam) \
-SOCKCALL_WRAP(name, release, (struct socket *sock), (sock)) \
-SOCKCALL_WRAP(name, bind, (struct socket *sock, struct sockaddr *uaddr, int addr_len), \
- (sock, uaddr, addr_len)) \
-SOCKCALL_WRAP(name, connect, (struct socket *sock, struct sockaddr * uaddr, \
- int addr_len, int flags), \
- (sock, uaddr, addr_len, flags)) \
-SOCKCALL_WRAP(name, socketpair, (struct socket *sock1, struct socket *sock2), \
- (sock1, sock2)) \
-SOCKCALL_WRAP(name, accept, (struct socket *sock, struct socket *newsock, \
- int flags), (sock, newsock, flags)) \
-SOCKCALL_WRAP(name, getname, (struct socket *sock, struct sockaddr *uaddr, \
- int *addr_len, int peer), (sock, uaddr, addr_len, peer)) \
-SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_table_struct *wait), \
- (file, sock, wait)) \
-SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \
- unsigned long arg), (sock, cmd, arg)) \
-SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \
- unsigned long arg), (sock, cmd, arg)) \
-SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \
-SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \
-SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \
- char __user *optval, int optlen), (sock, level, optname, optval, optlen)) \
-SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \
- char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \
-SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \
- (iocb, sock, m, len)) \
-SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags), \
- (iocb, sock, m, len, flags)) \
-SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \
- (file, sock, vma)) \
- \
-static const struct proto_ops name##_ops = { \
- .family = fam, \
- .owner = THIS_MODULE, \
- .release = __lock_##name##_release, \
- .bind = __lock_##name##_bind, \
- .connect = __lock_##name##_connect, \
- .socketpair = __lock_##name##_socketpair, \
- .accept = __lock_##name##_accept, \
- .getname = __lock_##name##_getname, \
- .poll = __lock_##name##_poll, \
- .ioctl = __lock_##name##_ioctl, \
- .compat_ioctl = __lock_##name##_compat_ioctl, \
- .listen = __lock_##name##_listen, \
- .shutdown = __lock_##name##_shutdown, \
- .setsockopt = __lock_##name##_setsockopt, \
- .getsockopt = __lock_##name##_getsockopt, \
- .sendmsg = __lock_##name##_sendmsg, \
- .recvmsg = __lock_##name##_recvmsg, \
- .mmap = __lock_##name##_mmap, \
-};
-
-#endif
-
-#define MODULE_ALIAS_NETPROTO(proto) \
- MODULE_ALIAS("net-pf-" __stringify(proto))
-
-#define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \
- MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto))
-
-#ifdef CONFIG_SYSCTL
-#include <linux/sysctl.h>
-extern ctl_table net_table[];
-extern int net_msg_cost;
-extern int net_msg_burst;
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_NET_H */
diff --git a/original/linux/netdevice.h b/original/linux/netdevice.h
deleted file mode 100644
index 50a4719..0000000
--- a/original/linux/netdevice.h
+++ /dev/null
@@ -1,1044 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions for the Interfaces handler.
- *
- * Version: @(#)dev.h 1.0.10 08/12/93
- *
- * Authors: Ross Biro
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- * Corey Minyard <wf-rch!minyard@relay.EU.net>
- * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov>
- * Alan Cox, <Alan.Cox@linux.org>
- * Bjorn Ekwall. <bj0rn@blox.se>
- * Pekka Riikonen <priikone@poseidon.pspt.fi>
- *
- * 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.
- *
- * Moved to /usr/include/linux for NET3
- */
-#ifndef _LINUX_NETDEVICE_H
-#define _LINUX_NETDEVICE_H
-
-#include <linux/if.h>
-#include <linux/if_ether.h>
-#include <linux/if_packet.h>
-
-#ifdef __KERNEL__
-#include <asm/atomic.h>
-#include <asm/cache.h>
-#include <asm/byteorder.h>
-
-#include <linux/device.h>
-#include <linux/percpu.h>
-#include <linux/dmaengine.h>
-
-struct divert_blk;
-struct vlan_group;
-struct ethtool_ops;
-struct netpoll_info;
- /* source back-compat hooks */
-#define SET_ETHTOOL_OPS(netdev,ops) \
- ( (netdev)->ethtool_ops = (ops) )
-
-#define HAVE_ALLOC_NETDEV /* feature macro: alloc_xxxdev
- functions are available. */
-#define HAVE_FREE_NETDEV /* free_netdev() */
-#define HAVE_NETDEV_PRIV /* netdev_priv() */
-
-#define NET_XMIT_SUCCESS 0
-#define NET_XMIT_DROP 1 /* skb dropped */
-#define NET_XMIT_CN 2 /* congestion notification */
-#define NET_XMIT_POLICED 3 /* skb is shot by police */
-#define NET_XMIT_BYPASS 4 /* packet does not leave via dequeue;
- (TC use only - dev_queue_xmit
- returns this as NET_XMIT_SUCCESS) */
-
-/* Backlog congestion levels */
-#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
-#define NET_RX_DROP 1 /* packet dropped */
-#define NET_RX_CN_LOW 2 /* storm alert, just in case */
-#define NET_RX_CN_MOD 3 /* Storm on its way! */
-#define NET_RX_CN_HIGH 4 /* The storm is here */
-#define NET_RX_BAD 5 /* packet dropped due to kernel error */
-
-#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
-
-#endif
-
-#define MAX_ADDR_LEN 32 /* Largest hardware address length */
-
-/* Driver transmit return codes */
-#define NETDEV_TX_OK 0 /* driver took care of packet */
-#define NETDEV_TX_BUSY 1 /* driver tx path was busy*/
-#define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */
-
-/*
- * Compute the worst case header length according to the protocols
- * used.
- */
-
-#if !defined(CONFIG_AX25) && !defined(CONFIG_AX25_MODULE) && !defined(CONFIG_TR)
-#define LL_MAX_HEADER 32
-#else
-#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
-#define LL_MAX_HEADER 96
-#else
-#define LL_MAX_HEADER 48
-#endif
-#endif
-
-#if !defined(CONFIG_NET_IPIP) && \
- !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
-#define MAX_HEADER LL_MAX_HEADER
-#else
-#define MAX_HEADER (LL_MAX_HEADER + 48)
-#endif
-
-/*
- * Network device statistics. Akin to the 2.0 ether stats but
- * with byte counters.
- */
-
-struct net_device_stats
-{
- unsigned long rx_packets; /* total packets received */
- unsigned long tx_packets; /* total packets transmitted */
- unsigned long rx_bytes; /* total bytes received */
- unsigned long tx_bytes; /* total bytes transmitted */
- unsigned long rx_errors; /* bad packets received */
- unsigned long tx_errors; /* packet transmit problems */
- unsigned long rx_dropped; /* no space in linux buffers */
- unsigned long tx_dropped; /* no space available in linux */
- unsigned long multicast; /* multicast packets received */
- unsigned long collisions;
-
- /* detailed rx_errors: */
- unsigned long rx_length_errors;
- unsigned long rx_over_errors; /* receiver ring buff overflow */
- unsigned long rx_crc_errors; /* recved pkt with crc error */
- unsigned long rx_frame_errors; /* recv'd frame alignment error */
- unsigned long rx_fifo_errors; /* recv'r fifo overrun */
- unsigned long rx_missed_errors; /* receiver missed packet */
-
- /* detailed tx_errors */
- unsigned long tx_aborted_errors;
- unsigned long tx_carrier_errors;
- unsigned long tx_fifo_errors;
- unsigned long tx_heartbeat_errors;
- unsigned long tx_window_errors;
-
- /* for cslip etc */
- unsigned long rx_compressed;
- unsigned long tx_compressed;
-};
-
-
-/* Media selection options. */
-enum {
- IF_PORT_UNKNOWN = 0,
- IF_PORT_10BASE2,
- IF_PORT_10BASET,
- IF_PORT_AUI,
- IF_PORT_100BASET,
- IF_PORT_100BASETX,
- IF_PORT_100BASEFX
-};
-
-#ifdef __KERNEL__
-
-#include <linux/cache.h>
-#include <linux/skbuff.h>
-
-struct neighbour;
-struct neigh_parms;
-struct sk_buff;
-
-struct netif_rx_stats
-{
- unsigned total;
- unsigned dropped;
- unsigned time_squeeze;
- unsigned cpu_collision;
-};
-
-DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
-
-
-/*
- * We tag multicasts with these structures.
- */
-
-struct dev_mc_list
-{
- struct dev_mc_list *next;
- __u8 dmi_addr[MAX_ADDR_LEN];
- unsigned char dmi_addrlen;
- int dmi_users;
- int dmi_gusers;
-};
-
-struct hh_cache
-{
- struct hh_cache *hh_next; /* Next entry */
- atomic_t hh_refcnt; /* number of users */
- unsigned short hh_type; /* protocol identifier, f.e ETH_P_IP
- * NOTE: For VLANs, this will be the
- * encapuslated type. --BLG
- */
- int hh_len; /* length of header */
- int (*hh_output)(struct sk_buff *skb);
- rwlock_t hh_lock;
-
- /* cached hardware header; allow for machine alignment needs. */
-#define HH_DATA_MOD 16
-#define HH_DATA_OFF(__len) \
- (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1))
-#define HH_DATA_ALIGN(__len) \
- (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
- unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)];
-};
-
-/* Reserve HH_DATA_MOD byte aligned hard_header_len, but at least that much.
- * Alternative is:
- * dev->hard_header_len ? (dev->hard_header_len +
- * (HH_DATA_MOD - 1)) & ~(HH_DATA_MOD - 1) : 0
- *
- * We could use other alignment values, but we must maintain the
- * relationship HH alignment <= LL alignment.
- */
-#define LL_RESERVED_SPACE(dev) \
- (((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
-#define LL_RESERVED_SPACE_EXTRA(dev,extra) \
- ((((dev)->hard_header_len+extra)&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
-
-/* These flag bits are private to the generic network queueing
- * layer, they may not be explicitly referenced by any other
- * code.
- */
-
-enum netdev_state_t
-{
- __LINK_STATE_XOFF=0,
- __LINK_STATE_START,
- __LINK_STATE_PRESENT,
- __LINK_STATE_SCHED,
- __LINK_STATE_NOCARRIER,
- __LINK_STATE_RX_SCHED,
- __LINK_STATE_LINKWATCH_PENDING,
- __LINK_STATE_DORMANT,
- __LINK_STATE_QDISC_RUNNING,
-};
-
-
-/*
- * This structure holds at boot time configured netdevice settings. They
- * are then used in the device probing.
- */
-struct netdev_boot_setup {
- char name[IFNAMSIZ];
- struct ifmap map;
-};
-#define NETDEV_BOOT_SETUP_MAX 8
-
-extern int __init netdev_boot_setup(char *str);
-
-/*
- * The DEVICE structure.
- * Actually, this whole structure is a big mistake. It mixes I/O
- * data with strictly "high-level" data, and it has to know about
- * almost every data structure used in the INET module.
- *
- * FIXME: cleanup struct net_device such that network protocol info
- * moves out.
- */
-
-struct net_device
-{
-
- /*
- * This is the first field of the "visible" part of this structure
- * (i.e. as seen by users in the "Space.c" file). It is the name
- * the interface.
- */
- char name[IFNAMSIZ];
- /* device name hash chain */
- struct hlist_node name_hlist;
-
- /*
- * I/O specific fields
- * FIXME: Merge these and struct ifmap into one
- */
- unsigned long mem_end; /* shared mem end */
- unsigned long mem_start; /* shared mem start */
- unsigned long base_addr; /* device I/O address */
- unsigned int irq; /* device IRQ number */
-
- /*
- * Some hardware also needs these fields, but they are not
- * part of the usual set specified in Space.c.
- */
-
- unsigned char if_port; /* Selectable AUI, TP,..*/
- unsigned char dma; /* DMA channel */
-
- unsigned long state;
-
- struct net_device *next;
-
- /* The device initialization function. Called only once. */
- int (*init)(struct net_device *dev);
-
- /* ------- Fields preinitialized in Space.c finish here ------- */
-
- /* Net device features */
- unsigned long features;
-#define NETIF_F_SG 1 /* Scatter/gather IO. */
-#define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */
-#define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */
-#define NETIF_F_HW_CSUM 8 /* Can checksum all the packets. */
-#define NETIF_F_HIGHDMA 32 /* Can DMA to high memory. */
-#define NETIF_F_FRAGLIST 64 /* Scatter/gather IO. */
-#define NETIF_F_HW_VLAN_TX 128 /* Transmit VLAN hw acceleration */
-#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
-#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
-#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
-#define NETIF_F_GSO 2048 /* Enable software GSO. */
-#define NETIF_F_LLTX 4096 /* LockLess TX */
-
- /* Segmentation offload features */
-#define NETIF_F_GSO_SHIFT 16
-#define NETIF_F_GSO_MASK 0xffff0000
-#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
-#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
-#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
-#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
-#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
-
- /* List of features with software fallbacks. */
-#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
-
-#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
-#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
-
- struct net_device *next_sched;
-
- /* Interface index. Unique device identifier */
- int ifindex;
- int iflink;
-
-
- struct net_device_stats* (*get_stats)(struct net_device *dev);
- struct iw_statistics* (*get_wireless_stats)(struct net_device *dev);
-
- /* List of functions to handle Wireless Extensions (instead of ioctl).
- * See <net/iw_handler.h> for details. Jean II */
- const struct iw_handler_def * wireless_handlers;
- /* Instance data managed by the core of Wireless Extensions. */
- struct iw_public_data * wireless_data;
-
- struct ethtool_ops *ethtool_ops;
-
- /*
- * This marks the end of the "visible" part of the structure. All
- * fields hereafter are internal to the system, and may change at
- * will (read: may be cleaned up at will).
- */
-
-
- unsigned int flags; /* interface flags (a la BSD) */
- unsigned short gflags;
- unsigned short priv_flags; /* Like 'flags' but invisible to userspace. */
- unsigned short padded; /* How much padding added by alloc_netdev() */
-
- unsigned char operstate; /* RFC2863 operstate */
- unsigned char link_mode; /* mapping policy to operstate */
-
- unsigned mtu; /* interface MTU value */
- unsigned short type; /* interface hardware type */
- unsigned short hard_header_len; /* hardware hdr length */
-
- struct net_device *master; /* Pointer to master device of a group,
- * which this device is member of.
- */
-
- /* Interface address info. */
- unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */
- unsigned char addr_len; /* hardware address length */
- unsigned short dev_id; /* for shared network cards */
-
- struct dev_mc_list *mc_list; /* Multicast mac addresses */
- int mc_count; /* Number of installed mcasts */
- int promiscuity;
- int allmulti;
-
-
- /* Protocol specific pointers */
-
- void *atalk_ptr; /* AppleTalk link */
- void *ip_ptr; /* IPv4 specific data */
- void *dn_ptr; /* DECnet specific data */
- void *ip6_ptr; /* IPv6 specific data */
- void *ec_ptr; /* Econet specific data */
- void *ax25_ptr; /* AX.25 specific data */
-
-/*
- * Cache line mostly used on receive path (including eth_type_trans())
- */
- struct list_head poll_list ____cacheline_aligned_in_smp;
- /* Link to poll list */
-
- int (*poll) (struct net_device *dev, int *quota);
- int quota;
- int weight;
- unsigned long last_rx; /* Time of last Rx */
- /* Interface address info used in eth_type_trans() */
- unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address, (before bcast
- because most packets are unicast) */
-
- unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
-
-/*
- * Cache line mostly used on queue transmit path (qdisc)
- */
- /* device queue lock */
- spinlock_t queue_lock ____cacheline_aligned_in_smp;
- struct Qdisc *qdisc;
- struct Qdisc *qdisc_sleeping;
- struct list_head qdisc_list;
- unsigned long tx_queue_len; /* Max frames per queue allowed */
-
- /* Partially transmitted GSO packet. */
- struct sk_buff *gso_skb;
-
- /* ingress path synchronizer */
- spinlock_t ingress_lock;
- struct Qdisc *qdisc_ingress;
-
-/*
- * One part is mostly used on xmit path (device)
- */
- /* hard_start_xmit synchronizer */
- spinlock_t _xmit_lock ____cacheline_aligned_in_smp;
- /* cpu id of processor entered to hard_start_xmit or -1,
- if nobody entered there.
- */
- int xmit_lock_owner;
- void *priv; /* pointer to private data */
- int (*hard_start_xmit) (struct sk_buff *skb,
- struct net_device *dev);
- /* These may be needed for future network-power-down code. */
- unsigned long trans_start; /* Time (in jiffies) of last Tx */
-
- int watchdog_timeo; /* used by dev_watchdog() */
- struct timer_list watchdog_timer;
-
-/*
- * refcnt is a very hot point, so align it on SMP
- */
- /* Number of references to this device */
- atomic_t refcnt ____cacheline_aligned_in_smp;
-
- /* delayed register/unregister */
- struct list_head todo_list;
- /* device index hash chain */
- struct hlist_node index_hlist;
-
- /* register/unregister state machine */
- enum { NETREG_UNINITIALIZED=0,
- NETREG_REGISTERED, /* completed register_netdevice */
- NETREG_UNREGISTERING, /* called unregister_netdevice */
- NETREG_UNREGISTERED, /* completed unregister todo */
- NETREG_RELEASED, /* called free_netdev */
- } reg_state;
-
- /* Called after device is detached from network. */
- void (*uninit)(struct net_device *dev);
- /* Called after last user reference disappears. */
- void (*destructor)(struct net_device *dev);
-
- /* Pointers to interface service routines. */
- int (*open)(struct net_device *dev);
- int (*stop)(struct net_device *dev);
-#define HAVE_NETDEV_POLL
- int (*hard_header) (struct sk_buff *skb,
- struct net_device *dev,
- unsigned short type,
- void *daddr,
- void *saddr,
- unsigned len);
- int (*rebuild_header)(struct sk_buff *skb);
-#define HAVE_MULTICAST
- void (*set_multicast_list)(struct net_device *dev);
-#define HAVE_SET_MAC_ADDR
- int (*set_mac_address)(struct net_device *dev,
- void *addr);
-#define HAVE_PRIVATE_IOCTL
- int (*do_ioctl)(struct net_device *dev,
- struct ifreq *ifr, int cmd);
-#define HAVE_SET_CONFIG
- int (*set_config)(struct net_device *dev,
- struct ifmap *map);
-#define HAVE_HEADER_CACHE
- int (*hard_header_cache)(struct neighbour *neigh,
- struct hh_cache *hh);
- void (*header_cache_update)(struct hh_cache *hh,
- struct net_device *dev,
- unsigned char * haddr);
-#define HAVE_CHANGE_MTU
- int (*change_mtu)(struct net_device *dev, int new_mtu);
-
-#define HAVE_TX_TIMEOUT
- void (*tx_timeout) (struct net_device *dev);
-
- void (*vlan_rx_register)(struct net_device *dev,
- struct vlan_group *grp);
- void (*vlan_rx_add_vid)(struct net_device *dev,
- unsigned short vid);
- void (*vlan_rx_kill_vid)(struct net_device *dev,
- unsigned short vid);
-
- int (*hard_header_parse)(struct sk_buff *skb,
- unsigned char *haddr);
- int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
-#ifdef CONFIG_NETPOLL
- struct netpoll_info *npinfo;
-#endif
-#ifdef CONFIG_NET_POLL_CONTROLLER
- void (*poll_controller)(struct net_device *dev);
-#endif
-
- /* bridge stuff */
- struct net_bridge_port *br_port;
-
-#ifdef CONFIG_NET_DIVERT
- /* this will get initialized at each interface type init routine */
- struct divert_blk *divert;
-#endif /* CONFIG_NET_DIVERT */
-
- /* class/net/name entry */
- struct class_device class_dev;
- /* space for optional statistics and wireless sysfs groups */
- struct attribute_group *sysfs_groups[3];
-};
-
-#define NETDEV_ALIGN 32
-#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
-
-static inline void *netdev_priv(struct net_device *dev)
-{
- return (char *)dev + ((sizeof(struct net_device)
- + NETDEV_ALIGN_CONST)
- & ~NETDEV_ALIGN_CONST);
-}
-
-#define SET_MODULE_OWNER(dev) do { } while (0)
-/* Set the sysfs physical device reference for the network logical device
- * if set prior to registration will cause a symlink during initialization.
- */
-#define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
-
-struct packet_type {
- __be16 type; /* This is really htons(ether_type). */
- struct net_device *dev; /* NULL is wildcarded here */
- int (*func) (struct sk_buff *,
- struct net_device *,
- struct packet_type *,
- struct net_device *);
- struct sk_buff *(*gso_segment)(struct sk_buff *skb,
- int features);
- int (*gso_send_check)(struct sk_buff *skb);
- void *af_packet_priv;
- struct list_head list;
-};
-
-#include <linux/interrupt.h>
-#include <linux/notifier.h>
-
-extern struct net_device loopback_dev; /* The loopback */
-extern struct net_device *dev_base; /* All devices */
-extern rwlock_t dev_base_lock; /* Device list lock */
-
-extern int netdev_boot_setup_check(struct net_device *dev);
-extern unsigned long netdev_boot_base(const char *prefix, int unit);
-extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr);
-extern struct net_device *dev_getfirstbyhwtype(unsigned short type);
-extern void dev_add_pack(struct packet_type *pt);
-extern void dev_remove_pack(struct packet_type *pt);
-extern void __dev_remove_pack(struct packet_type *pt);
-
-extern struct net_device *dev_get_by_flags(unsigned short flags,
- unsigned short mask);
-extern struct net_device *dev_get_by_name(const char *name);
-extern struct net_device *__dev_get_by_name(const char *name);
-extern int dev_alloc_name(struct net_device *dev, const char *name);
-extern int dev_open(struct net_device *dev);
-extern int dev_close(struct net_device *dev);
-extern int dev_queue_xmit(struct sk_buff *skb);
-extern int register_netdevice(struct net_device *dev);
-extern int unregister_netdevice(struct net_device *dev);
-extern void free_netdev(struct net_device *dev);
-extern void synchronize_net(void);
-extern int register_netdevice_notifier(struct notifier_block *nb);
-extern int unregister_netdevice_notifier(struct notifier_block *nb);
-extern int call_netdevice_notifiers(unsigned long val, void *v);
-extern struct net_device *dev_get_by_index(int ifindex);
-extern struct net_device *__dev_get_by_index(int ifindex);
-extern int dev_restart(struct net_device *dev);
-#ifdef CONFIG_NETPOLL_TRAP
-extern int netpoll_trap(void);
-#endif
-
-typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
-extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf);
-static inline int unregister_gifconf(unsigned int family)
-{
- return register_gifconf(family, NULL);
-}
-
-/*
- * Incoming packets are placed on per-cpu queues so that
- * no locking is needed.
- */
-
-struct softnet_data
-{
- struct net_device *output_queue;
- struct sk_buff_head input_pkt_queue;
- struct list_head poll_list;
- struct sk_buff *completion_queue;
-
- struct net_device backlog_dev; /* Sorry. 8) */
-#ifdef CONFIG_NET_DMA
- struct dma_chan *net_dma;
-#endif
-};
-
-DECLARE_PER_CPU(struct softnet_data,softnet_data);
-
-#define HAVE_NETIF_QUEUE
-
-extern void __netif_schedule(struct net_device *dev);
-
-static inline void netif_schedule(struct net_device *dev)
-{
- if (!test_bit(__LINK_STATE_XOFF, &dev->state))
- __netif_schedule(dev);
-}
-
-static inline void netif_start_queue(struct net_device *dev)
-{
- clear_bit(__LINK_STATE_XOFF, &dev->state);
-}
-
-static inline void netif_wake_queue(struct net_device *dev)
-{
-#ifdef CONFIG_NETPOLL_TRAP
- if (netpoll_trap())
- return;
-#endif
- if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state))
- __netif_schedule(dev);
-}
-
-static inline void netif_stop_queue(struct net_device *dev)
-{
-#ifdef CONFIG_NETPOLL_TRAP
- if (netpoll_trap())
- return;
-#endif
- set_bit(__LINK_STATE_XOFF, &dev->state);
-}
-
-static inline int netif_queue_stopped(const struct net_device *dev)
-{
- return test_bit(__LINK_STATE_XOFF, &dev->state);
-}
-
-static inline int netif_running(const struct net_device *dev)
-{
- return test_bit(__LINK_STATE_START, &dev->state);
-}
-
-
-/* Use this variant when it is known for sure that it
- * is executing from interrupt context.
- */
-static inline void dev_kfree_skb_irq(struct sk_buff *skb)
-{
- if (atomic_dec_and_test(&skb->users)) {
- struct softnet_data *sd;
- unsigned long flags;
-
- local_irq_save(flags);
- sd = &__get_cpu_var(softnet_data);
- skb->next = sd->completion_queue;
- sd->completion_queue = skb;
- raise_softirq_irqoff(NET_TX_SOFTIRQ);
- local_irq_restore(flags);
- }
-}
-
-/* Use this variant in places where it could be invoked
- * either from interrupt or non-interrupt context.
- */
-extern void dev_kfree_skb_any(struct sk_buff *skb);
-
-#define HAVE_NETIF_RX 1
-extern int netif_rx(struct sk_buff *skb);
-extern int netif_rx_ni(struct sk_buff *skb);
-#define HAVE_NETIF_RECEIVE_SKB 1
-extern int netif_receive_skb(struct sk_buff *skb);
-extern int dev_valid_name(const char *name);
-extern int dev_ioctl(unsigned int cmd, void __user *);
-extern int dev_ethtool(struct ifreq *);
-extern unsigned dev_get_flags(const struct net_device *);
-extern int dev_change_flags(struct net_device *, unsigned);
-extern int dev_change_name(struct net_device *, char *);
-extern int dev_set_mtu(struct net_device *, int);
-extern int dev_set_mac_address(struct net_device *,
- struct sockaddr *);
-extern int dev_hard_start_xmit(struct sk_buff *skb,
- struct net_device *dev);
-
-extern void dev_init(void);
-
-extern int netdev_budget;
-
-/* Called by rtnetlink.c:rtnl_unlock() */
-extern void netdev_run_todo(void);
-
-static inline void dev_put(struct net_device *dev)
-{
- atomic_dec(&dev->refcnt);
-}
-
-static inline void dev_hold(struct net_device *dev)
-{
- atomic_inc(&dev->refcnt);
-}
-
-/* Carrier loss detection, dial on demand. The functions netif_carrier_on
- * and _off may be called from IRQ context, but it is caller
- * who is responsible for serialization of these calls.
- *
- * The name carrier is inappropriate, these functions should really be
- * called netif_lowerlayer_*() because they represent the state of any
- * kind of lower layer not just hardware media.
- */
-
-extern void linkwatch_fire_event(struct net_device *dev);
-
-static inline int netif_carrier_ok(const struct net_device *dev)
-{
- return !test_bit(__LINK_STATE_NOCARRIER, &dev->state);
-}
-
-extern void __netdev_watchdog_up(struct net_device *dev);
-
-extern void netif_carrier_on(struct net_device *dev);
-
-extern void netif_carrier_off(struct net_device *dev);
-
-static inline void netif_dormant_on(struct net_device *dev)
-{
- if (!test_and_set_bit(__LINK_STATE_DORMANT, &dev->state))
- linkwatch_fire_event(dev);
-}
-
-static inline void netif_dormant_off(struct net_device *dev)
-{
- if (test_and_clear_bit(__LINK_STATE_DORMANT, &dev->state))
- linkwatch_fire_event(dev);
-}
-
-static inline int netif_dormant(const struct net_device *dev)
-{
- return test_bit(__LINK_STATE_DORMANT, &dev->state);
-}
-
-
-static inline int netif_oper_up(const struct net_device *dev) {
- return (dev->operstate == IF_OPER_UP ||
- dev->operstate == IF_OPER_UNKNOWN /* backward compat */);
-}
-
-/* Hot-plugging. */
-static inline int netif_device_present(struct net_device *dev)
-{
- return test_bit(__LINK_STATE_PRESENT, &dev->state);
-}
-
-extern void netif_device_detach(struct net_device *dev);
-
-extern void netif_device_attach(struct net_device *dev);
-
-/*
- * Network interface message level settings
- */
-#define HAVE_NETIF_MSG 1
-
-enum {
- NETIF_MSG_DRV = 0x0001,
- NETIF_MSG_PROBE = 0x0002,
- NETIF_MSG_LINK = 0x0004,
- NETIF_MSG_TIMER = 0x0008,
- NETIF_MSG_IFDOWN = 0x0010,
- NETIF_MSG_IFUP = 0x0020,
- NETIF_MSG_RX_ERR = 0x0040,
- NETIF_MSG_TX_ERR = 0x0080,
- NETIF_MSG_TX_QUEUED = 0x0100,
- NETIF_MSG_INTR = 0x0200,
- NETIF_MSG_TX_DONE = 0x0400,
- NETIF_MSG_RX_STATUS = 0x0800,
- NETIF_MSG_PKTDATA = 0x1000,
- NETIF_MSG_HW = 0x2000,
- NETIF_MSG_WOL = 0x4000,
-};
-
-#define netif_msg_drv(p) ((p)->msg_enable & NETIF_MSG_DRV)
-#define netif_msg_probe(p) ((p)->msg_enable & NETIF_MSG_PROBE)
-#define netif_msg_link(p) ((p)->msg_enable & NETIF_MSG_LINK)
-#define netif_msg_timer(p) ((p)->msg_enable & NETIF_MSG_TIMER)
-#define netif_msg_ifdown(p) ((p)->msg_enable & NETIF_MSG_IFDOWN)
-#define netif_msg_ifup(p) ((p)->msg_enable & NETIF_MSG_IFUP)
-#define netif_msg_rx_err(p) ((p)->msg_enable & NETIF_MSG_RX_ERR)
-#define netif_msg_tx_err(p) ((p)->msg_enable & NETIF_MSG_TX_ERR)
-#define netif_msg_tx_queued(p) ((p)->msg_enable & NETIF_MSG_TX_QUEUED)
-#define netif_msg_intr(p) ((p)->msg_enable & NETIF_MSG_INTR)
-#define netif_msg_tx_done(p) ((p)->msg_enable & NETIF_MSG_TX_DONE)
-#define netif_msg_rx_status(p) ((p)->msg_enable & NETIF_MSG_RX_STATUS)
-#define netif_msg_pktdata(p) ((p)->msg_enable & NETIF_MSG_PKTDATA)
-#define netif_msg_hw(p) ((p)->msg_enable & NETIF_MSG_HW)
-#define netif_msg_wol(p) ((p)->msg_enable & NETIF_MSG_WOL)
-
-static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
-{
- /* use default */
- if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
- return default_msg_enable_bits;
- if (debug_value == 0) /* no output */
- return 0;
- /* set low N bits */
- return (1 << debug_value) - 1;
-}
-
-/* Test if receive needs to be scheduled */
-static inline int __netif_rx_schedule_prep(struct net_device *dev)
-{
- return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
-}
-
-/* Test if receive needs to be scheduled but only if up */
-static inline int netif_rx_schedule_prep(struct net_device *dev)
-{
- return netif_running(dev) && __netif_rx_schedule_prep(dev);
-}
-
-/* Add interface to tail of rx poll list. This assumes that _prep has
- * already been called and returned 1.
- */
-
-extern void __netif_rx_schedule(struct net_device *dev);
-
-/* Try to reschedule poll. Called by irq handler. */
-
-static inline void netif_rx_schedule(struct net_device *dev)
-{
- if (netif_rx_schedule_prep(dev))
- __netif_rx_schedule(dev);
-}
-
-/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete().
- * Do not inline this?
- */
-static inline int netif_rx_reschedule(struct net_device *dev, int undo)
-{
- if (netif_rx_schedule_prep(dev)) {
- unsigned long flags;
-
- dev->quota += undo;
-
- local_irq_save(flags);
- list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
- __raise_softirq_irqoff(NET_RX_SOFTIRQ);
- local_irq_restore(flags);
- return 1;
- }
- return 0;
-}
-
-/* Remove interface from poll list: it must be in the poll list
- * on current cpu. This primitive is called by dev->poll(), when
- * it completes the work. The device cannot be out of poll list at this
- * moment, it is BUG().
- */
-static inline void netif_rx_complete(struct net_device *dev)
-{
- unsigned long flags;
-
- local_irq_save(flags);
- BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state));
- list_del(&dev->poll_list);
- smp_mb__before_clear_bit();
- clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
- local_irq_restore(flags);
-}
-
-static inline void netif_poll_disable(struct net_device *dev)
-{
- while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state))
- /* No hurry. */
- schedule_timeout_interruptible(1);
-}
-
-static inline void netif_poll_enable(struct net_device *dev)
-{
- clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
-}
-
-/* same as netif_rx_complete, except that local_irq_save(flags)
- * has already been issued
- */
-static inline void __netif_rx_complete(struct net_device *dev)
-{
- BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state));
- list_del(&dev->poll_list);
- smp_mb__before_clear_bit();
- clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
-}
-
-static inline void netif_tx_lock(struct net_device *dev)
-{
- spin_lock(&dev->_xmit_lock);
- dev->xmit_lock_owner = smp_processor_id();
-}
-
-static inline void netif_tx_lock_bh(struct net_device *dev)
-{
- spin_lock_bh(&dev->_xmit_lock);
- dev->xmit_lock_owner = smp_processor_id();
-}
-
-static inline int netif_tx_trylock(struct net_device *dev)
-{
- int ok = spin_trylock(&dev->_xmit_lock);
- if (likely(ok))
- dev->xmit_lock_owner = smp_processor_id();
- return ok;
-}
-
-static inline void netif_tx_unlock(struct net_device *dev)
-{
- dev->xmit_lock_owner = -1;
- spin_unlock(&dev->_xmit_lock);
-}
-
-static inline void netif_tx_unlock_bh(struct net_device *dev)
-{
- dev->xmit_lock_owner = -1;
- spin_unlock_bh(&dev->_xmit_lock);
-}
-
-static inline void netif_tx_disable(struct net_device *dev)
-{
- netif_tx_lock_bh(dev);
- netif_stop_queue(dev);
- netif_tx_unlock_bh(dev);
-}
-
-/* These functions live elsewhere (drivers/net/net_init.c, but related) */
-
-extern void ether_setup(struct net_device *dev);
-
-/* Support for loadable net-drivers */
-extern struct net_device *alloc_netdev(int sizeof_priv, const char *name,
- void (*setup)(struct net_device *));
-extern int register_netdev(struct net_device *dev);
-extern void unregister_netdev(struct net_device *dev);
-/* Functions used for multicast support */
-extern void dev_mc_upload(struct net_device *dev);
-extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all);
-extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly);
-extern void dev_mc_discard(struct net_device *dev);
-extern void dev_set_promiscuity(struct net_device *dev, int inc);
-extern void dev_set_allmulti(struct net_device *dev, int inc);
-extern void netdev_state_change(struct net_device *dev);
-extern void netdev_features_change(struct net_device *dev);
-/* Load a device via the kmod */
-extern void dev_load(const char *name);
-extern void dev_mcast_init(void);
-extern int netdev_max_backlog;
-extern int weight_p;
-extern int netdev_set_master(struct net_device *dev, struct net_device *master);
-extern int skb_checksum_help(struct sk_buff *skb, int inward);
-extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
-#ifdef CONFIG_BUG
-extern void netdev_rx_csum_fault(struct net_device *dev);
-#else
-static inline void netdev_rx_csum_fault(struct net_device *dev)
-{
-}
-#endif
-/* rx skb timestamps */
-extern void net_enable_timestamp(void);
-extern void net_disable_timestamp(void);
-
-#ifdef CONFIG_PROC_FS
-extern void *dev_seq_start(struct seq_file *seq, loff_t *pos);
-extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
-extern void dev_seq_stop(struct seq_file *seq, void *v);
-#endif
-
-extern void linkwatch_run_queue(void);
-
-static inline int net_gso_ok(int features, int gso_type)
-{
- int feature = gso_type << NETIF_F_GSO_SHIFT;
- return (features & feature) == feature;
-}
-
-static inline int skb_gso_ok(struct sk_buff *skb, int features)
-{
- return net_gso_ok(features, skb_shinfo(skb)->gso_type);
-}
-
-static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
-{
- return skb_is_gso(skb) &&
- (!skb_gso_ok(skb, dev->features) ||
- unlikely(skb->ip_summed != CHECKSUM_HW));
-}
-
-/* On bonding slaves other than the currently active slave, suppress
- * duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast.
- */
-static inline int skb_bond_should_drop(struct sk_buff *skb)
-{
- struct net_device *dev = skb->dev;
- struct net_device *master = dev->master;
-
- if (master &&
- (dev->priv_flags & IFF_SLAVE_INACTIVE)) {
- if (master->priv_flags & IFF_MASTER_ALB) {
- if (skb->pkt_type != PACKET_BROADCAST &&
- skb->pkt_type != PACKET_MULTICAST)
- return 0;
- }
- if (master->priv_flags & IFF_MASTER_8023AD &&
- skb->protocol == __constant_htons(ETH_P_SLOW))
- return 0;
-
- return 1;
- }
- return 0;
-}
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_DEV_H */
diff --git a/original/linux/netfilter.h b/original/linux/netfilter.h
deleted file mode 100644
index 03317c8..0000000
--- a/original/linux/netfilter.h
+++ /dev/null
@@ -1,366 +0,0 @@
-#ifndef __LINUX_NETFILTER_H
-#define __LINUX_NETFILTER_H
-
-#ifdef __KERNEL__
-#include <linux/init.h>
-#include <linux/skbuff.h>
-#include <linux/net.h>
-#include <linux/if.h>
-#include <linux/in.h>
-#include <linux/in6.h>
-#include <linux/wait.h>
-#include <linux/list.h>
-#endif
-#include <linux/types.h>
-#include <linux/compiler.h>
-
-/* Responses from hook functions. */
-#define NF_DROP 0
-#define NF_ACCEPT 1
-#define NF_STOLEN 2
-#define NF_QUEUE 3
-#define NF_REPEAT 4
-#define NF_STOP 5
-#define NF_MAX_VERDICT NF_STOP
-
-/* we overload the higher bits for encoding auxiliary data such as the queue
- * number. Not nice, but better than additional function arguments. */
-#define NF_VERDICT_MASK 0x0000ffff
-#define NF_VERDICT_BITS 16
-
-#define NF_VERDICT_QMASK 0xffff0000
-#define NF_VERDICT_QBITS 16
-
-#define NF_QUEUE_NR(x) ((((x) << NF_VERDICT_BITS) & NF_VERDICT_QMASK) | NF_QUEUE)
-
-/* only for userspace compatibility */
-#ifndef __KERNEL__
-/* Generic cache responses from hook functions.
- <= 0x2000 is used for protocol-flags. */
-#define NFC_UNKNOWN 0x4000
-#define NFC_ALTERED 0x8000
-#endif
-
-enum nf_inet_hooks {
- NF_INET_PRE_ROUTING,
- NF_INET_LOCAL_IN,
- NF_INET_FORWARD,
- NF_INET_LOCAL_OUT,
- NF_INET_POST_ROUTING,
- NF_INET_NUMHOOKS
-};
-
-enum {
- NFPROTO_UNSPEC = 0,
- NFPROTO_IPV4 = 2,
- NFPROTO_ARP = 3,
- NFPROTO_BRIDGE = 7,
- NFPROTO_IPV6 = 10,
- NFPROTO_DECNET = 12,
- NFPROTO_NUMPROTO,
-};
-
-union nf_inet_addr {
- __u32 all[4];
- __be32 ip;
- __be32 ip6[4];
- struct in_addr in;
- struct in6_addr in6;
-};
-
-#ifdef __KERNEL__
-#ifdef CONFIG_NETFILTER
-
-static inline int nf_inet_addr_cmp(const union nf_inet_addr *a1,
- const union nf_inet_addr *a2)
-{
- return a1->all[0] == a2->all[0] &&
- a1->all[1] == a2->all[1] &&
- a1->all[2] == a2->all[2] &&
- a1->all[3] == a2->all[3];
-}
-
-extern void netfilter_init(void);
-
-/* Largest hook number + 1 */
-#define NF_MAX_HOOKS 8
-
-struct sk_buff;
-
-typedef unsigned int nf_hookfn(unsigned int hooknum,
- struct sk_buff *skb,
- const struct net_device *in,
- const struct net_device *out,
- int (*okfn)(struct sk_buff *));
-
-struct nf_hook_ops {
- struct list_head list;
-
- /* User fills in from here down. */
- nf_hookfn *hook;
- struct module *owner;
- u_int8_t pf;
- unsigned int hooknum;
- /* Hooks are ordered in ascending priority. */
- int priority;
-};
-
-struct nf_sockopt_ops {
- struct list_head list;
-
- u_int8_t pf;
-
- /* Non-inclusive ranges: use 0/0/NULL to never get called. */
- int set_optmin;
- int set_optmax;
- int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len);
-#ifdef CONFIG_COMPAT
- int (*compat_set)(struct sock *sk, int optval,
- void __user *user, unsigned int len);
-#endif
- int get_optmin;
- int get_optmax;
- int (*get)(struct sock *sk, int optval, void __user *user, int *len);
-#ifdef CONFIG_COMPAT
- int (*compat_get)(struct sock *sk, int optval,
- void __user *user, int *len);
-#endif
- /* Use the module struct to lock set/get code in place */
- struct module *owner;
-};
-
-/* Function to register/unregister hook points. */
-int nf_register_hook(struct nf_hook_ops *reg);
-void nf_unregister_hook(struct nf_hook_ops *reg);
-int nf_register_hooks(struct nf_hook_ops *reg, unsigned int n);
-void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n);
-
-/* Functions to register get/setsockopt ranges (non-inclusive). You
- need to check permissions yourself! */
-int nf_register_sockopt(struct nf_sockopt_ops *reg);
-void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
-
-#ifdef CONFIG_SYSCTL
-/* Sysctl registration */
-extern struct ctl_path nf_net_netfilter_sysctl_path[];
-extern struct ctl_path nf_net_ipv4_netfilter_sysctl_path[];
-#endif /* CONFIG_SYSCTL */
-
-extern struct list_head nf_hooks[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
-
-int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
- struct net_device *indev, struct net_device *outdev,
- int (*okfn)(struct sk_buff *), int thresh);
-
-/**
- * nf_hook_thresh - call a netfilter hook
- *
- * Returns 1 if the hook has allowed the packet to pass. The function
- * okfn must be invoked by the caller in this case. Any other return
- * value indicates the packet has been consumed by the hook.
- */
-static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
- struct sk_buff *skb,
- struct net_device *indev,
- struct net_device *outdev,
- int (*okfn)(struct sk_buff *), int thresh)
-{
-#ifndef CONFIG_NETFILTER_DEBUG
- if (list_empty(&nf_hooks[pf][hook]))
- return 1;
-#endif
- return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh);
-}
-
-static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
- struct net_device *indev, struct net_device *outdev,
- int (*okfn)(struct sk_buff *))
-{
- return nf_hook_thresh(pf, hook, skb, indev, outdev, okfn, INT_MIN);
-}
-
-/* Activate hook; either okfn or kfree_skb called, unless a hook
- returns NF_STOLEN (in which case, it's up to the hook to deal with
- the consequences).
-
- Returns -ERRNO if packet dropped. Zero means queued, stolen or
- accepted.
-*/
-
-/* RR:
- > I don't want nf_hook to return anything because people might forget
- > about async and trust the return value to mean "packet was ok".
-
- AK:
- Just document it clearly, then you can expect some sense from kernel
- coders :)
-*/
-
-static inline int
-NF_HOOK_THRESH(uint8_t pf, unsigned int hook, struct sk_buff *skb,
- struct net_device *in, struct net_device *out,
- int (*okfn)(struct sk_buff *), int thresh)
-{
- int ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, thresh);
- if (ret == 1)
- ret = okfn(skb);
- return ret;
-}
-
-static inline int
-NF_HOOK_COND(uint8_t pf, unsigned int hook, struct sk_buff *skb,
- struct net_device *in, struct net_device *out,
- int (*okfn)(struct sk_buff *), bool cond)
-{
- int ret;
-
- if (!cond ||
- ((ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, INT_MIN)) == 1))
- ret = okfn(skb);
- return ret;
-}
-
-static inline int
-NF_HOOK(uint8_t pf, unsigned int hook, struct sk_buff *skb,
- struct net_device *in, struct net_device *out,
- int (*okfn)(struct sk_buff *))
-{
- return NF_HOOK_THRESH(pf, hook, skb, in, out, okfn, INT_MIN);
-}
-
-/* Call setsockopt() */
-int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
- unsigned int len);
-int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
- int *len);
-#ifdef CONFIG_COMPAT
-int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval,
- char __user *opt, unsigned int len);
-int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval,
- char __user *opt, int *len);
-#endif
-
-/* Call this before modifying an existing packet: ensures it is
- modifiable and linear to the point you care about (writable_len).
- Returns true or false. */
-extern int skb_make_writable(struct sk_buff *skb, unsigned int writable_len);
-
-struct flowi;
-struct nf_queue_entry;
-
-struct nf_afinfo {
- unsigned short family;
- __sum16 (*checksum)(struct sk_buff *skb, unsigned int hook,
- unsigned int dataoff, u_int8_t protocol);
- __sum16 (*checksum_partial)(struct sk_buff *skb,
- unsigned int hook,
- unsigned int dataoff,
- unsigned int len,
- u_int8_t protocol);
- int (*route)(struct dst_entry **dst, struct flowi *fl);
- void (*saveroute)(const struct sk_buff *skb,
- struct nf_queue_entry *entry);
- int (*reroute)(struct sk_buff *skb,
- const struct nf_queue_entry *entry);
- int route_key_size;
-};
-
-extern const struct nf_afinfo *nf_afinfo[NFPROTO_NUMPROTO];
-static inline const struct nf_afinfo *nf_get_afinfo(unsigned short family)
-{
- return rcu_dereference(nf_afinfo[family]);
-}
-
-static inline __sum16
-nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff,
- u_int8_t protocol, unsigned short family)
-{
- const struct nf_afinfo *afinfo;
- __sum16 csum = 0;
-
- rcu_read_lock();
- afinfo = nf_get_afinfo(family);
- if (afinfo)
- csum = afinfo->checksum(skb, hook, dataoff, protocol);
- rcu_read_unlock();
- return csum;
-}
-
-static inline __sum16
-nf_checksum_partial(struct sk_buff *skb, unsigned int hook,
- unsigned int dataoff, unsigned int len,
- u_int8_t protocol, unsigned short family)
-{
- const struct nf_afinfo *afinfo;
- __sum16 csum = 0;
-
- rcu_read_lock();
- afinfo = nf_get_afinfo(family);
- if (afinfo)
- csum = afinfo->checksum_partial(skb, hook, dataoff, len,
- protocol);
- rcu_read_unlock();
- return csum;
-}
-
-extern int nf_register_afinfo(const struct nf_afinfo *afinfo);
-extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo);
-
-#include <net/flow.h>
-extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
-
-static inline void
-nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
-{
-#ifdef CONFIG_NF_NAT_NEEDED
- void (*decodefn)(struct sk_buff *, struct flowi *);
-
- if (family == AF_INET) {
- rcu_read_lock();
- decodefn = rcu_dereference(ip_nat_decode_session);
- if (decodefn)
- decodefn(skb, fl);
- rcu_read_unlock();
- }
-#endif
-}
-
-#ifdef CONFIG_PROC_FS
-#include <linux/proc_fs.h>
-extern struct proc_dir_entry *proc_net_netfilter;
-#endif
-
-#else /* !CONFIG_NETFILTER */
-#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb)
-#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb)
-static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
- struct sk_buff *skb,
- struct net_device *indev,
- struct net_device *outdev,
- int (*okfn)(struct sk_buff *), int thresh)
-{
- return okfn(skb);
-}
-static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
- struct net_device *indev, struct net_device *outdev,
- int (*okfn)(struct sk_buff *))
-{
- return 1;
-}
-struct flowi;
-static inline void
-nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
-{
-}
-#endif /*CONFIG_NETFILTER*/
-
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
-extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *);
-extern void nf_ct_attach(struct sk_buff *, struct sk_buff *);
-extern void (*nf_ct_destroy)(struct nf_conntrack *);
-#else
-static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {}
-#endif
-
-#endif /*__KERNEL__*/
-#endif /*__LINUX_NETFILTER_H*/
diff --git a/original/linux/netfilter/nf_conntrack_common.h b/original/linux/netfilter/nf_conntrack_common.h
deleted file mode 100644
index d2e4bd7..0000000
--- a/original/linux/netfilter/nf_conntrack_common.h
+++ /dev/null
@@ -1,166 +0,0 @@
-#ifndef _NF_CONNTRACK_COMMON_H
-#define _NF_CONNTRACK_COMMON_H
-/* Connection state tracking for netfilter. This is separated from,
- but required by, the NAT layer; it can also be used by an iptables
- extension. */
-enum ip_conntrack_info
-{
- /* Part of an established connection (either direction). */
- IP_CT_ESTABLISHED,
-
- /* Like NEW, but related to an existing connection, or ICMP error
- (in either direction). */
- IP_CT_RELATED,
-
- /* Started a new connection to track (only
- IP_CT_DIR_ORIGINAL); may be a retransmission. */
- IP_CT_NEW,
-
- /* >= this indicates reply direction */
- IP_CT_IS_REPLY,
-
- /* Number of distinct IP_CT types (no NEW in reply dirn). */
- IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
-};
-
-/* Bitset representing status of connection. */
-enum ip_conntrack_status {
- /* It's an expected connection: bit 0 set. This bit never changed */
- IPS_EXPECTED_BIT = 0,
- IPS_EXPECTED = (1 << IPS_EXPECTED_BIT),
-
- /* We've seen packets both ways: bit 1 set. Can be set, not unset. */
- IPS_SEEN_REPLY_BIT = 1,
- IPS_SEEN_REPLY = (1 << IPS_SEEN_REPLY_BIT),
-
- /* Conntrack should never be early-expired. */
- IPS_ASSURED_BIT = 2,
- IPS_ASSURED = (1 << IPS_ASSURED_BIT),
-
- /* Connection is confirmed: originating packet has left box */
- IPS_CONFIRMED_BIT = 3,
- IPS_CONFIRMED = (1 << IPS_CONFIRMED_BIT),
-
- /* Connection needs src nat in orig dir. This bit never changed. */
- IPS_SRC_NAT_BIT = 4,
- IPS_SRC_NAT = (1 << IPS_SRC_NAT_BIT),
-
- /* Connection needs dst nat in orig dir. This bit never changed. */
- IPS_DST_NAT_BIT = 5,
- IPS_DST_NAT = (1 << IPS_DST_NAT_BIT),
-
- /* Both together. */
- IPS_NAT_MASK = (IPS_DST_NAT | IPS_SRC_NAT),
-
- /* Connection needs TCP sequence adjusted. */
- IPS_SEQ_ADJUST_BIT = 6,
- IPS_SEQ_ADJUST = (1 << IPS_SEQ_ADJUST_BIT),
-
- /* NAT initialization bits. */
- IPS_SRC_NAT_DONE_BIT = 7,
- IPS_SRC_NAT_DONE = (1 << IPS_SRC_NAT_DONE_BIT),
-
- IPS_DST_NAT_DONE_BIT = 8,
- IPS_DST_NAT_DONE = (1 << IPS_DST_NAT_DONE_BIT),
-
- /* Both together */
- IPS_NAT_DONE_MASK = (IPS_DST_NAT_DONE | IPS_SRC_NAT_DONE),
-
- /* Connection is dying (removed from lists), can not be unset. */
- IPS_DYING_BIT = 9,
- IPS_DYING = (1 << IPS_DYING_BIT),
-
- /* Connection has fixed timeout. */
- IPS_FIXED_TIMEOUT_BIT = 10,
- IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT),
-};
-
-/* Connection tracking event bits */
-enum ip_conntrack_events
-{
- /* New conntrack */
- IPCT_NEW_BIT = 0,
- IPCT_NEW = (1 << IPCT_NEW_BIT),
-
- /* Expected connection */
- IPCT_RELATED_BIT = 1,
- IPCT_RELATED = (1 << IPCT_RELATED_BIT),
-
- /* Destroyed conntrack */
- IPCT_DESTROY_BIT = 2,
- IPCT_DESTROY = (1 << IPCT_DESTROY_BIT),
-
- /* Timer has been refreshed */
- IPCT_REFRESH_BIT = 3,
- IPCT_REFRESH = (1 << IPCT_REFRESH_BIT),
-
- /* Status has changed */
- IPCT_STATUS_BIT = 4,
- IPCT_STATUS = (1 << IPCT_STATUS_BIT),
-
- /* Update of protocol info */
- IPCT_PROTOINFO_BIT = 5,
- IPCT_PROTOINFO = (1 << IPCT_PROTOINFO_BIT),
-
- /* Volatile protocol info */
- IPCT_PROTOINFO_VOLATILE_BIT = 6,
- IPCT_PROTOINFO_VOLATILE = (1 << IPCT_PROTOINFO_VOLATILE_BIT),
-
- /* New helper for conntrack */
- IPCT_HELPER_BIT = 7,
- IPCT_HELPER = (1 << IPCT_HELPER_BIT),
-
- /* Update of helper info */
- IPCT_HELPINFO_BIT = 8,
- IPCT_HELPINFO = (1 << IPCT_HELPINFO_BIT),
-
- /* Volatile helper info */
- IPCT_HELPINFO_VOLATILE_BIT = 9,
- IPCT_HELPINFO_VOLATILE = (1 << IPCT_HELPINFO_VOLATILE_BIT),
-
- /* NAT info */
- IPCT_NATINFO_BIT = 10,
- IPCT_NATINFO = (1 << IPCT_NATINFO_BIT),
-
- /* Counter highest bit has been set */
- IPCT_COUNTER_FILLING_BIT = 11,
- IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),
-};
-
-enum ip_conntrack_expect_events {
- IPEXP_NEW_BIT = 0,
- IPEXP_NEW = (1 << IPEXP_NEW_BIT),
-};
-
-#ifdef __KERNEL__
-struct ip_conntrack_counter
-{
- u_int32_t packets;
- u_int32_t bytes;
-};
-
-struct ip_conntrack_stat
-{
- unsigned int searched;
- unsigned int found;
- unsigned int new;
- unsigned int invalid;
- unsigned int ignore;
- unsigned int delete;
- unsigned int delete_list;
- unsigned int insert;
- unsigned int insert_failed;
- unsigned int drop;
- unsigned int early_drop;
- unsigned int error;
- unsigned int expect_new;
- unsigned int expect_create;
- unsigned int expect_delete;
-};
-
-/* call to create an explicit dependency on nf_conntrack. */
-extern void need_conntrack(void);
-
-#endif /* __KERNEL__ */
-
-#endif /* _NF_CONNTRACK_COMMON_H */
diff --git a/original/linux/netfilter/nf_conntrack_ftp.h b/original/linux/netfilter/nf_conntrack_ftp.h
deleted file mode 100644
index ad4a41c..0000000
--- a/original/linux/netfilter/nf_conntrack_ftp.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef _NF_CONNTRACK_FTP_H
-#define _NF_CONNTRACK_FTP_H
-/* FTP tracking. */
-
-/* This enum is exposed to userspace */
-enum ip_ct_ftp_type
-{
- /* PORT command from client */
- IP_CT_FTP_PORT,
- /* PASV response from server */
- IP_CT_FTP_PASV,
- /* EPRT command from client */
- IP_CT_FTP_EPRT,
- /* EPSV response from server */
- IP_CT_FTP_EPSV,
-};
-
-#ifdef __KERNEL__
-
-#define FTP_PORT 21
-
-#define NUM_SEQ_TO_REMEMBER 2
-/* This structure exists only once per master */
-struct ip_ct_ftp_master {
- /* Valid seq positions for cmd matching after newline */
- u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER];
- /* 0 means seq_match_aft_nl not set */
- int seq_aft_nl_num[IP_CT_DIR_MAX];
-};
-
-struct ip_conntrack_expect;
-
-/* For NAT to hook in when we find a packet which describes what other
- * connection we should expect. */
-extern unsigned int (*ip_nat_ftp_hook)(struct sk_buff **pskb,
- enum ip_conntrack_info ctinfo,
- enum ip_ct_ftp_type type,
- unsigned int matchoff,
- unsigned int matchlen,
- struct ip_conntrack_expect *exp,
- u32 *seq);
-#endif /* __KERNEL__ */
-
-#endif /* _NF_CONNTRACK_FTP_H */
diff --git a/original/linux/netfilter/nf_conntrack_sctp.h b/original/linux/netfilter/nf_conntrack_sctp.h
deleted file mode 100644
index b8994d9..0000000
--- a/original/linux/netfilter/nf_conntrack_sctp.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _NF_CONNTRACK_SCTP_H
-#define _NF_CONNTRACK_SCTP_H
-/* SCTP tracking. */
-
-#include <linux/netfilter/nf_conntrack_tuple_common.h>
-
-enum sctp_conntrack {
- SCTP_CONNTRACK_NONE,
- SCTP_CONNTRACK_CLOSED,
- SCTP_CONNTRACK_COOKIE_WAIT,
- SCTP_CONNTRACK_COOKIE_ECHOED,
- SCTP_CONNTRACK_ESTABLISHED,
- SCTP_CONNTRACK_SHUTDOWN_SENT,
- SCTP_CONNTRACK_SHUTDOWN_RECD,
- SCTP_CONNTRACK_SHUTDOWN_ACK_SENT,
- SCTP_CONNTRACK_MAX
-};
-
-struct ip_ct_sctp
-{
- enum sctp_conntrack state;
-
- u_int32_t vtag[IP_CT_DIR_MAX];
- u_int32_t ttag[IP_CT_DIR_MAX];
-};
-
-#endif /* _NF_CONNTRACK_SCTP_H */
diff --git a/original/linux/netfilter/nf_conntrack_tcp.h b/original/linux/netfilter/nf_conntrack_tcp.h
deleted file mode 100644
index b2feeff..0000000
--- a/original/linux/netfilter/nf_conntrack_tcp.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _NF_CONNTRACK_TCP_H
-#define _NF_CONNTRACK_TCP_H
-/* TCP tracking. */
-
-/* This is exposed to userspace (ctnetlink) */
-enum tcp_conntrack {
- TCP_CONNTRACK_NONE,
- TCP_CONNTRACK_SYN_SENT,
- TCP_CONNTRACK_SYN_RECV,
- TCP_CONNTRACK_ESTABLISHED,
- TCP_CONNTRACK_FIN_WAIT,
- TCP_CONNTRACK_CLOSE_WAIT,
- TCP_CONNTRACK_LAST_ACK,
- TCP_CONNTRACK_TIME_WAIT,
- TCP_CONNTRACK_CLOSE,
- TCP_CONNTRACK_LISTEN,
- TCP_CONNTRACK_MAX,
- TCP_CONNTRACK_IGNORE
-};
-
-/* Window scaling is advertised by the sender */
-#define IP_CT_TCP_FLAG_WINDOW_SCALE 0x01
-
-/* SACK is permitted by the sender */
-#define IP_CT_TCP_FLAG_SACK_PERM 0x02
-
-/* This sender sent FIN first */
-#define IP_CT_TCP_FLAG_CLOSE_INIT 0x03
-
-#ifdef __KERNEL__
-
-struct ip_ct_tcp_state {
- u_int32_t td_end; /* max of seq + len */
- u_int32_t td_maxend; /* max of ack + max(win, 1) */
- u_int32_t td_maxwin; /* max(win) */
- u_int8_t td_scale; /* window scale factor */
- u_int8_t loose; /* used when connection picked up from the middle */
- u_int8_t flags; /* per direction options */
-};
-
-struct ip_ct_tcp
-{
- struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */
- u_int8_t state; /* state of the connection (enum tcp_conntrack) */
- /* For detecting stale connections */
- u_int8_t last_dir; /* Direction of the last packet (enum ip_conntrack_dir) */
- u_int8_t retrans; /* Number of retransmitted packets */
- u_int8_t last_index; /* Index of the last packet */
- u_int32_t last_seq; /* Last sequence number seen in dir */
- u_int32_t last_ack; /* Last sequence number seen in opposite dir */
- u_int32_t last_end; /* Last seq + len */
-};
-
-#endif /* __KERNEL__ */
-
-#endif /* _NF_CONNTRACK_TCP_H */
diff --git a/original/linux/netfilter/nf_conntrack_tuple_common.h b/original/linux/netfilter/nf_conntrack_tuple_common.h
deleted file mode 100644
index 8e145f0..0000000
--- a/original/linux/netfilter/nf_conntrack_tuple_common.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _NF_CONNTRACK_TUPLE_COMMON_H
-#define _NF_CONNTRACK_TUPLE_COMMON_H
-
-enum ip_conntrack_dir
-{
- IP_CT_DIR_ORIGINAL,
- IP_CT_DIR_REPLY,
- IP_CT_DIR_MAX
-};
-
-#define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
-
-#endif /* _NF_CONNTRACK_TUPLE_COMMON_H */
diff --git a/original/linux/netfilter/nfnetlink.h b/original/linux/netfilter/nfnetlink.h
deleted file mode 100644
index 9f5b12c..0000000
--- a/original/linux/netfilter/nfnetlink.h
+++ /dev/null
@@ -1,176 +0,0 @@
-#ifndef _NFNETLINK_H
-#define _NFNETLINK_H
-#include <linux/types.h>
-
-#ifndef __KERNEL__
-/* nfnetlink groups: Up to 32 maximum - backwards compatibility for userspace */
-#define NF_NETLINK_CONNTRACK_NEW 0x00000001
-#define NF_NETLINK_CONNTRACK_UPDATE 0x00000002
-#define NF_NETLINK_CONNTRACK_DESTROY 0x00000004
-#define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008
-#define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010
-#define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020
-#endif
-
-enum nfnetlink_groups {
- NFNLGRP_NONE,
-#define NFNLGRP_NONE NFNLGRP_NONE
- NFNLGRP_CONNTRACK_NEW,
-#define NFNLGRP_CONNTRACK_NEW NFNLGRP_CONNTRACK_NEW
- NFNLGRP_CONNTRACK_UPDATE,
-#define NFNLGRP_CONNTRACK_UPDATE NFNLGRP_CONNTRACK_UPDATE
- NFNLGRP_CONNTRACK_DESTROY,
-#define NFNLGRP_CONNTRACK_DESTROY NFNLGRP_CONNTRACK_DESTROY
- NFNLGRP_CONNTRACK_EXP_NEW,
-#define NFNLGRP_CONNTRACK_EXP_NEW NFNLGRP_CONNTRACK_EXP_NEW
- NFNLGRP_CONNTRACK_EXP_UPDATE,
-#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE
- NFNLGRP_CONNTRACK_EXP_DESTROY,
-#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY
- __NFNLGRP_MAX,
-};
-#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
-
-/* Generic structure for encapsulation optional netfilter information.
- * It is reminiscent of sockaddr, but with sa_family replaced
- * with attribute type.
- * ! This should someday be put somewhere generic as now rtnetlink and
- * ! nfnetlink use the same attributes methods. - J. Schulist.
- */
-
-struct nfattr
-{
- u_int16_t nfa_len;
- u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
- * bit to indicate whether the payload is nested */
-} __attribute__ ((packed));
-
-/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
- * rtnetlink.h, it's time to put this in a generic file */
-
-#define NFNL_NFA_NEST 0x8000
-#define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
-
-#define NFA_ALIGNTO 4
-#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
-#define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) \
- && (nfa)->nfa_len <= (len))
-#define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \
- (struct nfattr *)(((char *)(nfa)) + NFA_ALIGN((nfa)->nfa_len)))
-#define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len))
-#define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len))
-#define NFA_DATA(nfa) ((void *)(((char *)(nfa)) + NFA_LENGTH(0)))
-#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
-#define NFA_NEST(skb, type) \
-({ struct nfattr *__start = (struct nfattr *) (skb)->tail; \
- NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \
- __start; })
-#define NFA_NEST_END(skb, start) \
-({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); \
- (skb)->len; })
-#define NFA_NEST_CANCEL(skb, start) \
-({ if (start) \
- skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
- -1; })
-
-/* General form of address family dependent message.
- */
-struct nfgenmsg {
- u_int8_t nfgen_family; /* AF_xxx */
- u_int8_t version; /* nfnetlink version */
- u_int16_t res_id; /* resource id */
-} __attribute__ ((packed));
-
-#define NFNETLINK_V0 0
-
-#define NFM_NFA(n) ((struct nfattr *)(((char *)(n)) \
- + NLMSG_ALIGN(sizeof(struct nfgenmsg))))
-#define NFM_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct nfgenmsg))
-
-/* netfilter netlink message types are split in two pieces:
- * 8 bit subsystem, 8bit operation.
- */
-
-#define NFNL_SUBSYS_ID(x) ((x & 0xff00) >> 8)
-#define NFNL_MSG_TYPE(x) (x & 0x00ff)
-
-/* No enum here, otherwise __stringify() trick of MODULE_ALIAS_NFNL_SUBSYS()
- * won't work anymore */
-#define NFNL_SUBSYS_NONE 0
-#define NFNL_SUBSYS_CTNETLINK 1
-#define NFNL_SUBSYS_CTNETLINK_EXP 2
-#define NFNL_SUBSYS_QUEUE 3
-#define NFNL_SUBSYS_ULOG 4
-#define NFNL_SUBSYS_COUNT 5
-
-#ifdef __KERNEL__
-
-#include <linux/netlink.h>
-#include <linux/capability.h>
-
-struct nfnl_callback
-{
- int (*call)(struct sock *nl, struct sk_buff *skb,
- struct nlmsghdr *nlh, struct nfattr *cda[], int *errp);
- u_int16_t attr_count; /* number of nfattr's */
-};
-
-struct nfnetlink_subsystem
-{
- const char *name;
- __u8 subsys_id; /* nfnetlink subsystem ID */
- __u8 cb_count; /* number of callbacks */
- struct nfnl_callback *cb; /* callback for individual types */
-};
-
-extern void __nfa_fill(struct sk_buff *skb, int attrtype,
- int attrlen, const void *data);
-#define NFA_PUT(skb, attrtype, attrlen, data) \
-({ if (skb_tailroom(skb) < (int)NFA_SPACE(attrlen)) goto nfattr_failure; \
- __nfa_fill(skb, attrtype, attrlen, data); })
-
-extern struct semaphore nfnl_sem;
-
-#define nfnl_shlock() down(&nfnl_sem)
-#define nfnl_shlock_nowait() down_trylock(&nfnl_sem)
-
-#define nfnl_shunlock() do { up(&nfnl_sem); \
- if(nfnl && nfnl->sk_receive_queue.qlen) \
- nfnl->sk_data_ready(nfnl, 0); \
- } while(0)
-
-extern void nfnl_lock(void);
-extern void nfnl_unlock(void);
-
-extern int nfnetlink_subsys_register(struct nfnetlink_subsystem *n);
-extern int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n);
-
-extern void nfattr_parse(struct nfattr *tb[], int maxattr,
- struct nfattr *nfa, int len);
-
-#define nfattr_parse_nested(tb, max, nfa) \
- nfattr_parse((tb), (max), NFA_DATA((nfa)), NFA_PAYLOAD((nfa)))
-
-#define nfattr_bad_size(tb, max, cta_min) \
-({ int __i, __res = 0; \
- for (__i=0; __i<max; __i++) { \
- if (!cta_min[__i]) \
- continue; \
- if (tb[__i] && NFA_PAYLOAD(tb[__i]) < cta_min[__i]){ \
- __res = 1; \
- break; \
- } \
- } \
- __res; \
-})
-
-extern int nfnetlink_has_listeners(unsigned int group);
-extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
- int echo);
-extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
-
-#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
- MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
-
-#endif /* __KERNEL__ */
-#endif /* _NFNETLINK_H */
diff --git a/original/linux/netfilter/nfnetlink_conntrack.h b/original/linux/netfilter/nfnetlink_conntrack.h
deleted file mode 100644
index 9ed534c..0000000
--- a/original/linux/netfilter/nfnetlink_conntrack.h
+++ /dev/null
@@ -1,175 +0,0 @@
-#ifndef _IPCONNTRACK_NETLINK_H
-#define _IPCONNTRACK_NETLINK_H
-#include <linux/netfilter/nfnetlink.h>
-
-enum cntl_msg_types {
- IPCTNL_MSG_CT_NEW,
- IPCTNL_MSG_CT_GET,
- IPCTNL_MSG_CT_DELETE,
- IPCTNL_MSG_CT_GET_CTRZERO,
-
- IPCTNL_MSG_MAX
-};
-
-enum ctnl_exp_msg_types {
- IPCTNL_MSG_EXP_NEW,
- IPCTNL_MSG_EXP_GET,
- IPCTNL_MSG_EXP_DELETE,
-
- IPCTNL_MSG_EXP_MAX
-};
-
-
-enum ctattr_type {
- CTA_UNSPEC,
- CTA_TUPLE_ORIG,
- CTA_TUPLE_REPLY,
- CTA_STATUS,
- CTA_PROTOINFO,
- CTA_HELP,
- CTA_NAT_SRC,
-#define CTA_NAT CTA_NAT_SRC /* backwards compatibility */
- CTA_TIMEOUT,
- CTA_MARK,
- CTA_COUNTERS_ORIG,
- CTA_COUNTERS_REPLY,
- CTA_USE,
- CTA_ID,
- CTA_NAT_DST,
- CTA_TUPLE_MASTER,
- CTA_NAT_SEQ_ADJ_ORIG,
- CTA_NAT_SEQ_ADJ_REPLY,
- CTA_SECMARK,
- CTA_ZONE,
- __CTA_MAX
-};
-#define CTA_MAX (__CTA_MAX - 1)
-
-enum ctattr_tuple {
- CTA_TUPLE_UNSPEC,
- CTA_TUPLE_IP,
- CTA_TUPLE_PROTO,
- __CTA_TUPLE_MAX
-};
-#define CTA_TUPLE_MAX (__CTA_TUPLE_MAX - 1)
-
-enum ctattr_ip {
- CTA_IP_UNSPEC,
- CTA_IP_V4_SRC,
- CTA_IP_V4_DST,
- CTA_IP_V6_SRC,
- CTA_IP_V6_DST,
- __CTA_IP_MAX
-};
-#define CTA_IP_MAX (__CTA_IP_MAX - 1)
-
-enum ctattr_l4proto {
- CTA_PROTO_UNSPEC,
- CTA_PROTO_NUM,
- CTA_PROTO_SRC_PORT,
- CTA_PROTO_DST_PORT,
- CTA_PROTO_ICMP_ID,
- CTA_PROTO_ICMP_TYPE,
- CTA_PROTO_ICMP_CODE,
- CTA_PROTO_ICMPV6_ID,
- CTA_PROTO_ICMPV6_TYPE,
- CTA_PROTO_ICMPV6_CODE,
- __CTA_PROTO_MAX
-};
-#define CTA_PROTO_MAX (__CTA_PROTO_MAX - 1)
-
-enum ctattr_protoinfo {
- CTA_PROTOINFO_UNSPEC,
- CTA_PROTOINFO_TCP,
- CTA_PROTOINFO_DCCP,
- CTA_PROTOINFO_SCTP,
- __CTA_PROTOINFO_MAX
-};
-#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
-
-enum ctattr_protoinfo_tcp {
- CTA_PROTOINFO_TCP_UNSPEC,
- CTA_PROTOINFO_TCP_STATE,
- CTA_PROTOINFO_TCP_WSCALE_ORIGINAL,
- CTA_PROTOINFO_TCP_WSCALE_REPLY,
- CTA_PROTOINFO_TCP_FLAGS_ORIGINAL,
- CTA_PROTOINFO_TCP_FLAGS_REPLY,
- __CTA_PROTOINFO_TCP_MAX
-};
-#define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)
-
-enum ctattr_protoinfo_dccp {
- CTA_PROTOINFO_DCCP_UNSPEC,
- CTA_PROTOINFO_DCCP_STATE,
- CTA_PROTOINFO_DCCP_ROLE,
- CTA_PROTOINFO_DCCP_HANDSHAKE_SEQ,
- __CTA_PROTOINFO_DCCP_MAX,
-};
-#define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1)
-
-enum ctattr_protoinfo_sctp {
- CTA_PROTOINFO_SCTP_UNSPEC,
- CTA_PROTOINFO_SCTP_STATE,
- CTA_PROTOINFO_SCTP_VTAG_ORIGINAL,
- CTA_PROTOINFO_SCTP_VTAG_REPLY,
- __CTA_PROTOINFO_SCTP_MAX
-};
-#define CTA_PROTOINFO_SCTP_MAX (__CTA_PROTOINFO_SCTP_MAX - 1)
-
-enum ctattr_counters {
- CTA_COUNTERS_UNSPEC,
- CTA_COUNTERS_PACKETS, /* 64bit counters */
- CTA_COUNTERS_BYTES, /* 64bit counters */
- CTA_COUNTERS32_PACKETS, /* old 32bit counters, unused */
- CTA_COUNTERS32_BYTES, /* old 32bit counters, unused */
- __CTA_COUNTERS_MAX
-};
-#define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1)
-
-enum ctattr_nat {
- CTA_NAT_UNSPEC,
- CTA_NAT_MINIP,
- CTA_NAT_MAXIP,
- CTA_NAT_PROTO,
- __CTA_NAT_MAX
-};
-#define CTA_NAT_MAX (__CTA_NAT_MAX - 1)
-
-enum ctattr_protonat {
- CTA_PROTONAT_UNSPEC,
- CTA_PROTONAT_PORT_MIN,
- CTA_PROTONAT_PORT_MAX,
- __CTA_PROTONAT_MAX
-};
-#define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1)
-
-enum ctattr_natseq {
- CTA_NAT_SEQ_UNSPEC,
- CTA_NAT_SEQ_CORRECTION_POS,
- CTA_NAT_SEQ_OFFSET_BEFORE,
- CTA_NAT_SEQ_OFFSET_AFTER,
- __CTA_NAT_SEQ_MAX
-};
-#define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1)
-
-enum ctattr_expect {
- CTA_EXPECT_UNSPEC,
- CTA_EXPECT_MASTER,
- CTA_EXPECT_TUPLE,
- CTA_EXPECT_MASK,
- CTA_EXPECT_TIMEOUT,
- CTA_EXPECT_ID,
- CTA_EXPECT_HELP_NAME,
- CTA_EXPECT_ZONE,
- __CTA_EXPECT_MAX
-};
-#define CTA_EXPECT_MAX (__CTA_EXPECT_MAX - 1)
-
-enum ctattr_help {
- CTA_HELP_UNSPEC,
- CTA_HELP_NAME,
- __CTA_HELP_MAX
-};
-#define CTA_HELP_MAX (__CTA_HELP_MAX - 1)
-
-#endif /* _IPCONNTRACK_NETLINK_H */
diff --git a/original/linux/netfilter/x_tables.h b/original/linux/netfilter/x_tables.h
deleted file mode 100644
index 48cc32d..0000000
--- a/original/linux/netfilter/x_tables.h
+++ /dev/null
@@ -1,398 +0,0 @@
-#ifndef _X_TABLES_H
-#define _X_TABLES_H
-
-#define XT_FUNCTION_MAXNAMELEN 30
-#define XT_TABLE_MAXNAMELEN 32
-
-struct xt_entry_match
-{
- union {
- struct {
- u_int16_t match_size;
-
- /* Used by userspace */
- char name[XT_FUNCTION_MAXNAMELEN-1];
-
- u_int8_t revision;
- } user;
- struct {
- u_int16_t match_size;
-
- /* Used inside the kernel */
- struct xt_match *match;
- } kernel;
-
- /* Total length */
- u_int16_t match_size;
- } u;
-
- unsigned char data[0];
-};
-
-struct xt_entry_target
-{
- union {
- struct {
- u_int16_t target_size;
-
- /* Used by userspace */
- char name[XT_FUNCTION_MAXNAMELEN-1];
-
- u_int8_t revision;
- } user;
- struct {
- u_int16_t target_size;
-
- /* Used inside the kernel */
- struct xt_target *target;
- } kernel;
-
- /* Total length */
- u_int16_t target_size;
- } u;
-
- unsigned char data[0];
-};
-
-struct xt_standard_target
-{
- struct xt_entry_target target;
- int verdict;
-};
-
-/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision
- * kernel supports, if >= revision. */
-struct xt_get_revision
-{
- char name[XT_FUNCTION_MAXNAMELEN-1];
-
- u_int8_t revision;
-};
-
-/* CONTINUE verdict for targets */
-#define XT_CONTINUE 0xFFFFFFFF
-
-/* For standard target */
-#define XT_RETURN (-NF_REPEAT - 1)
-
-/* this is a dummy structure to find out the alignment requirement for a struct
- * containing all the fundamental data types that are used in ipt_entry,
- * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my
- * personal pleasure to remove it -HW
- */
-struct _xt_align
-{
- u_int8_t u8;
- u_int16_t u16;
- u_int32_t u32;
- u_int64_t u64;
-};
-
-#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \
- & ~(__alignof__(struct _xt_align)-1))
-
-/* Standard return verdict, or do jump. */
-#define XT_STANDARD_TARGET ""
-/* Error verdict. */
-#define XT_ERROR_TARGET "ERROR"
-
-/*
- * New IP firewall options for [gs]etsockopt at the RAW IP level.
- * Unlike BSD Linux inherits IP options so you don't have to use a raw
- * socket for this. Instead we check rights in the calls. */
-#define XT_BASE_CTL 64 /* base for firewall socket options */
-
-#define XT_SO_SET_REPLACE (XT_BASE_CTL)
-#define XT_SO_SET_ADD_COUNTERS (XT_BASE_CTL + 1)
-#define XT_SO_SET_MAX XT_SO_SET_ADD_COUNTERS
-
-#define XT_SO_GET_INFO (XT_BASE_CTL)
-#define XT_SO_GET_ENTRIES (XT_BASE_CTL + 1)
-#define XT_SO_GET_REVISION_MATCH (XT_BASE_CTL + 2)
-#define XT_SO_GET_REVISION_TARGET (XT_BASE_CTL + 3)
-#define XT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
-
-#define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
-#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
-
-struct xt_counters
-{
- u_int64_t pcnt, bcnt; /* Packet and byte counters */
-};
-
-/* The argument to IPT_SO_ADD_COUNTERS. */
-struct xt_counters_info
-{
- /* Which table. */
- char name[XT_TABLE_MAXNAMELEN];
-
- unsigned int num_counters;
-
- /* The counters (actually `number' of these). */
- struct xt_counters counters[0];
-};
-
-#define XT_INV_PROTO 0x40 /* Invert the sense of PROTO. */
-
-#ifdef __KERNEL__
-
-#include <linux/netdevice.h>
-
-#define ASSERT_READ_LOCK(x)
-#define ASSERT_WRITE_LOCK(x)
-#include <linux/netfilter_ipv4/listhelp.h>
-
-#ifdef CONFIG_COMPAT
-#define COMPAT_TO_USER 1
-#define COMPAT_FROM_USER -1
-#define COMPAT_CALC_SIZE 0
-#endif
-
-struct xt_match
-{
- struct list_head list;
-
- const char name[XT_FUNCTION_MAXNAMELEN-1];
-
- /* Return true or false: return FALSE and set *hotdrop = 1 to
- force immediate packet drop. */
- /* Arguments changed since 2.6.9, as this must now handle
- non-linear skb, using skb_header_pointer and
- skb_ip_make_writable. */
- int (*match)(const struct sk_buff *skb,
- const struct net_device *in,
- const struct net_device *out,
- const struct xt_match *match,
- const void *matchinfo,
- int offset,
- unsigned int protoff,
- int *hotdrop);
-
- /* Called when user tries to insert an entry of this type. */
- /* Should return true or false. */
- int (*checkentry)(const char *tablename,
- const void *ip,
- const struct xt_match *match,
- void *matchinfo,
- unsigned int matchinfosize,
- unsigned int hook_mask);
-
- /* Called when entry of this type deleted. */
- void (*destroy)(const struct xt_match *match, void *matchinfo,
- unsigned int matchinfosize);
-
- /* Called when userspace align differs from kernel space one */
- int (*compat)(void *match, void **dstptr, int *size, int convert);
-
- /* Set this to THIS_MODULE if you are a module, otherwise NULL */
- struct module *me;
-
- char *table;
- unsigned int matchsize;
- unsigned int hooks;
- unsigned short proto;
-
- unsigned short family;
- u_int8_t revision;
-};
-
-/* Registration hooks for targets. */
-struct xt_target
-{
- struct list_head list;
-
- const char name[XT_FUNCTION_MAXNAMELEN-1];
-
- /* Returns verdict. Argument order changed since 2.6.9, as this
- must now handle non-linear skbs, using skb_copy_bits and
- skb_ip_make_writable. */
- unsigned int (*target)(struct sk_buff **pskb,
- const struct net_device *in,
- const struct net_device *out,
- unsigned int hooknum,
- const struct xt_target *target,
- const void *targinfo,
- void *userdata);
-
- /* Called when user tries to insert an entry of this type:
- hook_mask is a bitmask of hooks from which it can be
- called. */
- /* Should return true or false. */
- int (*checkentry)(const char *tablename,
- const void *entry,
- const struct xt_target *target,
- void *targinfo,
- unsigned int targinfosize,
- unsigned int hook_mask);
-
- /* Called when entry of this type deleted. */
- void (*destroy)(const struct xt_target *target, void *targinfo,
- unsigned int targinfosize);
-
- /* Called when userspace align differs from kernel space one */
- int (*compat)(void *target, void **dstptr, int *size, int convert);
-
- /* Set this to THIS_MODULE if you are a module, otherwise NULL */
- struct module *me;
-
- char *table;
- unsigned int targetsize;
- unsigned int hooks;
- unsigned short proto;
-
- unsigned short family;
- u_int8_t revision;
-};
-
-/* Furniture shopping... */
-struct xt_table
-{
- struct list_head list;
-
- /* A unique name... */
- char name[XT_TABLE_MAXNAMELEN];
-
- /* What hooks you will enter on */
- unsigned int valid_hooks;
-
- /* Lock for the curtain */
- rwlock_t lock;
-
- /* Man behind the curtain... */
- //struct ip6t_table_info *private;
- void *private;
-
- /* Set this to THIS_MODULE if you are a module, otherwise NULL */
- struct module *me;
-
- int af; /* address/protocol family */
-};
-
-#include <linux/netfilter_ipv4.h>
-
-/* The table itself */
-struct xt_table_info
-{
- /* Size per table */
- unsigned int size;
- /* Number of entries: FIXME. --RR */
- unsigned int number;
- /* Initial number of entries. Needed for module usage count */
- unsigned int initial_entries;
-
- /* Entry points and underflows */
- unsigned int hook_entry[NF_IP_NUMHOOKS];
- unsigned int underflow[NF_IP_NUMHOOKS];
-
- /* ipt_entry tables: one per CPU */
- char *entries[NR_CPUS];
-};
-
-extern int xt_register_target(struct xt_target *target);
-extern void xt_unregister_target(struct xt_target *target);
-extern int xt_register_match(struct xt_match *target);
-extern void xt_unregister_match(struct xt_match *target);
-
-extern int xt_check_match(const struct xt_match *match, unsigned short family,
- unsigned int size, const char *table, unsigned int hook,
- unsigned short proto, int inv_proto);
-extern int xt_check_target(const struct xt_target *target, unsigned short family,
- unsigned int size, const char *table, unsigned int hook,
- unsigned short proto, int inv_proto);
-
-extern int xt_register_table(struct xt_table *table,
- struct xt_table_info *bootstrap,
- struct xt_table_info *newinfo);
-extern void *xt_unregister_table(struct xt_table *table);
-
-extern struct xt_table_info *xt_replace_table(struct xt_table *table,
- unsigned int num_counters,
- struct xt_table_info *newinfo,
- int *error);
-
-extern struct xt_match *xt_find_match(int af, const char *name, u8 revision);
-extern struct xt_target *xt_find_target(int af, const char *name, u8 revision);
-extern struct xt_target *xt_request_find_target(int af, const char *name,
- u8 revision);
-extern int xt_find_revision(int af, const char *name, u8 revision, int target,
- int *err);
-
-extern struct xt_table *xt_find_table_lock(int af, const char *name);
-extern void xt_table_unlock(struct xt_table *t);
-
-extern int xt_proto_init(int af);
-extern void xt_proto_fini(int af);
-
-extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
-extern void xt_free_table_info(struct xt_table_info *info);
-
-#ifdef CONFIG_COMPAT
-#include <net/compat.h>
-
-struct compat_xt_entry_match
-{
- union {
- struct {
- u_int16_t match_size;
- char name[XT_FUNCTION_MAXNAMELEN - 1];
- u_int8_t revision;
- } user;
- struct {
- u_int16_t match_size;
- compat_uptr_t match;
- } kernel;
- u_int16_t match_size;
- } u;
- unsigned char data[0];
-};
-
-struct compat_xt_entry_target
-{
- union {
- struct {
- u_int16_t target_size;
- char name[XT_FUNCTION_MAXNAMELEN - 1];
- u_int8_t revision;
- } user;
- struct {
- u_int16_t target_size;
- compat_uptr_t target;
- } kernel;
- u_int16_t target_size;
- } u;
- unsigned char data[0];
-};
-
-/* FIXME: this works only on 32 bit tasks
- * need to change whole approach in order to calculate align as function of
- * current task alignment */
-
-struct compat_xt_counters
-{
-#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
- u_int32_t cnt[4];
-#else
- u_int64_t cnt[2];
-#endif
-};
-
-struct compat_xt_counters_info
-{
- char name[XT_TABLE_MAXNAMELEN];
- compat_uint_t num_counters;
- struct compat_xt_counters counters[0];
-};
-
-#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \
- & ~(__alignof__(struct compat_xt_counters)-1))
-
-extern void xt_compat_lock(int af);
-extern void xt_compat_unlock(int af);
-extern int xt_compat_match(void *match, void **dstptr, int *size, int convert);
-extern int xt_compat_target(void *target, void **dstptr, int *size,
- int convert);
-
-#endif /* CONFIG_COMPAT */
-#endif /* __KERNEL__ */
-
-#endif /* _X_TABLES_H */
diff --git a/original/linux/netfilter/xt_CLASSIFY.h b/original/linux/netfilter/xt_CLASSIFY.h
deleted file mode 100644
index 5811135..0000000
--- a/original/linux/netfilter/xt_CLASSIFY.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _XT_CLASSIFY_H
-#define _XT_CLASSIFY_H
-
-struct xt_classify_target_info {
- u_int32_t priority;
-};
-
-#endif /*_XT_CLASSIFY_H */
diff --git a/original/linux/netfilter/xt_CONNMARK.h b/original/linux/netfilter/xt_CONNMARK.h
deleted file mode 100644
index 9f74468..0000000
--- a/original/linux/netfilter/xt_CONNMARK.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _XT_CONNMARK_H_target
-#define _XT_CONNMARK_H_target
-
-/* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com>
- * by Henrik Nordstrom <hno@marasystems.com>
- *
- * 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.
- */
-
-enum {
- XT_CONNMARK_SET = 0,
- XT_CONNMARK_SAVE,
- XT_CONNMARK_RESTORE
-};
-
-struct xt_connmark_target_info {
- unsigned long mark;
- unsigned long mask;
- u_int8_t mode;
-};
-
-#endif /*_XT_CONNMARK_H_target*/
diff --git a/original/linux/netfilter/xt_CONNSECMARK.h b/original/linux/netfilter/xt_CONNSECMARK.h
deleted file mode 100644
index c6bd754..0000000
--- a/original/linux/netfilter/xt_CONNSECMARK.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _XT_CONNSECMARK_H_target
-#define _XT_CONNSECMARK_H_target
-
-enum {
- CONNSECMARK_SAVE = 1,
- CONNSECMARK_RESTORE,
-};
-
-struct xt_connsecmark_target_info {
- u_int8_t mode;
-};
-
-#endif /*_XT_CONNSECMARK_H_target */
diff --git a/original/linux/netfilter/xt_IDLETIMER.h b/original/linux/netfilter/xt_IDLETIMER.h
deleted file mode 100644
index faaa28b..0000000
--- a/original/linux/netfilter/xt_IDLETIMER.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * linux/include/linux/netfilter/xt_IDLETIMER.h
- *
- * Header file for Xtables timer target module.
- *
- * Copyright (C) 2004, 2010 Nokia Corporation
- *
- * Written by Timo Teras <ext-timo.teras@nokia.com>
- *
- * Converted to x_tables and forward-ported to 2.6.34
- * by Luciano Coelho <luciano.coelho@nokia.com>
- *
- * Contact: Luciano Coelho <luciano.coelho@nokia.com>
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#ifndef _XT_IDLETIMER_H
-#define _XT_IDLETIMER_H
-
-#include <linux/types.h>
-
-#define MAX_IDLETIMER_LABEL_SIZE 28
-#define NLMSG_MAX_SIZE 64
-
-#define NL_EVENT_TYPE_INACTIVE 0
-#define NL_EVENT_TYPE_ACTIVE 1
-
-struct idletimer_tg_info {
- __u32 timeout;
-
- char label[MAX_IDLETIMER_LABEL_SIZE];
-
- /* Use netlink messages for notification in addition to sysfs */
- __u8 send_nl_msg;
-
- /* for kernel module internal use only */
- struct idletimer_tg *timer __attribute__((aligned(8)));
-};
-
-#endif
diff --git a/original/linux/netfilter/xt_MARK.h b/original/linux/netfilter/xt_MARK.h
deleted file mode 100644
index b021e93..0000000
--- a/original/linux/netfilter/xt_MARK.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _XT_MARK_H_target
-#define _XT_MARK_H_target
-
-/* Version 0 */
-struct xt_mark_target_info {
- unsigned long mark;
-};
-
-/* Version 1 */
-enum {
- XT_MARK_SET=0,
- XT_MARK_AND,
- XT_MARK_OR,
-};
-
-struct xt_mark_target_info_v1 {
- unsigned long mark;
- u_int8_t mode;
-};
-
-#endif /*_XT_MARK_H_target */
diff --git a/original/linux/netfilter/xt_NFQUEUE.h b/original/linux/netfilter/xt_NFQUEUE.h
deleted file mode 100644
index 9a9af79..0000000
--- a/original/linux/netfilter/xt_NFQUEUE.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* iptables module for using NFQUEUE mechanism
- *
- * (C) 2005 Harald Welte <laforge@netfilter.org>
- *
- * This software is distributed under GNU GPL v2, 1991
- *
-*/
-#ifndef _XT_NFQ_TARGET_H
-#define _XT_NFQ_TARGET_H
-
-/* target info */
-struct xt_NFQ_info {
- u_int16_t queuenum;
-};
-
-#endif /* _XT_NFQ_TARGET_H */
diff --git a/original/linux/netfilter/xt_SECMARK.h b/original/linux/netfilter/xt_SECMARK.h
deleted file mode 100644
index c53fbff..0000000
--- a/original/linux/netfilter/xt_SECMARK.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _XT_SECMARK_H_target
-#define _XT_SECMARK_H_target
-
-/*
- * This is intended for use by various security subsystems (but not
- * at the same time).
- *
- * 'mode' refers to the specific security subsystem which the
- * packets are being marked for.
- */
-#define SECMARK_MODE_SEL 0x01 /* SELinux */
-#define SECMARK_SELCTX_MAX 256
-
-struct xt_secmark_target_selinux_info {
- u_int32_t selsid;
- char selctx[SECMARK_SELCTX_MAX];
-};
-
-struct xt_secmark_target_info {
- u_int8_t mode;
- union {
- struct xt_secmark_target_selinux_info sel;
- } u;
-};
-
-#endif /*_XT_SECMARK_H_target */
diff --git a/original/linux/netfilter/xt_comment.h b/original/linux/netfilter/xt_comment.h
deleted file mode 100644
index eacfedc..0000000
--- a/original/linux/netfilter/xt_comment.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _XT_COMMENT_H
-#define _XT_COMMENT_H
-
-#define XT_MAX_COMMENT_LEN 256
-
-struct xt_comment_info {
- unsigned char comment[XT_MAX_COMMENT_LEN];
-};
-
-#endif /* XT_COMMENT_H */
diff --git a/original/linux/netfilter/xt_connbytes.h b/original/linux/netfilter/xt_connbytes.h
deleted file mode 100644
index c022c98..0000000
--- a/original/linux/netfilter/xt_connbytes.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _XT_CONNBYTES_H
-#define _XT_CONNBYTES_H
-
-enum xt_connbytes_what {
- XT_CONNBYTES_PKTS,
- XT_CONNBYTES_BYTES,
- XT_CONNBYTES_AVGPKT,
-};
-
-enum xt_connbytes_direction {
- XT_CONNBYTES_DIR_ORIGINAL,
- XT_CONNBYTES_DIR_REPLY,
- XT_CONNBYTES_DIR_BOTH,
-};
-
-struct xt_connbytes_info
-{
- struct {
- aligned_u64 from; /* count to be matched */
- aligned_u64 to; /* count to be matched */
- } count;
- u_int8_t what; /* ipt_connbytes_what */
- u_int8_t direction; /* ipt_connbytes_direction */
-};
-#endif
diff --git a/original/linux/netfilter/xt_connmark.h b/original/linux/netfilter/xt_connmark.h
deleted file mode 100644
index c592f6a..0000000
--- a/original/linux/netfilter/xt_connmark.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _XT_CONNMARK_H
-#define _XT_CONNMARK_H
-
-/* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com>
- * by Henrik Nordstrom <hno@marasystems.com>
- *
- * 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.
- */
-
-struct xt_connmark_info {
- unsigned long mark, mask;
- u_int8_t invert;
-};
-
-#endif /*_XT_CONNMARK_H*/
diff --git a/original/linux/netfilter/xt_conntrack.h b/original/linux/netfilter/xt_conntrack.h
deleted file mode 100644
index 4c2d994..0000000
--- a/original/linux/netfilter/xt_conntrack.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Header file for kernel module to match connection tracking information.
- * GPL (C) 2001 Marc Boucher (marc@mbsi.ca).
- */
-
-#ifndef _XT_CONNTRACK_H
-#define _XT_CONNTRACK_H
-
-#include <linux/netfilter/nf_conntrack_tuple_common.h>
-#include <linux/in.h>
-
-#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
-#define XT_CONNTRACK_STATE_INVALID (1 << 0)
-
-#define XT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1))
-#define XT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2))
-#define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
-
-/* flags, invflags: */
-#define XT_CONNTRACK_STATE 0x01
-#define XT_CONNTRACK_PROTO 0x02
-#define XT_CONNTRACK_ORIGSRC 0x04
-#define XT_CONNTRACK_ORIGDST 0x08
-#define XT_CONNTRACK_REPLSRC 0x10
-#define XT_CONNTRACK_REPLDST 0x20
-#define XT_CONNTRACK_STATUS 0x40
-#define XT_CONNTRACK_EXPIRES 0x80
-
-/* This is exposed to userspace, so remains frozen in time. */
-struct ip_conntrack_old_tuple
-{
- struct {
- __u32 ip;
- union {
- __u16 all;
- } u;
- } src;
-
- struct {
- __u32 ip;
- union {
- __u16 all;
- } u;
-
- /* The protocol. */
- __u16 protonum;
- } dst;
-};
-
-struct xt_conntrack_info
-{
- unsigned int statemask, statusmask;
-
- struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX];
- struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX];
-
- unsigned long expires_min, expires_max;
-
- /* Flags word */
- u_int8_t flags;
- /* Inverse flags */
- u_int8_t invflags;
-};
-#endif /*_XT_CONNTRACK_H*/
diff --git a/original/linux/netfilter/xt_dccp.h b/original/linux/netfilter/xt_dccp.h
deleted file mode 100644
index e0221b9..0000000
--- a/original/linux/netfilter/xt_dccp.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _XT_DCCP_H_
-#define _XT_DCCP_H_
-
-#define XT_DCCP_SRC_PORTS 0x01
-#define XT_DCCP_DEST_PORTS 0x02
-#define XT_DCCP_TYPE 0x04
-#define XT_DCCP_OPTION 0x08
-
-#define XT_DCCP_VALID_FLAGS 0x0f
-
-struct xt_dccp_info {
- u_int16_t dpts[2]; /* Min, Max */
- u_int16_t spts[2]; /* Min, Max */
-
- u_int16_t flags;
- u_int16_t invflags;
-
- u_int16_t typemask;
- u_int8_t option;
-};
-
-#endif /* _XT_DCCP_H_ */
-
diff --git a/original/linux/netfilter/xt_esp.h b/original/linux/netfilter/xt_esp.h
deleted file mode 100644
index 9380fb1..0000000
--- a/original/linux/netfilter/xt_esp.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _XT_ESP_H
-#define _XT_ESP_H
-
-struct xt_esp
-{
- u_int32_t spis[2]; /* Security Parameter Index */
- u_int8_t invflags; /* Inverse flags */
-};
-
-/* Values for "invflags" field in struct xt_esp. */
-#define XT_ESP_INV_SPI 0x01 /* Invert the sense of spi. */
-#define XT_ESP_INV_MASK 0x01 /* All possible flags. */
-
-#endif /*_XT_ESP_H*/
diff --git a/original/linux/netfilter/xt_helper.h b/original/linux/netfilter/xt_helper.h
deleted file mode 100644
index 6b42763..0000000
--- a/original/linux/netfilter/xt_helper.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _XT_HELPER_H
-#define _XT_HELPER_H
-
-struct xt_helper_info {
- int invert;
- char name[30];
-};
-#endif /* _XT_HELPER_H */
diff --git a/original/linux/netfilter/xt_length.h b/original/linux/netfilter/xt_length.h
deleted file mode 100644
index 7c2b439..0000000
--- a/original/linux/netfilter/xt_length.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _XT_LENGTH_H
-#define _XT_LENGTH_H
-
-struct xt_length_info {
- u_int16_t min, max;
- u_int8_t invert;
-};
-
-#endif /*_XT_LENGTH_H*/
diff --git a/original/linux/netfilter/xt_limit.h b/original/linux/netfilter/xt_limit.h
deleted file mode 100644
index b3ce653..0000000
--- a/original/linux/netfilter/xt_limit.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _XT_RATE_H
-#define _XT_RATE_H
-
-/* timings are in milliseconds. */
-#define XT_LIMIT_SCALE 10000
-
-/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
- seconds, or one every 59 hours. */
-struct xt_rateinfo {
- u_int32_t avg; /* Average secs between packets * scale */
- u_int32_t burst; /* Period multiplier for upper limit. */
-
- /* Used internally by the kernel */
- unsigned long prev;
- u_int32_t credit;
- u_int32_t credit_cap, cost;
-
- /* Ugly, ugly fucker. */
- struct xt_rateinfo *master;
-};
-#endif /*_XT_RATE_H*/
diff --git a/original/linux/netfilter/xt_mac.h b/original/linux/netfilter/xt_mac.h
deleted file mode 100644
index b892cdc..0000000
--- a/original/linux/netfilter/xt_mac.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _XT_MAC_H
-#define _XT_MAC_H
-
-struct xt_mac_info {
- unsigned char srcaddr[ETH_ALEN];
- int invert;
-};
-#endif /*_XT_MAC_H*/
diff --git a/original/linux/netfilter/xt_mark.h b/original/linux/netfilter/xt_mark.h
deleted file mode 100644
index 802dd48..0000000
--- a/original/linux/netfilter/xt_mark.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _XT_MARK_H
-#define _XT_MARK_H
-
-struct xt_mark_info {
- unsigned long mark, mask;
- u_int8_t invert;
-};
-
-#endif /*_XT_MARK_H*/
diff --git a/original/linux/netfilter/xt_multiport.h b/original/linux/netfilter/xt_multiport.h
deleted file mode 100644
index d49ee41..0000000
--- a/original/linux/netfilter/xt_multiport.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _XT_MULTIPORT_H
-#define _XT_MULTIPORT_H
-
-enum xt_multiport_flags
-{
- XT_MULTIPORT_SOURCE,
- XT_MULTIPORT_DESTINATION,
- XT_MULTIPORT_EITHER
-};
-
-#define XT_MULTI_PORTS 15
-
-/* Must fit inside union xt_matchinfo: 16 bytes */
-struct xt_multiport
-{
- u_int8_t flags; /* Type of comparison */
- u_int8_t count; /* Number of ports */
- u_int16_t ports[XT_MULTI_PORTS]; /* Ports */
-};
-
-struct xt_multiport_v1
-{
- u_int8_t flags; /* Type of comparison */
- u_int8_t count; /* Number of ports */
- u_int16_t ports[XT_MULTI_PORTS]; /* Ports */
- u_int8_t pflags[XT_MULTI_PORTS]; /* Port flags */
- u_int8_t invert; /* Invert flag */
-};
-
-#endif /*_XT_MULTIPORT_H*/
diff --git a/original/linux/netfilter/xt_physdev.h b/original/linux/netfilter/xt_physdev.h
deleted file mode 100644
index 25a7a18..0000000
--- a/original/linux/netfilter/xt_physdev.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _XT_PHYSDEV_H
-#define _XT_PHYSDEV_H
-
-#ifdef __KERNEL__
-#include <linux/if.h>
-#endif
-
-#define XT_PHYSDEV_OP_IN 0x01
-#define XT_PHYSDEV_OP_OUT 0x02
-#define XT_PHYSDEV_OP_BRIDGED 0x04
-#define XT_PHYSDEV_OP_ISIN 0x08
-#define XT_PHYSDEV_OP_ISOUT 0x10
-#define XT_PHYSDEV_OP_MASK (0x20 - 1)
-
-struct xt_physdev_info {
- char physindev[IFNAMSIZ];
- char in_mask[IFNAMSIZ];
- char physoutdev[IFNAMSIZ];
- char out_mask[IFNAMSIZ];
- u_int8_t invert;
- u_int8_t bitmask;
-};
-
-#endif /*_XT_PHYSDEV_H*/
diff --git a/original/linux/netfilter/xt_pkttype.h b/original/linux/netfilter/xt_pkttype.h
deleted file mode 100644
index f265cf5..0000000
--- a/original/linux/netfilter/xt_pkttype.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _XT_PKTTYPE_H
-#define _XT_PKTTYPE_H
-
-struct xt_pkttype_info {
- int pkttype;
- int invert;
-};
-#endif /*_XT_PKTTYPE_H*/
diff --git a/original/linux/netfilter/xt_quota.h b/original/linux/netfilter/xt_quota.h
deleted file mode 100644
index acd7fd7..0000000
--- a/original/linux/netfilter/xt_quota.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _XT_QUOTA_H
-#define _XT_QUOTA_H
-
-enum xt_quota_flags {
- XT_QUOTA_INVERT = 0x1,
-};
-#define XT_QUOTA_MASK 0x1
-
-struct xt_quota_info {
- u_int32_t flags;
- u_int32_t pad;
- aligned_u64 quota;
- struct xt_quota_info *master;
-};
-
-#endif /* _XT_QUOTA_H */
diff --git a/original/linux/netfilter/xt_realm.h b/original/linux/netfilter/xt_realm.h
deleted file mode 100644
index 220e872..0000000
--- a/original/linux/netfilter/xt_realm.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _XT_REALM_H
-#define _XT_REALM_H
-
-struct xt_realm_info {
- u_int32_t id;
- u_int32_t mask;
- u_int8_t invert;
-};
-
-#endif /* _XT_REALM_H */
diff --git a/original/linux/netfilter/xt_sctp.h b/original/linux/netfilter/xt_sctp.h
deleted file mode 100644
index b157897..0000000
--- a/original/linux/netfilter/xt_sctp.h
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifndef _XT_SCTP_H_
-#define _XT_SCTP_H_
-
-#define XT_SCTP_SRC_PORTS 0x01
-#define XT_SCTP_DEST_PORTS 0x02
-#define XT_SCTP_CHUNK_TYPES 0x04
-
-#define XT_SCTP_VALID_FLAGS 0x07
-
-#define ELEMCOUNT(x) (sizeof(x)/sizeof(x[0]))
-
-
-struct xt_sctp_flag_info {
- u_int8_t chunktype;
- u_int8_t flag;
- u_int8_t flag_mask;
-};
-
-#define XT_NUM_SCTP_FLAGS 4
-
-struct xt_sctp_info {
- u_int16_t dpts[2]; /* Min, Max */
- u_int16_t spts[2]; /* Min, Max */
-
- u_int32_t chunkmap[256 / sizeof (u_int32_t)]; /* Bit mask of chunks to be matched according to RFC 2960 */
-
-#define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */
-#define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */
-#define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */
-
- u_int32_t chunk_match_type;
- struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS];
- int flag_count;
-
- u_int32_t flags;
- u_int32_t invflags;
-};
-
-#define bytes(type) (sizeof(type) * 8)
-
-#define SCTP_CHUNKMAP_SET(chunkmap, type) \
- do { \
- chunkmap[type / bytes(u_int32_t)] |= \
- 1 << (type % bytes(u_int32_t)); \
- } while (0)
-
-#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \
- do { \
- chunkmap[type / bytes(u_int32_t)] &= \
- ~(1 << (type % bytes(u_int32_t))); \
- } while (0)
-
-#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \
-({ \
- (chunkmap[type / bytes (u_int32_t)] & \
- (1 << (type % bytes (u_int32_t)))) ? 1: 0; \
-})
-
-#define SCTP_CHUNKMAP_RESET(chunkmap) \
- do { \
- int i; \
- for (i = 0; i < ELEMCOUNT(chunkmap); i++) \
- chunkmap[i] = 0; \
- } while (0)
-
-#define SCTP_CHUNKMAP_SET_ALL(chunkmap) \
- do { \
- int i; \
- for (i = 0; i < ELEMCOUNT(chunkmap); i++) \
- chunkmap[i] = ~0; \
- } while (0)
-
-#define SCTP_CHUNKMAP_COPY(destmap, srcmap) \
- do { \
- int i; \
- for (i = 0; i < ELEMCOUNT(chunkmap); i++) \
- destmap[i] = srcmap[i]; \
- } while (0)
-
-#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \
-({ \
- int i; \
- int flag = 1; \
- for (i = 0; i < ELEMCOUNT(chunkmap); i++) { \
- if (chunkmap[i]) { \
- flag = 0; \
- break; \
- } \
- } \
- flag; \
-})
-
-#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \
-({ \
- int i; \
- int flag = 1; \
- for (i = 0; i < ELEMCOUNT(chunkmap); i++) { \
- if (chunkmap[i] != ~0) { \
- flag = 0; \
- break; \
- } \
- } \
- flag; \
-})
-
-#endif /* _XT_SCTP_H_ */
-
diff --git a/original/linux/netfilter/xt_state.h b/original/linux/netfilter/xt_state.h
deleted file mode 100644
index c06f32e..0000000
--- a/original/linux/netfilter/xt_state.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _XT_STATE_H
-#define _XT_STATE_H
-
-#define XT_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
-#define XT_STATE_INVALID (1 << 0)
-
-#define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1))
-
-struct xt_state_info
-{
- unsigned int statemask;
-};
-#endif /*_XT_STATE_H*/
diff --git a/original/linux/netfilter/xt_statistic.h b/original/linux/netfilter/xt_statistic.h
deleted file mode 100644
index c344e99..0000000
--- a/original/linux/netfilter/xt_statistic.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _XT_STATISTIC_H
-#define _XT_STATISTIC_H
-
-enum xt_statistic_mode {
- XT_STATISTIC_MODE_RANDOM,
- XT_STATISTIC_MODE_NTH,
- __XT_STATISTIC_MODE_MAX
-};
-#define XT_STATISTIC_MODE_MAX (__XT_STATISTIC_MODE_MAX - 1)
-
-enum xt_statistic_flags {
- XT_STATISTIC_INVERT = 0x1,
-};
-#define XT_STATISTIC_MASK 0x1
-
-struct xt_statistic_info {
- u_int16_t mode;
- u_int16_t flags;
- union {
- struct {
- u_int32_t probability;
- } random;
- struct {
- u_int32_t every;
- u_int32_t packet;
- u_int32_t count;
- } nth;
- } u;
- struct xt_statistic_info *master __attribute__((aligned(8)));
-};
-
-#endif /* _XT_STATISTIC_H */
diff --git a/original/linux/netfilter/xt_string.h b/original/linux/netfilter/xt_string.h
deleted file mode 100644
index 3b3419f..0000000
--- a/original/linux/netfilter/xt_string.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _XT_STRING_H
-#define _XT_STRING_H
-
-#define XT_STRING_MAX_PATTERN_SIZE 128
-#define XT_STRING_MAX_ALGO_NAME_SIZE 16
-
-struct xt_string_info
-{
- u_int16_t from_offset;
- u_int16_t to_offset;
- char algo[XT_STRING_MAX_ALGO_NAME_SIZE];
- char pattern[XT_STRING_MAX_PATTERN_SIZE];
- u_int8_t patlen;
- u_int8_t invert;
- struct ts_config __attribute__((aligned(8))) *config;
-};
-
-#endif /*_XT_STRING_H*/
diff --git a/original/linux/netfilter/xt_tcpmss.h b/original/linux/netfilter/xt_tcpmss.h
deleted file mode 100644
index e03274c..0000000
--- a/original/linux/netfilter/xt_tcpmss.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _XT_TCPMSS_MATCH_H
-#define _XT_TCPMSS_MATCH_H
-
-struct xt_tcpmss_match_info {
- u_int16_t mss_min, mss_max;
- u_int8_t invert;
-};
-
-#endif /*_XT_TCPMSS_MATCH_H*/
diff --git a/original/linux/netfilter/xt_tcpudp.h b/original/linux/netfilter/xt_tcpudp.h
deleted file mode 100644
index 78bc65f..0000000
--- a/original/linux/netfilter/xt_tcpudp.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _XT_TCPUDP_H
-#define _XT_TCPUDP_H
-
-/* TCP matching stuff */
-struct xt_tcp
-{
- u_int16_t spts[2]; /* Source port range. */
- u_int16_t dpts[2]; /* Destination port range. */
- u_int8_t option; /* TCP Option iff non-zero*/
- u_int8_t flg_mask; /* TCP flags mask byte */
- u_int8_t flg_cmp; /* TCP flags compare byte */
- u_int8_t invflags; /* Inverse flags */
-};
-
-/* Values for "inv" field in struct ipt_tcp. */
-#define XT_TCP_INV_SRCPT 0x01 /* Invert the sense of source ports. */
-#define XT_TCP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */
-#define XT_TCP_INV_FLAGS 0x04 /* Invert the sense of TCP flags. */
-#define XT_TCP_INV_OPTION 0x08 /* Invert the sense of option test. */
-#define XT_TCP_INV_MASK 0x0F /* All possible flags. */
-
-/* UDP matching stuff */
-struct xt_udp
-{
- u_int16_t spts[2]; /* Source port range. */
- u_int16_t dpts[2]; /* Destination port range. */
- u_int8_t invflags; /* Inverse flags */
-};
-
-/* Values for "invflags" field in struct ipt_udp. */
-#define XT_UDP_INV_SRCPT 0x01 /* Invert the sense of source ports. */
-#define XT_UDP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */
-#define XT_UDP_INV_MASK 0x03 /* All possible flags. */
-
-
-#endif
diff --git a/original/linux/netfilter_arp.h b/original/linux/netfilter_arp.h
deleted file mode 100644
index 92bc6dd..0000000
--- a/original/linux/netfilter_arp.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __LINUX_ARP_NETFILTER_H
-#define __LINUX_ARP_NETFILTER_H
-
-/* ARP-specific defines for netfilter.
- * (C)2002 Rusty Russell IBM -- This code is GPL.
- */
-
-#include <linux/netfilter.h>
-
-/* There is no PF_ARP. */
-#define NF_ARP 0
-
-/* ARP Hooks */
-#define NF_ARP_IN 0
-#define NF_ARP_OUT 1
-#define NF_ARP_FORWARD 2
-#define NF_ARP_NUMHOOKS 3
-
-#endif /* __LINUX_ARP_NETFILTER_H */
diff --git a/original/linux/netfilter_arp/arp_tables.h b/original/linux/netfilter_arp/arp_tables.h
deleted file mode 100644
index 62cc27d..0000000
--- a/original/linux/netfilter_arp/arp_tables.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Format of an ARP firewall descriptor
- *
- * src, tgt, src_mask, tgt_mask, arpop, arpop_mask are always stored in
- * network byte order.
- * flags are stored in host byte order (of course).
- */
-
-#ifndef _ARPTABLES_H
-#define _ARPTABLES_H
-
-#ifdef __KERNEL__
-#include <linux/if.h>
-#include <linux/types.h>
-#include <linux/in.h>
-#include <linux/if_arp.h>
-#include <linux/skbuff.h>
-#endif
-#include <linux/compiler.h>
-#include <linux/netfilter_arp.h>
-
-#include <linux/netfilter/x_tables.h>
-
-#define ARPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
-#define ARPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
-#define arpt_target xt_target
-#define arpt_table xt_table
-
-#define ARPT_DEV_ADDR_LEN_MAX 16
-
-struct arpt_devaddr_info {
- char addr[ARPT_DEV_ADDR_LEN_MAX];
- char mask[ARPT_DEV_ADDR_LEN_MAX];
-};
-
-/* Yes, Virginia, you have to zero the padding. */
-struct arpt_arp {
- /* Source and target IP addr */
- struct in_addr src, tgt;
- /* Mask for src and target IP addr */
- struct in_addr smsk, tmsk;
-
- /* Device hw address length, src+target device addresses */
- u_int8_t arhln, arhln_mask;
- struct arpt_devaddr_info src_devaddr;
- struct arpt_devaddr_info tgt_devaddr;
-
- /* ARP operation code. */
- u_int16_t arpop, arpop_mask;
-
- /* ARP hardware address and protocol address format. */
- u_int16_t arhrd, arhrd_mask;
- u_int16_t arpro, arpro_mask;
-
- /* The protocol address length is only accepted if it is 4
- * so there is no use in offering a way to do filtering on it.
- */
-
- char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
- unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
-
- /* Flags word */
- u_int8_t flags;
- /* Inverse flags */
- u_int16_t invflags;
-};
-
-#define arpt_entry_target xt_entry_target
-#define arpt_standard_target xt_standard_target
-
-/* Values for "flag" field in struct arpt_ip (general arp structure).
- * No flags defined yet.
- */
-#define ARPT_F_MASK 0x00 /* All possible flag bits mask. */
-
-/* Values for "inv" field in struct arpt_arp. */
-#define ARPT_INV_VIA_IN 0x0001 /* Invert the sense of IN IFACE. */
-#define ARPT_INV_VIA_OUT 0x0002 /* Invert the sense of OUT IFACE */
-#define ARPT_INV_SRCIP 0x0004 /* Invert the sense of SRC IP. */
-#define ARPT_INV_TGTIP 0x0008 /* Invert the sense of TGT IP. */
-#define ARPT_INV_SRCDEVADDR 0x0010 /* Invert the sense of SRC DEV ADDR. */
-#define ARPT_INV_TGTDEVADDR 0x0020 /* Invert the sense of TGT DEV ADDR. */
-#define ARPT_INV_ARPOP 0x0040 /* Invert the sense of ARP OP. */
-#define ARPT_INV_ARPHRD 0x0080 /* Invert the sense of ARP HRD. */
-#define ARPT_INV_ARPPRO 0x0100 /* Invert the sense of ARP PRO. */
-#define ARPT_INV_ARPHLN 0x0200 /* Invert the sense of ARP HLN. */
-#define ARPT_INV_MASK 0x03FF /* All possible flag bits mask. */
-
-/* This structure defines each of the firewall rules. Consists of 3
- parts which are 1) general ARP header stuff 2) match specific
- stuff 3) the target to perform if the rule matches */
-struct arpt_entry
-{
- struct arpt_arp arp;
-
- /* Size of arpt_entry + matches */
- u_int16_t target_offset;
- /* Size of arpt_entry + matches + target */
- u_int16_t next_offset;
-
- /* Back pointer */
- unsigned int comefrom;
-
- /* Packet and byte counters. */
- struct xt_counters counters;
-
- /* The matches (if any), then the target. */
- unsigned char elems[0];
-};
-
-/*
- * New IP firewall options for [gs]etsockopt at the RAW IP level.
- * Unlike BSD Linux inherits IP options so you don't have to use a raw
- * socket for this. Instead we check rights in the calls.
- */
-#define ARPT_CTL_OFFSET 32
-#define ARPT_BASE_CTL (XT_BASE_CTL+ARPT_CTL_OFFSET)
-
-#define ARPT_SO_SET_REPLACE (XT_SO_SET_REPLACE+ARPT_CTL_OFFSET)
-#define ARPT_SO_SET_ADD_COUNTERS (XT_SO_SET_ADD_COUNTERS+ARPT_CTL_OFFSET)
-#define ARPT_SO_SET_MAX (XT_SO_SET_MAX+ARPT_CTL_OFFSET)
-
-#define ARPT_SO_GET_INFO (XT_SO_GET_INFO+ARPT_CTL_OFFSET)
-#define ARPT_SO_GET_ENTRIES (XT_SO_GET_ENTRIES+ARPT_CTL_OFFSET)
-/* #define ARPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH */
-#define ARPT_SO_GET_REVISION_TARGET (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
-#define ARPT_SO_GET_MAX (XT_SO_GET_REVISION_TARGET+ARPT_CTL_OFFSET)
-
-/* CONTINUE verdict for targets */
-#define ARPT_CONTINUE XT_CONTINUE
-
-/* For standard target */
-#define ARPT_RETURN XT_RETURN
-
-/* The argument to ARPT_SO_GET_INFO */
-struct arpt_getinfo
-{
- /* Which table: caller fills this in. */
- char name[ARPT_TABLE_MAXNAMELEN];
-
- /* Kernel fills these in. */
- /* Which hook entry points are valid: bitmask */
- unsigned int valid_hooks;
-
- /* Hook entry points: one per netfilter hook. */
- unsigned int hook_entry[NF_ARP_NUMHOOKS];
-
- /* Underflow points. */
- unsigned int underflow[NF_ARP_NUMHOOKS];
-
- /* Number of entries */
- unsigned int num_entries;
-
- /* Size of entries. */
- unsigned int size;
-};
-
-/* The argument to ARPT_SO_SET_REPLACE. */
-struct arpt_replace
-{
- /* Which table. */
- char name[ARPT_TABLE_MAXNAMELEN];
-
- /* Which hook entry points are valid: bitmask. You can't
- change this. */
- unsigned int valid_hooks;
-
- /* Number of entries */
- unsigned int num_entries;
-
- /* Total size of new entries */
- unsigned int size;
-
- /* Hook entry points. */
- unsigned int hook_entry[NF_ARP_NUMHOOKS];
-
- /* Underflow points. */
- unsigned int underflow[NF_ARP_NUMHOOKS];
-
- /* Information about old entries: */
- /* Number of counters (must be equal to current number of entries). */
- unsigned int num_counters;
- /* The old entries' counters. */
- struct xt_counters __user *counters;
-
- /* The entries (hang off end: not really an array). */
- struct arpt_entry entries[0];
-};
-
-/* The argument to ARPT_SO_ADD_COUNTERS. */
-#define arpt_counters_info xt_counters_info
-
-/* The argument to ARPT_SO_GET_ENTRIES. */
-struct arpt_get_entries
-{
- /* Which table: user fills this in. */
- char name[ARPT_TABLE_MAXNAMELEN];
-
- /* User fills this in: total entry size. */
- unsigned int size;
-
- /* The entries. */
- struct arpt_entry entrytable[0];
-};
-
-/* Standard return verdict, or do jump. */
-#define ARPT_STANDARD_TARGET XT_STANDARD_TARGET
-/* Error verdict. */
-#define ARPT_ERROR_TARGET XT_ERROR_TARGET
-
-/* Helper functions */
-static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e)
-{
- return (void *)e + e->target_offset;
-}
-
-/* fn returns 0 to continue iteration */
-#define ARPT_ENTRY_ITERATE(entries, size, fn, args...) \
-({ \
- unsigned int __i; \
- int __ret = 0; \
- struct arpt_entry *__entry; \
- \
- for (__i = 0; __i < (size); __i += __entry->next_offset) { \
- __entry = (void *)(entries) + __i; \
- \
- __ret = fn(__entry , ## args); \
- if (__ret != 0) \
- break; \
- } \
- __ret; \
-})
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-#ifdef __KERNEL__
-
-#define arpt_register_target(tgt) \
-({ (tgt)->family = NF_ARP; \
- xt_register_target(tgt); })
-#define arpt_unregister_target(tgt) xt_unregister_target(tgt)
-
-extern int arpt_register_table(struct arpt_table *table,
- const struct arpt_replace *repl);
-extern void arpt_unregister_table(struct arpt_table *table);
-extern unsigned int arpt_do_table(struct sk_buff **pskb,
- unsigned int hook,
- const struct net_device *in,
- const struct net_device *out,
- struct arpt_table *table,
- void *userdata);
-
-#define ARPT_ALIGN(s) (((s) + (__alignof__(struct arpt_entry)-1)) & ~(__alignof__(struct arpt_entry)-1))
-#endif /*__KERNEL__*/
-#endif /* _ARPTABLES_H */
diff --git a/original/linux/netfilter_bridge.h b/original/linux/netfilter_bridge.h
deleted file mode 100644
index 427c67f..0000000
--- a/original/linux/netfilter_bridge.h
+++ /dev/null
@@ -1,96 +0,0 @@
-#ifndef __LINUX_BRIDGE_NETFILTER_H
-#define __LINUX_BRIDGE_NETFILTER_H
-
-/* bridge-specific defines for netfilter.
- */
-
-#include <linux/netfilter.h>
-#if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER)
-#include <linux/if_ether.h>
-#endif
-
-/* Bridge Hooks */
-/* After promisc drops, checksum checks. */
-#define NF_BR_PRE_ROUTING 0
-/* If the packet is destined for this box. */
-#define NF_BR_LOCAL_IN 1
-/* If the packet is destined for another interface. */
-#define NF_BR_FORWARD 2
-/* Packets coming from a local process. */
-#define NF_BR_LOCAL_OUT 3
-/* Packets about to hit the wire. */
-#define NF_BR_POST_ROUTING 4
-/* Not really a hook, but used for the ebtables broute table */
-#define NF_BR_BROUTING 5
-#define NF_BR_NUMHOOKS 6
-
-#ifdef __KERNEL__
-
-enum nf_br_hook_priorities {
- NF_BR_PRI_FIRST = INT_MIN,
- NF_BR_PRI_NAT_DST_BRIDGED = -300,
- NF_BR_PRI_FILTER_BRIDGED = -200,
- NF_BR_PRI_BRNF = 0,
- NF_BR_PRI_NAT_DST_OTHER = 100,
- NF_BR_PRI_FILTER_OTHER = 200,
- NF_BR_PRI_NAT_SRC = 300,
- NF_BR_PRI_LAST = INT_MAX,
-};
-
-#ifdef CONFIG_BRIDGE_NETFILTER
-
-#define BRNF_PKT_TYPE 0x01
-#define BRNF_BRIDGED_DNAT 0x02
-#define BRNF_DONT_TAKE_PARENT 0x04
-#define BRNF_BRIDGED 0x08
-#define BRNF_NF_BRIDGE_PREROUTING 0x10
-
-
-/* Only used in br_forward.c */
-static inline
-int nf_bridge_maybe_copy_header(struct sk_buff *skb)
-{
- int err;
-
- if (skb->nf_bridge) {
- if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
- err = skb_cow(skb, 18);
- if (err)
- return err;
- memcpy(skb->data - 18, skb->nf_bridge->data, 18);
- skb_push(skb, 4);
- } else {
- err = skb_cow(skb, 16);
- if (err)
- return err;
- memcpy(skb->data - 16, skb->nf_bridge->data, 16);
- }
- }
- return 0;
-}
-
-/* This is called by the IP fragmenting code and it ensures there is
- * enough room for the encapsulating header (if there is one). */
-static inline
-int nf_bridge_pad(struct sk_buff *skb)
-{
- if (skb->protocol == __constant_htons(ETH_P_IP))
- return 0;
- if (skb->nf_bridge) {
- if (skb->protocol == __constant_htons(ETH_P_8021Q))
- return 4;
- }
- return 0;
-}
-
-struct bridge_skb_cb {
- union {
- __u32 ipv4;
- } daddr;
-};
-
-extern int brnf_deferred_hooks;
-#endif /* CONFIG_BRIDGE_NETFILTER */
-
-#endif /* __KERNEL__ */
-#endif
diff --git a/original/linux/netfilter_ipv4.h b/original/linux/netfilter_ipv4.h
deleted file mode 100644
index ce02c98..0000000
--- a/original/linux/netfilter_ipv4.h
+++ /dev/null
@@ -1,86 +0,0 @@
-#ifndef __LINUX_IP_NETFILTER_H
-#define __LINUX_IP_NETFILTER_H
-
-/* IPv4-specific defines for netfilter.
- * (C)1998 Rusty Russell -- This code is GPL.
- */
-
-#include <linux/netfilter.h>
-
-/* only for userspace compatibility */
-#ifndef __KERNEL__
-/* IP Cache bits. */
-/* Src IP address. */
-#define NFC_IP_SRC 0x0001
-/* Dest IP address. */
-#define NFC_IP_DST 0x0002
-/* Input device. */
-#define NFC_IP_IF_IN 0x0004
-/* Output device. */
-#define NFC_IP_IF_OUT 0x0008
-/* TOS. */
-#define NFC_IP_TOS 0x0010
-/* Protocol. */
-#define NFC_IP_PROTO 0x0020
-/* IP options. */
-#define NFC_IP_OPTIONS 0x0040
-/* Frag & flags. */
-#define NFC_IP_FRAG 0x0080
-
-/* Per-protocol information: only matters if proto match. */
-/* TCP flags. */
-#define NFC_IP_TCPFLAGS 0x0100
-/* Source port. */
-#define NFC_IP_SRC_PT 0x0200
-/* Dest port. */
-#define NFC_IP_DST_PT 0x0400
-/* Something else about the proto */
-#define NFC_IP_PROTO_UNKNOWN 0x2000
-#endif /* ! __KERNEL__ */
-
-/* IP Hooks */
-/* After promisc drops, checksum checks. */
-#define NF_IP_PRE_ROUTING 0
-/* If the packet is destined for this box. */
-#define NF_IP_LOCAL_IN 1
-/* If the packet is destined for another interface. */
-#define NF_IP_FORWARD 2
-/* Packets coming from a local process. */
-#define NF_IP_LOCAL_OUT 3
-/* Packets about to hit the wire. */
-#define NF_IP_POST_ROUTING 4
-#define NF_IP_NUMHOOKS 5
-
-enum nf_ip_hook_priorities {
- NF_IP_PRI_FIRST = INT_MIN,
- NF_IP_PRI_CONNTRACK_DEFRAG = -400,
- NF_IP_PRI_RAW = -300,
- NF_IP_PRI_SELINUX_FIRST = -225,
- NF_IP_PRI_CONNTRACK = -200,
- NF_IP_PRI_BRIDGE_SABOTAGE_FORWARD = -175,
- NF_IP_PRI_MANGLE = -150,
- NF_IP_PRI_NAT_DST = -100,
- NF_IP_PRI_BRIDGE_SABOTAGE_LOCAL_OUT = -50,
- NF_IP_PRI_FILTER = 0,
- NF_IP_PRI_NAT_SRC = 100,
- NF_IP_PRI_SELINUX_LAST = 225,
- NF_IP_PRI_CONNTRACK_HELPER = INT_MAX - 2,
- NF_IP_PRI_NAT_SEQ_ADJUST = INT_MAX - 1,
- NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
- NF_IP_PRI_LAST = INT_MAX,
-};
-
-/* Arguments for setsockopt SOL_IP: */
-/* 2.0 firewalling went from 64 through 71 (and +256, +512, etc). */
-/* 2.2 firewalling (+ masq) went from 64 through 76 */
-/* 2.4 firewalling went 64 through 67. */
-#define SO_ORIGINAL_DST 80
-
-#ifdef __KERNEL__
-extern int ip_route_me_harder(struct sk_buff **pskb);
-extern int ip_xfrm_me_harder(struct sk_buff **pskb);
-extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
- unsigned int dataoff, u_int8_t protocol);
-#endif /*__KERNEL__*/
-
-#endif /*__LINUX_IP_NETFILTER_H*/
diff --git a/original/linux/netfilter_ipv4/ip_conntrack.h b/original/linux/netfilter_ipv4/ip_conntrack.h
deleted file mode 100644
index 51dbec1..0000000
--- a/original/linux/netfilter_ipv4/ip_conntrack.h
+++ /dev/null
@@ -1,395 +0,0 @@
-#ifndef _IP_CONNTRACK_H
-#define _IP_CONNTRACK_H
-
-#include <linux/netfilter/nf_conntrack_common.h>
-
-#ifdef __KERNEL__
-#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
-#include <linux/bitops.h>
-#include <linux/compiler.h>
-#include <asm/atomic.h>
-
-#include <linux/netfilter_ipv4/ip_conntrack_tcp.h>
-#include <linux/netfilter_ipv4/ip_conntrack_icmp.h>
-#include <linux/netfilter_ipv4/ip_conntrack_proto_gre.h>
-#include <linux/netfilter_ipv4/ip_conntrack_sctp.h>
-
-/* per conntrack: protocol private data */
-union ip_conntrack_proto {
- /* insert conntrack proto private data here */
- struct ip_ct_gre gre;
- struct ip_ct_sctp sctp;
- struct ip_ct_tcp tcp;
- struct ip_ct_icmp icmp;
-};
-
-union ip_conntrack_expect_proto {
- /* insert expect proto private data here */
-};
-
-/* Add protocol helper include file here */
-#include <linux/netfilter_ipv4/ip_conntrack_h323.h>
-#include <linux/netfilter_ipv4/ip_conntrack_pptp.h>
-#include <linux/netfilter_ipv4/ip_conntrack_amanda.h>
-#include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
-#include <linux/netfilter_ipv4/ip_conntrack_irc.h>
-
-/* per conntrack: application helper private data */
-union ip_conntrack_help {
- /* insert conntrack helper private data (master) here */
- struct ip_ct_h323_master ct_h323_info;
- struct ip_ct_pptp_master ct_pptp_info;
- struct ip_ct_ftp_master ct_ftp_info;
- struct ip_ct_irc_master ct_irc_info;
-};
-
-#ifdef CONFIG_IP_NF_NAT_NEEDED
-#include <linux/netfilter_ipv4/ip_nat.h>
-#include <linux/netfilter_ipv4/ip_nat_pptp.h>
-
-/* per conntrack: nat application helper private data */
-union ip_conntrack_nat_help {
- /* insert nat helper private data here */
- struct ip_nat_pptp nat_pptp_info;
-};
-#endif
-
-#include <linux/types.h>
-#include <linux/skbuff.h>
-
-#ifdef CONFIG_NETFILTER_DEBUG
-#define IP_NF_ASSERT(x) \
-do { \
- if (!(x)) \
- /* Wooah! I'm tripping my conntrack in a frenzy of \
- netplay... */ \
- printk("NF_IP_ASSERT: %s:%i(%s)\n", \
- __FILE__, __LINE__, __FUNCTION__); \
-} while(0)
-#else
-#define IP_NF_ASSERT(x)
-#endif
-
-struct ip_conntrack_helper;
-
-struct ip_conntrack
-{
- /* Usage count in here is 1 for hash table/destruct timer, 1 per skb,
- plus 1 for any connection(s) we are `master' for */
- struct nf_conntrack ct_general;
-
- /* Have we seen traffic both ways yet? (bitset) */
- unsigned long status;
-
- /* Timer function; drops refcnt when it goes off. */
- struct timer_list timeout;
-
-#ifdef CONFIG_IP_NF_CT_ACCT
- /* Accounting Information (same cache line as other written members) */
- struct ip_conntrack_counter counters[IP_CT_DIR_MAX];
-#endif
- /* If we were expected by an expectation, this will be it */
- struct ip_conntrack *master;
-
- /* Current number of expected connections */
- unsigned int expecting;
-
- /* Unique ID that identifies this conntrack*/
- unsigned int id;
-
- /* Helper, if any. */
- struct ip_conntrack_helper *helper;
-
- /* Storage reserved for other modules: */
- union ip_conntrack_proto proto;
-
- union ip_conntrack_help help;
-
-#ifdef CONFIG_IP_NF_NAT_NEEDED
- struct {
- struct ip_nat_info info;
- union ip_conntrack_nat_help help;
-#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \
- defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE)
- int masq_index;
-#endif
- } nat;
-#endif /* CONFIG_IP_NF_NAT_NEEDED */
-
-#if defined(CONFIG_IP_NF_CONNTRACK_MARK)
- u_int32_t mark;
-#endif
-
-#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK
- u_int32_t secmark;
-#endif
-
- /* Traversed often, so hopefully in different cacheline to top */
- /* These are my tuples; original and reply */
- struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX];
-};
-
-struct ip_conntrack_expect
-{
- /* Internal linked list (global expectation list) */
- struct list_head list;
-
- /* We expect this tuple, with the following mask */
- struct ip_conntrack_tuple tuple, mask;
-
- /* Function to call after setup and insertion */
- void (*expectfn)(struct ip_conntrack *new,
- struct ip_conntrack_expect *this);
-
- /* The conntrack of the master connection */
- struct ip_conntrack *master;
-
- /* Timer function; deletes the expectation. */
- struct timer_list timeout;
-
- /* Usage count. */
- atomic_t use;
-
- /* Unique ID */
- unsigned int id;
-
- /* Flags */
- unsigned int flags;
-
-#ifdef CONFIG_IP_NF_NAT_NEEDED
- u_int32_t saved_ip;
- /* This is the original per-proto part, used to map the
- * expected connection the way the recipient expects. */
- union ip_conntrack_manip_proto saved_proto;
- /* Direction relative to the master connection. */
- enum ip_conntrack_dir dir;
-#endif
-};
-
-#define IP_CT_EXPECT_PERMANENT 0x1
-
-static inline struct ip_conntrack *
-tuplehash_to_ctrack(const struct ip_conntrack_tuple_hash *hash)
-{
- return container_of(hash, struct ip_conntrack,
- tuplehash[hash->tuple.dst.dir]);
-}
-
-/* get master conntrack via master expectation */
-#define master_ct(conntr) (conntr->master)
-
-/* Alter reply tuple (maybe alter helper). */
-extern void
-ip_conntrack_alter_reply(struct ip_conntrack *conntrack,
- const struct ip_conntrack_tuple *newreply);
-
-/* Is this tuple taken? (ignoring any belonging to the given
- conntrack). */
-extern int
-ip_conntrack_tuple_taken(const struct ip_conntrack_tuple *tuple,
- const struct ip_conntrack *ignored_conntrack);
-
-/* Return conntrack_info and tuple hash for given skb. */
-static inline struct ip_conntrack *
-ip_conntrack_get(const struct sk_buff *skb, enum ip_conntrack_info *ctinfo)
-{
- *ctinfo = skb->nfctinfo;
- return (struct ip_conntrack *)skb->nfct;
-}
-
-/* decrement reference count on a conntrack */
-static inline void
-ip_conntrack_put(struct ip_conntrack *ct)
-{
- IP_NF_ASSERT(ct);
- nf_conntrack_put(&ct->ct_general);
-}
-
-extern int invert_tuplepr(struct ip_conntrack_tuple *inverse,
- const struct ip_conntrack_tuple *orig);
-
-extern void __ip_ct_refresh_acct(struct ip_conntrack *ct,
- enum ip_conntrack_info ctinfo,
- const struct sk_buff *skb,
- unsigned long extra_jiffies,
- int do_acct);
-
-/* Refresh conntrack for this many jiffies and do accounting */
-static inline void ip_ct_refresh_acct(struct ip_conntrack *ct,
- enum ip_conntrack_info ctinfo,
- const struct sk_buff *skb,
- unsigned long extra_jiffies)
-{
- __ip_ct_refresh_acct(ct, ctinfo, skb, extra_jiffies, 1);
-}
-
-/* Refresh conntrack for this many jiffies */
-static inline void ip_ct_refresh(struct ip_conntrack *ct,
- const struct sk_buff *skb,
- unsigned long extra_jiffies)
-{
- __ip_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0);
-}
-
-/* These are for NAT. Icky. */
-/* Update TCP window tracking data when NAT mangles the packet */
-extern void ip_conntrack_tcp_update(struct sk_buff *skb,
- struct ip_conntrack *conntrack,
- enum ip_conntrack_dir dir);
-
-/* Call me when a conntrack is destroyed. */
-extern void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack);
-
-/* Fake conntrack entry for untracked connections */
-extern struct ip_conntrack ip_conntrack_untracked;
-
-/* Returns new sk_buff, or NULL */
-struct sk_buff *
-ip_ct_gather_frags(struct sk_buff *skb, u_int32_t user);
-
-/* Iterate over all conntracks: if iter returns true, it's deleted. */
-extern void
-ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *data),
- void *data);
-
-extern struct ip_conntrack_helper *
-__ip_conntrack_helper_find_byname(const char *);
-extern struct ip_conntrack_helper *
-ip_conntrack_helper_find_get(const struct ip_conntrack_tuple *tuple);
-extern void ip_conntrack_helper_put(struct ip_conntrack_helper *helper);
-
-extern struct ip_conntrack_protocol *
-__ip_conntrack_proto_find(u_int8_t protocol);
-extern struct ip_conntrack_protocol *
-ip_conntrack_proto_find_get(u_int8_t protocol);
-extern void ip_conntrack_proto_put(struct ip_conntrack_protocol *proto);
-
-extern void ip_ct_remove_expectations(struct ip_conntrack *ct);
-
-extern struct ip_conntrack *ip_conntrack_alloc(struct ip_conntrack_tuple *,
- struct ip_conntrack_tuple *);
-
-extern void ip_conntrack_free(struct ip_conntrack *ct);
-
-extern void ip_conntrack_hash_insert(struct ip_conntrack *ct);
-
-extern struct ip_conntrack_expect *
-__ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple);
-
-extern struct ip_conntrack_expect *
-ip_conntrack_expect_find(const struct ip_conntrack_tuple *tuple);
-
-extern struct ip_conntrack_tuple_hash *
-__ip_conntrack_find(const struct ip_conntrack_tuple *tuple,
- const struct ip_conntrack *ignored_conntrack);
-
-extern void ip_conntrack_flush(void);
-
-/* It's confirmed if it is, or has been in the hash table. */
-static inline int is_confirmed(struct ip_conntrack *ct)
-{
- return test_bit(IPS_CONFIRMED_BIT, &ct->status);
-}
-
-static inline int is_dying(struct ip_conntrack *ct)
-{
- return test_bit(IPS_DYING_BIT, &ct->status);
-}
-
-extern unsigned int ip_conntrack_htable_size;
-extern int ip_conntrack_checksum;
-
-#define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++)
-
-#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
-#include <linux/notifier.h>
-#include <linux/interrupt.h>
-
-struct ip_conntrack_ecache {
- struct ip_conntrack *ct;
- unsigned int events;
-};
-DECLARE_PER_CPU(struct ip_conntrack_ecache, ip_conntrack_ecache);
-
-#define CONNTRACK_ECACHE(x) (__get_cpu_var(ip_conntrack_ecache).x)
-
-extern struct atomic_notifier_head ip_conntrack_chain;
-extern struct atomic_notifier_head ip_conntrack_expect_chain;
-
-static inline int ip_conntrack_register_notifier(struct notifier_block *nb)
-{
- return atomic_notifier_chain_register(&ip_conntrack_chain, nb);
-}
-
-static inline int ip_conntrack_unregister_notifier(struct notifier_block *nb)
-{
- return atomic_notifier_chain_unregister(&ip_conntrack_chain, nb);
-}
-
-static inline int
-ip_conntrack_expect_register_notifier(struct notifier_block *nb)
-{
- return atomic_notifier_chain_register(&ip_conntrack_expect_chain, nb);
-}
-
-static inline int
-ip_conntrack_expect_unregister_notifier(struct notifier_block *nb)
-{
- return atomic_notifier_chain_unregister(&ip_conntrack_expect_chain,
- nb);
-}
-
-extern void ip_ct_deliver_cached_events(const struct ip_conntrack *ct);
-extern void __ip_ct_event_cache_init(struct ip_conntrack *ct);
-
-static inline void
-ip_conntrack_event_cache(enum ip_conntrack_events event,
- const struct sk_buff *skb)
-{
- struct ip_conntrack *ct = (struct ip_conntrack *)skb->nfct;
- struct ip_conntrack_ecache *ecache;
-
- local_bh_disable();
- ecache = &__get_cpu_var(ip_conntrack_ecache);
- if (ct != ecache->ct)
- __ip_ct_event_cache_init(ct);
- ecache->events |= event;
- local_bh_enable();
-}
-
-static inline void ip_conntrack_event(enum ip_conntrack_events event,
- struct ip_conntrack *ct)
-{
- if (is_confirmed(ct) && !is_dying(ct))
- atomic_notifier_call_chain(&ip_conntrack_chain, event, ct);
-}
-
-static inline void
-ip_conntrack_expect_event(enum ip_conntrack_expect_events event,
- struct ip_conntrack_expect *exp)
-{
- atomic_notifier_call_chain(&ip_conntrack_expect_chain, event, exp);
-}
-#else /* CONFIG_IP_NF_CONNTRACK_EVENTS */
-static inline void ip_conntrack_event_cache(enum ip_conntrack_events event,
- const struct sk_buff *skb) {}
-static inline void ip_conntrack_event(enum ip_conntrack_events event,
- struct ip_conntrack *ct) {}
-static inline void ip_ct_deliver_cached_events(const struct ip_conntrack *ct) {}
-static inline void
-ip_conntrack_expect_event(enum ip_conntrack_expect_events event,
- struct ip_conntrack_expect *exp) {}
-#endif /* CONFIG_IP_NF_CONNTRACK_EVENTS */
-
-#ifdef CONFIG_IP_NF_NAT_NEEDED
-static inline int ip_nat_initialized(struct ip_conntrack *conntrack,
- enum ip_nat_manip_type manip)
-{
- if (manip == IP_NAT_MANIP_SRC)
- return test_bit(IPS_SRC_NAT_DONE_BIT, &conntrack->status);
- return test_bit(IPS_DST_NAT_DONE_BIT, &conntrack->status);
-}
-#endif /* CONFIG_IP_NF_NAT_NEEDED */
-
-#endif /* __KERNEL__ */
-#endif /* _IP_CONNTRACK_H */
diff --git a/original/linux/netfilter_ipv4/ip_conntrack_tuple.h b/original/linux/netfilter_ipv4/ip_conntrack_tuple.h
deleted file mode 100644
index 2fdabdb..0000000
--- a/original/linux/netfilter_ipv4/ip_conntrack_tuple.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef _IP_CONNTRACK_TUPLE_H
-#define _IP_CONNTRACK_TUPLE_H
-
-#include <linux/types.h>
-#include <linux/netfilter/nf_conntrack_tuple_common.h>
-
-/* A `tuple' is a structure containing the information to uniquely
- identify a connection. ie. if two packets have the same tuple, they
- are in the same connection; if not, they are not.
-
- We divide the structure along "manipulatable" and
- "non-manipulatable" lines, for the benefit of the NAT code.
-*/
-
-/* The protocol-specific manipulable parts of the tuple: always in
- network order! */
-union ip_conntrack_manip_proto
-{
- /* Add other protocols here. */
- u_int16_t all;
-
- struct {
- __be16 port;
- } tcp;
- struct {
- u_int16_t port;
- } udp;
- struct {
- u_int16_t id;
- } icmp;
- struct {
- u_int16_t port;
- } sctp;
- struct {
- __be16 key; /* key is 32bit, pptp only uses 16 */
- } gre;
-};
-
-/* The manipulable part of the tuple. */
-struct ip_conntrack_manip
-{
- u_int32_t ip;
- union ip_conntrack_manip_proto u;
-};
-
-/* This contains the information to distinguish a connection. */
-struct ip_conntrack_tuple
-{
- struct ip_conntrack_manip src;
-
- /* These are the parts of the tuple which are fixed. */
- struct {
- u_int32_t ip;
- union {
- /* Add other protocols here. */
- u_int16_t all;
-
- struct {
- u_int16_t port;
- } tcp;
- struct {
- u_int16_t port;
- } udp;
- struct {
- u_int8_t type, code;
- } icmp;
- struct {
- u_int16_t port;
- } sctp;
- struct {
- __be16 key; /* key is 32bit,
- * pptp only uses 16 */
- } gre;
- } u;
-
- /* The protocol. */
- u_int8_t protonum;
-
- /* The direction (for tuplehash) */
- u_int8_t dir;
- } dst;
-};
-
-/* This is optimized opposed to a memset of the whole structure. Everything we
- * really care about is the source/destination unions */
-#define IP_CT_TUPLE_U_BLANK(tuple) \
- do { \
- (tuple)->src.u.all = 0; \
- (tuple)->dst.u.all = 0; \
- } while (0)
-
-#ifdef __KERNEL__
-
-#define DUMP_TUPLE(tp) \
-DEBUGP("tuple %p: %u %u.%u.%u.%u:%hu -> %u.%u.%u.%u:%hu\n", \
- (tp), (tp)->dst.protonum, \
- NIPQUAD((tp)->src.ip), ntohs((tp)->src.u.all), \
- NIPQUAD((tp)->dst.ip), ntohs((tp)->dst.u.all))
-
-/* If we're the first tuple, it's the original dir. */
-#define DIRECTION(h) ((enum ip_conntrack_dir)(h)->tuple.dst.dir)
-
-/* Connections have two entries in the hash table: one for each way */
-struct ip_conntrack_tuple_hash
-{
- struct list_head list;
-
- struct ip_conntrack_tuple tuple;
-};
-
-#endif /* __KERNEL__ */
-
-static inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1,
- const struct ip_conntrack_tuple *t2)
-{
- return t1->src.ip == t2->src.ip
- && t1->src.u.all == t2->src.u.all;
-}
-
-static inline int ip_ct_tuple_dst_equal(const struct ip_conntrack_tuple *t1,
- const struct ip_conntrack_tuple *t2)
-{
- return t1->dst.ip == t2->dst.ip
- && t1->dst.u.all == t2->dst.u.all
- && t1->dst.protonum == t2->dst.protonum;
-}
-
-static inline int ip_ct_tuple_equal(const struct ip_conntrack_tuple *t1,
- const struct ip_conntrack_tuple *t2)
-{
- return ip_ct_tuple_src_equal(t1, t2) && ip_ct_tuple_dst_equal(t1, t2);
-}
-
-static inline int ip_ct_tuple_mask_cmp(const struct ip_conntrack_tuple *t,
- const struct ip_conntrack_tuple *tuple,
- const struct ip_conntrack_tuple *mask)
-{
- return !(((t->src.ip ^ tuple->src.ip) & mask->src.ip)
- || ((t->dst.ip ^ tuple->dst.ip) & mask->dst.ip)
- || ((t->src.u.all ^ tuple->src.u.all) & mask->src.u.all)
- || ((t->dst.u.all ^ tuple->dst.u.all) & mask->dst.u.all)
- || ((t->dst.protonum ^ tuple->dst.protonum)
- & mask->dst.protonum));
-}
-
-#endif /* _IP_CONNTRACK_TUPLE_H */
diff --git a/original/linux/netfilter_ipv4/ip_nat.h b/original/linux/netfilter_ipv4/ip_nat.h
deleted file mode 100644
index e9f5ed1..0000000
--- a/original/linux/netfilter_ipv4/ip_nat.h
+++ /dev/null
@@ -1,82 +0,0 @@
-#ifndef _IP_NAT_H
-#define _IP_NAT_H
-#include <linux/netfilter_ipv4.h>
-#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
-
-#define IP_NAT_MAPPING_TYPE_MAX_NAMELEN 16
-
-enum ip_nat_manip_type
-{
- IP_NAT_MANIP_SRC,
- IP_NAT_MANIP_DST
-};
-
-/* SRC manip occurs POST_ROUTING or LOCAL_IN */
-#define HOOK2MANIP(hooknum) ((hooknum) != NF_IP_POST_ROUTING && (hooknum) != NF_IP_LOCAL_IN)
-
-#define IP_NAT_RANGE_MAP_IPS 1
-#define IP_NAT_RANGE_PROTO_SPECIFIED 2
-
-/* NAT sequence number modifications */
-struct ip_nat_seq {
- /* position of the last TCP sequence number
- * modification (if any) */
- u_int32_t correction_pos;
- /* sequence number offset before and after last modification */
- int16_t offset_before, offset_after;
-};
-
-/* Single range specification. */
-struct ip_nat_range
-{
- /* Set to OR of flags above. */
- unsigned int flags;
-
- /* Inclusive: network order. */
- u_int32_t min_ip, max_ip;
-
- /* Inclusive: network order */
- union ip_conntrack_manip_proto min, max;
-};
-
-/* For backwards compat: don't use in modern code. */
-struct ip_nat_multi_range_compat
-{
- unsigned int rangesize; /* Must be 1. */
-
- /* hangs off end. */
- struct ip_nat_range range[1];
-};
-
-#ifdef __KERNEL__
-#include <linux/list.h>
-
-/* Protects NAT hash tables, and NAT-private part of conntracks. */
-extern rwlock_t ip_nat_lock;
-
-/* The structure embedded in the conntrack structure. */
-struct ip_nat_info
-{
- struct list_head bysource;
- struct ip_nat_seq seq[IP_CT_DIR_MAX];
-};
-
-struct ip_conntrack;
-
-/* Set up the info structure to map into this range. */
-extern unsigned int ip_nat_setup_info(struct ip_conntrack *conntrack,
- const struct ip_nat_range *range,
- unsigned int hooknum);
-
-/* Is this tuple already taken? (not by us)*/
-extern int ip_nat_used_tuple(const struct ip_conntrack_tuple *tuple,
- const struct ip_conntrack *ignored_conntrack);
-
-/* Calculate relative checksum. */
-extern u_int16_t ip_nat_cheat_check(u_int32_t oldvalinv,
- u_int32_t newval,
- u_int16_t oldcheck);
-#else /* !__KERNEL__: iptables wants this to compile. */
-#define ip_nat_multi_range ip_nat_multi_range_compat
-#endif /*__KERNEL__*/
-#endif
diff --git a/original/linux/netfilter_ipv4/ip_nat_rule.h b/original/linux/netfilter_ipv4/ip_nat_rule.h
deleted file mode 100644
index 73b9552..0000000
--- a/original/linux/netfilter_ipv4/ip_nat_rule.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _IP_NAT_RULE_H
-#define _IP_NAT_RULE_H
-#include <linux/netfilter_ipv4/ip_conntrack.h>
-#include <linux/netfilter_ipv4/ip_tables.h>
-#include <linux/netfilter_ipv4/ip_nat.h>
-
-#ifdef __KERNEL__
-
-extern int ip_nat_rule_init(void) __init;
-extern void ip_nat_rule_cleanup(void);
-extern int ip_nat_rule_find(struct sk_buff **pskb,
- unsigned int hooknum,
- const struct net_device *in,
- const struct net_device *out,
- struct ip_conntrack *ct,
- struct ip_nat_info *info);
-
-extern unsigned int
-alloc_null_binding(struct ip_conntrack *conntrack,
- struct ip_nat_info *info,
- unsigned int hooknum);
-
-extern unsigned int
-alloc_null_binding_confirmed(struct ip_conntrack *conntrack,
- struct ip_nat_info *info,
- unsigned int hooknum);
-#endif
-#endif /* _IP_NAT_RULE_H */
diff --git a/original/linux/netfilter_ipv4/ip_queue.h b/original/linux/netfilter_ipv4/ip_queue.h
deleted file mode 100644
index aa08d68..0000000
--- a/original/linux/netfilter_ipv4/ip_queue.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * This is a module which is used for queueing IPv4 packets and
- * communicating with userspace via netlink.
- *
- * (C) 2000 James Morris, this code is GPL.
- */
-#ifndef _IP_QUEUE_H
-#define _IP_QUEUE_H
-
-#ifdef __KERNEL__
-#ifdef DEBUG_IPQ
-#define QDEBUG(x...) printk(KERN_DEBUG ## x)
-#else
-#define QDEBUG(x...)
-#endif /* DEBUG_IPQ */
-#else
-#include <net/if.h>
-#endif /* ! __KERNEL__ */
-
-/* Messages sent from kernel */
-typedef struct ipq_packet_msg {
- unsigned long packet_id; /* ID of queued packet */
- unsigned long mark; /* Netfilter mark value */
- long timestamp_sec; /* Packet arrival time (seconds) */
- long timestamp_usec; /* Packet arrvial time (+useconds) */
- unsigned int hook; /* Netfilter hook we rode in on */
- char indev_name[IFNAMSIZ]; /* Name of incoming interface */
- char outdev_name[IFNAMSIZ]; /* Name of outgoing interface */
- unsigned short hw_protocol; /* Hardware protocol (network order) */
- unsigned short hw_type; /* Hardware type */
- unsigned char hw_addrlen; /* Hardware address length */
- unsigned char hw_addr[8]; /* Hardware address */
- size_t data_len; /* Length of packet data */
- unsigned char payload[0]; /* Optional packet data */
-} ipq_packet_msg_t;
-
-/* Messages sent from userspace */
-typedef struct ipq_mode_msg {
- unsigned char value; /* Requested mode */
- size_t range; /* Optional range of packet requested */
-} ipq_mode_msg_t;
-
-typedef struct ipq_verdict_msg {
- unsigned int value; /* Verdict to hand to netfilter */
- unsigned long id; /* Packet ID for this verdict */
- size_t data_len; /* Length of replacement data */
- unsigned char payload[0]; /* Optional replacement packet */
-} ipq_verdict_msg_t;
-
-typedef struct ipq_peer_msg {
- union {
- ipq_verdict_msg_t verdict;
- ipq_mode_msg_t mode;
- } msg;
-} ipq_peer_msg_t;
-
-/* Packet delivery modes */
-enum {
- IPQ_COPY_NONE, /* Initial mode, packets are dropped */
- IPQ_COPY_META, /* Copy metadata */
- IPQ_COPY_PACKET /* Copy metadata + packet (range) */
-};
-#define IPQ_COPY_MAX IPQ_COPY_PACKET
-
-/* Types of messages */
-#define IPQM_BASE 0x10 /* standard netlink messages below this */
-#define IPQM_MODE (IPQM_BASE + 1) /* Mode request from peer */
-#define IPQM_VERDICT (IPQM_BASE + 2) /* Verdict from peer */
-#define IPQM_PACKET (IPQM_BASE + 3) /* Packet from kernel */
-#define IPQM_MAX (IPQM_BASE + 4)
-
-#endif /*_IP_QUEUE_H*/
diff --git a/original/linux/netfilter_ipv4/ip_tables.h b/original/linux/netfilter_ipv4/ip_tables.h
deleted file mode 100644
index 1ba09f7..0000000
--- a/original/linux/netfilter_ipv4/ip_tables.h
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * 25-Jul-1998 Major changes to allow for ip chain table
- *
- * 3-Jan-2000 Named tables to allow packet selection for different uses.
- */
-
-/*
- * Format of an IP firewall descriptor
- *
- * src, dst, src_mask, dst_mask are always stored in network byte order.
- * flags are stored in host byte order (of course).
- * Port numbers are stored in HOST byte order.
- */
-
-#ifndef _IPTABLES_H
-#define _IPTABLES_H
-
-#ifdef __KERNEL__
-#include <linux/if.h>
-#include <linux/types.h>
-#include <linux/in.h>
-#include <linux/ip.h>
-#include <linux/skbuff.h>
-#endif
-#include <linux/compiler.h>
-#include <linux/netfilter_ipv4.h>
-
-#include <linux/netfilter/x_tables.h>
-
-#define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
-#define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
-#define ipt_match xt_match
-#define ipt_target xt_target
-#define ipt_table xt_table
-#define ipt_get_revision xt_get_revision
-
-/* Yes, Virginia, you have to zero the padding. */
-struct ipt_ip {
- /* Source and destination IP addr */
- struct in_addr src, dst;
- /* Mask for src and dest IP addr */
- struct in_addr smsk, dmsk;
- char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
- unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
-
- /* Protocol, 0 = ANY */
- u_int16_t proto;
-
- /* Flags word */
- u_int8_t flags;
- /* Inverse flags */
- u_int8_t invflags;
-};
-
-#define ipt_entry_match xt_entry_match
-#define ipt_entry_target xt_entry_target
-#define ipt_standard_target xt_standard_target
-
-#define ipt_counters xt_counters
-
-/* Values for "flag" field in struct ipt_ip (general ip structure). */
-#define IPT_F_FRAG 0x01 /* Set if rule is a fragment rule */
-#define IPT_F_GOTO 0x02 /* Set if jump is a goto */
-#define IPT_F_MASK 0x03 /* All possible flag bits mask. */
-
-/* Values for "inv" field in struct ipt_ip. */
-#define IPT_INV_VIA_IN 0x01 /* Invert the sense of IN IFACE. */
-#define IPT_INV_VIA_OUT 0x02 /* Invert the sense of OUT IFACE */
-#define IPT_INV_TOS 0x04 /* Invert the sense of TOS. */
-#define IPT_INV_SRCIP 0x08 /* Invert the sense of SRC IP. */
-#define IPT_INV_DSTIP 0x10 /* Invert the sense of DST OP. */
-#define IPT_INV_FRAG 0x20 /* Invert the sense of FRAG. */
-#define IPT_INV_PROTO XT_INV_PROTO
-#define IPT_INV_MASK 0x7F /* All possible flag bits mask. */
-
-/* This structure defines each of the firewall rules. Consists of 3
- parts which are 1) general IP header stuff 2) match specific
- stuff 3) the target to perform if the rule matches */
-struct ipt_entry
-{
- struct ipt_ip ip;
-
- /* Mark with fields that we care about. */
- unsigned int nfcache;
-
- /* Size of ipt_entry + matches */
- u_int16_t target_offset;
- /* Size of ipt_entry + matches + target */
- u_int16_t next_offset;
-
- /* Back pointer */
- unsigned int comefrom;
-
- /* Packet and byte counters. */
- struct xt_counters counters;
-
- /* The matches (if any), then the target. */
- unsigned char elems[0];
-};
-
-/*
- * New IP firewall options for [gs]etsockopt at the RAW IP level.
- * Unlike BSD Linux inherits IP options so you don't have to use a raw
- * socket for this. Instead we check rights in the calls. */
-#define IPT_BASE_CTL XT_BASE_CTL
-
-#define IPT_SO_SET_REPLACE XT_SO_SET_REPLACE
-#define IPT_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
-#define IPT_SO_SET_MAX XT_SO_SET_MAX
-
-#define IPT_SO_GET_INFO XT_SO_GET_INFO
-#define IPT_SO_GET_ENTRIES XT_SO_GET_ENTRIES
-#define IPT_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
-#define IPT_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
-#define IPT_SO_GET_MAX XT_SO_GET_REVISION_TARGET
-
-#define IPT_CONTINUE XT_CONTINUE
-#define IPT_RETURN XT_RETURN
-
-#include <linux/netfilter/xt_tcpudp.h>
-#define ipt_udp xt_udp
-#define ipt_tcp xt_tcp
-
-#define IPT_TCP_INV_SRCPT XT_TCP_INV_SRCPT
-#define IPT_TCP_INV_DSTPT XT_TCP_INV_DSTPT
-#define IPT_TCP_INV_FLAGS XT_TCP_INV_FLAGS
-#define IPT_TCP_INV_OPTION XT_TCP_INV_OPTION
-#define IPT_TCP_INV_MASK XT_TCP_INV_MASK
-
-#define IPT_UDP_INV_SRCPT XT_UDP_INV_SRCPT
-#define IPT_UDP_INV_DSTPT XT_UDP_INV_DSTPT
-#define IPT_UDP_INV_MASK XT_UDP_INV_MASK
-
-/* ICMP matching stuff */
-struct ipt_icmp
-{
- u_int8_t type; /* type to match */
- u_int8_t code[2]; /* range of code */
- u_int8_t invflags; /* Inverse flags */
-};
-
-/* Values for "inv" field for struct ipt_icmp. */
-#define IPT_ICMP_INV 0x01 /* Invert the sense of type/code test */
-
-/* The argument to IPT_SO_GET_INFO */
-struct ipt_getinfo
-{
- /* Which table: caller fills this in. */
- char name[IPT_TABLE_MAXNAMELEN];
-
- /* Kernel fills these in. */
- /* Which hook entry points are valid: bitmask */
- unsigned int valid_hooks;
-
- /* Hook entry points: one per netfilter hook. */
- unsigned int hook_entry[NF_IP_NUMHOOKS];
-
- /* Underflow points. */
- unsigned int underflow[NF_IP_NUMHOOKS];
-
- /* Number of entries */
- unsigned int num_entries;
-
- /* Size of entries. */
- unsigned int size;
-};
-
-/* The argument to IPT_SO_SET_REPLACE. */
-struct ipt_replace
-{
- /* Which table. */
- char name[IPT_TABLE_MAXNAMELEN];
-
- /* Which hook entry points are valid: bitmask. You can't
- change this. */
- unsigned int valid_hooks;
-
- /* Number of entries */
- unsigned int num_entries;
-
- /* Total size of new entries */
- unsigned int size;
-
- /* Hook entry points. */
- unsigned int hook_entry[NF_IP_NUMHOOKS];
-
- /* Underflow points. */
- unsigned int underflow[NF_IP_NUMHOOKS];
-
- /* Information about old entries: */
- /* Number of counters (must be equal to current number of entries). */
- unsigned int num_counters;
- /* The old entries' counters. */
- struct xt_counters __user *counters;
-
- /* The entries (hang off end: not really an array). */
- struct ipt_entry entries[0];
-};
-
-/* The argument to IPT_SO_ADD_COUNTERS. */
-#define ipt_counters_info xt_counters_info
-
-/* The argument to IPT_SO_GET_ENTRIES. */
-struct ipt_get_entries
-{
- /* Which table: user fills this in. */
- char name[IPT_TABLE_MAXNAMELEN];
-
- /* User fills this in: total entry size. */
- unsigned int size;
-
- /* The entries. */
- struct ipt_entry entrytable[0];
-};
-
-/* Standard return verdict, or do jump. */
-#define IPT_STANDARD_TARGET XT_STANDARD_TARGET
-/* Error verdict. */
-#define IPT_ERROR_TARGET XT_ERROR_TARGET
-
-/* Helper functions */
-static __inline__ struct ipt_entry_target *
-ipt_get_target(struct ipt_entry *e)
-{
- return (void *)e + e->target_offset;
-}
-
-/* fn returns 0 to continue iteration */
-#define IPT_MATCH_ITERATE(e, fn, args...) \
-({ \
- unsigned int __i; \
- int __ret = 0; \
- struct ipt_entry_match *__match; \
- \
- for (__i = sizeof(struct ipt_entry); \
- __i < (e)->target_offset; \
- __i += __match->u.match_size) { \
- __match = (void *)(e) + __i; \
- \
- __ret = fn(__match , ## args); \
- if (__ret != 0) \
- break; \
- } \
- __ret; \
-})
-
-/* fn returns 0 to continue iteration */
-#define IPT_ENTRY_ITERATE(entries, size, fn, args...) \
-({ \
- unsigned int __i; \
- int __ret = 0; \
- struct ipt_entry *__entry; \
- \
- for (__i = 0; __i < (size); __i += __entry->next_offset) { \
- __entry = (void *)(entries) + __i; \
- \
- __ret = fn(__entry , ## args); \
- if (__ret != 0) \
- break; \
- } \
- __ret; \
-})
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-#ifdef __KERNEL__
-
-#include <linux/init.h>
-extern void ipt_init(void) __init;
-
-#define ipt_register_target(tgt) \
-({ (tgt)->family = AF_INET; \
- xt_register_target(tgt); })
-#define ipt_unregister_target(tgt) xt_unregister_target(tgt)
-
-#define ipt_register_match(mtch) \
-({ (mtch)->family = AF_INET; \
- xt_register_match(mtch); })
-#define ipt_unregister_match(mtch) xt_unregister_match(mtch)
-
-//#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl)
-//#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl)
-
-extern int ipt_register_table(struct ipt_table *table,
- const struct ipt_replace *repl);
-extern void ipt_unregister_table(struct ipt_table *table);
-
-/* net/sched/ipt.c: Gimme access to your targets! Gets target->me. */
-extern struct ipt_target *ipt_find_target(const char *name, u8 revision);
-
-/* Standard entry. */
-struct ipt_standard
-{
- struct ipt_entry entry;
- struct ipt_standard_target target;
-};
-
-struct ipt_error_target
-{
- struct ipt_entry_target target;
- char errorname[IPT_FUNCTION_MAXNAMELEN];
-};
-
-struct ipt_error
-{
- struct ipt_entry entry;
- struct ipt_error_target target;
-};
-
-extern unsigned int ipt_do_table(struct sk_buff **pskb,
- unsigned int hook,
- const struct net_device *in,
- const struct net_device *out,
- struct ipt_table *table,
- void *userdata);
-
-#define IPT_ALIGN(s) XT_ALIGN(s)
-
-#ifdef CONFIG_COMPAT
-#include <net/compat.h>
-
-struct compat_ipt_entry
-{
- struct ipt_ip ip;
- compat_uint_t nfcache;
- u_int16_t target_offset;
- u_int16_t next_offset;
- compat_uint_t comefrom;
- struct compat_xt_counters counters;
- unsigned char elems[0];
-};
-
-#define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s)
-
-#endif /* CONFIG_COMPAT */
-#endif /*__KERNEL__*/
-#endif /* _IPTABLES_H */
diff --git a/original/linux/netfilter_ipv4/ipt_CLASSIFY.h b/original/linux/netfilter_ipv4/ipt_CLASSIFY.h
deleted file mode 100644
index a46d511..0000000
--- a/original/linux/netfilter_ipv4/ipt_CLASSIFY.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IPT_CLASSIFY_H
-#define _IPT_CLASSIFY_H
-
-#include <linux/netfilter/xt_CLASSIFY.h>
-#define ipt_classify_target_info xt_classify_target_info
-
-#endif /*_IPT_CLASSIFY_H */
diff --git a/original/linux/netfilter_ipv4/ipt_DSCP.h b/original/linux/netfilter_ipv4/ipt_DSCP.h
deleted file mode 100644
index b30f510..0000000
--- a/original/linux/netfilter_ipv4/ipt_DSCP.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* iptables module for setting the IPv4 DSCP field
- *
- * (C) 2002 Harald Welte <laforge@gnumonks.org>
- * based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh <mgm@paktronix.com>
- * This software is distributed under GNU GPL v2, 1991
- *
- * See RFC2474 for a description of the DSCP field within the IP Header.
- *
- * ipt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp
-*/
-#ifndef _IPT_DSCP_TARGET_H
-#define _IPT_DSCP_TARGET_H
-#include <linux/netfilter_ipv4/ipt_dscp.h>
-
-/* target info */
-struct ipt_DSCP_info {
- u_int8_t dscp;
-};
-
-#endif /* _IPT_DSCP_TARGET_H */
diff --git a/original/linux/netfilter_ipv4/ipt_ECN.h b/original/linux/netfilter_ipv4/ipt_ECN.h
deleted file mode 100644
index 94e0d98..0000000
--- a/original/linux/netfilter_ipv4/ipt_ECN.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Header file for iptables ipt_ECN target
- *
- * (C) 2002 by Harald Welte <laforge@gnumonks.org>
- *
- * This software is distributed under GNU GPL v2, 1991
- *
- * ipt_ECN.h,v 1.3 2002/05/29 12:17:40 laforge Exp
-*/
-#ifndef _IPT_ECN_TARGET_H
-#define _IPT_ECN_TARGET_H
-#include <linux/netfilter_ipv4/ipt_DSCP.h>
-
-#define IPT_ECN_IP_MASK (~IPT_DSCP_MASK)
-
-#define IPT_ECN_OP_SET_IP 0x01 /* set ECN bits of IPv4 header */
-#define IPT_ECN_OP_SET_ECE 0x10 /* set ECE bit of TCP header */
-#define IPT_ECN_OP_SET_CWR 0x20 /* set CWR bit of TCP header */
-
-#define IPT_ECN_OP_MASK 0xce
-
-struct ipt_ECN_info {
- u_int8_t operation; /* bitset of operations */
- u_int8_t ip_ect; /* ECT codepoint of IPv4 header, pre-shifted */
- union {
- struct {
- u_int8_t ece:1, cwr:1; /* TCP ECT bits */
- } tcp;
- } proto;
-};
-
-#endif /* _IPT_ECN_TARGET_H */
diff --git a/original/linux/netfilter_ipv4/ipt_LOG.h b/original/linux/netfilter_ipv4/ipt_LOG.h
deleted file mode 100644
index 892f9a3..0000000
--- a/original/linux/netfilter_ipv4/ipt_LOG.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _IPT_LOG_H
-#define _IPT_LOG_H
-
-/* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */
-#define IPT_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */
-#define IPT_LOG_TCPOPT 0x02 /* Log TCP options */
-#define IPT_LOG_IPOPT 0x04 /* Log IP options */
-#define IPT_LOG_UID 0x08 /* Log UID owning local socket */
-#define IPT_LOG_NFLOG 0x10 /* Log using nf_log backend */
-#define IPT_LOG_MASK 0x1f
-
-struct ipt_log_info {
- unsigned char level;
- unsigned char logflags;
- char prefix[30];
-};
-
-#endif /*_IPT_LOG_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_NFQUEUE.h b/original/linux/netfilter_ipv4/ipt_NFQUEUE.h
deleted file mode 100644
index 97a2a75..0000000
--- a/original/linux/netfilter_ipv4/ipt_NFQUEUE.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* iptables module for using NFQUEUE mechanism
- *
- * (C) 2005 Harald Welte <laforge@netfilter.org>
- *
- * This software is distributed under GNU GPL v2, 1991
- *
-*/
-#ifndef _IPT_NFQ_TARGET_H
-#define _IPT_NFQ_TARGET_H
-
-/* Backwards compatibility for old userspace */
-#include <linux/netfilter/xt_NFQUEUE.h>
-
-#define ipt_NFQ_info xt_NFQ_info
-
-#endif /* _IPT_DSCP_TARGET_H */
diff --git a/original/linux/netfilter_ipv4/ipt_REJECT.h b/original/linux/netfilter_ipv4/ipt_REJECT.h
deleted file mode 100644
index 4293a1a..0000000
--- a/original/linux/netfilter_ipv4/ipt_REJECT.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _IPT_REJECT_H
-#define _IPT_REJECT_H
-
-enum ipt_reject_with {
- IPT_ICMP_NET_UNREACHABLE,
- IPT_ICMP_HOST_UNREACHABLE,
- IPT_ICMP_PROT_UNREACHABLE,
- IPT_ICMP_PORT_UNREACHABLE,
- IPT_ICMP_ECHOREPLY,
- IPT_ICMP_NET_PROHIBITED,
- IPT_ICMP_HOST_PROHIBITED,
- IPT_TCP_RESET,
- IPT_ICMP_ADMIN_PROHIBITED
-};
-
-struct ipt_reject_info {
- enum ipt_reject_with with; /* reject type */
-};
-
-#endif /*_IPT_REJECT_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_TCPMSS.h b/original/linux/netfilter_ipv4/ipt_TCPMSS.h
deleted file mode 100644
index aadb395..0000000
--- a/original/linux/netfilter_ipv4/ipt_TCPMSS.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IPT_TCPMSS_H
-#define _IPT_TCPMSS_H
-
-struct ipt_tcpmss_info {
- u_int16_t mss;
-};
-
-#define IPT_TCPMSS_CLAMP_PMTU 0xffff
-
-#endif /*_IPT_TCPMSS_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_TOS.h b/original/linux/netfilter_ipv4/ipt_TOS.h
deleted file mode 100644
index 6bf9e1f..0000000
--- a/original/linux/netfilter_ipv4/ipt_TOS.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _IPT_TOS_H_target
-#define _IPT_TOS_H_target
-
-#ifndef IPTOS_NORMALSVC
-#define IPTOS_NORMALSVC 0
-#endif
-
-struct ipt_tos_target_info {
- u_int8_t tos;
-};
-
-#endif /*_IPT_TOS_H_target*/
diff --git a/original/linux/netfilter_ipv4/ipt_TTL.h b/original/linux/netfilter_ipv4/ipt_TTL.h
deleted file mode 100644
index ee6611e..0000000
--- a/original/linux/netfilter_ipv4/ipt_TTL.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* TTL modification module for IP tables
- * (C) 2000 by Harald Welte <laforge@netfilter.org> */
-
-#ifndef _IPT_TTL_H
-#define _IPT_TTL_H
-
-enum {
- IPT_TTL_SET = 0,
- IPT_TTL_INC,
- IPT_TTL_DEC
-};
-
-#define IPT_TTL_MAXMODE IPT_TTL_DEC
-
-struct ipt_TTL_info {
- u_int8_t mode;
- u_int8_t ttl;
-};
-
-
-#endif
diff --git a/original/linux/netfilter_ipv4/ipt_ULOG.h b/original/linux/netfilter_ipv4/ipt_ULOG.h
deleted file mode 100644
index 417aad2..0000000
--- a/original/linux/netfilter_ipv4/ipt_ULOG.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Header file for IP tables userspace logging, Version 1.8
- *
- * (C) 2000-2002 by Harald Welte <laforge@gnumonks.org>
- *
- * Distributed under the terms of GNU GPL */
-
-#ifndef _IPT_ULOG_H
-#define _IPT_ULOG_H
-
-#ifndef NETLINK_NFLOG
-#define NETLINK_NFLOG 5
-#endif
-
-#define ULOG_DEFAULT_NLGROUP 1
-#define ULOG_DEFAULT_QTHRESHOLD 1
-
-#define ULOG_MAC_LEN 80
-#define ULOG_PREFIX_LEN 32
-
-#define ULOG_MAX_QLEN 50
-/* Why 50? Well... there is a limit imposed by the slab cache 131000
- * bytes. So the multipart netlink-message has to be < 131000 bytes.
- * Assuming a standard ethernet-mtu of 1500, we could define this up
- * to 80... but even 50 seems to be big enough. */
-
-/* private data structure for each rule with a ULOG target */
-struct ipt_ulog_info {
- unsigned int nl_group;
- size_t copy_range;
- size_t qthreshold;
- char prefix[ULOG_PREFIX_LEN];
-};
-
-/* Format of the ULOG packets passed through netlink */
-typedef struct ulog_packet_msg {
- unsigned long mark;
- long timestamp_sec;
- long timestamp_usec;
- unsigned int hook;
- char indev_name[IFNAMSIZ];
- char outdev_name[IFNAMSIZ];
- size_t data_len;
- char prefix[ULOG_PREFIX_LEN];
- unsigned char mac_len;
- unsigned char mac[ULOG_MAC_LEN];
- unsigned char payload[0];
-} ulog_packet_msg_t;
-
-#endif /*_IPT_ULOG_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_addrtype.h b/original/linux/netfilter_ipv4/ipt_addrtype.h
deleted file mode 100644
index 166ed01..0000000
--- a/original/linux/netfilter_ipv4/ipt_addrtype.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _IPT_ADDRTYPE_H
-#define _IPT_ADDRTYPE_H
-
-struct ipt_addrtype_info {
- u_int16_t source; /* source-type mask */
- u_int16_t dest; /* dest-type mask */
- u_int32_t invert_source;
- u_int32_t invert_dest;
-};
-
-#endif
diff --git a/original/linux/netfilter_ipv4/ipt_ah.h b/original/linux/netfilter_ipv4/ipt_ah.h
deleted file mode 100644
index 7b9a2ac..0000000
--- a/original/linux/netfilter_ipv4/ipt_ah.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _IPT_AH_H
-#define _IPT_AH_H
-
-struct ipt_ah
-{
- u_int32_t spis[2]; /* Security Parameter Index */
- u_int8_t invflags; /* Inverse flags */
-};
-
-
-
-/* Values for "invflags" field in struct ipt_ah. */
-#define IPT_AH_INV_SPI 0x01 /* Invert the sense of spi. */
-#define IPT_AH_INV_MASK 0x01 /* All possible flags. */
-
-#endif /*_IPT_AH_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_comment.h b/original/linux/netfilter_ipv4/ipt_comment.h
deleted file mode 100644
index ae2afc2..0000000
--- a/original/linux/netfilter_ipv4/ipt_comment.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IPT_COMMENT_H
-#define _IPT_COMMENT_H
-
-#include <linux/netfilter/xt_comment.h>
-
-#define IPT_MAX_COMMENT_LEN XT_MAX_COMMENT_LEN
-
-#define ipt_comment_info xt_comment_info
-
-#endif /* _IPT_COMMENT_H */
diff --git a/original/linux/netfilter_ipv4/ipt_connbytes.h b/original/linux/netfilter_ipv4/ipt_connbytes.h
deleted file mode 100644
index f63e6ee..0000000
--- a/original/linux/netfilter_ipv4/ipt_connbytes.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _IPT_CONNBYTES_H
-#define _IPT_CONNBYTES_H
-
-#include <linux/netfilter/xt_connbytes.h>
-#define ipt_connbytes_what xt_connbytes_what
-
-#define IPT_CONNBYTES_PKTS XT_CONNBYTES_PKTS
-#define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES
-#define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT
-
-#define ipt_connbytes_direction xt_connbytes_direction
-#define IPT_CONNBYTES_DIR_ORIGINAL XT_CONNBYTES_DIR_ORIGINAL
-#define IPT_CONNBYTES_DIR_REPLY XT_CONNBYTES_DIR_REPLY
-#define IPT_CONNBYTES_DIR_BOTH XT_CONNBYTES_DIR_BOTH
-
-#define ipt_connbytes_info xt_connbytes_info
-
-#endif
diff --git a/original/linux/netfilter_ipv4/ipt_dccp.h b/original/linux/netfilter_ipv4/ipt_dccp.h
deleted file mode 100644
index e70d11e..0000000
--- a/original/linux/netfilter_ipv4/ipt_dccp.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _IPT_DCCP_H_
-#define _IPT_DCCP_H_
-
-#include <linux/netfilter/xt_dccp.h>
-#define IPT_DCCP_SRC_PORTS XT_DCCP_SRC_PORTS
-#define IPT_DCCP_DEST_PORTS XT_DCCP_DEST_PORTS
-#define IPT_DCCP_TYPE XT_DCCP_TYPE
-#define IPT_DCCP_OPTION XT_DCCP_OPTION
-
-#define IPT_DCCP_VALID_FLAGS XT_DCCP_VALID_FLAGS
-
-#define ipt_dccp_info xt_dccp_info
-
-#endif /* _IPT_DCCP_H_ */
-
diff --git a/original/linux/netfilter_ipv4/ipt_dscp_.h b/original/linux/netfilter_ipv4/ipt_dscp_.h
deleted file mode 100644
index 2fa6dfe..0000000
--- a/original/linux/netfilter_ipv4/ipt_dscp_.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* iptables module for matching the IPv4 DSCP field
- *
- * (C) 2002 Harald Welte <laforge@gnumonks.org>
- * This software is distributed under GNU GPL v2, 1991
- *
- * See RFC2474 for a description of the DSCP field within the IP Header.
- *
- * ipt_dscp.h,v 1.3 2002/08/05 19:00:21 laforge Exp
-*/
-#ifndef _IPT_DSCP_H
-#define _IPT_DSCP_H
-
-#define IPT_DSCP_MASK 0xfc /* 11111100 */
-#define IPT_DSCP_SHIFT 2
-#define IPT_DSCP_MAX 0x3f /* 00111111 */
-
-/* match info */
-struct ipt_dscp_info {
- u_int8_t dscp;
- u_int8_t invert;
-};
-
-#endif /* _IPT_DSCP_H */
diff --git a/original/linux/netfilter_ipv4/ipt_esp.h b/original/linux/netfilter_ipv4/ipt_esp.h
deleted file mode 100644
index 78296e7..0000000
--- a/original/linux/netfilter_ipv4/ipt_esp.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IPT_ESP_H
-#define _IPT_ESP_H
-
-#include <linux/netfilter/xt_esp.h>
-
-#define ipt_esp xt_esp
-#define IPT_ESP_INV_SPI XT_ESP_INV_SPI
-#define IPT_ESP_INV_MASK XT_ESP_INV_MASK
-
-#endif /*_IPT_ESP_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_hashlimit.h b/original/linux/netfilter_ipv4/ipt_hashlimit.h
deleted file mode 100644
index ac2cb64..0000000
--- a/original/linux/netfilter_ipv4/ipt_hashlimit.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _IPT_HASHLIMIT_H
-#define _IPT_HASHLIMIT_H
-
-/* timings are in milliseconds. */
-#define IPT_HASHLIMIT_SCALE 10000
-/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
- seconds, or one every 59 hours. */
-
-/* details of this structure hidden by the implementation */
-struct ipt_hashlimit_htable;
-
-#define IPT_HASHLIMIT_HASH_DIP 0x0001
-#define IPT_HASHLIMIT_HASH_DPT 0x0002
-#define IPT_HASHLIMIT_HASH_SIP 0x0004
-#define IPT_HASHLIMIT_HASH_SPT 0x0008
-
-struct hashlimit_cfg {
- u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */
- u_int32_t avg; /* Average secs between packets * scale */
- u_int32_t burst; /* Period multiplier for upper limit. */
-
- /* user specified */
- u_int32_t size; /* how many buckets */
- u_int32_t max; /* max number of entries */
- u_int32_t gc_interval; /* gc interval */
- u_int32_t expire; /* when do entries expire? */
-};
-
-struct ipt_hashlimit_info {
- char name [IFNAMSIZ]; /* name */
- struct hashlimit_cfg cfg;
- struct ipt_hashlimit_htable *hinfo;
-
- /* Used internally by the kernel */
- union {
- void *ptr;
- struct ipt_hashlimit_info *master;
- } u;
-};
-#endif /*_IPT_HASHLIMIT_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_helper.h b/original/linux/netfilter_ipv4/ipt_helper.h
deleted file mode 100644
index 80452c2..0000000
--- a/original/linux/netfilter_ipv4/ipt_helper.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IPT_HELPER_H
-#define _IPT_HELPER_H
-
-#include <linux/netfilter/xt_helper.h>
-#define ipt_helper_info xt_helper_info
-
-#endif /* _IPT_HELPER_H */
diff --git a/original/linux/netfilter_ipv4/ipt_iprange.h b/original/linux/netfilter_ipv4/ipt_iprange.h
deleted file mode 100644
index 3ecb3bd..0000000
--- a/original/linux/netfilter_ipv4/ipt_iprange.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _IPT_IPRANGE_H
-#define _IPT_IPRANGE_H
-
-#define IPRANGE_SRC 0x01 /* Match source IP address */
-#define IPRANGE_DST 0x02 /* Match destination IP address */
-#define IPRANGE_SRC_INV 0x10 /* Negate the condition */
-#define IPRANGE_DST_INV 0x20 /* Negate the condition */
-
-struct ipt_iprange {
- /* Inclusive: network order. */
- u_int32_t min_ip, max_ip;
-};
-
-struct ipt_iprange_info
-{
- struct ipt_iprange src;
- struct ipt_iprange dst;
-
- /* Flags from above */
- u_int8_t flags;
-};
-
-#endif /* _IPT_IPRANGE_H */
diff --git a/original/linux/netfilter_ipv4/ipt_length.h b/original/linux/netfilter_ipv4/ipt_length.h
deleted file mode 100644
index 9b45206..0000000
--- a/original/linux/netfilter_ipv4/ipt_length.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IPT_LENGTH_H
-#define _IPT_LENGTH_H
-
-#include <linux/netfilter/xt_length.h>
-#define ipt_length_info xt_length_info
-
-#endif /*_IPT_LENGTH_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_mac.h b/original/linux/netfilter_ipv4/ipt_mac.h
deleted file mode 100644
index b186008..0000000
--- a/original/linux/netfilter_ipv4/ipt_mac.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IPT_MAC_H
-#define _IPT_MAC_H
-
-#include <linux/netfilter/xt_mac.h>
-#define ipt_mac_info xt_mac_info
-
-#endif /*_IPT_MAC_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_owner.h b/original/linux/netfilter_ipv4/ipt_owner.h
deleted file mode 100644
index 92f4bda..0000000
--- a/original/linux/netfilter_ipv4/ipt_owner.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _IPT_OWNER_H
-#define _IPT_OWNER_H
-
-/* match and invert flags */
-#define IPT_OWNER_UID 0x01
-#define IPT_OWNER_GID 0x02
-#define IPT_OWNER_PID 0x04
-#define IPT_OWNER_SID 0x08
-#define IPT_OWNER_COMM 0x10
-
-struct ipt_owner_info {
- uid_t uid;
- gid_t gid;
- pid_t pid;
- pid_t sid;
- char comm[16];
- u_int8_t match, invert; /* flags */
-};
-
-#endif /*_IPT_OWNER_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_physdev.h b/original/linux/netfilter_ipv4/ipt_physdev.h
deleted file mode 100644
index 2400e71..0000000
--- a/original/linux/netfilter_ipv4/ipt_physdev.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _IPT_PHYSDEV_H
-#define _IPT_PHYSDEV_H
-
-/* Backwards compatibility for old userspace */
-
-#include <linux/netfilter/xt_physdev.h>
-
-#define IPT_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN
-#define IPT_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT
-#define IPT_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED
-#define IPT_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN
-#define IPT_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT
-#define IPT_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK
-
-#define ipt_physdev_info xt_physdev_info
-
-#endif /*_IPT_PHYSDEV_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_pkttype.h b/original/linux/netfilter_ipv4/ipt_pkttype.h
deleted file mode 100644
index ff1fbc9..0000000
--- a/original/linux/netfilter_ipv4/ipt_pkttype.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IPT_PKTTYPE_H
-#define _IPT_PKTTYPE_H
-
-#include <linux/netfilter/xt_pkttype.h>
-#define ipt_pkttype_info xt_pkttype_info
-
-#endif /*_IPT_PKTTYPE_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_realm.h b/original/linux/netfilter_ipv4/ipt_realm.h
deleted file mode 100644
index b3996ea..0000000
--- a/original/linux/netfilter_ipv4/ipt_realm.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IPT_REALM_H
-#define _IPT_REALM_H
-
-#include <linux/netfilter/xt_realm.h>
-#define ipt_realm_info xt_realm_info
-
-#endif /* _IPT_REALM_H */
diff --git a/original/linux/netfilter_ipv4/ipt_recent.h b/original/linux/netfilter_ipv4/ipt_recent.h
deleted file mode 100644
index 6508a45..0000000
--- a/original/linux/netfilter_ipv4/ipt_recent.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _IPT_RECENT_H
-#define _IPT_RECENT_H
-
-#define RECENT_NAME "ipt_recent"
-#define RECENT_VER "v0.3.1"
-
-#define IPT_RECENT_CHECK 1
-#define IPT_RECENT_SET 2
-#define IPT_RECENT_UPDATE 4
-#define IPT_RECENT_REMOVE 8
-#define IPT_RECENT_TTL 16
-
-#define IPT_RECENT_SOURCE 0
-#define IPT_RECENT_DEST 1
-
-#define IPT_RECENT_NAME_LEN 200
-
-struct ipt_recent_info {
- u_int32_t seconds;
- u_int32_t hit_count;
- u_int8_t check_set;
- u_int8_t invert;
- char name[IPT_RECENT_NAME_LEN];
- u_int8_t side;
-};
-
-#endif /*_IPT_RECENT_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_sctp.h b/original/linux/netfilter_ipv4/ipt_sctp.h
deleted file mode 100644
index 80b3dba..0000000
--- a/original/linux/netfilter_ipv4/ipt_sctp.h
+++ /dev/null
@@ -1,105 +0,0 @@
-#ifndef _IPT_SCTP_H_
-#define _IPT_SCTP_H_
-
-#define IPT_SCTP_SRC_PORTS 0x01
-#define IPT_SCTP_DEST_PORTS 0x02
-#define IPT_SCTP_CHUNK_TYPES 0x04
-
-#define IPT_SCTP_VALID_FLAGS 0x07
-
-
-struct ipt_sctp_flag_info {
- u_int8_t chunktype;
- u_int8_t flag;
- u_int8_t flag_mask;
-};
-
-#define IPT_NUM_SCTP_FLAGS 4
-
-struct ipt_sctp_info {
- u_int16_t dpts[2]; /* Min, Max */
- u_int16_t spts[2]; /* Min, Max */
-
- u_int32_t chunkmap[256 / sizeof (u_int32_t)]; /* Bit mask of chunks to be matched according to RFC 2960 */
-
-#define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */
-#define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */
-#define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */
-
- u_int32_t chunk_match_type;
- struct ipt_sctp_flag_info flag_info[IPT_NUM_SCTP_FLAGS];
- int flag_count;
-
- u_int32_t flags;
- u_int32_t invflags;
-};
-
-#define bytes(type) (sizeof(type) * 8)
-
-#define SCTP_CHUNKMAP_SET(chunkmap, type) \
- do { \
- chunkmap[type / bytes(u_int32_t)] |= \
- 1 << (type % bytes(u_int32_t)); \
- } while (0)
-
-#define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \
- do { \
- chunkmap[type / bytes(u_int32_t)] &= \
- ~(1 << (type % bytes(u_int32_t))); \
- } while (0)
-
-#define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \
-({ \
- (chunkmap[type / bytes (u_int32_t)] & \
- (1 << (type % bytes (u_int32_t)))) ? 1: 0; \
-})
-
-#define SCTP_CHUNKMAP_RESET(chunkmap) \
- do { \
- int i; \
- for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \
- chunkmap[i] = 0; \
- } while (0)
-
-#define SCTP_CHUNKMAP_SET_ALL(chunkmap) \
- do { \
- int i; \
- for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \
- chunkmap[i] = ~0; \
- } while (0)
-
-#define SCTP_CHUNKMAP_COPY(destmap, srcmap) \
- do { \
- int i; \
- for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \
- destmap[i] = srcmap[i]; \
- } while (0)
-
-#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \
-({ \
- int i; \
- int flag = 1; \
- for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { \
- if (chunkmap[i]) { \
- flag = 0; \
- break; \
- } \
- } \
- flag; \
-})
-
-#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \
-({ \
- int i; \
- int flag = 1; \
- for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { \
- if (chunkmap[i] != ~0) { \
- flag = 0; \
- break; \
- } \
- } \
- flag; \
-})
-
-#endif /* _IPT_SCTP_H_ */
-
diff --git a/original/linux/netfilter_ipv4/ipt_state.h b/original/linux/netfilter_ipv4/ipt_state.h
deleted file mode 100644
index a44a99c..0000000
--- a/original/linux/netfilter_ipv4/ipt_state.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _IPT_STATE_H
-#define _IPT_STATE_H
-
-/* Backwards compatibility for old userspace */
-
-#include <linux/netfilter/xt_state.h>
-
-#define IPT_STATE_BIT XT_STATE_BIT
-#define IPT_STATE_INVALID XT_STATE_INVALID
-
-#define IPT_STATE_UNTRACKED XT_STATE_UNTRACKED
-
-#define ipt_state_info xt_state_info
-
-#endif /*_IPT_STATE_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_string.h b/original/linux/netfilter_ipv4/ipt_string.h
deleted file mode 100644
index c26de30..0000000
--- a/original/linux/netfilter_ipv4/ipt_string.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IPT_STRING_H
-#define _IPT_STRING_H
-
-#include <linux/netfilter/xt_string.h>
-
-#define IPT_STRING_MAX_PATTERN_SIZE XT_STRING_MAX_PATTERN_SIZE
-#define IPT_STRING_MAX_ALGO_NAME_SIZE XT_STRING_MAX_ALGO_NAME_SIZE
-#define ipt_string_info xt_string_info
-
-#endif /*_IPT_STRING_H*/
diff --git a/original/linux/netfilter_ipv4/ipt_tos_.h b/original/linux/netfilter_ipv4/ipt_tos_.h
deleted file mode 100644
index a21f5df..0000000
--- a/original/linux/netfilter_ipv4/ipt_tos_.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _IPT_TOS_H
-#define _IPT_TOS_H
-
-struct ipt_tos_info {
- u_int8_t tos;
- u_int8_t invert;
-};
-
-#ifndef IPTOS_NORMALSVC
-#define IPTOS_NORMALSVC 0
-#endif
-
-#endif /*_IPT_TOS_H*/
diff --git a/original/linux/netfilter_ipv6.h b/original/linux/netfilter_ipv6.h
deleted file mode 100644
index 1f7e300..0000000
--- a/original/linux/netfilter_ipv6.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef __LINUX_IP6_NETFILTER_H
-#define __LINUX_IP6_NETFILTER_H
-
-/* IPv6-specific defines for netfilter.
- * (C)1998 Rusty Russell -- This code is GPL.
- * (C)1999 David Jeffery
- * this header was blatantly ripped from netfilter_ipv4.h
- * it's amazing what adding a bunch of 6s can do =8^)
- */
-
-#include <linux/netfilter.h>
-
-/* only for userspace compatibility */
-#ifndef __KERNEL__
-/* IP Cache bits. */
-/* Src IP address. */
-#define NFC_IP6_SRC 0x0001
-/* Dest IP address. */
-#define NFC_IP6_DST 0x0002
-/* Input device. */
-#define NFC_IP6_IF_IN 0x0004
-/* Output device. */
-#define NFC_IP6_IF_OUT 0x0008
-/* TOS. */
-#define NFC_IP6_TOS 0x0010
-/* Protocol. */
-#define NFC_IP6_PROTO 0x0020
-/* IP options. */
-#define NFC_IP6_OPTIONS 0x0040
-/* Frag & flags. */
-#define NFC_IP6_FRAG 0x0080
-
-
-/* Per-protocol information: only matters if proto match. */
-/* TCP flags. */
-#define NFC_IP6_TCPFLAGS 0x0100
-/* Source port. */
-#define NFC_IP6_SRC_PT 0x0200
-/* Dest port. */
-#define NFC_IP6_DST_PT 0x0400
-/* Something else about the proto */
-#define NFC_IP6_PROTO_UNKNOWN 0x2000
-
-/* IP6 Hooks */
-/* After promisc drops, checksum checks. */
-#define NF_IP6_PRE_ROUTING 0
-/* If the packet is destined for this box. */
-#define NF_IP6_LOCAL_IN 1
-/* If the packet is destined for another interface. */
-#define NF_IP6_FORWARD 2
-/* Packets coming from a local process. */
-#define NF_IP6_LOCAL_OUT 3
-/* Packets about to hit the wire. */
-#define NF_IP6_POST_ROUTING 4
-#define NF_IP6_NUMHOOKS 5
-#endif /* ! __KERNEL__ */
-
-
-enum nf_ip6_hook_priorities {
- NF_IP6_PRI_FIRST = INT_MIN,
- NF_IP6_PRI_CONNTRACK_DEFRAG = -400,
- NF_IP6_PRI_RAW = -300,
- NF_IP6_PRI_SELINUX_FIRST = -225,
- NF_IP6_PRI_CONNTRACK = -200,
- NF_IP6_PRI_MANGLE = -150,
- NF_IP6_PRI_NAT_DST = -100,
- NF_IP6_PRI_FILTER = 0,
- NF_IP6_PRI_SECURITY = 50,
- NF_IP6_PRI_NAT_SRC = 100,
- NF_IP6_PRI_SELINUX_LAST = 225,
- NF_IP6_PRI_LAST = INT_MAX,
-};
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_NETFILTER
-extern int ip6_route_me_harder(struct sk_buff *skb);
-extern __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
- unsigned int dataoff, u_int8_t protocol);
-
-extern int ipv6_netfilter_init(void);
-extern void ipv6_netfilter_fini(void);
-#else /* CONFIG_NETFILTER */
-static inline int ipv6_netfilter_init(void) { return 0; }
-static inline void ipv6_netfilter_fini(void) { return; }
-#endif /* CONFIG_NETFILTER */
-
-#endif /* __KERNEL__ */
-
-#endif /*__LINUX_IP6_NETFILTER_H*/
diff --git a/original/linux/netfilter_ipv6/ip6_tables.h b/original/linux/netfilter_ipv6/ip6_tables.h
deleted file mode 100644
index d0d5d1e..0000000
--- a/original/linux/netfilter_ipv6/ip6_tables.h
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * 25-Jul-1998 Major changes to allow for ip chain table
- *
- * 3-Jan-2000 Named tables to allow packet selection for different uses.
- */
-
-/*
- * Format of an IP6 firewall descriptor
- *
- * src, dst, src_mask, dst_mask are always stored in network byte order.
- * flags are stored in host byte order (of course).
- * Port numbers are stored in HOST byte order.
- */
-
-#ifndef _IP6_TABLES_H
-#define _IP6_TABLES_H
-
-#ifdef __KERNEL__
-#include <linux/if.h>
-#include <linux/types.h>
-#include <linux/in6.h>
-#include <linux/ipv6.h>
-#include <linux/skbuff.h>
-#endif
-#include <linux/compiler.h>
-#include <linux/netfilter_ipv6.h>
-
-#include <linux/netfilter/x_tables.h>
-
-#define IP6T_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
-#define IP6T_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
-
-#define ip6t_match xt_match
-#define ip6t_target xt_target
-#define ip6t_table xt_table
-#define ip6t_get_revision xt_get_revision
-
-/* Yes, Virginia, you have to zero the padding. */
-struct ip6t_ip6 {
- /* Source and destination IP6 addr */
- struct in6_addr src, dst;
- /* Mask for src and dest IP6 addr */
- struct in6_addr smsk, dmsk;
- char iniface[IFNAMSIZ], outiface[IFNAMSIZ];
- unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
-
- /* ARGH, HopByHop uses 0, so can't do 0 = ANY,
- instead IP6T_F_NOPROTO must be set */
- u_int16_t proto;
- /* TOS to match iff flags & IP6T_F_TOS */
- u_int8_t tos;
-
- /* Flags word */
- u_int8_t flags;
- /* Inverse flags */
- u_int8_t invflags;
-};
-
-#define ip6t_entry_match xt_entry_match
-#define ip6t_entry_target xt_entry_target
-#define ip6t_standard_target xt_standard_target
-
-#define ip6t_counters xt_counters
-
-/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
-#define IP6T_F_PROTO 0x01 /* Set if rule cares about upper
- protocols */
-#define IP6T_F_TOS 0x02 /* Match the TOS. */
-#define IP6T_F_GOTO 0x04 /* Set if jump is a goto */
-#define IP6T_F_MASK 0x07 /* All possible flag bits mask. */
-
-/* Values for "inv" field in struct ip6t_ip6. */
-#define IP6T_INV_VIA_IN 0x01 /* Invert the sense of IN IFACE. */
-#define IP6T_INV_VIA_OUT 0x02 /* Invert the sense of OUT IFACE */
-#define IP6T_INV_TOS 0x04 /* Invert the sense of TOS. */
-#define IP6T_INV_SRCIP 0x08 /* Invert the sense of SRC IP. */
-#define IP6T_INV_DSTIP 0x10 /* Invert the sense of DST OP. */
-#define IP6T_INV_FRAG 0x20 /* Invert the sense of FRAG. */
-#define IP6T_INV_PROTO XT_INV_PROTO
-#define IP6T_INV_MASK 0x7F /* All possible flag bits mask. */
-
-/* This structure defines each of the firewall rules. Consists of 3
- parts which are 1) general IP header stuff 2) match specific
- stuff 3) the target to perform if the rule matches */
-struct ip6t_entry
-{
- struct ip6t_ip6 ipv6;
-
- /* Mark with fields that we care about. */
- unsigned int nfcache;
-
- /* Size of ipt_entry + matches */
- u_int16_t target_offset;
- /* Size of ipt_entry + matches + target */
- u_int16_t next_offset;
-
- /* Back pointer */
- unsigned int comefrom;
-
- /* Packet and byte counters. */
- struct xt_counters counters;
-
- /* The matches (if any), then the target. */
- unsigned char elems[0];
-};
-
-/*
- * New IP firewall options for [gs]etsockopt at the RAW IP level.
- * Unlike BSD Linux inherits IP options so you don't have to use
- * a raw socket for this. Instead we check rights in the calls. */
-#define IP6T_BASE_CTL XT_BASE_CTL
-
-#define IP6T_SO_SET_REPLACE XT_SO_SET_REPLACE
-#define IP6T_SO_SET_ADD_COUNTERS XT_SO_SET_ADD_COUNTERS
-#define IP6T_SO_SET_MAX XT_SO_SET_MAX
-
-#define IP6T_SO_GET_INFO XT_SO_GET_INFO
-#define IP6T_SO_GET_ENTRIES XT_SO_GET_ENTRIES
-#define IP6T_SO_GET_REVISION_MATCH XT_SO_GET_REVISION_MATCH
-#define IP6T_SO_GET_REVISION_TARGET XT_SO_GET_REVISION_TARGET
-#define IP6T_SO_GET_MAX XT_SO_GET_REVISION_TARGET
-
-/* CONTINUE verdict for targets */
-#define IP6T_CONTINUE XT_CONTINUE
-
-/* For standard target */
-#define IP6T_RETURN XT_RETURN
-
-/* TCP/UDP matching stuff */
-#include <linux/netfilter/xt_tcpudp.h>
-
-#define ip6t_tcp xt_tcp
-#define ip6t_udp xt_udp
-
-/* Values for "inv" field in struct ipt_tcp. */
-#define IP6T_TCP_INV_SRCPT XT_TCP_INV_SRCPT
-#define IP6T_TCP_INV_DSTPT XT_TCP_INV_DSTPT
-#define IP6T_TCP_INV_FLAGS XT_TCP_INV_FLAGS
-#define IP6T_TCP_INV_OPTION XT_TCP_INV_OPTION
-#define IP6T_TCP_INV_MASK XT_TCP_INV_MASK
-
-/* Values for "invflags" field in struct ipt_udp. */
-#define IP6T_UDP_INV_SRCPT XT_UDP_INV_SRCPT
-#define IP6T_UDP_INV_DSTPT XT_UDP_INV_DSTPT
-#define IP6T_UDP_INV_MASK XT_UDP_INV_MASK
-
-/* ICMP matching stuff */
-struct ip6t_icmp
-{
- u_int8_t type; /* type to match */
- u_int8_t code[2]; /* range of code */
- u_int8_t invflags; /* Inverse flags */
-};
-
-/* Values for "inv" field for struct ipt_icmp. */
-#define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */
-
-/* The argument to IP6T_SO_GET_INFO */
-struct ip6t_getinfo
-{
- /* Which table: caller fills this in. */
- char name[IP6T_TABLE_MAXNAMELEN];
-
- /* Kernel fills these in. */
- /* Which hook entry points are valid: bitmask */
- unsigned int valid_hooks;
-
- /* Hook entry points: one per netfilter hook. */
- unsigned int hook_entry[NF_IP6_NUMHOOKS];
-
- /* Underflow points. */
- unsigned int underflow[NF_IP6_NUMHOOKS];
-
- /* Number of entries */
- unsigned int num_entries;
-
- /* Size of entries. */
- unsigned int size;
-};
-
-/* The argument to IP6T_SO_SET_REPLACE. */
-struct ip6t_replace
-{
- /* Which table. */
- char name[IP6T_TABLE_MAXNAMELEN];
-
- /* Which hook entry points are valid: bitmask. You can't
- change this. */
- unsigned int valid_hooks;
-
- /* Number of entries */
- unsigned int num_entries;
-
- /* Total size of new entries */
- unsigned int size;
-
- /* Hook entry points. */
- unsigned int hook_entry[NF_IP6_NUMHOOKS];
-
- /* Underflow points. */
- unsigned int underflow[NF_IP6_NUMHOOKS];
-
- /* Information about old entries: */
- /* Number of counters (must be equal to current number of entries). */
- unsigned int num_counters;
- /* The old entries' counters. */
- struct xt_counters __user *counters;
-
- /* The entries (hang off end: not really an array). */
- struct ip6t_entry entries[0];
-};
-
-/* The argument to IP6T_SO_ADD_COUNTERS. */
-#define ip6t_counters_info xt_counters_info
-
-/* The argument to IP6T_SO_GET_ENTRIES. */
-struct ip6t_get_entries
-{
- /* Which table: user fills this in. */
- char name[IP6T_TABLE_MAXNAMELEN];
-
- /* User fills this in: total entry size. */
- unsigned int size;
-
- /* The entries. */
- struct ip6t_entry entrytable[0];
-};
-
-/* Standard return verdict, or do jump. */
-#define IP6T_STANDARD_TARGET XT_STANDARD_TARGET
-/* Error verdict. */
-#define IP6T_ERROR_TARGET XT_ERROR_TARGET
-
-/* Helper functions */
-static __inline__ struct ip6t_entry_target *
-ip6t_get_target(struct ip6t_entry *e)
-{
- return (void *)e + e->target_offset;
-}
-
-/* fn returns 0 to continue iteration */
-#define IP6T_MATCH_ITERATE(e, fn, args...) \
-({ \
- unsigned int __i; \
- int __ret = 0; \
- struct ip6t_entry_match *__m; \
- \
- for (__i = sizeof(struct ip6t_entry); \
- __i < (e)->target_offset; \
- __i += __m->u.match_size) { \
- __m = (void *)(e) + __i; \
- \
- __ret = fn(__m , ## args); \
- if (__ret != 0) \
- break; \
- } \
- __ret; \
-})
-
-/* fn returns 0 to continue iteration */
-#define IP6T_ENTRY_ITERATE(entries, size, fn, args...) \
-({ \
- unsigned int __i; \
- int __ret = 0; \
- struct ip6t_entry *__e; \
- \
- for (__i = 0; __i < (size); __i += __e->next_offset) { \
- __e = (void *)(entries) + __i; \
- \
- __ret = fn(__e , ## args); \
- if (__ret != 0) \
- break; \
- } \
- __ret; \
-})
-
-/*
- * Main firewall chains definitions and global var's definitions.
- */
-
-#ifdef __KERNEL__
-
-#include <linux/init.h>
-extern void ip6t_init(void) __init;
-
-#define ip6t_register_target(tgt) \
-({ (tgt)->family = AF_INET6; \
- xt_register_target(tgt); })
-#define ip6t_unregister_target(tgt) xt_unregister_target(tgt)
-
-#define ip6t_register_match(match) \
-({ (match)->family = AF_INET6; \
- xt_register_match(match); })
-#define ip6t_unregister_match(match) xt_unregister_match(match)
-
-extern int ip6t_register_table(struct ip6t_table *table,
- const struct ip6t_replace *repl);
-extern void ip6t_unregister_table(struct ip6t_table *table);
-extern unsigned int ip6t_do_table(struct sk_buff **pskb,
- unsigned int hook,
- const struct net_device *in,
- const struct net_device *out,
- struct ip6t_table *table,
- void *userdata);
-
-/* Check for an extension */
-extern int ip6t_ext_hdr(u8 nexthdr);
-/* find specified header and get offset to it */
-extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
- int target, unsigned short *fragoff);
-
-extern int ip6_masked_addrcmp(const struct in6_addr *addr1,
- const struct in6_addr *mask,
- const struct in6_addr *addr2);
-
-#define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1))
-
-#endif /*__KERNEL__*/
-#endif /* _IP6_TABLES_H */
diff --git a/original/linux/netfilter_ipv6/ip6t_HL.h b/original/linux/netfilter_ipv6/ip6t_HL.h
deleted file mode 100644
index afb7813..0000000
--- a/original/linux/netfilter_ipv6/ip6t_HL.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Hop Limit modification module for ip6tables
- * Maciej Soltysiak <solt@dns.toxicfilms.tv>
- * Based on HW's TTL module */
-
-#ifndef _IP6T_HL_H
-#define _IP6T_HL_H
-
-enum {
- IP6T_HL_SET = 0,
- IP6T_HL_INC,
- IP6T_HL_DEC
-};
-
-#define IP6T_HL_MAXMODE IP6T_HL_DEC
-
-struct ip6t_HL_info {
- u_int8_t mode;
- u_int8_t hop_limit;
-};
-
-
-#endif
diff --git a/original/linux/netfilter_ipv6/ip6t_LOG.h b/original/linux/netfilter_ipv6/ip6t_LOG.h
deleted file mode 100644
index 060c1a1..0000000
--- a/original/linux/netfilter_ipv6/ip6t_LOG.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _IP6T_LOG_H
-#define _IP6T_LOG_H
-
-/* make sure not to change this without changing netfilter.h:NF_LOG_* (!) */
-#define IP6T_LOG_TCPSEQ 0x01 /* Log TCP sequence numbers */
-#define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */
-#define IP6T_LOG_IPOPT 0x04 /* Log IP options */
-#define IP6T_LOG_UID 0x08 /* Log UID owning local socket */
-#define IP6T_LOG_NFLOG 0x10 /* Log using nf_log backend */
-#define IP6T_LOG_MASK 0x1f
-
-struct ip6t_log_info {
- unsigned char level;
- unsigned char logflags;
- char prefix[30];
-};
-
-#endif /*_IPT_LOG_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_REJECT.h b/original/linux/netfilter_ipv6/ip6t_REJECT.h
deleted file mode 100644
index 6be6504..0000000
--- a/original/linux/netfilter_ipv6/ip6t_REJECT.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _IP6T_REJECT_H
-#define _IP6T_REJECT_H
-
-enum ip6t_reject_with {
- IP6T_ICMP6_NO_ROUTE,
- IP6T_ICMP6_ADM_PROHIBITED,
- IP6T_ICMP6_NOT_NEIGHBOUR,
- IP6T_ICMP6_ADDR_UNREACH,
- IP6T_ICMP6_PORT_UNREACH,
- IP6T_ICMP6_ECHOREPLY,
- IP6T_TCP_RESET
-};
-
-struct ip6t_reject_info {
- u_int32_t with; /* reject type */
-};
-
-#endif /*_IP6T_REJECT_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_ah.h b/original/linux/netfilter_ipv6/ip6t_ah.h
deleted file mode 100644
index 8531879..0000000
--- a/original/linux/netfilter_ipv6/ip6t_ah.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _IP6T_AH_H
-#define _IP6T_AH_H
-
-struct ip6t_ah
-{
- u_int32_t spis[2]; /* Security Parameter Index */
- u_int32_t hdrlen; /* Header Length */
- u_int8_t hdrres; /* Test of the Reserved Filed */
- u_int8_t invflags; /* Inverse flags */
-};
-
-#define IP6T_AH_SPI 0x01
-#define IP6T_AH_LEN 0x02
-#define IP6T_AH_RES 0x04
-
-/* Values for "invflags" field in struct ip6t_ah. */
-#define IP6T_AH_INV_SPI 0x01 /* Invert the sense of spi. */
-#define IP6T_AH_INV_LEN 0x02 /* Invert the sense of length. */
-#define IP6T_AH_INV_MASK 0x03 /* All possible flags. */
-
-#endif /*_IP6T_AH_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_esp.h b/original/linux/netfilter_ipv6/ip6t_esp.h
deleted file mode 100644
index f62eaf5..0000000
--- a/original/linux/netfilter_ipv6/ip6t_esp.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _IP6T_ESP_H
-#define _IP6T_ESP_H
-
-#include <linux/netfilter/xt_esp.h>
-
-#define ip6t_esp xt_esp
-#define IP6T_ESP_INV_SPI XT_ESP_INV_SPI
-#define IP6T_ESP_INV_MASK XT_ESP_INV_MASK
-
-#endif /*_IP6T_ESP_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_frag.h b/original/linux/netfilter_ipv6/ip6t_frag.h
deleted file mode 100644
index 66070a0..0000000
--- a/original/linux/netfilter_ipv6/ip6t_frag.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef _IP6T_FRAG_H
-#define _IP6T_FRAG_H
-
-struct ip6t_frag
-{
- u_int32_t ids[2]; /* Security Parameter Index */
- u_int32_t hdrlen; /* Header Length */
- u_int8_t flags; /* */
- u_int8_t invflags; /* Inverse flags */
-};
-
-#define IP6T_FRAG_IDS 0x01
-#define IP6T_FRAG_LEN 0x02
-#define IP6T_FRAG_RES 0x04
-#define IP6T_FRAG_FST 0x08
-#define IP6T_FRAG_MF 0x10
-#define IP6T_FRAG_NMF 0x20
-
-/* Values for "invflags" field in struct ip6t_frag. */
-#define IP6T_FRAG_INV_IDS 0x01 /* Invert the sense of ids. */
-#define IP6T_FRAG_INV_LEN 0x02 /* Invert the sense of length. */
-#define IP6T_FRAG_INV_MASK 0x03 /* All possible flags. */
-
-#endif /*_IP6T_FRAG_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_hl.h b/original/linux/netfilter_ipv6/ip6t_hl.h
deleted file mode 100644
index 5ef91b8..0000000
--- a/original/linux/netfilter_ipv6/ip6t_hl.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* ip6tables module for matching the Hop Limit value
- * Maciej Soltysiak <solt@dns.toxicfilms.tv>
- * Based on HW's ttl module */
-
-#ifndef _IP6T_HL_H
-#define _IP6T_HL_H
-
-enum {
- IP6T_HL_EQ = 0, /* equals */
- IP6T_HL_NE, /* not equals */
- IP6T_HL_LT, /* less than */
- IP6T_HL_GT, /* greater than */
-};
-
-
-struct ip6t_hl_info {
- u_int8_t mode;
- u_int8_t hop_limit;
-};
-
-
-#endif
diff --git a/original/linux/netfilter_ipv6/ip6t_ipv6header.h b/original/linux/netfilter_ipv6/ip6t_ipv6header.h
deleted file mode 100644
index 51c53fc..0000000
--- a/original/linux/netfilter_ipv6/ip6t_ipv6header.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ipv6header match - matches IPv6 packets based
-on whether they contain certain headers */
-
-/* Original idea: Brad Chapman
- * Rewritten by: Andras Kis-Szabo <kisza@sch.bme.hu> */
-
-
-#ifndef __IPV6HEADER_H
-#define __IPV6HEADER_H
-
-struct ip6t_ipv6header_info
-{
- u_int8_t matchflags;
- u_int8_t invflags;
- u_int8_t modeflag;
-};
-
-#define MASK_HOPOPTS 128
-#define MASK_DSTOPTS 64
-#define MASK_ROUTING 32
-#define MASK_FRAGMENT 16
-#define MASK_AH 8
-#define MASK_ESP 4
-#define MASK_NONE 2
-#define MASK_PROTO 1
-
-#endif /* __IPV6HEADER_H */
diff --git a/original/linux/netfilter_ipv6/ip6t_length.h b/original/linux/netfilter_ipv6/ip6t_length.h
deleted file mode 100644
index 9e9689d..0000000
--- a/original/linux/netfilter_ipv6/ip6t_length.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef _IP6T_LENGTH_H
-#define _IP6T_LENGTH_H
-
-#include <linux/netfilter/xt_length.h>
-#define ip6t_length_info xt_length_info
-
-#endif /*_IP6T_LENGTH_H*/
-
diff --git a/original/linux/netfilter_ipv6/ip6t_mac.h b/original/linux/netfilter_ipv6/ip6t_mac.h
deleted file mode 100644
index ac58e83..0000000
--- a/original/linux/netfilter_ipv6/ip6t_mac.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _IP6T_MAC_H
-#define _IP6T_MAC_H
-
-#include <linux/netfilter/xt_mac.h>
-#define ip6t_mac_info xt_mac_info
-
-#endif /*_IP6T_MAC_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_opts.h b/original/linux/netfilter_ipv6/ip6t_opts.h
deleted file mode 100644
index a07e363..0000000
--- a/original/linux/netfilter_ipv6/ip6t_opts.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _IP6T_OPTS_H
-#define _IP6T_OPTS_H
-
-#define IP6T_OPTS_OPTSNR 16
-
-struct ip6t_opts
-{
- u_int32_t hdrlen; /* Header Length */
- u_int8_t flags; /* */
- u_int8_t invflags; /* Inverse flags */
- u_int16_t opts[IP6T_OPTS_OPTSNR]; /* opts */
- u_int8_t optsnr; /* Nr of OPts */
-};
-
-#define IP6T_OPTS_LEN 0x01
-#define IP6T_OPTS_OPTS 0x02
-#define IP6T_OPTS_NSTRICT 0x04
-
-/* Values for "invflags" field in struct ip6t_rt. */
-#define IP6T_OPTS_INV_LEN 0x01 /* Invert the sense of length. */
-#define IP6T_OPTS_INV_MASK 0x01 /* All possible flags. */
-
-#endif /*_IP6T_OPTS_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_owner.h b/original/linux/netfilter_ipv6/ip6t_owner.h
deleted file mode 100644
index 19937da..0000000
--- a/original/linux/netfilter_ipv6/ip6t_owner.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _IP6T_OWNER_H
-#define _IP6T_OWNER_H
-
-/* match and invert flags */
-#define IP6T_OWNER_UID 0x01
-#define IP6T_OWNER_GID 0x02
-#define IP6T_OWNER_PID 0x04
-#define IP6T_OWNER_SID 0x08
-
-struct ip6t_owner_info {
- uid_t uid;
- gid_t gid;
- pid_t pid;
- pid_t sid;
- u_int8_t match, invert; /* flags */
-};
-
-#endif /*_IPT_OWNER_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_physdev.h b/original/linux/netfilter_ipv6/ip6t_physdev.h
deleted file mode 100644
index c161c0a..0000000
--- a/original/linux/netfilter_ipv6/ip6t_physdev.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef _IP6T_PHYSDEV_H
-#define _IP6T_PHYSDEV_H
-
-/* Backwards compatibility for old userspace */
-
-#include <linux/netfilter/xt_physdev.h>
-
-#define IP6T_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN
-#define IP6T_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT
-#define IP6T_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED
-#define IP6T_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN
-#define IP6T_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT
-#define IP6T_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK
-
-#define ip6t_physdev_info xt_physdev_info
-
-#endif /*_IP6T_PHYSDEV_H*/
diff --git a/original/linux/netfilter_ipv6/ip6t_rt.h b/original/linux/netfilter_ipv6/ip6t_rt.h
deleted file mode 100644
index 5215602..0000000
--- a/original/linux/netfilter_ipv6/ip6t_rt.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef _IP6T_RT_H
-#define _IP6T_RT_H
-
-/*#include <linux/in6.h>*/
-
-#define IP6T_RT_HOPS 16
-
-struct ip6t_rt
-{
- u_int32_t rt_type; /* Routing Type */
- u_int32_t segsleft[2]; /* Segments Left */
- u_int32_t hdrlen; /* Header Length */
- u_int8_t flags; /* */
- u_int8_t invflags; /* Inverse flags */
- struct in6_addr addrs[IP6T_RT_HOPS]; /* Hops */
- u_int8_t addrnr; /* Nr of Addresses */
-};
-
-#define IP6T_RT_TYP 0x01
-#define IP6T_RT_SGS 0x02
-#define IP6T_RT_LEN 0x04
-#define IP6T_RT_RES 0x08
-#define IP6T_RT_FST_MASK 0x30
-#define IP6T_RT_FST 0x10
-#define IP6T_RT_FST_NSTRICT 0x20
-
-/* Values for "invflags" field in struct ip6t_rt. */
-#define IP6T_RT_INV_TYP 0x01 /* Invert the sense of type. */
-#define IP6T_RT_INV_SGS 0x02 /* Invert the sense of Segments. */
-#define IP6T_RT_INV_LEN 0x04 /* Invert the sense of length. */
-#define IP6T_RT_INV_MASK 0x07 /* All possible flags. */
-
-#endif /*_IP6T_RT_H*/
diff --git a/original/linux/netlink.h b/original/linux/netlink.h
deleted file mode 100644
index e0a09df..0000000
--- a/original/linux/netlink.h
+++ /dev/null
@@ -1,185 +0,0 @@
-#ifndef __LINUX_NETLINK_H
-#define __LINUX_NETLINK_H
-
-#include <linux/kernel.h>
-#include <linux/socket.h> /* for __kernel_sa_family_t */
-#include <linux/types.h>
-
-#define NETLINK_ROUTE 0 /* Routing/device hook */
-#define NETLINK_UNUSED 1 /* Unused number */
-#define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */
-#define NETLINK_FIREWALL 3 /* Unused number, formerly ip_queue */
-#define NETLINK_SOCK_DIAG 4 /* socket monitoring */
-#define NETLINK_NFLOG 5 /* netfilter/iptables ULOG */
-#define NETLINK_XFRM 6 /* ipsec */
-#define NETLINK_SELINUX 7 /* SELinux event notifications */
-#define NETLINK_ISCSI 8 /* Open-iSCSI */
-#define NETLINK_AUDIT 9 /* auditing */
-#define NETLINK_FIB_LOOKUP 10
-#define NETLINK_CONNECTOR 11
-#define NETLINK_NETFILTER 12 /* netfilter subsystem */
-#define NETLINK_IP6_FW 13
-#define NETLINK_DNRTMSG 14 /* DECnet routing messages */
-#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
-#define NETLINK_GENERIC 16
-/* leave room for NETLINK_DM (DM Events) */
-#define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
-#define NETLINK_ECRYPTFS 19
-#define NETLINK_RDMA 20
-#define NETLINK_CRYPTO 21 /* Crypto layer */
-
-#define NETLINK_INET_DIAG NETLINK_SOCK_DIAG
-
-#define MAX_LINKS 32
-
-struct sockaddr_nl {
- __kernel_sa_family_t nl_family; /* AF_NETLINK */
- unsigned short nl_pad; /* zero */
- __u32 nl_pid; /* port ID */
- __u32 nl_groups; /* multicast groups mask */
-};
-
-struct nlmsghdr {
- __u32 nlmsg_len; /* Length of message including header */
- __u16 nlmsg_type; /* Message content */
- __u16 nlmsg_flags; /* Additional flags */
- __u32 nlmsg_seq; /* Sequence number */
- __u32 nlmsg_pid; /* Sending process port ID */
-};
-
-/* Flags values */
-
-#define NLM_F_REQUEST 1 /* It is request message. */
-#define NLM_F_MULTI 2 /* Multipart message, terminated by NLMSG_DONE */
-#define NLM_F_ACK 4 /* Reply with ack, with zero or error code */
-#define NLM_F_ECHO 8 /* Echo this request */
-#define NLM_F_DUMP_INTR 16 /* Dump was inconsistent due to sequence change */
-
-/* Modifiers to GET request */
-#define NLM_F_ROOT 0x100 /* specify tree root */
-#define NLM_F_MATCH 0x200 /* return all matching */
-#define NLM_F_ATOMIC 0x400 /* atomic GET */
-#define NLM_F_DUMP (NLM_F_ROOT|NLM_F_MATCH)
-
-/* Modifiers to NEW request */
-#define NLM_F_REPLACE 0x100 /* Override existing */
-#define NLM_F_EXCL 0x200 /* Do not touch, if it exists */
-#define NLM_F_CREATE 0x400 /* Create, if it does not exist */
-#define NLM_F_APPEND 0x800 /* Add to end of list */
-
-/*
- 4.4BSD ADD NLM_F_CREATE|NLM_F_EXCL
- 4.4BSD CHANGE NLM_F_REPLACE
-
- True CHANGE NLM_F_CREATE|NLM_F_REPLACE
- Append NLM_F_CREATE
- Check NLM_F_EXCL
- */
-
-#define NLMSG_ALIGNTO 4U
-#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
-#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
-#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
-#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
-#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
-#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
- (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
-#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \
- (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
- (nlh)->nlmsg_len <= (len))
-#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
-
-#define NLMSG_NOOP 0x1 /* Nothing. */
-#define NLMSG_ERROR 0x2 /* Error */
-#define NLMSG_DONE 0x3 /* End of a dump */
-#define NLMSG_OVERRUN 0x4 /* Data lost */
-
-#define NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */
-
-struct nlmsgerr {
- int error;
- struct nlmsghdr msg;
-};
-
-#define NETLINK_ADD_MEMBERSHIP 1
-#define NETLINK_DROP_MEMBERSHIP 2
-#define NETLINK_PKTINFO 3
-#define NETLINK_BROADCAST_ERROR 4
-#define NETLINK_NO_ENOBUFS 5
-#define NETLINK_RX_RING 6
-#define NETLINK_TX_RING 7
-
-struct nl_pktinfo {
- __u32 group;
-};
-
-struct nl_mmap_req {
- unsigned int nm_block_size;
- unsigned int nm_block_nr;
- unsigned int nm_frame_size;
- unsigned int nm_frame_nr;
-};
-
-struct nl_mmap_hdr {
- unsigned int nm_status;
- unsigned int nm_len;
- __u32 nm_group;
- /* credentials */
- __u32 nm_pid;
- __u32 nm_uid;
- __u32 nm_gid;
-};
-
-enum nl_mmap_status {
- NL_MMAP_STATUS_UNUSED,
- NL_MMAP_STATUS_RESERVED,
- NL_MMAP_STATUS_VALID,
- NL_MMAP_STATUS_COPY,
- NL_MMAP_STATUS_SKIP,
-};
-
-#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO
-#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
-#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
-
-#define NET_MAJOR 36 /* Major 36 is reserved for networking */
-
-enum {
- NETLINK_UNCONNECTED = 0,
- NETLINK_CONNECTED,
-};
-
-/*
- * <------- NLA_HDRLEN ------> <-- NLA_ALIGN(payload)-->
- * +---------------------+- - -+- - - - - - - - - -+- - -+
- * | Header | Pad | Payload | Pad |
- * | (struct nlattr) | ing | | ing |
- * +---------------------+- - -+- - - - - - - - - -+- - -+
- * <-------------- nlattr->nla_len -------------->
- */
-
-struct nlattr {
- __u16 nla_len;
- __u16 nla_type;
-};
-
-/*
- * nla_type (16 bits)
- * +---+---+-------------------------------+
- * | N | O | Attribute Type |
- * +---+---+-------------------------------+
- * N := Carries nested attributes
- * O := Payload stored in network byte order
- *
- * Note: The N and O flag are mutually exclusive.
- */
-#define NLA_F_NESTED (1 << 15)
-#define NLA_F_NET_BYTEORDER (1 << 14)
-#define NLA_TYPE_MASK ~(NLA_F_NESTED | NLA_F_NET_BYTEORDER)
-
-#define NLA_ALIGNTO 4
-#define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
-#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
-
-
-#endif /* __LINUX_NETLINK_H */
diff --git a/original/linux/nfs.h b/original/linux/nfs.h
deleted file mode 100644
index 54af92c..0000000
--- a/original/linux/nfs.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * NFS protocol definitions
- *
- * This file contains constants mostly for Version 2 of the protocol,
- * but also has a couple of NFSv3 bits in (notably the error codes).
- */
-#ifndef _LINUX_NFS_H
-#define _LINUX_NFS_H
-
-#define NFS_PROGRAM 100003
-#define NFS_PORT 2049
-#define NFS_MAXDATA 8192
-#define NFS_MAXPATHLEN 1024
-#define NFS_MAXNAMLEN 255
-#define NFS_MAXGROUPS 16
-#define NFS_FHSIZE 32
-#define NFS_COOKIESIZE 4
-#define NFS_FIFO_DEV (-1)
-#define NFSMODE_FMT 0170000
-#define NFSMODE_DIR 0040000
-#define NFSMODE_CHR 0020000
-#define NFSMODE_BLK 0060000
-#define NFSMODE_REG 0100000
-#define NFSMODE_LNK 0120000
-#define NFSMODE_SOCK 0140000
-#define NFSMODE_FIFO 0010000
-
-#define NFS_MNT_PROGRAM 100005
-#define NFS_MNT_PORT 627
-
-/*
- * NFS stats. The good thing with these values is that NFSv3 errors are
- * a superset of NFSv2 errors (with the exception of NFSERR_WFLUSH which
- * no-one uses anyway), so we can happily mix code as long as we make sure
- * no NFSv3 errors are returned to NFSv2 clients.
- * Error codes that have a `--' in the v2 column are not part of the
- * standard, but seem to be widely used nevertheless.
- */
- enum nfs_stat {
- NFS_OK = 0, /* v2 v3 v4 */
- NFSERR_PERM = 1, /* v2 v3 v4 */
- NFSERR_NOENT = 2, /* v2 v3 v4 */
- NFSERR_IO = 5, /* v2 v3 v4 */
- NFSERR_NXIO = 6, /* v2 v3 v4 */
- NFSERR_EAGAIN = 11, /* v2 v3 */
- NFSERR_ACCES = 13, /* v2 v3 v4 */
- NFSERR_EXIST = 17, /* v2 v3 v4 */
- NFSERR_XDEV = 18, /* v3 v4 */
- NFSERR_NODEV = 19, /* v2 v3 v4 */
- NFSERR_NOTDIR = 20, /* v2 v3 v4 */
- NFSERR_ISDIR = 21, /* v2 v3 v4 */
- NFSERR_INVAL = 22, /* v2 v3 v4 */
- NFSERR_FBIG = 27, /* v2 v3 v4 */
- NFSERR_NOSPC = 28, /* v2 v3 v4 */
- NFSERR_ROFS = 30, /* v2 v3 v4 */
- NFSERR_MLINK = 31, /* v3 v4 */
- NFSERR_OPNOTSUPP = 45, /* v2 v3 */
- NFSERR_NAMETOOLONG = 63, /* v2 v3 v4 */
- NFSERR_NOTEMPTY = 66, /* v2 v3 v4 */
- NFSERR_DQUOT = 69, /* v2 v3 v4 */
- NFSERR_STALE = 70, /* v2 v3 v4 */
- NFSERR_REMOTE = 71, /* v2 v3 */
- NFSERR_WFLUSH = 99, /* v2 */
- NFSERR_BADHANDLE = 10001, /* v3 v4 */
- NFSERR_NOT_SYNC = 10002, /* v3 */
- NFSERR_BAD_COOKIE = 10003, /* v3 v4 */
- NFSERR_NOTSUPP = 10004, /* v3 v4 */
- NFSERR_TOOSMALL = 10005, /* v3 v4 */
- NFSERR_SERVERFAULT = 10006, /* v3 v4 */
- NFSERR_BADTYPE = 10007, /* v3 v4 */
- NFSERR_JUKEBOX = 10008, /* v3 v4 */
- NFSERR_SAME = 10009, /* v4 */
- NFSERR_DENIED = 10010, /* v4 */
- NFSERR_EXPIRED = 10011, /* v4 */
- NFSERR_LOCKED = 10012, /* v4 */
- NFSERR_GRACE = 10013, /* v4 */
- NFSERR_FHEXPIRED = 10014, /* v4 */
- NFSERR_SHARE_DENIED = 10015, /* v4 */
- NFSERR_WRONGSEC = 10016, /* v4 */
- NFSERR_CLID_INUSE = 10017, /* v4 */
- NFSERR_RESOURCE = 10018, /* v4 */
- NFSERR_MOVED = 10019, /* v4 */
- NFSERR_NOFILEHANDLE = 10020, /* v4 */
- NFSERR_MINOR_VERS_MISMATCH = 10021, /* v4 */
- NFSERR_STALE_CLIENTID = 10022, /* v4 */
- NFSERR_STALE_STATEID = 10023, /* v4 */
- NFSERR_OLD_STATEID = 10024, /* v4 */
- NFSERR_BAD_STATEID = 10025, /* v4 */
- NFSERR_BAD_SEQID = 10026, /* v4 */
- NFSERR_NOT_SAME = 10027, /* v4 */
- NFSERR_LOCK_RANGE = 10028, /* v4 */
- NFSERR_SYMLINK = 10029, /* v4 */
- NFSERR_RESTOREFH = 10030, /* v4 */
- NFSERR_LEASE_MOVED = 10031, /* v4 */
- NFSERR_ATTRNOTSUPP = 10032, /* v4 */
- NFSERR_NO_GRACE = 10033, /* v4 */
- NFSERR_RECLAIM_BAD = 10034, /* v4 */
- NFSERR_RECLAIM_CONFLICT = 10035,/* v4 */
- NFSERR_BAD_XDR = 10036, /* v4 */
- NFSERR_LOCKS_HELD = 10037, /* v4 */
- NFSERR_OPENMODE = 10038, /* v4 */
- NFSERR_BADOWNER = 10039, /* v4 */
- NFSERR_BADCHAR = 10040, /* v4 */
- NFSERR_BADNAME = 10041, /* v4 */
- NFSERR_BAD_RANGE = 10042, /* v4 */
- NFSERR_LOCK_NOTSUPP = 10043, /* v4 */
- NFSERR_OP_ILLEGAL = 10044, /* v4 */
- NFSERR_DEADLOCK = 10045, /* v4 */
- NFSERR_FILE_OPEN = 10046, /* v4 */
- NFSERR_ADMIN_REVOKED = 10047, /* v4 */
- NFSERR_CB_PATH_DOWN = 10048, /* v4 */
- NFSERR_REPLAY_ME = 10049 /* v4 */
-};
-
-/* NFSv2 file types - beware, these are not the same in NFSv3 */
-
-enum nfs_ftype {
- NFNON = 0,
- NFREG = 1,
- NFDIR = 2,
- NFBLK = 3,
- NFCHR = 4,
- NFLNK = 5,
- NFSOCK = 6,
- NFBAD = 7,
- NFFIFO = 8
-};
-
-#ifdef __KERNEL__
-#include <linux/sunrpc/msg_prot.h>
-#include <linux/string.h>
-
-/*
- * This is the kernel NFS client file handle representation
- */
-#define NFS_MAXFHSIZE 128
-struct nfs_fh {
- unsigned short size;
- unsigned char data[NFS_MAXFHSIZE];
-};
-
-/*
- * Returns a zero iff the size and data fields match.
- * Checks only "size" bytes in the data field.
- */
-static inline int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b)
-{
- return a->size != b->size || memcmp(a->data, b->data, a->size) != 0;
-}
-
-static inline void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source)
-{
- target->size = source->size;
- memcpy(target->data, source->data, source->size);
-}
-
-
-/*
- * This is really a general kernel constant, but since nothing like
- * this is defined in the kernel headers, I have to do it here.
- */
-#define NFS_OFFSET_MAX ((__s64)((~(__u64)0) >> 1))
-
-
-enum nfs3_stable_how {
- NFS_UNSTABLE = 0,
- NFS_DATA_SYNC = 1,
- NFS_FILE_SYNC = 2
-};
-#endif /* __KERNEL__ */
-#endif /* _LINUX_NFS_H */
diff --git a/original/linux/nfs2.h b/original/linux/nfs2.h
deleted file mode 100644
index 0ed9517..0000000
--- a/original/linux/nfs2.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * NFS protocol definitions
- *
- * This file contains constants for Version 2 of the protocol.
- */
-#ifndef _LINUX_NFS2_H
-#define _LINUX_NFS2_H
-
-#define NFS2_PORT 2049
-#define NFS2_MAXDATA 8192
-#define NFS2_MAXPATHLEN 1024
-#define NFS2_MAXNAMLEN 255
-#define NFS2_MAXGROUPS 16
-#define NFS2_FHSIZE 32
-#define NFS2_COOKIESIZE 4
-#define NFS2_FIFO_DEV (-1)
-#define NFS2MODE_FMT 0170000
-#define NFS2MODE_DIR 0040000
-#define NFS2MODE_CHR 0020000
-#define NFS2MODE_BLK 0060000
-#define NFS2MODE_REG 0100000
-#define NFS2MODE_LNK 0120000
-#define NFS2MODE_SOCK 0140000
-#define NFS2MODE_FIFO 0010000
-
-
-/* NFSv2 file types - beware, these are not the same in NFSv3 */
-enum nfs2_ftype {
- NF2NON = 0,
- NF2REG = 1,
- NF2DIR = 2,
- NF2BLK = 3,
- NF2CHR = 4,
- NF2LNK = 5,
- NF2SOCK = 6,
- NF2BAD = 7,
- NF2FIFO = 8
-};
-
-struct nfs2_fh {
- char data[NFS2_FHSIZE];
-};
-
-/*
- * Procedure numbers for NFSv2
- */
-#define NFS2_VERSION 2
-#define NFSPROC_NULL 0
-#define NFSPROC_GETATTR 1
-#define NFSPROC_SETATTR 2
-#define NFSPROC_ROOT 3
-#define NFSPROC_LOOKUP 4
-#define NFSPROC_READLINK 5
-#define NFSPROC_READ 6
-#define NFSPROC_WRITECACHE 7
-#define NFSPROC_WRITE 8
-#define NFSPROC_CREATE 9
-#define NFSPROC_REMOVE 10
-#define NFSPROC_RENAME 11
-#define NFSPROC_LINK 12
-#define NFSPROC_SYMLINK 13
-#define NFSPROC_MKDIR 14
-#define NFSPROC_RMDIR 15
-#define NFSPROC_READDIR 16
-#define NFSPROC_STATFS 17
-
-#define NFS_MNT_PROGRAM 100005
-#define NFS_MNT_VERSION 1
-#define MNTPROC_NULL 0
-#define MNTPROC_MNT 1
-#define MNTPROC_UMNT 3
-#define MNTPROC_UMNTALL 4
-
-#endif /* _LINUX_NFS2_H */
diff --git a/original/linux/nfs3.h b/original/linux/nfs3.h
deleted file mode 100644
index 7f11fa5..0000000
--- a/original/linux/nfs3.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * NFSv3 protocol definitions
- */
-#ifndef _LINUX_NFS3_H
-#define _LINUX_NFS3_H
-
-#define NFS3_PORT 2049
-#define NFS3_MAXDATA 32768
-#define NFS3_MAXPATHLEN PATH_MAX
-#define NFS3_MAXNAMLEN NAME_MAX
-#define NFS3_MAXGROUPS 16
-#define NFS3_FHSIZE 64
-#define NFS3_COOKIESIZE 4
-#define NFS3_FIFO_DEV (-1)
-#define NFS3MODE_FMT 0170000
-#define NFS3MODE_DIR 0040000
-#define NFS3MODE_CHR 0020000
-#define NFS3MODE_BLK 0060000
-#define NFS3MODE_REG 0100000
-#define NFS3MODE_LNK 0120000
-#define NFS3MODE_SOCK 0140000
-#define NFS3MODE_FIFO 0010000
-
-/* Flags for access() call */
-#define NFS3_ACCESS_READ 0x0001
-#define NFS3_ACCESS_LOOKUP 0x0002
-#define NFS3_ACCESS_MODIFY 0x0004
-#define NFS3_ACCESS_EXTEND 0x0008
-#define NFS3_ACCESS_DELETE 0x0010
-#define NFS3_ACCESS_EXECUTE 0x0020
-#define NFS3_ACCESS_FULL 0x003f
-
-/* Flags for create mode */
-enum nfs3_createmode {
- NFS3_CREATE_UNCHECKED = 0,
- NFS3_CREATE_GUARDED = 1,
- NFS3_CREATE_EXCLUSIVE = 2
-};
-
-/* NFSv3 file system properties */
-#define NFS3_FSF_LINK 0x0001
-#define NFS3_FSF_SYMLINK 0x0002
-#define NFS3_FSF_HOMOGENEOUS 0x0008
-#define NFS3_FSF_CANSETTIME 0x0010
-/* Some shorthands. See fs/nfsd/nfs3proc.c */
-#define NFS3_FSF_DEFAULT 0x001B
-#define NFS3_FSF_BILLYBOY 0x0018
-#define NFS3_FSF_READONLY 0x0008
-
-enum nfs3_ftype {
- NF3NON = 0,
- NF3REG = 1,
- NF3DIR = 2,
- NF3BLK = 3,
- NF3CHR = 4,
- NF3LNK = 5,
- NF3SOCK = 6,
- NF3FIFO = 7, /* changed from NFSv2 (was 8) */
- NF3BAD = 8
-};
-
-struct nfs3_fh {
- unsigned short size;
- unsigned char data[NFS3_FHSIZE];
-};
-
-#define NFS3_VERSION 3
-#define NFS3PROC_NULL 0
-#define NFS3PROC_GETATTR 1
-#define NFS3PROC_SETATTR 2
-#define NFS3PROC_LOOKUP 3
-#define NFS3PROC_ACCESS 4
-#define NFS3PROC_READLINK 5
-#define NFS3PROC_READ 6
-#define NFS3PROC_WRITE 7
-#define NFS3PROC_CREATE 8
-#define NFS3PROC_MKDIR 9
-#define NFS3PROC_SYMLINK 10
-#define NFS3PROC_MKNOD 11
-#define NFS3PROC_REMOVE 12
-#define NFS3PROC_RMDIR 13
-#define NFS3PROC_RENAME 14
-#define NFS3PROC_LINK 15
-#define NFS3PROC_READDIR 16
-#define NFS3PROC_READDIRPLUS 17
-#define NFS3PROC_FSSTAT 18
-#define NFS3PROC_FSINFO 19
-#define NFS3PROC_PATHCONF 20
-#define NFS3PROC_COMMIT 21
-
-#define NFS_MNT3_PROGRAM 100005
-#define NFS_MNT3_VERSION 3
-#define MOUNTPROC3_NULL 0
-#define MOUNTPROC3_MNT 1
-#define MOUNTPROC3_UMNT 3
-#define MOUNTPROC3_UMNTALL 4
-
-
-#if defined(__KERNEL__) || defined(NFS_NEED_KERNEL_TYPES)
-
-/* Number of 32bit words in post_op_attr */
-#define NFS3_POST_OP_ATTR_WORDS 22
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_NFS3_H */
diff --git a/original/linux/nfs4.h b/original/linux/nfs4.h
deleted file mode 100644
index db05182..0000000
--- a/original/linux/nfs4.h
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * include/linux/nfs4.h
- *
- * NFSv4 protocol definitions.
- *
- * Copyright (c) 2002 The Regents of the University of Michigan.
- * All rights reserved.
- *
- * Kendrick Smith <kmsmith@umich.edu>
- * Andy Adamson <andros@umich.edu>
- */
-
-#ifndef _LINUX_NFS4_H
-#define _LINUX_NFS4_H
-
-#include <linux/types.h>
-
-#define NFS4_VERIFIER_SIZE 8
-#define NFS4_FHSIZE 128
-#define NFS4_MAXPATHLEN PATH_MAX
-#define NFS4_MAXNAMLEN NAME_MAX
-
-#define NFS4_ACCESS_READ 0x0001
-#define NFS4_ACCESS_LOOKUP 0x0002
-#define NFS4_ACCESS_MODIFY 0x0004
-#define NFS4_ACCESS_EXTEND 0x0008
-#define NFS4_ACCESS_DELETE 0x0010
-#define NFS4_ACCESS_EXECUTE 0x0020
-
-#define NFS4_FH_PERSISTENT 0x0000
-#define NFS4_FH_NOEXPIRE_WITH_OPEN 0x0001
-#define NFS4_FH_VOLATILE_ANY 0x0002
-#define NFS4_FH_VOL_MIGRATION 0x0004
-#define NFS4_FH_VOL_RENAME 0x0008
-
-#define NFS4_OPEN_RESULT_CONFIRM 0x0002
-#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
-
-#define NFS4_SHARE_ACCESS_READ 0x0001
-#define NFS4_SHARE_ACCESS_WRITE 0x0002
-#define NFS4_SHARE_ACCESS_BOTH 0x0003
-#define NFS4_SHARE_DENY_READ 0x0001
-#define NFS4_SHARE_DENY_WRITE 0x0002
-#define NFS4_SHARE_DENY_BOTH 0x0003
-
-#define NFS4_SET_TO_SERVER_TIME 0
-#define NFS4_SET_TO_CLIENT_TIME 1
-
-#define NFS4_ACE_ACCESS_ALLOWED_ACE_TYPE 0
-#define NFS4_ACE_ACCESS_DENIED_ACE_TYPE 1
-#define NFS4_ACE_SYSTEM_AUDIT_ACE_TYPE 2
-#define NFS4_ACE_SYSTEM_ALARM_ACE_TYPE 3
-
-#define ACL4_SUPPORT_ALLOW_ACL 0x01
-#define ACL4_SUPPORT_DENY_ACL 0x02
-#define ACL4_SUPPORT_AUDIT_ACL 0x04
-#define ACL4_SUPPORT_ALARM_ACL 0x08
-
-#define NFS4_ACE_FILE_INHERIT_ACE 0x00000001
-#define NFS4_ACE_DIRECTORY_INHERIT_ACE 0x00000002
-#define NFS4_ACE_NO_PROPAGATE_INHERIT_ACE 0x00000004
-#define NFS4_ACE_INHERIT_ONLY_ACE 0x00000008
-#define NFS4_ACE_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010
-#define NFS4_ACE_FAILED_ACCESS_ACE_FLAG 0x00000020
-#define NFS4_ACE_IDENTIFIER_GROUP 0x00000040
-#define NFS4_ACE_OWNER 0x00000080
-#define NFS4_ACE_GROUP 0x00000100
-#define NFS4_ACE_EVERYONE 0x00000200
-
-#define NFS4_ACE_READ_DATA 0x00000001
-#define NFS4_ACE_LIST_DIRECTORY 0x00000001
-#define NFS4_ACE_WRITE_DATA 0x00000002
-#define NFS4_ACE_ADD_FILE 0x00000002
-#define NFS4_ACE_APPEND_DATA 0x00000004
-#define NFS4_ACE_ADD_SUBDIRECTORY 0x00000004
-#define NFS4_ACE_READ_NAMED_ATTRS 0x00000008
-#define NFS4_ACE_WRITE_NAMED_ATTRS 0x00000010
-#define NFS4_ACE_EXECUTE 0x00000020
-#define NFS4_ACE_DELETE_CHILD 0x00000040
-#define NFS4_ACE_READ_ATTRIBUTES 0x00000080
-#define NFS4_ACE_WRITE_ATTRIBUTES 0x00000100
-#define NFS4_ACE_DELETE 0x00010000
-#define NFS4_ACE_READ_ACL 0x00020000
-#define NFS4_ACE_WRITE_ACL 0x00040000
-#define NFS4_ACE_WRITE_OWNER 0x00080000
-#define NFS4_ACE_SYNCHRONIZE 0x00100000
-#define NFS4_ACE_GENERIC_READ 0x00120081
-#define NFS4_ACE_GENERIC_WRITE 0x00160106
-#define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
-#define NFS4_ACE_MASK_ALL 0x001F01FF
-
-enum nfs4_acl_whotype {
- NFS4_ACL_WHO_NAMED = 0,
- NFS4_ACL_WHO_OWNER,
- NFS4_ACL_WHO_GROUP,
- NFS4_ACL_WHO_EVERYONE,
-};
-
-#ifdef __KERNEL__
-#include <linux/list.h>
-
-struct nfs4_ace {
- uint32_t type;
- uint32_t flag;
- uint32_t access_mask;
- int whotype;
- uid_t who;
- struct list_head l_ace;
-};
-
-struct nfs4_acl {
- uint32_t naces;
- struct list_head ace_head;
-};
-
-typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier;
-typedef struct { char data[16]; } nfs4_stateid;
-
-enum nfs_opnum4 {
- OP_ACCESS = 3,
- OP_CLOSE = 4,
- OP_COMMIT = 5,
- OP_CREATE = 6,
- OP_DELEGPURGE = 7,
- OP_DELEGRETURN = 8,
- OP_GETATTR = 9,
- OP_GETFH = 10,
- OP_LINK = 11,
- OP_LOCK = 12,
- OP_LOCKT = 13,
- OP_LOCKU = 14,
- OP_LOOKUP = 15,
- OP_LOOKUPP = 16,
- OP_NVERIFY = 17,
- OP_OPEN = 18,
- OP_OPENATTR = 19,
- OP_OPEN_CONFIRM = 20,
- OP_OPEN_DOWNGRADE = 21,
- OP_PUTFH = 22,
- OP_PUTPUBFH = 23,
- OP_PUTROOTFH = 24,
- OP_READ = 25,
- OP_READDIR = 26,
- OP_READLINK = 27,
- OP_REMOVE = 28,
- OP_RENAME = 29,
- OP_RENEW = 30,
- OP_RESTOREFH = 31,
- OP_SAVEFH = 32,
- OP_SECINFO = 33,
- OP_SETATTR = 34,
- OP_SETCLIENTID = 35,
- OP_SETCLIENTID_CONFIRM = 36,
- OP_VERIFY = 37,
- OP_WRITE = 38,
- OP_RELEASE_LOCKOWNER = 39,
- OP_ILLEGAL = 10044,
-};
-
-/*Defining first and last NFS4 operations implemented.
-Needs to be updated if more operations are defined in future.*/
-
-#define FIRST_NFS4_OP OP_ACCESS
-#define LAST_NFS4_OP OP_RELEASE_LOCKOWNER
-
-enum nfsstat4 {
- NFS4_OK = 0,
- NFS4ERR_PERM = 1,
- NFS4ERR_NOENT = 2,
- NFS4ERR_IO = 5,
- NFS4ERR_NXIO = 6,
- NFS4ERR_ACCESS = 13,
- NFS4ERR_EXIST = 17,
- NFS4ERR_XDEV = 18,
- /* Unused/reserved 19 */
- NFS4ERR_NOTDIR = 20,
- NFS4ERR_ISDIR = 21,
- NFS4ERR_INVAL = 22,
- NFS4ERR_FBIG = 27,
- NFS4ERR_NOSPC = 28,
- NFS4ERR_ROFS = 30,
- NFS4ERR_MLINK = 31,
- NFS4ERR_NAMETOOLONG = 63,
- NFS4ERR_NOTEMPTY = 66,
- NFS4ERR_DQUOT = 69,
- NFS4ERR_STALE = 70,
- NFS4ERR_BADHANDLE = 10001,
- NFS4ERR_BAD_COOKIE = 10003,
- NFS4ERR_NOTSUPP = 10004,
- NFS4ERR_TOOSMALL = 10005,
- NFS4ERR_SERVERFAULT = 10006,
- NFS4ERR_BADTYPE = 10007,
- NFS4ERR_DELAY = 10008,
- NFS4ERR_SAME = 10009,
- NFS4ERR_DENIED = 10010,
- NFS4ERR_EXPIRED = 10011,
- NFS4ERR_LOCKED = 10012,
- NFS4ERR_GRACE = 10013,
- NFS4ERR_FHEXPIRED = 10014,
- NFS4ERR_SHARE_DENIED = 10015,
- NFS4ERR_WRONGSEC = 10016,
- NFS4ERR_CLID_INUSE = 10017,
- NFS4ERR_RESOURCE = 10018,
- NFS4ERR_MOVED = 10019,
- NFS4ERR_NOFILEHANDLE = 10020,
- NFS4ERR_MINOR_VERS_MISMATCH = 10021,
- NFS4ERR_STALE_CLIENTID = 10022,
- NFS4ERR_STALE_STATEID = 10023,
- NFS4ERR_OLD_STATEID = 10024,
- NFS4ERR_BAD_STATEID = 10025,
- NFS4ERR_BAD_SEQID = 10026,
- NFS4ERR_NOT_SAME = 10027,
- NFS4ERR_LOCK_RANGE = 10028,
- NFS4ERR_SYMLINK = 10029,
- NFS4ERR_RESTOREFH = 10030,
- NFS4ERR_LEASE_MOVED = 10031,
- NFS4ERR_ATTRNOTSUPP = 10032,
- NFS4ERR_NO_GRACE = 10033,
- NFS4ERR_RECLAIM_BAD = 10034,
- NFS4ERR_RECLAIM_CONFLICT = 10035,
- NFS4ERR_BADXDR = 10036,
- NFS4ERR_LOCKS_HELD = 10037,
- NFS4ERR_OPENMODE = 10038,
- NFS4ERR_BADOWNER = 10039,
- NFS4ERR_BADCHAR = 10040,
- NFS4ERR_BADNAME = 10041,
- NFS4ERR_BAD_RANGE = 10042,
- NFS4ERR_LOCK_NOTSUPP = 10043,
- NFS4ERR_OP_ILLEGAL = 10044,
- NFS4ERR_DEADLOCK = 10045,
- NFS4ERR_FILE_OPEN = 10046,
- NFS4ERR_ADMIN_REVOKED = 10047,
- NFS4ERR_CB_PATH_DOWN = 10048
-};
-
-/*
- * Note: NF4BAD is not actually part of the protocol; it is just used
- * internally by nfsd.
- */
-enum nfs_ftype4 {
- NF4BAD = 0,
- NF4REG = 1, /* Regular File */
- NF4DIR = 2, /* Directory */
- NF4BLK = 3, /* Special File - block device */
- NF4CHR = 4, /* Special File - character device */
- NF4LNK = 5, /* Symbolic Link */
- NF4SOCK = 6, /* Special File - socket */
- NF4FIFO = 7, /* Special File - fifo */
- NF4ATTRDIR = 8, /* Attribute Directory */
- NF4NAMEDATTR = 9 /* Named Attribute */
-};
-
-enum open_claim_type4 {
- NFS4_OPEN_CLAIM_NULL = 0,
- NFS4_OPEN_CLAIM_PREVIOUS = 1,
- NFS4_OPEN_CLAIM_DELEGATE_CUR = 2,
- NFS4_OPEN_CLAIM_DELEGATE_PREV = 3
-};
-
-enum opentype4 {
- NFS4_OPEN_NOCREATE = 0,
- NFS4_OPEN_CREATE = 1
-};
-
-enum createmode4 {
- NFS4_CREATE_UNCHECKED = 0,
- NFS4_CREATE_GUARDED = 1,
- NFS4_CREATE_EXCLUSIVE = 2
-};
-
-enum limit_by4 {
- NFS4_LIMIT_SIZE = 1,
- NFS4_LIMIT_BLOCKS = 2
-};
-
-enum open_delegation_type4 {
- NFS4_OPEN_DELEGATE_NONE = 0,
- NFS4_OPEN_DELEGATE_READ = 1,
- NFS4_OPEN_DELEGATE_WRITE = 2
-};
-
-enum lock_type4 {
- NFS4_UNLOCK_LT = 0,
- NFS4_READ_LT = 1,
- NFS4_WRITE_LT = 2,
- NFS4_READW_LT = 3,
- NFS4_WRITEW_LT = 4
-};
-
-
-/* Mandatory Attributes */
-#define FATTR4_WORD0_SUPPORTED_ATTRS (1UL << 0)
-#define FATTR4_WORD0_TYPE (1UL << 1)
-#define FATTR4_WORD0_FH_EXPIRE_TYPE (1UL << 2)
-#define FATTR4_WORD0_CHANGE (1UL << 3)
-#define FATTR4_WORD0_SIZE (1UL << 4)
-#define FATTR4_WORD0_LINK_SUPPORT (1UL << 5)
-#define FATTR4_WORD0_SYMLINK_SUPPORT (1UL << 6)
-#define FATTR4_WORD0_NAMED_ATTR (1UL << 7)
-#define FATTR4_WORD0_FSID (1UL << 8)
-#define FATTR4_WORD0_UNIQUE_HANDLES (1UL << 9)
-#define FATTR4_WORD0_LEASE_TIME (1UL << 10)
-#define FATTR4_WORD0_RDATTR_ERROR (1UL << 11)
-
-/* Recommended Attributes */
-#define FATTR4_WORD0_ACL (1UL << 12)
-#define FATTR4_WORD0_ACLSUPPORT (1UL << 13)
-#define FATTR4_WORD0_ARCHIVE (1UL << 14)
-#define FATTR4_WORD0_CANSETTIME (1UL << 15)
-#define FATTR4_WORD0_CASE_INSENSITIVE (1UL << 16)
-#define FATTR4_WORD0_CASE_PRESERVING (1UL << 17)
-#define FATTR4_WORD0_CHOWN_RESTRICTED (1UL << 18)
-#define FATTR4_WORD0_FILEHANDLE (1UL << 19)
-#define FATTR4_WORD0_FILEID (1UL << 20)
-#define FATTR4_WORD0_FILES_AVAIL (1UL << 21)
-#define FATTR4_WORD0_FILES_FREE (1UL << 22)
-#define FATTR4_WORD0_FILES_TOTAL (1UL << 23)
-#define FATTR4_WORD0_FS_LOCATIONS (1UL << 24)
-#define FATTR4_WORD0_HIDDEN (1UL << 25)
-#define FATTR4_WORD0_HOMOGENEOUS (1UL << 26)
-#define FATTR4_WORD0_MAXFILESIZE (1UL << 27)
-#define FATTR4_WORD0_MAXLINK (1UL << 28)
-#define FATTR4_WORD0_MAXNAME (1UL << 29)
-#define FATTR4_WORD0_MAXREAD (1UL << 30)
-#define FATTR4_WORD0_MAXWRITE (1UL << 31)
-#define FATTR4_WORD1_MIMETYPE (1UL << 0)
-#define FATTR4_WORD1_MODE (1UL << 1)
-#define FATTR4_WORD1_NO_TRUNC (1UL << 2)
-#define FATTR4_WORD1_NUMLINKS (1UL << 3)
-#define FATTR4_WORD1_OWNER (1UL << 4)
-#define FATTR4_WORD1_OWNER_GROUP (1UL << 5)
-#define FATTR4_WORD1_QUOTA_HARD (1UL << 6)
-#define FATTR4_WORD1_QUOTA_SOFT (1UL << 7)
-#define FATTR4_WORD1_QUOTA_USED (1UL << 8)
-#define FATTR4_WORD1_RAWDEV (1UL << 9)
-#define FATTR4_WORD1_SPACE_AVAIL (1UL << 10)
-#define FATTR4_WORD1_SPACE_FREE (1UL << 11)
-#define FATTR4_WORD1_SPACE_TOTAL (1UL << 12)
-#define FATTR4_WORD1_SPACE_USED (1UL << 13)
-#define FATTR4_WORD1_SYSTEM (1UL << 14)
-#define FATTR4_WORD1_TIME_ACCESS (1UL << 15)
-#define FATTR4_WORD1_TIME_ACCESS_SET (1UL << 16)
-#define FATTR4_WORD1_TIME_BACKUP (1UL << 17)
-#define FATTR4_WORD1_TIME_CREATE (1UL << 18)
-#define FATTR4_WORD1_TIME_DELTA (1UL << 19)
-#define FATTR4_WORD1_TIME_METADATA (1UL << 20)
-#define FATTR4_WORD1_TIME_MODIFY (1UL << 21)
-#define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22)
-#define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23)
-
-#define NFSPROC4_NULL 0
-#define NFSPROC4_COMPOUND 1
-#define NFS4_MINOR_VERSION 0
-#define NFS4_DEBUG 1
-
-/* Index of predefined Linux client operations */
-
-enum {
- NFSPROC4_CLNT_NULL = 0, /* Unused */
- NFSPROC4_CLNT_READ,
- NFSPROC4_CLNT_WRITE,
- NFSPROC4_CLNT_COMMIT,
- NFSPROC4_CLNT_OPEN,
- NFSPROC4_CLNT_OPEN_CONFIRM,
- NFSPROC4_CLNT_OPEN_NOATTR,
- NFSPROC4_CLNT_OPEN_DOWNGRADE,
- NFSPROC4_CLNT_CLOSE,
- NFSPROC4_CLNT_SETATTR,
- NFSPROC4_CLNT_FSINFO,
- NFSPROC4_CLNT_RENEW,
- NFSPROC4_CLNT_SETCLIENTID,
- NFSPROC4_CLNT_SETCLIENTID_CONFIRM,
- NFSPROC4_CLNT_LOCK,
- NFSPROC4_CLNT_LOCKT,
- NFSPROC4_CLNT_LOCKU,
- NFSPROC4_CLNT_ACCESS,
- NFSPROC4_CLNT_GETATTR,
- NFSPROC4_CLNT_LOOKUP,
- NFSPROC4_CLNT_LOOKUP_ROOT,
- NFSPROC4_CLNT_REMOVE,
- NFSPROC4_CLNT_RENAME,
- NFSPROC4_CLNT_LINK,
- NFSPROC4_CLNT_SYMLINK,
- NFSPROC4_CLNT_CREATE,
- NFSPROC4_CLNT_PATHCONF,
- NFSPROC4_CLNT_STATFS,
- NFSPROC4_CLNT_READLINK,
- NFSPROC4_CLNT_READDIR,
- NFSPROC4_CLNT_SERVER_CAPS,
- NFSPROC4_CLNT_DELEGRETURN,
- NFSPROC4_CLNT_GETACL,
- NFSPROC4_CLNT_SETACL,
- NFSPROC4_CLNT_FS_LOCATIONS,
-};
-
-#endif
-#endif
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
diff --git a/original/linux/nfs_xdr.h b/original/linux/nfs_xdr.h
deleted file mode 100644
index 41e5a19..0000000
--- a/original/linux/nfs_xdr.h
+++ /dev/null
@@ -1,842 +0,0 @@
-#ifndef _LINUX_NFS_XDR_H
-#define _LINUX_NFS_XDR_H
-
-#include <linux/sunrpc/xprt.h>
-#include <linux/nfsacl.h>
-
-/*
- * To change the maximum rsize and wsize supported by the NFS client, adjust
- * NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can
- * support a megabyte or more. The default is left at 4096 bytes, which is
- * reasonable for NFS over UDP.
- */
-#define NFS_MAX_FILE_IO_SIZE (1048576U)
-#define NFS_DEF_FILE_IO_SIZE (4096U)
-#define NFS_MIN_FILE_IO_SIZE (1024U)
-
-struct nfs_fsid {
- uint64_t major;
- uint64_t minor;
-};
-
-/*
- * Helper for checking equality between 2 fsids.
- */
-static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b)
-{
- return a->major == b->major && a->minor == b->minor;
-}
-
-struct nfs_fattr {
- unsigned short valid; /* which fields are valid */
- __u64 pre_size; /* pre_op_attr.size */
- struct timespec pre_mtime; /* pre_op_attr.mtime */
- struct timespec pre_ctime; /* pre_op_attr.ctime */
- enum nfs_ftype type; /* always use NFSv2 types */
- __u32 mode;
- __u32 nlink;
- __u32 uid;
- __u32 gid;
- __u64 size;
- union {
- struct {
- __u32 blocksize;
- __u32 blocks;
- } nfs2;
- struct {
- __u64 used;
- } nfs3;
- } du;
- dev_t rdev;
- struct nfs_fsid fsid;
- __u64 fileid;
- struct timespec atime;
- struct timespec mtime;
- struct timespec ctime;
- __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */
- __u64 change_attr; /* NFSv4 change attribute */
- __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
- unsigned long time_start;
-};
-
-#define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */
-#define NFS_ATTR_FATTR 0x0002 /* post-op attributes */
-#define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */
-#define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */
-#define NFS_ATTR_FATTR_V4_REFERRAL 0x0010 /* NFSv4 referral */
-
-/*
- * Info on the file system
- */
-struct nfs_fsinfo {
- struct nfs_fattr *fattr; /* Post-op attributes */
- __u32 rtmax; /* max. read transfer size */
- __u32 rtpref; /* pref. read transfer size */
- __u32 rtmult; /* reads should be multiple of this */
- __u32 wtmax; /* max. write transfer size */
- __u32 wtpref; /* pref. write transfer size */
- __u32 wtmult; /* writes should be multiple of this */
- __u32 dtpref; /* pref. readdir transfer size */
- __u64 maxfilesize;
- __u32 lease_time; /* in seconds */
-};
-
-struct nfs_fsstat {
- struct nfs_fattr *fattr; /* Post-op attributes */
- __u64 tbytes; /* total size in bytes */
- __u64 fbytes; /* # of free bytes */
- __u64 abytes; /* # of bytes available to user */
- __u64 tfiles; /* # of files */
- __u64 ffiles; /* # of free files */
- __u64 afiles; /* # of files available to user */
-};
-
-struct nfs2_fsstat {
- __u32 tsize; /* Server transfer size */
- __u32 bsize; /* Filesystem block size */
- __u32 blocks; /* No. of "bsize" blocks on filesystem */
- __u32 bfree; /* No. of free "bsize" blocks */
- __u32 bavail; /* No. of available "bsize" blocks */
-};
-
-struct nfs_pathconf {
- struct nfs_fattr *fattr; /* Post-op attributes */
- __u32 max_link; /* max # of hard links */
- __u32 max_namelen; /* max name length */
-};
-
-struct nfs4_change_info {
- u32 atomic;
- u64 before;
- u64 after;
-};
-
-struct nfs_seqid;
-/*
- * Arguments to the open call.
- */
-struct nfs_openargs {
- const struct nfs_fh * fh;
- struct nfs_seqid * seqid;
- int open_flags;
- __u64 clientid;
- __u32 id;
- union {
- struct iattr * attrs; /* UNCHECKED, GUARDED */
- nfs4_verifier verifier; /* EXCLUSIVE */
- nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
- int delegation_type; /* CLAIM_PREVIOUS */
- } u;
- const struct qstr * name;
- const struct nfs_server *server; /* Needed for ID mapping */
- const u32 * bitmask;
- __u32 claim;
-};
-
-struct nfs_openres {
- nfs4_stateid stateid;
- struct nfs_fh fh;
- struct nfs4_change_info cinfo;
- __u32 rflags;
- struct nfs_fattr * f_attr;
- struct nfs_fattr * dir_attr;
- const struct nfs_server *server;
- int delegation_type;
- nfs4_stateid delegation;
- __u32 do_recall;
- __u64 maxsize;
-};
-
-/*
- * Arguments to the open_confirm call.
- */
-struct nfs_open_confirmargs {
- const struct nfs_fh * fh;
- nfs4_stateid * stateid;
- struct nfs_seqid * seqid;
-};
-
-struct nfs_open_confirmres {
- nfs4_stateid stateid;
-};
-
-/*
- * Arguments to the close call.
- */
-struct nfs_closeargs {
- struct nfs_fh * fh;
- nfs4_stateid * stateid;
- struct nfs_seqid * seqid;
- int open_flags;
- const u32 * bitmask;
-};
-
-struct nfs_closeres {
- nfs4_stateid stateid;
- struct nfs_fattr * fattr;
- const struct nfs_server *server;
-};
-/*
- * * Arguments to the lock,lockt, and locku call.
- * */
-struct nfs_lowner {
- __u64 clientid;
- u32 id;
-};
-
-struct nfs_lock_args {
- struct nfs_fh * fh;
- struct file_lock * fl;
- struct nfs_seqid * lock_seqid;
- nfs4_stateid * lock_stateid;
- struct nfs_seqid * open_seqid;
- nfs4_stateid * open_stateid;
- struct nfs_lowner lock_owner;
- unsigned char block : 1;
- unsigned char reclaim : 1;
- unsigned char new_lock_owner : 1;
-};
-
-struct nfs_lock_res {
- nfs4_stateid stateid;
-};
-
-struct nfs_locku_args {
- struct nfs_fh * fh;
- struct file_lock * fl;
- struct nfs_seqid * seqid;
- nfs4_stateid * stateid;
-};
-
-struct nfs_locku_res {
- nfs4_stateid stateid;
-};
-
-struct nfs_lockt_args {
- struct nfs_fh * fh;
- struct file_lock * fl;
- struct nfs_lowner lock_owner;
-};
-
-struct nfs_lockt_res {
- struct file_lock * denied; /* LOCK, LOCKT failed */
-};
-
-struct nfs4_delegreturnargs {
- const struct nfs_fh *fhandle;
- const nfs4_stateid *stateid;
- const u32 * bitmask;
-};
-
-struct nfs4_delegreturnres {
- struct nfs_fattr * fattr;
- const struct nfs_server *server;
-};
-
-/*
- * Arguments to the read call.
- */
-struct nfs_readargs {
- struct nfs_fh * fh;
- struct nfs_open_context *context;
- __u64 offset;
- __u32 count;
- unsigned int pgbase;
- struct page ** pages;
-};
-
-struct nfs_readres {
- struct nfs_fattr * fattr;
- __u32 count;
- int eof;
-};
-
-/*
- * Arguments to the write call.
- */
-struct nfs_writeargs {
- struct nfs_fh * fh;
- struct nfs_open_context *context;
- __u64 offset;
- __u32 count;
- enum nfs3_stable_how stable;
- unsigned int pgbase;
- struct page ** pages;
- const u32 * bitmask;
-};
-
-struct nfs_writeverf {
- enum nfs3_stable_how committed;
- __u32 verifier[2];
-};
-
-struct nfs_writeres {
- struct nfs_fattr * fattr;
- struct nfs_writeverf * verf;
- __u32 count;
- const struct nfs_server *server;
-};
-
-/*
- * Argument struct for decode_entry function
- */
-struct nfs_entry {
- __u64 ino;
- __u64 cookie,
- prev_cookie;
- const char * name;
- unsigned int len;
- int eof;
- struct nfs_fh * fh;
- struct nfs_fattr * fattr;
-};
-
-/*
- * The following types are for NFSv2 only.
- */
-struct nfs_sattrargs {
- struct nfs_fh * fh;
- struct iattr * sattr;
-};
-
-struct nfs_diropargs {
- struct nfs_fh * fh;
- const char * name;
- unsigned int len;
-};
-
-struct nfs_createargs {
- struct nfs_fh * fh;
- const char * name;
- unsigned int len;
- struct iattr * sattr;
-};
-
-struct nfs_renameargs {
- struct nfs_fh * fromfh;
- const char * fromname;
- unsigned int fromlen;
- struct nfs_fh * tofh;
- const char * toname;
- unsigned int tolen;
-};
-
-struct nfs_setattrargs {
- struct nfs_fh * fh;
- nfs4_stateid stateid;
- struct iattr * iap;
- const struct nfs_server * server; /* Needed for name mapping */
- const u32 * bitmask;
-};
-
-struct nfs_setaclargs {
- struct nfs_fh * fh;
- size_t acl_len;
- unsigned int acl_pgbase;
- struct page ** acl_pages;
-};
-
-struct nfs_getaclargs {
- struct nfs_fh * fh;
- size_t acl_len;
- unsigned int acl_pgbase;
- struct page ** acl_pages;
-};
-
-struct nfs_setattrres {
- struct nfs_fattr * fattr;
- const struct nfs_server * server;
-};
-
-struct nfs_linkargs {
- struct nfs_fh * fromfh;
- struct nfs_fh * tofh;
- const char * toname;
- unsigned int tolen;
-};
-
-struct nfs_symlinkargs {
- struct nfs_fh * fromfh;
- const char * fromname;
- unsigned int fromlen;
- const char * topath;
- unsigned int tolen;
- struct iattr * sattr;
-};
-
-struct nfs_readdirargs {
- struct nfs_fh * fh;
- __u32 cookie;
- unsigned int count;
- struct page ** pages;
-};
-
-struct nfs3_getaclargs {
- struct nfs_fh * fh;
- int mask;
- struct page ** pages;
-};
-
-struct nfs3_setaclargs {
- struct inode * inode;
- int mask;
- struct posix_acl * acl_access;
- struct posix_acl * acl_default;
- struct page ** pages;
-};
-
-struct nfs_diropok {
- struct nfs_fh * fh;
- struct nfs_fattr * fattr;
-};
-
-struct nfs_readlinkargs {
- struct nfs_fh * fh;
- unsigned int pgbase;
- unsigned int pglen;
- struct page ** pages;
-};
-
-struct nfs3_sattrargs {
- struct nfs_fh * fh;
- struct iattr * sattr;
- unsigned int guard;
- struct timespec guardtime;
-};
-
-struct nfs3_diropargs {
- struct nfs_fh * fh;
- const char * name;
- unsigned int len;
-};
-
-struct nfs3_accessargs {
- struct nfs_fh * fh;
- __u32 access;
-};
-
-struct nfs3_createargs {
- struct nfs_fh * fh;
- const char * name;
- unsigned int len;
- struct iattr * sattr;
- enum nfs3_createmode createmode;
- __u32 verifier[2];
-};
-
-struct nfs3_mkdirargs {
- struct nfs_fh * fh;
- const char * name;
- unsigned int len;
- struct iattr * sattr;
-};
-
-struct nfs3_symlinkargs {
- struct nfs_fh * fromfh;
- const char * fromname;
- unsigned int fromlen;
- const char * topath;
- unsigned int tolen;
- struct iattr * sattr;
-};
-
-struct nfs3_mknodargs {
- struct nfs_fh * fh;
- const char * name;
- unsigned int len;
- enum nfs3_ftype type;
- struct iattr * sattr;
- dev_t rdev;
-};
-
-struct nfs3_renameargs {
- struct nfs_fh * fromfh;
- const char * fromname;
- unsigned int fromlen;
- struct nfs_fh * tofh;
- const char * toname;
- unsigned int tolen;
-};
-
-struct nfs3_linkargs {
- struct nfs_fh * fromfh;
- struct nfs_fh * tofh;
- const char * toname;
- unsigned int tolen;
-};
-
-struct nfs3_readdirargs {
- struct nfs_fh * fh;
- __u64 cookie;
- __u32 verf[2];
- int plus;
- unsigned int count;
- struct page ** pages;
-};
-
-struct nfs3_diropres {
- struct nfs_fattr * dir_attr;
- struct nfs_fh * fh;
- struct nfs_fattr * fattr;
-};
-
-struct nfs3_accessres {
- struct nfs_fattr * fattr;
- __u32 access;
-};
-
-struct nfs3_readlinkargs {
- struct nfs_fh * fh;
- unsigned int pgbase;
- unsigned int pglen;
- struct page ** pages;
-};
-
-struct nfs3_renameres {
- struct nfs_fattr * fromattr;
- struct nfs_fattr * toattr;
-};
-
-struct nfs3_linkres {
- struct nfs_fattr * dir_attr;
- struct nfs_fattr * fattr;
-};
-
-struct nfs3_readdirres {
- struct nfs_fattr * dir_attr;
- __u32 * verf;
- int plus;
-};
-
-struct nfs3_getaclres {
- struct nfs_fattr * fattr;
- int mask;
- unsigned int acl_access_count;
- unsigned int acl_default_count;
- struct posix_acl * acl_access;
- struct posix_acl * acl_default;
-};
-
-#ifdef CONFIG_NFS_V4
-
-typedef u64 clientid4;
-
-struct nfs4_accessargs {
- const struct nfs_fh * fh;
- u32 access;
-};
-
-struct nfs4_accessres {
- u32 supported;
- u32 access;
-};
-
-struct nfs4_create_arg {
- u32 ftype;
- union {
- struct qstr * symlink; /* NF4LNK */
- struct {
- u32 specdata1;
- u32 specdata2;
- } device; /* NF4BLK, NF4CHR */
- } u;
- const struct qstr * name;
- const struct nfs_server * server;
- const struct iattr * attrs;
- const struct nfs_fh * dir_fh;
- const u32 * bitmask;
-};
-
-struct nfs4_create_res {
- const struct nfs_server * server;
- struct nfs_fh * fh;
- struct nfs_fattr * fattr;
- struct nfs4_change_info dir_cinfo;
- struct nfs_fattr * dir_fattr;
-};
-
-struct nfs4_fsinfo_arg {
- const struct nfs_fh * fh;
- const u32 * bitmask;
-};
-
-struct nfs4_getattr_arg {
- const struct nfs_fh * fh;
- const u32 * bitmask;
-};
-
-struct nfs4_getattr_res {
- const struct nfs_server * server;
- struct nfs_fattr * fattr;
-};
-
-struct nfs4_link_arg {
- const struct nfs_fh * fh;
- const struct nfs_fh * dir_fh;
- const struct qstr * name;
- const u32 * bitmask;
-};
-
-struct nfs4_link_res {
- const struct nfs_server * server;
- struct nfs_fattr * fattr;
- struct nfs4_change_info cinfo;
- struct nfs_fattr * dir_attr;
-};
-
-
-struct nfs4_lookup_arg {
- const struct nfs_fh * dir_fh;
- const struct qstr * name;
- const u32 * bitmask;
-};
-
-struct nfs4_lookup_res {
- const struct nfs_server * server;
- struct nfs_fattr * fattr;
- struct nfs_fh * fh;
-};
-
-struct nfs4_lookup_root_arg {
- const u32 * bitmask;
-};
-
-struct nfs4_pathconf_arg {
- const struct nfs_fh * fh;
- const u32 * bitmask;
-};
-
-struct nfs4_readdir_arg {
- const struct nfs_fh * fh;
- u64 cookie;
- nfs4_verifier verifier;
- u32 count;
- struct page ** pages; /* zero-copy data */
- unsigned int pgbase; /* zero-copy data */
- const u32 * bitmask;
-};
-
-struct nfs4_readdir_res {
- nfs4_verifier verifier;
- unsigned int pgbase;
-};
-
-struct nfs4_readlink {
- const struct nfs_fh * fh;
- unsigned int pgbase;
- unsigned int pglen; /* zero-copy data */
- struct page ** pages; /* zero-copy data */
-};
-
-struct nfs4_remove_arg {
- const struct nfs_fh * fh;
- const struct qstr * name;
- const u32 * bitmask;
-};
-
-struct nfs4_remove_res {
- const struct nfs_server * server;
- struct nfs4_change_info cinfo;
- struct nfs_fattr * dir_attr;
-};
-
-struct nfs4_rename_arg {
- const struct nfs_fh * old_dir;
- const struct nfs_fh * new_dir;
- const struct qstr * old_name;
- const struct qstr * new_name;
- const u32 * bitmask;
-};
-
-struct nfs4_rename_res {
- const struct nfs_server * server;
- struct nfs4_change_info old_cinfo;
- struct nfs_fattr * old_fattr;
- struct nfs4_change_info new_cinfo;
- struct nfs_fattr * new_fattr;
-};
-
-struct nfs4_setclientid {
- const nfs4_verifier * sc_verifier; /* request */
- unsigned int sc_name_len;
- char sc_name[48]; /* request */
- u32 sc_prog; /* request */
- unsigned int sc_netid_len;
- char sc_netid[4]; /* request */
- unsigned int sc_uaddr_len;
- char sc_uaddr[24]; /* request */
- u32 sc_cb_ident; /* request */
-};
-
-struct nfs4_statfs_arg {
- const struct nfs_fh * fh;
- const u32 * bitmask;
-};
-
-struct nfs4_server_caps_res {
- u32 attr_bitmask[2];
- u32 acl_bitmask;
- u32 has_links;
- u32 has_symlinks;
-};
-
-struct nfs4_string {
- unsigned int len;
- char *data;
-};
-
-#define NFS4_PATHNAME_MAXCOMPONENTS 512
-struct nfs4_pathname {
- unsigned int ncomponents;
- struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
-};
-
-#define NFS4_FS_LOCATION_MAXSERVERS 10
-struct nfs4_fs_location {
- unsigned int nservers;
- struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
- struct nfs4_pathname rootpath;
-};
-
-#define NFS4_FS_LOCATIONS_MAXENTRIES 10
-struct nfs4_fs_locations {
- struct nfs_fattr fattr;
- const struct nfs_server *server;
- struct nfs4_pathname fs_path;
- int nlocations;
- struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
-};
-
-struct nfs4_fs_locations_arg {
- const struct nfs_fh *dir_fh;
- const struct qstr *name;
- struct page *page;
- const u32 *bitmask;
-};
-
-#endif /* CONFIG_NFS_V4 */
-
-struct nfs_page;
-
-#define NFS_PAGEVEC_SIZE (8U)
-
-struct nfs_read_data {
- int flags;
- struct rpc_task task;
- struct inode *inode;
- struct rpc_cred *cred;
- struct nfs_fattr fattr; /* fattr storage */
- struct list_head pages; /* Coalesced read requests */
- struct nfs_page *req; /* multi ops per nfs_page */
- struct page **pagevec;
- unsigned int npages; /* Max length of pagevec */
- struct nfs_readargs args;
- struct nfs_readres res;
-#ifdef CONFIG_NFS_V4
- unsigned long timestamp; /* For lease renewal */
-#endif
- struct page *page_array[NFS_PAGEVEC_SIZE];
-};
-
-struct nfs_write_data {
- int flags;
- struct rpc_task task;
- struct inode *inode;
- struct rpc_cred *cred;
- struct nfs_fattr fattr;
- struct nfs_writeverf verf;
- struct list_head pages; /* Coalesced requests we wish to flush */
- struct nfs_page *req; /* multi ops per nfs_page */
- struct page **pagevec;
- unsigned int npages; /* Max length of pagevec */
- struct nfs_writeargs args; /* argument struct */
- struct nfs_writeres res; /* result struct */
-#ifdef CONFIG_NFS_V4
- unsigned long timestamp; /* For lease renewal */
-#endif
- struct page *page_array[NFS_PAGEVEC_SIZE];
-};
-
-struct nfs_access_entry;
-
-/*
- * RPC procedure vector for NFSv2/NFSv3 demuxing
- */
-struct nfs_rpc_ops {
- int version; /* Protocol version */
- struct dentry_operations *dentry_ops;
- struct inode_operations *dir_inode_ops;
- struct inode_operations *file_inode_ops;
-
- int (*getroot) (struct nfs_server *, struct nfs_fh *,
- struct nfs_fsinfo *);
- int (*getattr) (struct nfs_server *, struct nfs_fh *,
- struct nfs_fattr *);
- int (*setattr) (struct dentry *, struct nfs_fattr *,
- struct iattr *);
- int (*lookup) (struct inode *, struct qstr *,
- struct nfs_fh *, struct nfs_fattr *);
- int (*access) (struct inode *, struct nfs_access_entry *);
- int (*readlink)(struct inode *, struct page *, unsigned int,
- unsigned int);
- int (*read) (struct nfs_read_data *);
- int (*write) (struct nfs_write_data *);
- int (*commit) (struct nfs_write_data *);
- int (*create) (struct inode *, struct dentry *,
- struct iattr *, int, struct nameidata *);
- int (*remove) (struct inode *, struct qstr *);
- int (*unlink_setup) (struct rpc_message *,
- struct dentry *, struct qstr *);
- int (*unlink_done) (struct dentry *, struct rpc_task *);
- int (*rename) (struct inode *, struct qstr *,
- struct inode *, struct qstr *);
- int (*link) (struct inode *, struct inode *, struct qstr *);
- int (*symlink) (struct inode *, struct qstr *, struct qstr *,
- struct iattr *, struct nfs_fh *,
- struct nfs_fattr *);
- int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
- int (*rmdir) (struct inode *, struct qstr *);
- int (*readdir) (struct dentry *, struct rpc_cred *,
- u64, struct page *, unsigned int, int);
- int (*mknod) (struct inode *, struct dentry *, struct iattr *,
- dev_t);
- int (*statfs) (struct nfs_server *, struct nfs_fh *,
- struct nfs_fsstat *);
- int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
- struct nfs_fsinfo *);
- int (*pathconf) (struct nfs_server *, struct nfs_fh *,
- struct nfs_pathconf *);
- u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus);
- void (*read_setup) (struct nfs_read_data *);
- int (*read_done) (struct rpc_task *, struct nfs_read_data *);
- void (*write_setup) (struct nfs_write_data *, int how);
- int (*write_done) (struct rpc_task *, struct nfs_write_data *);
- void (*commit_setup) (struct nfs_write_data *, int how);
- int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
- int (*file_open) (struct inode *, struct file *);
- int (*file_release) (struct inode *, struct file *);
- int (*lock)(struct file *, int, struct file_lock *);
- void (*clear_acl_cache)(struct inode *);
-};
-
-/*
- * NFS_CALL(getattr, inode, (fattr));
- * into
- * NFS_PROTO(inode)->getattr(fattr);
- */
-#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
-
-/*
- * Function vectors etc. for the NFS client
- */
-extern struct nfs_rpc_ops nfs_v2_clientops;
-extern struct nfs_rpc_ops nfs_v3_clientops;
-extern struct nfs_rpc_ops nfs_v4_clientops;
-extern struct rpc_version nfs_version2;
-extern struct rpc_version nfs_version3;
-extern struct rpc_version nfs_version4;
-
-extern struct rpc_version nfsacl_version3;
-extern struct rpc_program nfsacl_program;
-
-#endif
diff --git a/original/linux/nfsacl.h b/original/linux/nfsacl.h
deleted file mode 100644
index 54487a9..0000000
--- a/original/linux/nfsacl.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * File: linux/nfsacl.h
- *
- * (C) 2003 Andreas Gruenbacher <agruen@suse.de>
- */
-#ifndef __LINUX_NFSACL_H
-#define __LINUX_NFSACL_H
-
-#define NFS_ACL_PROGRAM 100227
-
-#define ACLPROC2_GETACL 1
-#define ACLPROC2_SETACL 2
-#define ACLPROC2_GETATTR 3
-#define ACLPROC2_ACCESS 4
-
-#define ACLPROC3_GETACL 1
-#define ACLPROC3_SETACL 2
-
-
-/* Flags for the getacl/setacl mode */
-#define NFS_ACL 0x0001
-#define NFS_ACLCNT 0x0002
-#define NFS_DFACL 0x0004
-#define NFS_DFACLCNT 0x0008
-
-/* Flag for Default ACL entries */
-#define NFS_ACL_DEFAULT 0x1000
-
-#ifdef __KERNEL__
-
-#include <linux/posix_acl.h>
-
-/* Maximum number of ACL entries over NFS */
-#define NFS_ACL_MAX_ENTRIES 1024
-
-#define NFSACL_MAXWORDS (2*(2+3*NFS_ACL_MAX_ENTRIES))
-#define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \
- >> PAGE_SHIFT)
-
-static inline unsigned int
-nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default)
-{
- unsigned int w = 16;
- w += max(acl_access ? (int)acl_access->a_count : 3, 4) * 12;
- if (acl_default)
- w += max((int)acl_default->a_count, 4) * 12;
- return w;
-}
-
-extern unsigned int
-nfsacl_encode(struct xdr_buf *buf, unsigned int base, struct inode *inode,
- struct posix_acl *acl, int encode_entries, int typeflag);
-extern unsigned int
-nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt,
- struct posix_acl **pacl);
-
-#endif /* __KERNEL__ */
-#endif /* __LINUX_NFSACL_H */
diff --git a/original/linux/nfsd/auth.h b/original/linux/nfsd/auth.h
deleted file mode 100644
index 0fb9f72..0000000
--- a/original/linux/nfsd/auth.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * include/linux/nfsd/auth.h
- *
- * nfsd-specific authentication stuff.
- * uid/gid mapping not yet implemented.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef LINUX_NFSD_AUTH_H
-#define LINUX_NFSD_AUTH_H
-
-#ifdef __KERNEL__
-
-#define nfsd_luid(rq, uid) ((u32)(uid))
-#define nfsd_lgid(rq, gid) ((u32)(gid))
-#define nfsd_ruid(rq, uid) ((u32)(uid))
-#define nfsd_rgid(rq, gid) ((u32)(gid))
-
-/*
- * Set the current process's fsuid/fsgid etc to those of the NFS
- * client user
- */
-int nfsd_setuser(struct svc_rqst *, struct svc_export *);
-
-#endif /* __KERNEL__ */
-#endif /* LINUX_NFSD_AUTH_H */
diff --git a/original/linux/nfsd/const.h b/original/linux/nfsd/const.h
deleted file mode 100644
index b75bb1b..0000000
--- a/original/linux/nfsd/const.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * include/linux/nfsd/const.h
- *
- * Various constants related to NFS.
- *
- * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_NFSD_CONST_H
-#define _LINUX_NFSD_CONST_H
-
-#include <linux/nfs.h>
-#include <linux/nfs2.h>
-#include <linux/nfs3.h>
-#include <linux/nfs4.h>
-
-/*
- * Maximum protocol version supported by knfsd
- */
-#define NFSSVC_MAXVERS 3
-
-/*
- * Maximum blocksize supported by daemon currently at 32K
- */
-#define NFSSVC_MAXBLKSIZE (32*1024)
-
-#ifdef __KERNEL__
-
-#ifndef NFS_SUPER_MAGIC
-# define NFS_SUPER_MAGIC 0x6969
-#endif
-
-#define NFSD_BUFSIZE (1024 + NFSSVC_MAXBLKSIZE)
-
-#ifdef CONFIG_NFSD_V4
-# define NFSSVC_XDRSIZE NFS4_SVC_XDRSIZE
-#elif defined(CONFIG_NFSD_V3)
-# define NFSSVC_XDRSIZE NFS3_SVC_XDRSIZE
-#else
-# define NFSSVC_XDRSIZE NFS2_SVC_XDRSIZE
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_NFSD_CONST_H */
diff --git a/original/linux/nfsd/debug.h b/original/linux/nfsd/debug.h
deleted file mode 100644
index ee4aa91..0000000
--- a/original/linux/nfsd/debug.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * linux/include/linux/nfsd/debug.h
- *
- * Debugging-related stuff for nfsd
- *
- * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef LINUX_NFSD_DEBUG_H
-#define LINUX_NFSD_DEBUG_H
-
-#include <linux/sunrpc/debug.h>
-
-/*
- * Enable debugging for nfsd.
- * Requires RPC_DEBUG.
- */
-#ifdef RPC_DEBUG
-# define NFSD_DEBUG 1
-#endif
-
-/*
- * knfsd debug flags
- */
-#define NFSDDBG_SOCK 0x0001
-#define NFSDDBG_FH 0x0002
-#define NFSDDBG_EXPORT 0x0004
-#define NFSDDBG_SVC 0x0008
-#define NFSDDBG_PROC 0x0010
-#define NFSDDBG_FILEOP 0x0020
-#define NFSDDBG_AUTH 0x0040
-#define NFSDDBG_REPCACHE 0x0080
-#define NFSDDBG_XDR 0x0100
-#define NFSDDBG_LOCKD 0x0200
-#define NFSDDBG_ALL 0x7FFF
-#define NFSDDBG_NOCHANGE 0xFFFF
-
-
-#ifdef __KERNEL__
-# undef ifdebug
-# ifdef NFSD_DEBUG
-# define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag)
-# else
-# define ifdebug(flag) if (0)
-# endif
-#endif /* __KERNEL__ */
-
-#endif /* LINUX_NFSD_DEBUG_H */
diff --git a/original/linux/nfsd/export.h b/original/linux/nfsd/export.h
deleted file mode 100644
index d2a8abb..0000000
--- a/original/linux/nfsd/export.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * include/linux/nfsd/export.h
- *
- * Public declarations for NFS exports. The definitions for the
- * syscall interface are in nfsctl.h
- *
- * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef NFSD_EXPORT_H
-#define NFSD_EXPORT_H
-
-#include <asm/types.h>
-#ifdef __KERNEL__
-# include <linux/types.h>
-# include <linux/in.h>
-#endif
-
-/*
- * Important limits for the exports stuff.
- */
-#define NFSCLNT_IDMAX 1024
-#define NFSCLNT_ADDRMAX 16
-#define NFSCLNT_KEYMAX 32
-
-/*
- * Export flags.
- */
-#define NFSEXP_READONLY 0x0001
-#define NFSEXP_INSECURE_PORT 0x0002
-#define NFSEXP_ROOTSQUASH 0x0004
-#define NFSEXP_ALLSQUASH 0x0008
-#define NFSEXP_ASYNC 0x0010
-#define NFSEXP_GATHERED_WRITES 0x0020
-/* 40 80 100 currently unused */
-#define NFSEXP_NOHIDE 0x0200
-#define NFSEXP_NOSUBTREECHECK 0x0400
-#define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */
-#define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */
-#define NFSEXP_FSID 0x2000
-#define NFSEXP_CROSSMOUNT 0x4000
-#define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */
-#define NFSEXP_ALLFLAGS 0xFE3F
-
-
-#ifdef __KERNEL__
-
-struct svc_export {
- struct cache_head h;
- struct auth_domain * ex_client;
- int ex_flags;
- struct vfsmount * ex_mnt;
- struct dentry * ex_dentry;
- uid_t ex_anon_uid;
- gid_t ex_anon_gid;
- int ex_fsid;
-};
-
-/* an "export key" (expkey) maps a filehandlefragement to an
- * svc_export for a given client. There can be two per export, one
- * for type 0 (dev/ino), one for type 1 (fsid)
- */
-struct svc_expkey {
- struct cache_head h;
-
- struct auth_domain * ek_client;
- int ek_fsidtype;
- u32 ek_fsid[3];
-
- struct vfsmount * ek_mnt;
- struct dentry * ek_dentry;
-};
-
-#define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT))
-#define EX_ISSYNC(exp) (!((exp)->ex_flags & NFSEXP_ASYNC))
-#define EX_RDONLY(exp) ((exp)->ex_flags & NFSEXP_READONLY)
-#define EX_NOHIDE(exp) ((exp)->ex_flags & NFSEXP_NOHIDE)
-#define EX_WGATHER(exp) ((exp)->ex_flags & NFSEXP_GATHERED_WRITES)
-
-
-/*
- * Function declarations
- */
-void nfsd_export_init(void);
-void nfsd_export_shutdown(void);
-void nfsd_export_flush(void);
-void exp_readlock(void);
-void exp_readunlock(void);
-struct svc_export * exp_get_by_name(struct auth_domain *clp,
- struct vfsmount *mnt,
- struct dentry *dentry,
- struct cache_req *reqp);
-struct svc_export * exp_parent(struct auth_domain *clp,
- struct vfsmount *mnt,
- struct dentry *dentry,
- struct cache_req *reqp);
-int exp_rootfh(struct auth_domain *,
- char *path, struct knfsd_fh *, int maxsize);
-int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
-int nfserrno(int errno);
-
-extern struct cache_detail svc_export_cache;
-
-static inline void exp_put(struct svc_export *exp)
-{
- cache_put(&exp->h, &svc_export_cache);
-}
-
-static inline void exp_get(struct svc_export *exp)
-{
- cache_get(&exp->h);
-}
-extern struct svc_export *
-exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv,
- struct cache_req *reqp);
-
-#endif /* __KERNEL__ */
-
-#endif /* NFSD_EXPORT_H */
-
diff --git a/original/linux/nfsd/interface.h b/original/linux/nfsd/interface.h
deleted file mode 100644
index af09797..0000000
--- a/original/linux/nfsd/interface.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * include/linux/nfsd/interface.h
- *
- * defines interface between nfsd and other bits of
- * the kernel. Particularly filesystems (eventually).
- *
- * Copyright (C) 2000 Neil Brown <neilb@cse.unsw.edu.au>
- */
-
-#ifndef LINUX_NFSD_INTERFACE_H
-#define LINUX_NFSD_INTERFACE_H
-
-#endif /* LINUX_NFSD_INTERFACE_H */
diff --git a/original/linux/nfsd/nfsfh.h b/original/linux/nfsd/nfsfh.h
deleted file mode 100644
index f9edcd2..0000000
--- a/original/linux/nfsd/nfsfh.h
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * include/linux/nfsd/nfsfh.h
- *
- * This file describes the layout of the file handles as passed
- * over the wire.
- *
- * Earlier versions of knfsd used to sign file handles using keyed MD5
- * or SHA. I've removed this code, because it doesn't give you more
- * security than blocking external access to port 2049 on your firewall.
- *
- * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_NFSD_FH_H
-#define _LINUX_NFSD_FH_H
-
-#include <asm/types.h>
-#ifdef __KERNEL__
-# include <linux/types.h>
-# include <linux/string.h>
-# include <linux/fs.h>
-#endif
-#include <linux/nfsd/const.h>
-#include <linux/nfsd/debug.h>
-
-/*
- * This is the old "dentry style" Linux NFSv2 file handle.
- *
- * The xino and xdev fields are currently used to transport the
- * ino/dev of the exported inode.
- */
-struct nfs_fhbase_old {
- __u32 fb_dcookie; /* dentry cookie - always 0xfeebbaca */
- __u32 fb_ino; /* our inode number */
- __u32 fb_dirino; /* dir inode number, 0 for directories */
- __u32 fb_dev; /* our device */
- __u32 fb_xdev;
- __u32 fb_xino;
- __u32 fb_generation;
-};
-
-/*
- * This is the new flexible, extensible style NFSv2/v3 file handle.
- * by Neil Brown <neilb@cse.unsw.edu.au> - March 2000
- *
- * The file handle is seens as a list of 4byte words.
- * The first word contains a version number (1) and four descriptor bytes
- * that tell how the remaining 3 variable length fields should be handled.
- * These three bytes are auth_type, fsid_type and fileid_type.
- *
- * All 4byte values are in host-byte-order.
- *
- * The auth_type field specifies how the filehandle can be authenticated
- * This might allow a file to be confirmed to be in a writable part of a
- * filetree without checking the path from it upto the root.
- * Current values:
- * 0 - No authentication. fb_auth is 0 bytes long
- * Possible future values:
- * 1 - 4 bytes taken from MD5 hash of the remainer of the file handle
- * prefixed by a secret and with the important export flags.
- *
- * The fsid_type identifies how the filesystem (or export point) is
- * encoded.
- * Current values:
- * 0 - 4 byte device id (ms-2-bytes major, ls-2-bytes minor), 4byte inode number
- * NOTE: we cannot use the kdev_t device id value, because kdev_t.h
- * says we mustn't. We must break it up and reassemble.
- * 1 - 4 byte user specified identifier
- * 2 - 4 byte major, 4 byte minor, 4 byte inode number - DEPRECATED
- * 3 - 4 byte device id, encoded for user-space, 4 byte inode number
- *
- * The fileid_type identified how the file within the filesystem is encoded.
- * This is (will be) passed to, and set by, the underlying filesystem if it supports
- * filehandle operations. The filesystem must not use the value '0' or '0xff' and may
- * only use the values 1 and 2 as defined below:
- * Current values:
- * 0 - The root, or export point, of the filesystem. fb_fileid is 0 bytes.
- * 1 - 32bit inode number, 32 bit generation number.
- * 2 - 32bit inode number, 32 bit generation number, 32 bit parent directory inode number.
- *
- */
-struct nfs_fhbase_new {
- __u8 fb_version; /* == 1, even => nfs_fhbase_old */
- __u8 fb_auth_type;
- __u8 fb_fsid_type;
- __u8 fb_fileid_type;
- __u32 fb_auth[1];
-/* __u32 fb_fsid[0]; floating */
-/* __u32 fb_fileid[0]; floating */
-};
-
-struct knfsd_fh {
- unsigned int fh_size; /* significant for NFSv3.
- * Points to the current size while building
- * a new file handle
- */
- union {
- struct nfs_fhbase_old fh_old;
- __u32 fh_pad[NFS4_FHSIZE/4];
- struct nfs_fhbase_new fh_new;
- } fh_base;
-};
-
-#define ofh_dcookie fh_base.fh_old.fb_dcookie
-#define ofh_ino fh_base.fh_old.fb_ino
-#define ofh_dirino fh_base.fh_old.fb_dirino
-#define ofh_dev fh_base.fh_old.fb_dev
-#define ofh_xdev fh_base.fh_old.fb_xdev
-#define ofh_xino fh_base.fh_old.fb_xino
-#define ofh_generation fh_base.fh_old.fb_generation
-
-#define fh_version fh_base.fh_new.fb_version
-#define fh_fsid_type fh_base.fh_new.fb_fsid_type
-#define fh_auth_type fh_base.fh_new.fb_auth_type
-#define fh_fileid_type fh_base.fh_new.fb_fileid_type
-#define fh_auth fh_base.fh_new.fb_auth
-#define fh_fsid fh_base.fh_new.fb_auth
-
-#ifdef __KERNEL__
-
-static inline __u32 ino_t_to_u32(ino_t ino)
-{
- return (__u32) ino;
-}
-
-static inline ino_t u32_to_ino_t(__u32 uino)
-{
- return (ino_t) uino;
-}
-
-/*
- * This is the internal representation of an NFS handle used in knfsd.
- * pre_mtime/post_version will be used to support wcc_attr's in NFSv3.
- */
-typedef struct svc_fh {
- struct knfsd_fh fh_handle; /* FH data */
- struct dentry * fh_dentry; /* validated dentry */
- struct svc_export * fh_export; /* export pointer */
- int fh_maxsize; /* max size for fh_handle */
-
- unsigned char fh_locked; /* inode locked by us */
-
-#ifdef CONFIG_NFSD_V3
- unsigned char fh_post_saved; /* post-op attrs saved */
- unsigned char fh_pre_saved; /* pre-op attrs saved */
-
- /* Pre-op attributes saved during fh_lock */
- __u64 fh_pre_size; /* size before operation */
- struct timespec fh_pre_mtime; /* mtime before oper */
- struct timespec fh_pre_ctime; /* ctime before oper */
-
- /* Post-op attributes saved in fh_unlock */
- umode_t fh_post_mode; /* i_mode */
- nlink_t fh_post_nlink; /* i_nlink */
- uid_t fh_post_uid; /* i_uid */
- gid_t fh_post_gid; /* i_gid */
- __u64 fh_post_size; /* i_size */
- unsigned long fh_post_blocks; /* i_blocks */
- unsigned long fh_post_blksize;/* i_blksize */
- __u32 fh_post_rdev[2];/* i_rdev */
- struct timespec fh_post_atime; /* i_atime */
- struct timespec fh_post_mtime; /* i_mtime */
- struct timespec fh_post_ctime; /* i_ctime */
-#endif /* CONFIG_NFSD_V3 */
-
-} svc_fh;
-
-static inline void mk_fsid_v0(u32 *fsidv, dev_t dev, ino_t ino)
-{
- fsidv[0] = htonl((MAJOR(dev)<<16) |
- MINOR(dev));
- fsidv[1] = ino_t_to_u32(ino);
-}
-
-static inline void mk_fsid_v1(u32 *fsidv, u32 fsid)
-{
- fsidv[0] = fsid;
-}
-
-static inline void mk_fsid_v2(u32 *fsidv, dev_t dev, ino_t ino)
-{
- fsidv[0] = htonl(MAJOR(dev));
- fsidv[1] = htonl(MINOR(dev));
- fsidv[2] = ino_t_to_u32(ino);
-}
-
-static inline void mk_fsid_v3(u32 *fsidv, dev_t dev, ino_t ino)
-{
- fsidv[0] = new_encode_dev(dev);
- fsidv[1] = ino_t_to_u32(ino);
-}
-
-static inline int key_len(int type)
-{
- switch(type) {
- case 0: return 8;
- case 1: return 4;
- case 2: return 12;
- case 3: return 8;
- default: return 0;
- }
-}
-
-/*
- * Shorthand for dprintk()'s
- */
-extern char * SVCFH_fmt(struct svc_fh *fhp);
-
-/*
- * Function prototypes
- */
-u32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
-int fh_compose(struct svc_fh *, struct svc_export *, struct dentry *, struct svc_fh *);
-int fh_update(struct svc_fh *);
-void fh_put(struct svc_fh *);
-
-static __inline__ struct svc_fh *
-fh_copy(struct svc_fh *dst, struct svc_fh *src)
-{
- if (src->fh_dentry || src->fh_locked) {
- struct dentry *dentry = src->fh_dentry;
- printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n",
- dentry->d_parent->d_name.name, dentry->d_name.name);
- }
-
- *dst = *src;
- return dst;
-}
-
-static __inline__ struct svc_fh *
-fh_init(struct svc_fh *fhp, int maxsize)
-{
- memset(fhp, 0, sizeof(*fhp));
- fhp->fh_maxsize = maxsize;
- return fhp;
-}
-
-#ifdef CONFIG_NFSD_V3
-/*
- * Fill in the pre_op attr for the wcc data
- */
-static inline void
-fill_pre_wcc(struct svc_fh *fhp)
-{
- struct inode *inode;
-
- inode = fhp->fh_dentry->d_inode;
- if (!fhp->fh_pre_saved) {
- fhp->fh_pre_mtime = inode->i_mtime;
- fhp->fh_pre_ctime = inode->i_ctime;
- fhp->fh_pre_size = inode->i_size;
- fhp->fh_pre_saved = 1;
- }
-}
-
-/*
- * Fill in the post_op attr for the wcc data
- */
-static inline void
-fill_post_wcc(struct svc_fh *fhp)
-{
- struct inode *inode = fhp->fh_dentry->d_inode;
-
- if (fhp->fh_post_saved)
- printk("nfsd: inode locked twice during operation.\n");
-
- fhp->fh_post_mode = inode->i_mode;
- fhp->fh_post_nlink = inode->i_nlink;
- fhp->fh_post_uid = inode->i_uid;
- fhp->fh_post_gid = inode->i_gid;
- fhp->fh_post_size = inode->i_size;
- if (inode->i_blksize) {
- fhp->fh_post_blksize = inode->i_blksize;
- fhp->fh_post_blocks = inode->i_blocks;
- } else {
- fhp->fh_post_blksize = BLOCK_SIZE;
- /* how much do we care for accuracy with MinixFS? */
- fhp->fh_post_blocks = (inode->i_size+511) >> 9;
- }
- fhp->fh_post_rdev[0] = htonl((u32)imajor(inode));
- fhp->fh_post_rdev[1] = htonl((u32)iminor(inode));
- fhp->fh_post_atime = inode->i_atime;
- fhp->fh_post_mtime = inode->i_mtime;
- fhp->fh_post_ctime = inode->i_ctime;
- fhp->fh_post_saved = 1;
-}
-#else
-#define fill_pre_wcc(ignored)
-#define fill_post_wcc(notused)
-#endif /* CONFIG_NFSD_V3 */
-
-
-/*
- * Lock a file handle/inode
- * NOTE: both fh_lock and fh_unlock are done "by hand" in
- * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once
- * so, any changes here should be reflected there.
- */
-static inline void
-fh_lock(struct svc_fh *fhp)
-{
- struct dentry *dentry = fhp->fh_dentry;
- struct inode *inode;
-
- dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n",
- SVCFH_fmt(fhp), fhp->fh_locked);
-
- if (!fhp->fh_dentry) {
- printk(KERN_ERR "fh_lock: fh not verified!\n");
- return;
- }
- if (fhp->fh_locked) {
- printk(KERN_WARNING "fh_lock: %s/%s already locked!\n",
- dentry->d_parent->d_name.name, dentry->d_name.name);
- return;
- }
-
- inode = dentry->d_inode;
- mutex_lock(&inode->i_mutex);
- fill_pre_wcc(fhp);
- fhp->fh_locked = 1;
-}
-
-/*
- * Unlock a file handle/inode
- */
-static inline void
-fh_unlock(struct svc_fh *fhp)
-{
- if (!fhp->fh_dentry)
- printk(KERN_ERR "fh_unlock: fh not verified!\n");
-
- if (fhp->fh_locked) {
- fill_post_wcc(fhp);
- mutex_unlock(&fhp->fh_dentry->d_inode->i_mutex);
- fhp->fh_locked = 0;
- }
-}
-#endif /* __KERNEL__ */
-
-
-#endif /* _LINUX_NFSD_FH_H */
diff --git a/original/linux/nfsd/stats.h b/original/linux/nfsd/stats.h
deleted file mode 100644
index 28a82fd..0000000
--- a/original/linux/nfsd/stats.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * linux/include/nfsd/stats.h
- *
- * Statistics for NFS server.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef LINUX_NFSD_STATS_H
-#define LINUX_NFSD_STATS_H
-
-#include <linux/nfs4.h>
-
-struct nfsd_stats {
- unsigned int rchits; /* repcache hits */
- unsigned int rcmisses; /* repcache hits */
- unsigned int rcnocache; /* uncached reqs */
- unsigned int fh_stale; /* FH stale error */
- unsigned int fh_lookup; /* dentry cached */
- unsigned int fh_anon; /* anon file dentry returned */
- unsigned int fh_nocache_dir; /* filehandle not found in dcache */
- unsigned int fh_nocache_nondir; /* filehandle not found in dcache */
- unsigned int io_read; /* bytes returned to read requests */
- unsigned int io_write; /* bytes passed in write requests */
- unsigned int th_cnt; /* number of available threads */
- unsigned int th_usage[10]; /* number of ticks during which n perdeciles
- * of available threads were in use */
- unsigned int th_fullcnt; /* number of times last free thread was used */
- unsigned int ra_size; /* size of ra cache */
- unsigned int ra_depth[11]; /* number of times ra entry was found that deep
- * in the cache (10percentiles). [10] = not found */
-#ifdef CONFIG_NFSD_V4
- unsigned int nfs4_opcount[LAST_NFS4_OP + 1]; /* count of individual nfsv4 operations */
-#endif
-
-};
-
-/* thread usage wraps very million seconds (approx one fortnight) */
-#define NFSD_USAGE_WRAP (HZ*1000000)
-
-#ifdef __KERNEL__
-
-extern struct nfsd_stats nfsdstats;
-extern struct svc_stat nfsd_svcstats;
-
-void nfsd_stat_init(void);
-void nfsd_stat_shutdown(void);
-
-#endif /* __KERNEL__ */
-#endif /* LINUX_NFSD_STATS_H */
diff --git a/original/linux/nfsd/xdr.h b/original/linux/nfsd/xdr.h
deleted file mode 100644
index 3f4f714..0000000
--- a/original/linux/nfsd/xdr.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * linux/inxlude/linux/nfsd/xdr.h
- *
- * XDR types for nfsd. This is mainly a typing exercise.
- */
-
-#ifndef LINUX_NFSD_H
-#define LINUX_NFSD_H
-
-#include <linux/fs.h>
-#include <linux/vfs.h>
-#include <linux/nfs.h>
-
-struct nfsd_fhandle {
- struct svc_fh fh;
-};
-
-struct nfsd_sattrargs {
- struct svc_fh fh;
- struct iattr attrs;
-};
-
-struct nfsd_diropargs {
- struct svc_fh fh;
- char * name;
- int len;
-};
-
-struct nfsd_readargs {
- struct svc_fh fh;
- __u32 offset;
- __u32 count;
- struct kvec vec[RPCSVC_MAXPAGES];
- int vlen;
-};
-
-struct nfsd_writeargs {
- svc_fh fh;
- __u32 offset;
- int len;
- struct kvec vec[RPCSVC_MAXPAGES];
- int vlen;
-};
-
-struct nfsd_createargs {
- struct svc_fh fh;
- char * name;
- int len;
- struct iattr attrs;
-};
-
-struct nfsd_renameargs {
- struct svc_fh ffh;
- char * fname;
- int flen;
- struct svc_fh tfh;
- char * tname;
- int tlen;
-};
-
-struct nfsd_readlinkargs {
- struct svc_fh fh;
- char * buffer;
-};
-
-struct nfsd_linkargs {
- struct svc_fh ffh;
- struct svc_fh tfh;
- char * tname;
- int tlen;
-};
-
-struct nfsd_symlinkargs {
- struct svc_fh ffh;
- char * fname;
- int flen;
- char * tname;
- int tlen;
- struct iattr attrs;
-};
-
-struct nfsd_readdirargs {
- struct svc_fh fh;
- __u32 cookie;
- __u32 count;
- u32 * buffer;
-};
-
-struct nfsd_attrstat {
- struct svc_fh fh;
- struct kstat stat;
-};
-
-struct nfsd_diropres {
- struct svc_fh fh;
- struct kstat stat;
-};
-
-struct nfsd_readlinkres {
- int len;
-};
-
-struct nfsd_readres {
- struct svc_fh fh;
- unsigned long count;
- struct kstat stat;
-};
-
-struct nfsd_readdirres {
- int count;
-
- struct readdir_cd common;
- u32 * buffer;
- int buflen;
- u32 * offset;
-};
-
-struct nfsd_statfsres {
- struct kstatfs stats;
-};
-
-/*
- * Storage requirements for XDR arguments and results.
- */
-union nfsd_xdrstore {
- struct nfsd_sattrargs sattr;
- struct nfsd_diropargs dirop;
- struct nfsd_readargs read;
- struct nfsd_writeargs write;
- struct nfsd_createargs create;
- struct nfsd_renameargs rename;
- struct nfsd_linkargs link;
- struct nfsd_symlinkargs symlink;
- struct nfsd_readdirargs readdir;
-};
-
-#define NFS2_SVC_XDRSIZE sizeof(union nfsd_xdrstore)
-
-
-int nfssvc_decode_void(struct svc_rqst *, u32 *, void *);
-int nfssvc_decode_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
-int nfssvc_decode_sattrargs(struct svc_rqst *, u32 *,
- struct nfsd_sattrargs *);
-int nfssvc_decode_diropargs(struct svc_rqst *, u32 *,
- struct nfsd_diropargs *);
-int nfssvc_decode_readargs(struct svc_rqst *, u32 *,
- struct nfsd_readargs *);
-int nfssvc_decode_writeargs(struct svc_rqst *, u32 *,
- struct nfsd_writeargs *);
-int nfssvc_decode_createargs(struct svc_rqst *, u32 *,
- struct nfsd_createargs *);
-int nfssvc_decode_renameargs(struct svc_rqst *, u32 *,
- struct nfsd_renameargs *);
-int nfssvc_decode_readlinkargs(struct svc_rqst *, u32 *,
- struct nfsd_readlinkargs *);
-int nfssvc_decode_linkargs(struct svc_rqst *, u32 *,
- struct nfsd_linkargs *);
-int nfssvc_decode_symlinkargs(struct svc_rqst *, u32 *,
- struct nfsd_symlinkargs *);
-int nfssvc_decode_readdirargs(struct svc_rqst *, u32 *,
- struct nfsd_readdirargs *);
-int nfssvc_encode_void(struct svc_rqst *, u32 *, void *);
-int nfssvc_encode_attrstat(struct svc_rqst *, u32 *, struct nfsd_attrstat *);
-int nfssvc_encode_diropres(struct svc_rqst *, u32 *, struct nfsd_diropres *);
-int nfssvc_encode_readlinkres(struct svc_rqst *, u32 *, struct nfsd_readlinkres *);
-int nfssvc_encode_readres(struct svc_rqst *, u32 *, struct nfsd_readres *);
-int nfssvc_encode_statfsres(struct svc_rqst *, u32 *, struct nfsd_statfsres *);
-int nfssvc_encode_readdirres(struct svc_rqst *, u32 *, struct nfsd_readdirres *);
-
-int nfssvc_encode_entry(struct readdir_cd *, const char *name,
- int namlen, loff_t offset, ino_t ino, unsigned int);
-
-int nfssvc_release_fhandle(struct svc_rqst *, u32 *, struct nfsd_fhandle *);
-
-/* Helper functions for NFSv2 ACL code */
-u32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, u32 *p, struct svc_fh *fhp);
-u32 *nfs2svc_decode_fh(u32 *p, struct svc_fh *fhp);
-
-#endif /* LINUX_NFSD_H */
diff --git a/original/linux/node.h b/original/linux/node.h
deleted file mode 100644
index bc001bc..0000000
--- a/original/linux/node.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * include/linux/node.h - generic node definition
- *
- * This is mainly for topological representation. We define the
- * basic 'struct node' here, which can be embedded in per-arch
- * definitions of processors.
- *
- * Basic handling of the devices is done in drivers/base/node.c
- * and system devices are handled in drivers/base/sys.c.
- *
- * Nodes are exported via driverfs in the class/node/devices/
- * directory.
- *
- * Per-node interfaces can be implemented using a struct device_interface.
- * See the following for how to do this:
- * - drivers/base/intf.c
- * - Documentation/driver-model/interface.txt
- */
-#ifndef _LINUX_NODE_H_
-#define _LINUX_NODE_H_
-
-#include <linux/sysdev.h>
-#include <linux/cpumask.h>
-
-struct node {
- struct sys_device sysdev;
-};
-
-extern struct node node_devices[];
-
-extern int register_node(struct node *, int, struct node *);
-extern void unregister_node(struct node *node);
-#ifdef CONFIG_NUMA
-extern int register_one_node(int nid);
-extern void unregister_one_node(int nid);
-extern int register_cpu_under_node(unsigned int cpu, unsigned int nid);
-extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid);
-#else
-static inline int register_one_node(int nid)
-{
- return 0;
-}
-static inline int unregister_one_node(int nid)
-{
- return 0;
-}
-static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid)
-{
- return 0;
-}
-static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
-{
- return 0;
-}
-#endif
-
-#define to_node(sys_device) container_of(sys_device, struct node, sysdev)
-
-#endif /* _LINUX_NODE_H_ */
diff --git a/original/linux/nodemask.h b/original/linux/nodemask.h
deleted file mode 100644
index 1a9ef3e..0000000
--- a/original/linux/nodemask.h
+++ /dev/null
@@ -1,379 +0,0 @@
-#ifndef __LINUX_NODEMASK_H
-#define __LINUX_NODEMASK_H
-
-/*
- * Nodemasks provide a bitmap suitable for representing the
- * set of Node's in a system, one bit position per Node number.
- *
- * See detailed comments in the file linux/bitmap.h describing the
- * data type on which these nodemasks are based.
- *
- * For details of nodemask_scnprintf() and nodemask_parse(),
- * see bitmap_scnprintf() and bitmap_parse() in lib/bitmap.c.
- * For details of nodelist_scnprintf() and nodelist_parse(), see
- * bitmap_scnlistprintf() and bitmap_parselist(), also in bitmap.c.
- * For details of node_remap(), see bitmap_bitremap in lib/bitmap.c.
- * For details of nodes_remap(), see bitmap_remap in lib/bitmap.c.
- *
- * The available nodemask operations are:
- *
- * void node_set(node, mask) turn on bit 'node' in mask
- * void node_clear(node, mask) turn off bit 'node' in mask
- * void nodes_setall(mask) set all bits
- * void nodes_clear(mask) clear all bits
- * int node_isset(node, mask) true iff bit 'node' set in mask
- * int node_test_and_set(node, mask) test and set bit 'node' in mask
- *
- * void nodes_and(dst, src1, src2) dst = src1 & src2 [intersection]
- * void nodes_or(dst, src1, src2) dst = src1 | src2 [union]
- * void nodes_xor(dst, src1, src2) dst = src1 ^ src2
- * void nodes_andnot(dst, src1, src2) dst = src1 & ~src2
- * void nodes_complement(dst, src) dst = ~src
- *
- * int nodes_equal(mask1, mask2) Does mask1 == mask2?
- * int nodes_intersects(mask1, mask2) Do mask1 and mask2 intersect?
- * int nodes_subset(mask1, mask2) Is mask1 a subset of mask2?
- * int nodes_empty(mask) Is mask empty (no bits sets)?
- * int nodes_full(mask) Is mask full (all bits sets)?
- * int nodes_weight(mask) Hamming weight - number of set bits
- *
- * void nodes_shift_right(dst, src, n) Shift right
- * void nodes_shift_left(dst, src, n) Shift left
- *
- * int first_node(mask) Number lowest set bit, or MAX_NUMNODES
- * int next_node(node, mask) Next node past 'node', or MAX_NUMNODES
- * int first_unset_node(mask) First node not set in mask, or
- * MAX_NUMNODES.
- *
- * nodemask_t nodemask_of_node(node) Return nodemask with bit 'node' set
- * NODE_MASK_ALL Initializer - all bits set
- * NODE_MASK_NONE Initializer - no bits set
- * unsigned long *nodes_addr(mask) Array of unsigned long's in mask
- *
- * int nodemask_scnprintf(buf, len, mask) Format nodemask for printing
- * int nodemask_parse(ubuf, ulen, mask) Parse ascii string as nodemask
- * int nodelist_scnprintf(buf, len, mask) Format nodemask as list for printing
- * int nodelist_parse(buf, map) Parse ascii string as nodelist
- * int node_remap(oldbit, old, new) newbit = map(old, new)(oldbit)
- * int nodes_remap(dst, src, old, new) *dst = map(old, new)(dst)
- *
- * for_each_node_mask(node, mask) for-loop node over mask
- *
- * int num_online_nodes() Number of online Nodes
- * int num_possible_nodes() Number of all possible Nodes
- *
- * int node_online(node) Is some node online?
- * int node_possible(node) Is some node possible?
- *
- * int any_online_node(mask) First online node in mask
- *
- * node_set_online(node) set bit 'node' in node_online_map
- * node_set_offline(node) clear bit 'node' in node_online_map
- *
- * for_each_node(node) for-loop node over node_possible_map
- * for_each_online_node(node) for-loop node over node_online_map
- *
- * Subtlety:
- * 1) The 'type-checked' form of node_isset() causes gcc (3.3.2, anyway)
- * to generate slightly worse code. So use a simple one-line #define
- * for node_isset(), instead of wrapping an inline inside a macro, the
- * way we do the other calls.
- */
-
-#include <linux/kernel.h>
-#include <linux/threads.h>
-#include <linux/bitmap.h>
-#include <linux/numa.h>
-
-typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
-extern nodemask_t _unused_nodemask_arg_;
-
-#define node_set(node, dst) __node_set((node), &(dst))
-static inline void __node_set(int node, volatile nodemask_t *dstp)
-{
- set_bit(node, dstp->bits);
-}
-
-#define node_clear(node, dst) __node_clear((node), &(dst))
-static inline void __node_clear(int node, volatile nodemask_t *dstp)
-{
- clear_bit(node, dstp->bits);
-}
-
-#define nodes_setall(dst) __nodes_setall(&(dst), MAX_NUMNODES)
-static inline void __nodes_setall(nodemask_t *dstp, int nbits)
-{
- bitmap_fill(dstp->bits, nbits);
-}
-
-#define nodes_clear(dst) __nodes_clear(&(dst), MAX_NUMNODES)
-static inline void __nodes_clear(nodemask_t *dstp, int nbits)
-{
- bitmap_zero(dstp->bits, nbits);
-}
-
-/* No static inline type checking - see Subtlety (1) above. */
-#define node_isset(node, nodemask) test_bit((node), (nodemask).bits)
-
-#define node_test_and_set(node, nodemask) \
- __node_test_and_set((node), &(nodemask))
-static inline int __node_test_and_set(int node, nodemask_t *addr)
-{
- return test_and_set_bit(node, addr->bits);
-}
-
-#define nodes_and(dst, src1, src2) \
- __nodes_and(&(dst), &(src1), &(src2), MAX_NUMNODES)
-static inline void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_or(dst, src1, src2) \
- __nodes_or(&(dst), &(src1), &(src2), MAX_NUMNODES)
-static inline void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_xor(dst, src1, src2) \
- __nodes_xor(&(dst), &(src1), &(src2), MAX_NUMNODES)
-static inline void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_andnot(dst, src1, src2) \
- __nodes_andnot(&(dst), &(src1), &(src2), MAX_NUMNODES)
-static inline void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_complement(dst, src) \
- __nodes_complement(&(dst), &(src), MAX_NUMNODES)
-static inline void __nodes_complement(nodemask_t *dstp,
- const nodemask_t *srcp, int nbits)
-{
- bitmap_complement(dstp->bits, srcp->bits, nbits);
-}
-
-#define nodes_equal(src1, src2) \
- __nodes_equal(&(src1), &(src2), MAX_NUMNODES)
-static inline int __nodes_equal(const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- return bitmap_equal(src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_intersects(src1, src2) \
- __nodes_intersects(&(src1), &(src2), MAX_NUMNODES)
-static inline int __nodes_intersects(const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- return bitmap_intersects(src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_subset(src1, src2) \
- __nodes_subset(&(src1), &(src2), MAX_NUMNODES)
-static inline int __nodes_subset(const nodemask_t *src1p,
- const nodemask_t *src2p, int nbits)
-{
- return bitmap_subset(src1p->bits, src2p->bits, nbits);
-}
-
-#define nodes_empty(src) __nodes_empty(&(src), MAX_NUMNODES)
-static inline int __nodes_empty(const nodemask_t *srcp, int nbits)
-{
- return bitmap_empty(srcp->bits, nbits);
-}
-
-#define nodes_full(nodemask) __nodes_full(&(nodemask), MAX_NUMNODES)
-static inline int __nodes_full(const nodemask_t *srcp, int nbits)
-{
- return bitmap_full(srcp->bits, nbits);
-}
-
-#define nodes_weight(nodemask) __nodes_weight(&(nodemask), MAX_NUMNODES)
-static inline int __nodes_weight(const nodemask_t *srcp, int nbits)
-{
- return bitmap_weight(srcp->bits, nbits);
-}
-
-#define nodes_shift_right(dst, src, n) \
- __nodes_shift_right(&(dst), &(src), (n), MAX_NUMNODES)
-static inline void __nodes_shift_right(nodemask_t *dstp,
- const nodemask_t *srcp, int n, int nbits)
-{
- bitmap_shift_right(dstp->bits, srcp->bits, n, nbits);
-}
-
-#define nodes_shift_left(dst, src, n) \
- __nodes_shift_left(&(dst), &(src), (n), MAX_NUMNODES)
-static inline void __nodes_shift_left(nodemask_t *dstp,
- const nodemask_t *srcp, int n, int nbits)
-{
- bitmap_shift_left(dstp->bits, srcp->bits, n, nbits);
-}
-
-/* FIXME: better would be to fix all architectures to never return
- > MAX_NUMNODES, then the silly min_ts could be dropped. */
-
-#define first_node(src) __first_node(&(src))
-static inline int __first_node(const nodemask_t *srcp)
-{
- return min_t(int, MAX_NUMNODES, find_first_bit(srcp->bits, MAX_NUMNODES));
-}
-
-#define next_node(n, src) __next_node((n), &(src))
-static inline int __next_node(int n, const nodemask_t *srcp)
-{
- return min_t(int,MAX_NUMNODES,find_next_bit(srcp->bits, MAX_NUMNODES, n+1));
-}
-
-#define nodemask_of_node(node) \
-({ \
- typeof(_unused_nodemask_arg_) m; \
- if (sizeof(m) == sizeof(unsigned long)) { \
- m.bits[0] = 1UL<<(node); \
- } else { \
- nodes_clear(m); \
- node_set((node), m); \
- } \
- m; \
-})
-
-#define first_unset_node(mask) __first_unset_node(&(mask))
-static inline int __first_unset_node(const nodemask_t *maskp)
-{
- return min_t(int,MAX_NUMNODES,
- find_first_zero_bit(maskp->bits, MAX_NUMNODES));
-}
-
-#define NODE_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(MAX_NUMNODES)
-
-#if MAX_NUMNODES <= BITS_PER_LONG
-
-#define NODE_MASK_ALL \
-((nodemask_t) { { \
- [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD \
-} })
-
-#else
-
-#define NODE_MASK_ALL \
-((nodemask_t) { { \
- [0 ... BITS_TO_LONGS(MAX_NUMNODES)-2] = ~0UL, \
- [BITS_TO_LONGS(MAX_NUMNODES)-1] = NODE_MASK_LAST_WORD \
-} })
-
-#endif
-
-#define NODE_MASK_NONE \
-((nodemask_t) { { \
- [0 ... BITS_TO_LONGS(MAX_NUMNODES)-1] = 0UL \
-} })
-
-#define nodes_addr(src) ((src).bits)
-
-#define nodemask_scnprintf(buf, len, src) \
- __nodemask_scnprintf((buf), (len), &(src), MAX_NUMNODES)
-static inline int __nodemask_scnprintf(char *buf, int len,
- const nodemask_t *srcp, int nbits)
-{
- return bitmap_scnprintf(buf, len, srcp->bits, nbits);
-}
-
-#define nodemask_parse(ubuf, ulen, dst) \
- __nodemask_parse((ubuf), (ulen), &(dst), MAX_NUMNODES)
-static inline int __nodemask_parse(const char __user *buf, int len,
- nodemask_t *dstp, int nbits)
-{
- return bitmap_parse(buf, len, dstp->bits, nbits);
-}
-
-#define nodelist_scnprintf(buf, len, src) \
- __nodelist_scnprintf((buf), (len), &(src), MAX_NUMNODES)
-static inline int __nodelist_scnprintf(char *buf, int len,
- const nodemask_t *srcp, int nbits)
-{
- return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
-}
-
-#define nodelist_parse(buf, dst) __nodelist_parse((buf), &(dst), MAX_NUMNODES)
-static inline int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits)
-{
- return bitmap_parselist(buf, dstp->bits, nbits);
-}
-
-#define node_remap(oldbit, old, new) \
- __node_remap((oldbit), &(old), &(new), MAX_NUMNODES)
-static inline int __node_remap(int oldbit,
- const nodemask_t *oldp, const nodemask_t *newp, int nbits)
-{
- return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits);
-}
-
-#define nodes_remap(dst, src, old, new) \
- __nodes_remap(&(dst), &(src), &(old), &(new), MAX_NUMNODES)
-static inline void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp,
- const nodemask_t *oldp, const nodemask_t *newp, int nbits)
-{
- bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits);
-}
-
-#if MAX_NUMNODES > 1
-#define for_each_node_mask(node, mask) \
- for ((node) = first_node(mask); \
- (node) < MAX_NUMNODES; \
- (node) = next_node((node), (mask)))
-#else /* MAX_NUMNODES == 1 */
-#define for_each_node_mask(node, mask) \
- if (!nodes_empty(mask)) \
- for ((node) = 0; (node) < 1; (node)++)
-#endif /* MAX_NUMNODES */
-
-/*
- * The following particular system nodemasks and operations
- * on them manage all possible and online nodes.
- */
-
-extern nodemask_t node_online_map;
-extern nodemask_t node_possible_map;
-
-#if MAX_NUMNODES > 1
-#define num_online_nodes() nodes_weight(node_online_map)
-#define num_possible_nodes() nodes_weight(node_possible_map)
-#define node_online(node) node_isset((node), node_online_map)
-#define node_possible(node) node_isset((node), node_possible_map)
-#define first_online_node first_node(node_online_map)
-#define next_online_node(nid) next_node((nid), node_online_map)
-#else
-#define num_online_nodes() 1
-#define num_possible_nodes() 1
-#define node_online(node) ((node) == 0)
-#define node_possible(node) ((node) == 0)
-#define first_online_node 0
-#define next_online_node(nid) (MAX_NUMNODES)
-#endif
-
-#define any_online_node(mask) \
-({ \
- int node; \
- for_each_node_mask(node, (mask)) \
- if (node_online(node)) \
- break; \
- node; \
-})
-
-#define node_set_online(node) set_bit((node), node_online_map.bits)
-#define node_set_offline(node) clear_bit((node), node_online_map.bits)
-
-#define for_each_node(node) for_each_node_mask((node), node_possible_map)
-#define for_each_online_node(node) for_each_node_mask((node), node_online_map)
-
-#endif /* __LINUX_NODEMASK_H */
diff --git a/original/linux/notifier.h b/original/linux/notifier.h
deleted file mode 100644
index 7ff386a..0000000
--- a/original/linux/notifier.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Routines to manage notifier chains for passing status changes to any
- * interested routines. We need this instead of hard coded call lists so
- * that modules can poke their nose into the innards. The network devices
- * needed them so here they are for the rest of you.
- *
- * Alan Cox <Alan.Cox@linux.org>
- */
-
-#ifndef _LINUX_NOTIFIER_H
-#define _LINUX_NOTIFIER_H
-#include <linux/errno.h>
-#include <linux/mutex.h>
-#include <linux/rwsem.h>
-
-/*
- * Notifier chains are of three types:
- *
- * Atomic notifier chains: Chain callbacks run in interrupt/atomic
- * context. Callouts are not allowed to block.
- * Blocking notifier chains: Chain callbacks run in process context.
- * Callouts are allowed to block.
- * Raw notifier chains: There are no restrictions on callbacks,
- * registration, or unregistration. All locking and protection
- * must be provided by the caller.
- *
- * atomic_notifier_chain_register() may be called from an atomic context,
- * but blocking_notifier_chain_register() must be called from a process
- * context. Ditto for the corresponding _unregister() routines.
- *
- * atomic_notifier_chain_unregister() and blocking_notifier_chain_unregister()
- * _must not_ be called from within the call chain.
- */
-
-struct notifier_block {
- int (*notifier_call)(struct notifier_block *, unsigned long, void *);
- struct notifier_block *next;
- int priority;
-};
-
-struct atomic_notifier_head {
- spinlock_t lock;
- struct notifier_block *head;
-};
-
-struct blocking_notifier_head {
- struct rw_semaphore rwsem;
- struct notifier_block *head;
-};
-
-struct raw_notifier_head {
- struct notifier_block *head;
-};
-
-#define ATOMIC_INIT_NOTIFIER_HEAD(name) do { \
- spin_lock_init(&(name)->lock); \
- (name)->head = NULL; \
- } while (0)
-#define BLOCKING_INIT_NOTIFIER_HEAD(name) do { \
- init_rwsem(&(name)->rwsem); \
- (name)->head = NULL; \
- } while (0)
-#define RAW_INIT_NOTIFIER_HEAD(name) do { \
- (name)->head = NULL; \
- } while (0)
-
-#define ATOMIC_NOTIFIER_INIT(name) { \
- .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
- .head = NULL }
-#define BLOCKING_NOTIFIER_INIT(name) { \
- .rwsem = __RWSEM_INITIALIZER((name).rwsem), \
- .head = NULL }
-#define RAW_NOTIFIER_INIT(name) { \
- .head = NULL }
-
-#define ATOMIC_NOTIFIER_HEAD(name) \
- struct atomic_notifier_head name = \
- ATOMIC_NOTIFIER_INIT(name)
-#define BLOCKING_NOTIFIER_HEAD(name) \
- struct blocking_notifier_head name = \
- BLOCKING_NOTIFIER_INIT(name)
-#define RAW_NOTIFIER_HEAD(name) \
- struct raw_notifier_head name = \
- RAW_NOTIFIER_INIT(name)
-
-#ifdef __KERNEL__
-
-extern int atomic_notifier_chain_register(struct atomic_notifier_head *,
- struct notifier_block *);
-extern int blocking_notifier_chain_register(struct blocking_notifier_head *,
- struct notifier_block *);
-extern int raw_notifier_chain_register(struct raw_notifier_head *,
- struct notifier_block *);
-
-extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *,
- struct notifier_block *);
-extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *,
- struct notifier_block *);
-extern int raw_notifier_chain_unregister(struct raw_notifier_head *,
- struct notifier_block *);
-
-extern int atomic_notifier_call_chain(struct atomic_notifier_head *,
- unsigned long val, void *v);
-extern int blocking_notifier_call_chain(struct blocking_notifier_head *,
- unsigned long val, void *v);
-extern int raw_notifier_call_chain(struct raw_notifier_head *,
- unsigned long val, void *v);
-
-#define NOTIFY_DONE 0x0000 /* Don't care */
-#define NOTIFY_OK 0x0001 /* Suits me */
-#define NOTIFY_STOP_MASK 0x8000 /* Don't call further */
-#define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002)
- /* Bad/Veto action */
-/*
- * Clean way to return from the notifier and stop further calls.
- */
-#define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK)
-
-/*
- * Declared notifiers so far. I can imagine quite a few more chains
- * over time (eg laptop power reset chains, reboot chain (to clean
- * device units up), device [un]mount chain, module load/unload chain,
- * low memory chain, screenblank chain (for plug in modular screenblankers)
- * VC switch chains (for loadable kernel svgalib VC switch helpers) etc...
- */
-
-/* netdevice notifier chain */
-#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */
-#define NETDEV_DOWN 0x0002
-#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface
- detected a hardware crash and restarted
- - we can use this eg to kick tcp sessions
- once done */
-#define NETDEV_CHANGE 0x0004 /* Notify device state change */
-#define NETDEV_REGISTER 0x0005
-#define NETDEV_UNREGISTER 0x0006
-#define NETDEV_CHANGEMTU 0x0007
-#define NETDEV_CHANGEADDR 0x0008
-#define NETDEV_GOING_DOWN 0x0009
-#define NETDEV_CHANGENAME 0x000A
-#define NETDEV_FEAT_CHANGE 0x000B
-
-#define SYS_DOWN 0x0001 /* Notify of system down */
-#define SYS_RESTART SYS_DOWN
-#define SYS_HALT 0x0002 /* Notify of system halt */
-#define SYS_POWER_OFF 0x0003 /* Notify of system power off */
-
-#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */
-
-#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */
-#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
-#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
-#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
-#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
-#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_NOTIFIER_H */
diff --git a/original/linux/numa.h b/original/linux/numa.h
deleted file mode 100644
index a31a730..0000000
--- a/original/linux/numa.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _LINUX_NUMA_H
-#define _LINUX_NUMA_H
-
-
-#ifdef CONFIG_NODES_SHIFT
-#define NODES_SHIFT CONFIG_NODES_SHIFT
-#else
-#define NODES_SHIFT 0
-#endif
-
-#define MAX_NUMNODES (1 << NODES_SHIFT)
-
-#endif /* _LINUX_NUMA_H */
diff --git a/original/linux/nvhdcp.h b/original/linux/nvhdcp.h
deleted file mode 100644
index f282ff8..0000000
--- a/original/linux/nvhdcp.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * include/video/nvhdcp.h
- *
- * Copyright (c) 2010-2011, NVIDIA Corporation.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_NVHDCP_H_
-#define _LINUX_NVHDCP_H_
-
-#include <linux/fb.h>
-#include <linux/types.h>
-#include <asm/ioctl.h>
-
-/* maximum receivers and repeaters connected at a time */
-#define TEGRA_NVHDCP_MAX_DEVS 127
-
-/* values for value_flags */
-#define TEGRA_NVHDCP_FLAG_AN 0x0001
-#define TEGRA_NVHDCP_FLAG_AKSV 0x0002
-#define TEGRA_NVHDCP_FLAG_BKSV 0x0004
-#define TEGRA_NVHDCP_FLAG_BSTATUS 0x0008 /* repeater status */
-#define TEGRA_NVHDCP_FLAG_CN 0x0010 /* c_n */
-#define TEGRA_NVHDCP_FLAG_CKSV 0x0020 /* c_ksv */
-#define TEGRA_NVHDCP_FLAG_DKSV 0x0040 /* d_ksv */
-#define TEGRA_NVHDCP_FLAG_KP 0x0080 /* k_prime */
-#define TEGRA_NVHDCP_FLAG_S 0x0100 /* hdcp_status */
-#define TEGRA_NVHDCP_FLAG_CS 0x0200 /* connection state */
-#define TEGRA_NVHDCP_FLAG_V 0x0400
-#define TEGRA_NVHDCP_FLAG_MP 0x0800
-#define TEGRA_NVHDCP_FLAG_BKSVLIST 0x1000
-
-/* values for packet_results */
-#define TEGRA_NVHDCP_RESULT_SUCCESS 0
-#define TEGRA_NVHDCP_RESULT_UNSUCCESSFUL 1
-#define TEGRA_NVHDCP_RESULT_PENDING 0x103
-#define TEGRA_NVHDCP_RESULT_LINK_FAILED 0xc0000013
-/* TODO: replace with -EINVAL */
-#define TEGRA_NVHDCP_RESULT_INVALID_PARAMETER 0xc000000d
-#define TEGRA_NVHDCP_RESULT_INVALID_PARAMETER_MIX 0xc0000030
-/* TODO: replace with -ENOMEM */
-#define TEGRA_NVHDCP_RESULT_NO_MEMORY 0xc0000017
-
-struct tegra_nvhdcp_packet {
- __u32 value_flags; // (IN/OUT)
- __u32 packet_results; // (OUT)
-
- __u64 c_n; // (IN) upstream exchange number
- __u64 c_ksv; // (IN)
-
- __u32 b_status; // (OUT) link/repeater status
- __u64 hdcp_status; // (OUT) READ_S
- __u64 cs; // (OUT) Connection State
-
- __u64 k_prime; // (OUT)
- __u64 a_n; // (OUT)
- __u64 a_ksv; // (OUT)
- __u64 b_ksv; // (OUT)
- __u64 d_ksv; // (OUT)
- __u8 v_prime[20]; // (OUT) 160-bit
- __u64 m_prime; // (OUT)
-
- // (OUT) Valid KSVs in the bKsvList. Maximum is 127 devices
- __u32 num_bksv_list;
-
- // (OUT) Up to 127 receivers & repeaters
- __u64 bksv_list[TEGRA_NVHDCP_MAX_DEVS];
-};
-
-/* parameters to TEGRAIO_NVHDCP_SET_POLICY */
-#define TEGRA_NVHDCP_POLICY_ON_DEMAND 0
-#define TEGRA_NVHDCP_POLICY_ALWAYS_ON 1
-
-/* ioctls */
-#define TEGRAIO_NVHDCP_ON _IO('F', 0x70)
-#define TEGRAIO_NVHDCP_OFF _IO('F', 0x71)
-#define TEGRAIO_NVHDCP_SET_POLICY _IOW('F', 0x72, __u32)
-#define TEGRAIO_NVHDCP_READ_M _IOWR('F', 0x73, struct tegra_nvhdcp_packet)
-#define TEGRAIO_NVHDCP_READ_S _IOWR('F', 0x74, struct tegra_nvhdcp_packet)
-#define TEGRAIO_NVHDCP_RENEGOTIATE _IO('F', 0x75)
-
-#endif
diff --git a/original/linux/nvram.h b/original/linux/nvram.h
deleted file mode 100644
index 9189829..0000000
--- a/original/linux/nvram.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef _LINUX_NVRAM_H
-#define _LINUX_NVRAM_H
-
-#include <linux/ioctl.h>
-
-/* /dev/nvram ioctls */
-#define NVRAM_INIT _IO('p', 0x40) /* initialize NVRAM and set checksum */
-#define NVRAM_SETCKS _IO('p', 0x41) /* recalculate checksum */
-
-/* for all current systems, this is where NVRAM starts */
-#define NVRAM_FIRST_BYTE 14
-/* all these functions expect an NVRAM offset, not an absolute */
-#define NVRAM_OFFSET(x) ((x)-NVRAM_FIRST_BYTE)
-
-#ifdef __KERNEL__
-/* __foo is foo without grabbing the rtc_lock - get it yourself */
-extern unsigned char __nvram_read_byte(int i);
-extern unsigned char nvram_read_byte(int i);
-extern void __nvram_write_byte(unsigned char c, int i);
-extern void nvram_write_byte(unsigned char c, int i);
-extern int __nvram_check_checksum(void);
-extern int nvram_check_checksum(void);
-#endif
-
-#endif /* _LINUX_NVRAM_H */
diff --git a/original/linux/omap_csmi.h b/original/linux/omap_csmi.h
deleted file mode 100644
index 7946088..0000000
--- a/original/linux/omap_csmi.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* linux/omap_csmi.h
-**
-** Copyright 2005-2006, The Android Open Source Project
-** Author: Arve Hjønnevåg
-**
-** This file is dual licensed. It may be redistributed and/or modified
-** under the terms of the Apache 2.0 License OR version 2 of the GNU
-** General Public License.
-*/
-
-#ifndef _OMAP_CSMI_H_
-#define _OMAP_CSMI_H_
-
-#include <asm/ioctl.h>
-
-#ifdef __KERNEL__
-
-typedef struct {
- uint32_t cmd;
- uint32_t arg1;
- uint32_t arg2;
- uint32_t arg3;
-} omap_csmi_gc_command_t;
-
-typedef struct {
- void (*ack)(int mailbox);
- int (*data)(int mailbox);
- void (*reset)(int mailbox);
- void (*start)(int mailbox);
- void (*stop)(int mailbox);
-} omap_csmi_mailbox_handlers_t;
-
-extern uint8_t *omap_csmi_gsm_data_vaddr;
-
-#define SEND_FLAG_NO_ACK_AFTER_SEND 1
-#define SEND_FLAG_REQEST_ACK_IF_BUSY 2
-
-typedef struct {
- uint32_t magic; // 0-3 0x494d5347
- uint32_t header_size; // 4-7 64
- uint8_t mailbox_size; // 8 8 or 16
- uint8_t num_channels; // 9 2-15
- uint8_t gc_channel; // 10
- uint8_t debug_channel; // 11
- uint16_t stream_channel_mask; // 12-13
- uint16_t pad; // 14-15
- char vendor_code[16]; // 16-31
- char product_code[16]; // 32-47
- uint32_t version; // 48-51
- uint32_t ffs_location; // 52-55
- uint32_t ffs_size; // 56-59 0 or size
- char vendor_data[20]; // 60-79
-} omap_csmi_gsm_image_info_t;
-// in platform_device->platform_data where platform_device->name == "omap-csmi"
-
-#define OMAP_GSM_IMAGE_HEADER_MAGIC 0x494d5347 /* GSMI */
-
-struct sysdev_class *omap_csmi_get_sysclass(void);
-unsigned short omap_csmi_get_vendor_boot_flags(void);
-int omap_csmi_gc_command(const omap_csmi_gc_command_t *command, int timeout, omap_csmi_gc_command_t *reply);
-int omap_csmi_send_mailbox(int mailbox, void *data, size_t size, unsigned int flags);
-void omap_csmi_read_mailbox(int mailbox, void *data, size_t size);
-int omap_csmi_install_mailbox_handlers(int mailbox, omap_csmi_mailbox_handlers_t handlers);
-int omap_csmi_uninstall_mailbox_handlers(int mailbox, omap_csmi_mailbox_handlers_t handlers);
-
-//mailbox channel 1 commands
-
-#define GC_DSP_PLL_REQ 0x0001
-#define GC_ARM_PLL_REQ 0x0002
-#define GC_READ_MEM_REQ 0x0003
-#define GC_SET_MEM_REQ 0x0004
-#define GC_SERIAL_CONFIG_REQ 0x0005
-#define GC_RESET_REQ 0x0006
-#define GC_SW_VERSION_REQ 0x0007
-#define GC_HW_VERSION_REQ 0x0008
-#define GC_SLEEP_REQ 0x0009
-#define GC_IRQ_REQ 0x000A
-#define GC_BATTERY_STATUS_REQ 0x0011
-#define GC_AUDIO_VOICE_REQ 0x0012
-#define GC_AUDIO_VOICEBANDCTL_REQ 0x0013
-#define GC_AUDIO_OUTPUTCTL_REQ 0x0014
-#define GC_AUDIO_SIDETONE_REQ 0x0015
-#define GC_AUDIO_ECHOCANC_REQ 0x0016
-#define GC_AUDIO_STEREO_CODEC_REQ 0x0017
-#define GC_AUDIO_PGA_REQ 0x0018
-#define GC_AUDIO_PROFILE_LOAD_REQ 0x0019
-#define GC_FFS_INIT_RESTORE_REQ 0x0020
-#define GC_FFS_RESTORE_REQ 0x0021
-#define GC_FFS_BACKUP_REQ 0x0022
-#define GC_DAR_GET_INFO_REQ 0x0023
-#define GC_AMR_RECORD_START_REQ 0x0030
-#define GC_AMR_RECORD_STOP_REQ 0x0031
-#define GC_AMR_PLAY_START_REQ 0x0032
-#define GC_AMR_PLAY_STOP_REQ 0x0033
-#define GC_AMR_GET_STATUS_REQ 0x0034
-#define GC_AMR_PURGE_PLAY_BUFFER_REQ 0x0035
-#define GC_ABB_REGISTER_REQ 0x0040
-#define GC_AUDIO_ENHECHOCANC_REQ 0x0041
-
-#define GC_READ_MEM_RES 0x1000
-#define GC_SW_VERSION_RES 0x1001
-#define GC_HW_VERSION_RES 0x1002
-#define GC_BATTERY_STATUS_RES 0x1005
-#define GC_AUDIO_VOICEBANDCTL_RES 0x1006
-#define GC_AUDIO_OUTPUTCTL_RES 0x1007
-#define GC_AUDIO_STEREO_CODEC_RES 0x1008
-#define GC_AUDIO_PROFILE_LOAD_RES 0x1019
-#define GC_FFS_INIT_RESTORE_RES 0x1020
-#define GC_FFS_BACKUP_RES 0x1022
-#define GC_DAR_GET_INFO_RES 0x1023
-#define GC_AMR_RECORD_START_RES 0x1030
-#define GC_AMR_RECORD_STOP_RES 0x1031
-#define GC_AMR_PLAY_START_RES 0x1032
-#define GC_AMR_PLAY_STOP_RES 0x1033
-#define GC_AMR_GET_STATUS_RES 0x1034
-#define GC_ABB_REGISTER_RES 0x1040
-
-#endif
-
-/* tty ioctls */
-
-#define OMAP_CSMI_TTY_ENABLE_ACK _IO('c', 0)
-#define OMAP_CSMI_TTY_DISABLE_ACK _IO('c', 1)
-#define OMAP_CSMI_TTY_READ_UNACKED _IOR('c', 2, int)
-#define OMAP_CSMI_TTY_ACK _IOW('c', 3, int)
-#define OMAP_CSMI_TTY_WAKEUP_AND_ACK _IOW('c', 4, int)
-
-#endif
diff --git a/original/linux/omap_ion.h b/original/linux/omap_ion.h
deleted file mode 100644
index ba505eb..0000000
--- a/original/linux/omap_ion.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * include/linux/omap_ion.h
- *
- * Copyright (C) 2011 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_OMAP_ION_H
-#define _LINUX_OMAP_ION_H
-
-#include <linux/types.h>
-
-/**
- * struct omap_ion_tiler_alloc_data - metadata passed from userspace for allocations
- * @w: width of the allocation
- * @h: height of the allocation
- * @fmt: format of the data (8, 16, 32bit or page)
- * @flags: flags passed to heap
- * @stride: stride of the allocation, returned to caller from kernel
- * @handle: pointer that will be populated with a cookie to use to refer
- * to this allocation
- *
- * Provided by userspace as an argument to the ioctl
- */
-struct omap_ion_tiler_alloc_data {
- size_t w;
- size_t h;
- int fmt;
- unsigned int flags;
- struct ion_handle *handle;
- size_t stride;
- size_t offset;
-};
-
-#ifdef __KERNEL__
-int omap_ion_tiler_alloc(struct ion_client *client,
- struct omap_ion_tiler_alloc_data *data);
-/* given a handle in the tiler, return a list of tiler pages that back it */
-int omap_tiler_pages(struct ion_client *client, struct ion_handle *handle,
- int *n, u32 ** tiler_pages);
-#endif /* __KERNEL__ */
-
-/* additional heaps used only on omap */
-enum {
- OMAP_ION_HEAP_TYPE_TILER = ION_HEAP_TYPE_CUSTOM + 1,
-};
-
-#define OMAP_ION_HEAP_TILER_MASK (1 << OMAP_ION_HEAP_TYPE_TILER)
-
-enum {
- OMAP_ION_TILER_ALLOC,
-};
-
-/**
- * These should match the defines in the tiler driver
- */
-enum {
- TILER_PIXEL_FMT_MIN = 0,
- TILER_PIXEL_FMT_8BIT = 0,
- TILER_PIXEL_FMT_16BIT = 1,
- TILER_PIXEL_FMT_32BIT = 2,
- TILER_PIXEL_FMT_PAGE = 3,
- TILER_PIXEL_FMT_MAX = 3
-};
-
-/**
- * List of heaps in the system
- */
-enum {
- OMAP_ION_HEAP_LARGE_SURFACES,
- OMAP_ION_HEAP_TILER,
- OMAP_ION_HEAP_SECURE_INPUT,
-};
-
-#endif /* _LINUX_ION_H */
-
diff --git a/original/linux/pagemap.h b/original/linux/pagemap.h
deleted file mode 100644
index 0a2f5d2..0000000
--- a/original/linux/pagemap.h
+++ /dev/null
@@ -1,216 +0,0 @@
-#ifndef _LINUX_PAGEMAP_H
-#define _LINUX_PAGEMAP_H
-
-/*
- * Copyright 1995 Linus Torvalds
- */
-#include <linux/mm.h>
-#include <linux/fs.h>
-#include <linux/list.h>
-#include <linux/highmem.h>
-#include <linux/compiler.h>
-#include <asm/uaccess.h>
-#include <linux/gfp.h>
-
-/*
- * Bits in mapping->flags. The lower __GFP_BITS_SHIFT bits are the page
- * allocation mode flags.
- */
-#define AS_EIO (__GFP_BITS_SHIFT + 0) /* IO error on async write */
-#define AS_ENOSPC (__GFP_BITS_SHIFT + 1) /* ENOSPC on async write */
-
-static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
-{
- return (__force gfp_t)mapping->flags & __GFP_BITS_MASK;
-}
-
-/*
- * This is non-atomic. Only to be used before the mapping is activated.
- * Probably needs a barrier...
- */
-static inline void mapping_set_gfp_mask(struct address_space *m, gfp_t mask)
-{
- m->flags = (m->flags & ~(__force unsigned long)__GFP_BITS_MASK) |
- (__force unsigned long)mask;
-}
-
-/*
- * The page cache can done in larger chunks than
- * one page, because it allows for more efficient
- * throughput (it can then be mapped into user
- * space in smaller chunks for same flexibility).
- *
- * Or rather, it _will_ be done in larger chunks.
- */
-#define PAGE_CACHE_SHIFT PAGE_SHIFT
-#define PAGE_CACHE_SIZE PAGE_SIZE
-#define PAGE_CACHE_MASK PAGE_MASK
-#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)
-
-#define page_cache_get(page) get_page(page)
-#define page_cache_release(page) put_page(page)
-void release_pages(struct page **pages, int nr, int cold);
-
-#ifdef CONFIG_NUMA
-extern struct page *page_cache_alloc(struct address_space *x);
-extern struct page *page_cache_alloc_cold(struct address_space *x);
-#else
-static inline struct page *page_cache_alloc(struct address_space *x)
-{
- return alloc_pages(mapping_gfp_mask(x), 0);
-}
-
-static inline struct page *page_cache_alloc_cold(struct address_space *x)
-{
- return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0);
-}
-#endif
-
-typedef int filler_t(void *, struct page *);
-
-extern struct page * find_get_page(struct address_space *mapping,
- unsigned long index);
-extern struct page * find_lock_page(struct address_space *mapping,
- unsigned long index);
-extern __deprecated_for_modules struct page * find_trylock_page(
- struct address_space *mapping, unsigned long index);
-extern struct page * find_or_create_page(struct address_space *mapping,
- unsigned long index, gfp_t gfp_mask);
-unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
- unsigned int nr_pages, struct page **pages);
-unsigned find_get_pages_contig(struct address_space *mapping, pgoff_t start,
- unsigned int nr_pages, struct page **pages);
-unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
- int tag, unsigned int nr_pages, struct page **pages);
-
-/*
- * Returns locked page at given index in given cache, creating it if needed.
- */
-static inline struct page *grab_cache_page(struct address_space *mapping, unsigned long index)
-{
- return find_or_create_page(mapping, index, mapping_gfp_mask(mapping));
-}
-
-extern struct page * grab_cache_page_nowait(struct address_space *mapping,
- unsigned long index);
-extern struct page * read_cache_page(struct address_space *mapping,
- unsigned long index, filler_t *filler,
- void *data);
-extern int read_cache_pages(struct address_space *mapping,
- struct list_head *pages, filler_t *filler, void *data);
-
-static inline struct page *read_mapping_page(struct address_space *mapping,
- unsigned long index, void *data)
-{
- filler_t *filler = (filler_t *)mapping->a_ops->readpage;
- return read_cache_page(mapping, index, filler, data);
-}
-
-int add_to_page_cache(struct page *page, struct address_space *mapping,
- unsigned long index, gfp_t gfp_mask);
-int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
- unsigned long index, gfp_t gfp_mask);
-extern void remove_from_page_cache(struct page *page);
-extern void __remove_from_page_cache(struct page *page);
-
-/*
- * Return byte-offset into filesystem object for page.
- */
-static inline loff_t page_offset(struct page *page)
-{
- return ((loff_t)page->index) << PAGE_CACHE_SHIFT;
-}
-
-static inline pgoff_t linear_page_index(struct vm_area_struct *vma,
- unsigned long address)
-{
- pgoff_t pgoff = (address - vma->vm_start) >> PAGE_SHIFT;
- pgoff += vma->vm_pgoff;
- return pgoff >> (PAGE_CACHE_SHIFT - PAGE_SHIFT);
-}
-
-extern void FASTCALL(__lock_page(struct page *page));
-extern void FASTCALL(unlock_page(struct page *page));
-
-static inline void lock_page(struct page *page)
-{
- might_sleep();
- if (TestSetPageLocked(page))
- __lock_page(page);
-}
-
-/*
- * This is exported only for wait_on_page_locked/wait_on_page_writeback.
- * Never use this directly!
- */
-extern void FASTCALL(wait_on_page_bit(struct page *page, int bit_nr));
-
-/*
- * Wait for a page to be unlocked.
- *
- * This must be called with the caller "holding" the page,
- * ie with increased "page->count" so that the page won't
- * go away during the wait..
- */
-static inline void wait_on_page_locked(struct page *page)
-{
- if (PageLocked(page))
- wait_on_page_bit(page, PG_locked);
-}
-
-/*
- * Wait for a page to complete writeback
- */
-static inline void wait_on_page_writeback(struct page *page)
-{
- if (PageWriteback(page))
- wait_on_page_bit(page, PG_writeback);
-}
-
-extern void end_page_writeback(struct page *page);
-
-/*
- * Fault a userspace page into pagetables. Return non-zero on a fault.
- *
- * This assumes that two userspace pages are always sufficient. That's
- * not true if PAGE_CACHE_SIZE > PAGE_SIZE.
- */
-static inline int fault_in_pages_writeable(char __user *uaddr, int size)
-{
- int ret;
-
- /*
- * Writing zeroes into userspace here is OK, because we know that if
- * the zero gets there, we'll be overwriting it.
- */
- ret = __put_user(0, uaddr);
- if (ret == 0) {
- char __user *end = uaddr + size - 1;
-
- /*
- * If the page was already mapped, this will get a cache miss
- * for sure, so try to avoid doing it.
- */
- if (((unsigned long)uaddr & PAGE_MASK) !=
- ((unsigned long)end & PAGE_MASK))
- ret = __put_user(0, end);
- }
- return ret;
-}
-
-static inline void fault_in_pages_readable(const char __user *uaddr, int size)
-{
- volatile char c;
- int ret;
-
- ret = __get_user(c, uaddr);
- if (ret == 0) {
- const char __user *end = uaddr + size - 1;
-
- if (((unsigned long)uaddr & PAGE_MASK) !=
- ((unsigned long)end & PAGE_MASK))
- __get_user(c, end);
- }
-}
-
-#endif /* _LINUX_PAGEMAP_H */
diff --git a/original/linux/param.h b/original/linux/param.h
deleted file mode 100644
index 092e92f..0000000
--- a/original/linux/param.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _LINUX_PARAM_H
-#define _LINUX_PARAM_H
-
-#include <asm/param.h>
-
-#endif
diff --git a/original/linux/patchkey.h b/original/linux/patchkey.h
deleted file mode 100644
index d974a6e..0000000
--- a/original/linux/patchkey.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * <linux/patchkey.h> -- definition of _PATCHKEY macro
- *
- * Copyright (C) 2005 Stuart Brady
- *
- * This exists because awe_voice.h defined its own _PATCHKEY and it wasn't
- * clear whether removing this would break anything in userspace.
- *
- * Do not include this file directly. Please use <sys/soundcard.h> instead.
- * For kernel code, use <linux/soundcard.h>
- */
-
-#ifndef _LINUX_PATCHKEY_H_INDIRECT
-#error "patchkey.h included directly"
-#endif
-
-#ifndef _LINUX_PATCHKEY_H
-#define _LINUX_PATCHKEY_H
-
-/* Endian macros. */
-#ifdef __KERNEL__
-# include <asm/byteorder.h>
-#else
-# include <endian.h>
-#endif
-
-#if defined(__KERNEL__)
-# if defined(__BIG_ENDIAN)
-# define _PATCHKEY(id) (0xfd00|id)
-# elif defined(__LITTLE_ENDIAN)
-# define _PATCHKEY(id) ((id<<8)|0x00fd)
-# else
-# error "could not determine byte order"
-# endif
-#elif defined(__BYTE_ORDER)
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define _PATCHKEY(id) (0xfd00|id)
-# elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define _PATCHKEY(id) ((id<<8)|0x00fd)
-# else
-# error "could not determine byte order"
-# endif
-#endif
-
-#endif /* _LINUX_PATCHKEY_H */
diff --git a/original/linux/pci.h b/original/linux/pci.h
deleted file mode 100644
index 8565b81..0000000
--- a/original/linux/pci.h
+++ /dev/null
@@ -1,791 +0,0 @@
-/*
- * pci.h
- *
- * PCI defines and function prototypes
- * Copyright 1994, Drew Eckhardt
- * Copyright 1997--1999 Martin Mares <mj@ucw.cz>
- *
- * For more information, please consult the following manuals (look at
- * http://www.pcisig.com/ for how to get them):
- *
- * PCI BIOS Specification
- * PCI Local Bus Specification
- * PCI to PCI Bridge Specification
- * PCI System Design Guide
- */
-
-#ifndef LINUX_PCI_H
-#define LINUX_PCI_H
-
-/* Include the pci register defines */
-#include <linux/pci_regs.h>
-
-/* Include the ID list */
-#include <linux/pci_ids.h>
-
-/*
- * The PCI interface treats multi-function devices as independent
- * devices. The slot/function address of each device is encoded
- * in a single byte as follows:
- *
- * 7:3 = slot
- * 2:0 = function
- */
-#define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
-#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
-#define PCI_FUNC(devfn) ((devfn) & 0x07)
-
-/* Ioctls for /proc/bus/pci/X/Y nodes. */
-#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8)
-#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */
-#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */
-#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */
-#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
-
-#ifdef __KERNEL__
-
-#include <linux/mod_devicetable.h>
-
-#include <linux/types.h>
-#include <linux/ioport.h>
-#include <linux/list.h>
-#include <linux/errno.h>
-#include <linux/device.h>
-
-/* File state for mmap()s on /proc/bus/pci/X/Y */
-enum pci_mmap_state {
- pci_mmap_io,
- pci_mmap_mem
-};
-
-/* This defines the direction arg to the DMA mapping routines. */
-#define PCI_DMA_BIDIRECTIONAL 0
-#define PCI_DMA_TODEVICE 1
-#define PCI_DMA_FROMDEVICE 2
-#define PCI_DMA_NONE 3
-
-#define DEVICE_COUNT_COMPATIBLE 4
-#define DEVICE_COUNT_RESOURCE 12
-
-typedef int __bitwise pci_power_t;
-
-#define PCI_D0 ((pci_power_t __force) 0)
-#define PCI_D1 ((pci_power_t __force) 1)
-#define PCI_D2 ((pci_power_t __force) 2)
-#define PCI_D3hot ((pci_power_t __force) 3)
-#define PCI_D3cold ((pci_power_t __force) 4)
-#define PCI_UNKNOWN ((pci_power_t __force) 5)
-#define PCI_POWER_ERROR ((pci_power_t __force) -1)
-
-/** The pci_channel state describes connectivity between the CPU and
- * the pci device. If some PCI bus between here and the pci device
- * has crashed or locked up, this info is reflected here.
- */
-typedef unsigned int __bitwise pci_channel_state_t;
-
-enum pci_channel_state {
- /* I/O channel is in normal state */
- pci_channel_io_normal = (__force pci_channel_state_t) 1,
-
- /* I/O to channel is blocked */
- pci_channel_io_frozen = (__force pci_channel_state_t) 2,
-
- /* PCI card is dead */
- pci_channel_io_perm_failure = (__force pci_channel_state_t) 3,
-};
-
-typedef unsigned short __bitwise pci_bus_flags_t;
-enum pci_bus_flags {
- PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
-};
-
-struct pci_cap_saved_state {
- struct hlist_node next;
- char cap_nr;
- u32 data[0];
-};
-
-/*
- * The pci_dev structure is used to describe PCI devices.
- */
-struct pci_dev {
- struct list_head global_list; /* node in list of all PCI devices */
- struct list_head bus_list; /* node in per-bus list */
- struct pci_bus *bus; /* bus this device is on */
- struct pci_bus *subordinate; /* bus this device bridges to */
-
- void *sysdata; /* hook for sys-specific extension */
- struct proc_dir_entry *procent; /* device entry in /proc/bus/pci */
-
- unsigned int devfn; /* encoded device & function index */
- unsigned short vendor;
- unsigned short device;
- unsigned short subsystem_vendor;
- unsigned short subsystem_device;
- unsigned int class; /* 3 bytes: (base,sub,prog-if) */
- u8 hdr_type; /* PCI header type (`multi' flag masked out) */
- u8 rom_base_reg; /* which config register controls the ROM */
- u8 pin; /* which interrupt pin this device uses */
-
- struct pci_driver *driver; /* which driver has allocated this device */
- u64 dma_mask; /* Mask of the bits of bus address this
- device implements. Normally this is
- 0xffffffff. You only need to change
- this if your device has broken DMA
- or supports 64-bit transfers. */
-
- pci_power_t current_state; /* Current operating state. In ACPI-speak,
- this is D0-D3, D0 being fully functional,
- and D3 being off. */
-
- pci_channel_state_t error_state; /* current connectivity state */
- struct device dev; /* Generic device interface */
-
- /* device is compatible with these IDs */
- unsigned short vendor_compatible[DEVICE_COUNT_COMPATIBLE];
- unsigned short device_compatible[DEVICE_COUNT_COMPATIBLE];
-
- int cfg_size; /* Size of configuration space */
-
- /*
- * Instead of touching interrupt line and base address registers
- * directly, use the values stored here. They might be different!
- */
- unsigned int irq;
- struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
-
- /* These fields are used by common fixups */
- unsigned int transparent:1; /* Transparent PCI bridge */
- unsigned int multifunction:1;/* Part of multi-function device */
- /* keep track of device state */
- unsigned int is_enabled:1; /* pci_enable_device has been called */
- unsigned int is_busmaster:1; /* device is busmaster */
- unsigned int no_msi:1; /* device may not use msi */
- unsigned int no_d1d2:1; /* only allow d0 or d3 */
- unsigned int block_ucfg_access:1; /* userspace config space access is blocked */
- unsigned int broken_parity_status:1; /* Device generates false positive parity */
- unsigned int msi_enabled:1;
- unsigned int msix_enabled:1;
-
- u32 saved_config_space[16]; /* config space saved at suspend time */
- struct hlist_head saved_cap_space;
- struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */
- int rom_attr_enabled; /* has display of the rom attribute been enabled? */
- struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */
-};
-
-#define pci_dev_g(n) list_entry(n, struct pci_dev, global_list)
-#define pci_dev_b(n) list_entry(n, struct pci_dev, bus_list)
-#define to_pci_dev(n) container_of(n, struct pci_dev, dev)
-#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
-
-static inline struct pci_cap_saved_state *pci_find_saved_cap(
- struct pci_dev *pci_dev,char cap)
-{
- struct pci_cap_saved_state *tmp;
- struct hlist_node *pos;
-
- hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
- if (tmp->cap_nr == cap)
- return tmp;
- }
- return NULL;
-}
-
-static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
- struct pci_cap_saved_state *new_cap)
-{
- hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
-}
-
-static inline void pci_remove_saved_cap(struct pci_cap_saved_state *cap)
-{
- hlist_del(&cap->next);
-}
-
-/*
- * For PCI devices, the region numbers are assigned this way:
- *
- * 0-5 standard PCI regions
- * 6 expansion ROM
- * 7-10 bridges: address space assigned to buses behind the bridge
- */
-
-#define PCI_ROM_RESOURCE 6
-#define PCI_BRIDGE_RESOURCES 7
-#define PCI_NUM_RESOURCES 11
-
-#ifndef PCI_BUS_NUM_RESOURCES
-#define PCI_BUS_NUM_RESOURCES 8
-#endif
-
-#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */
-
-struct pci_bus {
- struct list_head node; /* node in list of buses */
- struct pci_bus *parent; /* parent bus this bridge is on */
- struct list_head children; /* list of child buses */
- struct list_head devices; /* list of devices on this bus */
- struct pci_dev *self; /* bridge device as seen by parent */
- struct resource *resource[PCI_BUS_NUM_RESOURCES];
- /* address space routed to this bus */
-
- struct pci_ops *ops; /* configuration access functions */
- void *sysdata; /* hook for sys-specific extension */
- struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */
-
- unsigned char number; /* bus number */
- unsigned char primary; /* number of primary bridge */
- unsigned char secondary; /* number of secondary bridge */
- unsigned char subordinate; /* max number of subordinate buses */
-
- char name[48];
-
- unsigned short bridge_ctl; /* manage NO_ISA/FBB/et al behaviors */
- pci_bus_flags_t bus_flags; /* Inherited by child busses */
- struct device *bridge;
- struct class_device class_dev;
- struct bin_attribute *legacy_io; /* legacy I/O for this bus */
- struct bin_attribute *legacy_mem; /* legacy mem */
-};
-
-#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
-#define to_pci_bus(n) container_of(n, struct pci_bus, class_dev)
-
-/*
- * Error values that may be returned by PCI functions.
- */
-#define PCIBIOS_SUCCESSFUL 0x00
-#define PCIBIOS_FUNC_NOT_SUPPORTED 0x81
-#define PCIBIOS_BAD_VENDOR_ID 0x83
-#define PCIBIOS_DEVICE_NOT_FOUND 0x86
-#define PCIBIOS_BAD_REGISTER_NUMBER 0x87
-#define PCIBIOS_SET_FAILED 0x88
-#define PCIBIOS_BUFFER_TOO_SMALL 0x89
-
-/* Low-level architecture-dependent routines */
-
-struct pci_ops {
- int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val);
- int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val);
-};
-
-struct pci_raw_ops {
- int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn,
- int reg, int len, u32 *val);
- int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn,
- int reg, int len, u32 val);
-};
-
-extern struct pci_raw_ops *raw_pci_ops;
-
-struct pci_bus_region {
- unsigned long start;
- unsigned long end;
-};
-
-struct pci_dynids {
- spinlock_t lock; /* protects list, index */
- struct list_head list; /* for IDs added at runtime */
- unsigned int use_driver_data:1; /* pci_driver->driver_data is used */
-};
-
-/* ---------------------------------------------------------------- */
-/** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides
- * a set fof callbacks in struct pci_error_handlers, then that device driver
- * will be notified of PCI bus errors, and will be driven to recovery
- * when an error occurs.
- */
-
-typedef unsigned int __bitwise pci_ers_result_t;
-
-enum pci_ers_result {
- /* no result/none/not supported in device driver */
- PCI_ERS_RESULT_NONE = (__force pci_ers_result_t) 1,
-
- /* Device driver can recover without slot reset */
- PCI_ERS_RESULT_CAN_RECOVER = (__force pci_ers_result_t) 2,
-
- /* Device driver wants slot to be reset. */
- PCI_ERS_RESULT_NEED_RESET = (__force pci_ers_result_t) 3,
-
- /* Device has completely failed, is unrecoverable */
- PCI_ERS_RESULT_DISCONNECT = (__force pci_ers_result_t) 4,
-
- /* Device driver is fully recovered and operational */
- PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5,
-};
-
-/* PCI bus error event callbacks */
-struct pci_error_handlers
-{
- /* PCI bus error detected on this device */
- pci_ers_result_t (*error_detected)(struct pci_dev *dev,
- enum pci_channel_state error);
-
- /* MMIO has been re-enabled, but not DMA */
- pci_ers_result_t (*mmio_enabled)(struct pci_dev *dev);
-
- /* PCI Express link has been reset */
- pci_ers_result_t (*link_reset)(struct pci_dev *dev);
-
- /* PCI slot has been reset */
- pci_ers_result_t (*slot_reset)(struct pci_dev *dev);
-
- /* Device driver may resume normal operations */
- void (*resume)(struct pci_dev *dev);
-};
-
-/* ---------------------------------------------------------------- */
-
-struct module;
-struct pci_driver {
- struct list_head node;
- char *name;
- const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */
- int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
- void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
- int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */
- int (*resume) (struct pci_dev *dev); /* Device woken up */
- int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */
- void (*shutdown) (struct pci_dev *dev);
-
- struct pci_error_handlers *err_handler;
- struct device_driver driver;
- struct pci_dynids dynids;
-};
-
-#define to_pci_driver(drv) container_of(drv,struct pci_driver, driver)
-
-/**
- * PCI_DEVICE - macro used to describe a specific pci device
- * @vend: the 16 bit PCI Vendor ID
- * @dev: the 16 bit PCI Device ID
- *
- * This macro is used to create a struct pci_device_id that matches a
- * specific device. The subvendor and subdevice fields will be set to
- * PCI_ANY_ID.
- */
-#define PCI_DEVICE(vend,dev) \
- .vendor = (vend), .device = (dev), \
- .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
-
-/**
- * PCI_DEVICE_CLASS - macro used to describe a specific pci device class
- * @dev_class: the class, subclass, prog-if triple for this device
- * @dev_class_mask: the class mask for this device
- *
- * This macro is used to create a struct pci_device_id that matches a
- * specific PCI class. The vendor, device, subvendor, and subdevice
- * fields will be set to PCI_ANY_ID.
- */
-#define PCI_DEVICE_CLASS(dev_class,dev_class_mask) \
- .class = (dev_class), .class_mask = (dev_class_mask), \
- .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
- .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
-
-/*
- * pci_module_init is obsolete, this stays here till we fix up all usages of it
- * in the tree.
- */
-#define pci_module_init pci_register_driver
-
-/* these external functions are only available when PCI support is enabled */
-#ifdef CONFIG_PCI
-
-extern struct bus_type pci_bus_type;
-
-/* Do NOT directly access these two variables, unless you are arch specific pci
- * code, or pci core code. */
-extern struct list_head pci_root_buses; /* list of all known PCI buses */
-extern struct list_head pci_devices; /* list of all devices */
-
-void pcibios_fixup_bus(struct pci_bus *);
-int pcibios_enable_device(struct pci_dev *, int mask);
-char *pcibios_setup (char *str);
-
-/* Used only when drivers/pci/setup.c is used */
-void pcibios_align_resource(void *, struct resource *, resource_size_t,
- resource_size_t);
-void pcibios_update_irq(struct pci_dev *, int irq);
-
-/* Generic PCI functions used internally */
-
-extern struct pci_bus *pci_find_bus(int domain, int busnr);
-void pci_bus_add_devices(struct pci_bus *bus);
-struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata);
-static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata)
-{
- struct pci_bus *root_bus;
- root_bus = pci_scan_bus_parented(NULL, bus, ops, sysdata);
- if (root_bus)
- pci_bus_add_devices(root_bus);
- return root_bus;
-}
-struct pci_bus *pci_create_bus(struct device *parent, int bus, struct pci_ops *ops, void *sysdata);
-struct pci_bus * pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr);
-int pci_scan_slot(struct pci_bus *bus, int devfn);
-struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn);
-void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
-unsigned int pci_scan_child_bus(struct pci_bus *bus);
-void pci_bus_add_device(struct pci_dev *dev);
-void pci_read_bridge_bases(struct pci_bus *child);
-struct resource *pci_find_parent_resource(const struct pci_dev *dev, struct resource *res);
-int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
-extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
-extern void pci_dev_put(struct pci_dev *dev);
-extern void pci_remove_bus(struct pci_bus *b);
-extern void pci_remove_bus_device(struct pci_dev *dev);
-void pci_setup_cardbus(struct pci_bus *bus);
-
-/* Generic PCI functions exported to card drivers */
-
-struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
-struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from);
-struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
-int pci_find_capability (struct pci_dev *dev, int cap);
-int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
-int pci_find_ext_capability (struct pci_dev *dev, int cap);
-struct pci_bus * pci_find_next_bus(const struct pci_bus *from);
-
-struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from);
-struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
- unsigned int ss_vendor, unsigned int ss_device,
- struct pci_dev *from);
-struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn);
-struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from);
-int pci_dev_present(const struct pci_device_id *ids);
-
-int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
-int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val);
-int pci_bus_read_config_dword (struct pci_bus *bus, unsigned int devfn, int where, u32 *val);
-int pci_bus_write_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 val);
-int pci_bus_write_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 val);
-int pci_bus_write_config_dword (struct pci_bus *bus, unsigned int devfn, int where, u32 val);
-
-static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
-{
- return pci_bus_read_config_byte (dev->bus, dev->devfn, where, val);
-}
-static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val)
-{
- return pci_bus_read_config_word (dev->bus, dev->devfn, where, val);
-}
-static inline int pci_read_config_dword(struct pci_dev *dev, int where, u32 *val)
-{
- return pci_bus_read_config_dword (dev->bus, dev->devfn, where, val);
-}
-static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val)
-{
- return pci_bus_write_config_byte (dev->bus, dev->devfn, where, val);
-}
-static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val)
-{
- return pci_bus_write_config_word (dev->bus, dev->devfn, where, val);
-}
-static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val)
-{
- return pci_bus_write_config_dword (dev->bus, dev->devfn, where, val);
-}
-
-int pci_enable_device(struct pci_dev *dev);
-int pci_enable_device_bars(struct pci_dev *dev, int mask);
-void pci_disable_device(struct pci_dev *dev);
-void pci_set_master(struct pci_dev *dev);
-#define HAVE_PCI_SET_MWI
-int pci_set_mwi(struct pci_dev *dev);
-void pci_clear_mwi(struct pci_dev *dev);
-void pci_intx(struct pci_dev *dev, int enable);
-int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
-int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
-void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
-int pci_assign_resource(struct pci_dev *dev, int i);
-int pci_assign_resource_fixed(struct pci_dev *dev, int i);
-void pci_restore_bars(struct pci_dev *dev);
-
-/* ROM control related routines */
-void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
-void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size);
-void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
-void pci_remove_rom(struct pci_dev *pdev);
-
-/* Power management related routines */
-int pci_save_state(struct pci_dev *dev);
-int pci_restore_state(struct pci_dev *dev);
-int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
-pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
-int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
-
-/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
-void pci_bus_assign_resources(struct pci_bus *bus);
-void pci_bus_size_bridges(struct pci_bus *bus);
-int pci_claim_resource(struct pci_dev *, int);
-void pci_assign_unassigned_resources(void);
-void pdev_enable_device(struct pci_dev *);
-void pdev_sort_resources(struct pci_dev *, struct resource_list *);
-void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
- int (*)(struct pci_dev *, u8, u8));
-#define HAVE_PCI_REQ_REGIONS 2
-int pci_request_regions(struct pci_dev *, const char *);
-void pci_release_regions(struct pci_dev *);
-int pci_request_region(struct pci_dev *, int, const char *);
-void pci_release_region(struct pci_dev *, int);
-
-/* drivers/pci/bus.c */
-int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
- resource_size_t size, resource_size_t align,
- resource_size_t min, unsigned int type_mask,
- void (*alignf)(void *, struct resource *,
- resource_size_t, resource_size_t),
- void *alignf_data);
-void pci_enable_bridges(struct pci_bus *bus);
-
-/* Proper probing supporting hot-pluggable devices */
-int __pci_register_driver(struct pci_driver *, struct module *);
-static inline int pci_register_driver(struct pci_driver *driver)
-{
- return __pci_register_driver(driver, THIS_MODULE);
-}
-
-void pci_unregister_driver(struct pci_driver *);
-void pci_remove_behind_bridge(struct pci_dev *);
-struct pci_driver *pci_dev_driver(const struct pci_dev *);
-const struct pci_device_id *pci_match_device(struct pci_driver *drv, struct pci_dev *dev);
-const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, struct pci_dev *dev);
-int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass);
-
-void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *),
- void *userdata);
-int pci_cfg_space_size(struct pci_dev *dev);
-unsigned char pci_bus_max_busnr(struct pci_bus* bus);
-
-/* kmem_cache style wrapper around pci_alloc_consistent() */
-
-#include <linux/dmapool.h>
-
-#define pci_pool dma_pool
-#define pci_pool_create(name, pdev, size, align, allocation) \
- dma_pool_create(name, &pdev->dev, size, align, allocation)
-#define pci_pool_destroy(pool) dma_pool_destroy(pool)
-#define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
-#define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
-
-enum pci_dma_burst_strategy {
- PCI_DMA_BURST_INFINITY, /* make bursts as large as possible,
- strategy_parameter is N/A */
- PCI_DMA_BURST_BOUNDARY, /* disconnect at every strategy_parameter
- byte boundaries */
- PCI_DMA_BURST_MULTIPLE, /* disconnect at some multiple of
- strategy_parameter byte boundaries */
-};
-
-#if defined(CONFIG_ISA) || defined(CONFIG_EISA)
-extern struct pci_dev *isa_bridge;
-#endif
-
-struct msix_entry {
- u16 vector; /* kernel uses to write allocated vector */
- u16 entry; /* driver uses to specify entry, OS writes */
-};
-
-#ifndef CONFIG_PCI_MSI
-static inline void pci_scan_msi_device(struct pci_dev *dev) {}
-static inline int pci_enable_msi(struct pci_dev *dev) {return -1;}
-static inline void pci_disable_msi(struct pci_dev *dev) {}
-static inline int pci_enable_msix(struct pci_dev* dev,
- struct msix_entry *entries, int nvec) {return -1;}
-static inline void pci_disable_msix(struct pci_dev *dev) {}
-static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
-#else
-extern void pci_scan_msi_device(struct pci_dev *dev);
-extern int pci_enable_msi(struct pci_dev *dev);
-extern void pci_disable_msi(struct pci_dev *dev);
-extern int pci_enable_msix(struct pci_dev* dev,
- struct msix_entry *entries, int nvec);
-extern void pci_disable_msix(struct pci_dev *dev);
-extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
-#endif
-
-extern void pci_block_user_cfg_access(struct pci_dev *dev);
-extern void pci_unblock_user_cfg_access(struct pci_dev *dev);
-
-/*
- * PCI domain support. Sometimes called PCI segment (eg by ACPI),
- * a PCI domain is defined to be a set of PCI busses which share
- * configuration space.
- */
-#ifndef CONFIG_PCI_DOMAINS
-static inline int pci_domain_nr(struct pci_bus *bus) { return 0; }
-static inline int pci_proc_domain(struct pci_bus *bus)
-{
- return 0;
-}
-#endif
-
-#else /* CONFIG_PCI is not enabled */
-
-/*
- * If the system does not have PCI, clearly these return errors. Define
- * these as simple inline functions to avoid hair in drivers.
- */
-
-#define _PCI_NOP(o,s,t) \
- static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \
- { return PCIBIOS_FUNC_NOT_SUPPORTED; }
-#define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \
- _PCI_NOP(o,word,u16 x) \
- _PCI_NOP(o,dword,u32 x)
-_PCI_NOP_ALL(read, *)
-_PCI_NOP_ALL(write,)
-
-static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev *from)
-{ return NULL; }
-
-static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn)
-{ return NULL; }
-
-static inline struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from)
-{ return NULL; }
-
-static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
-unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from)
-{ return NULL; }
-
-static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from)
-{ return NULL; }
-
-#define pci_dev_present(ids) (0)
-#define pci_dev_put(dev) do { } while (0)
-
-static inline void pci_set_master(struct pci_dev *dev) { }
-static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; }
-static inline void pci_disable_device(struct pci_dev *dev) { }
-static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
-static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
-static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;}
-static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
-static inline void pci_unregister_driver(struct pci_driver *drv) { }
-static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }
-static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; }
-static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; }
-static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; }
-
-/* Power management related routines */
-static inline int pci_save_state(struct pci_dev *dev) { return 0; }
-static inline int pci_restore_state(struct pci_dev *dev) { return 0; }
-static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; }
-static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; }
-static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; }
-
-#define isa_bridge ((struct pci_dev *)NULL)
-
-#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
-
-static inline void pci_block_user_cfg_access(struct pci_dev *dev) { }
-static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) { }
-
-#endif /* CONFIG_PCI */
-
-/* Include architecture-dependent settings and functions */
-
-#include <asm/pci.h>
-
-/* these helpers provide future and backwards compatibility
- * for accessing popular PCI BAR info */
-#define pci_resource_start(dev,bar) ((dev)->resource[(bar)].start)
-#define pci_resource_end(dev,bar) ((dev)->resource[(bar)].end)
-#define pci_resource_flags(dev,bar) ((dev)->resource[(bar)].flags)
-#define pci_resource_len(dev,bar) \
- ((pci_resource_start((dev),(bar)) == 0 && \
- pci_resource_end((dev),(bar)) == \
- pci_resource_start((dev),(bar))) ? 0 : \
- \
- (pci_resource_end((dev),(bar)) - \
- pci_resource_start((dev),(bar)) + 1))
-
-/* Similar to the helpers above, these manipulate per-pci_dev
- * driver-specific data. They are really just a wrapper around
- * the generic device structure functions of these calls.
- */
-static inline void *pci_get_drvdata (struct pci_dev *pdev)
-{
- return dev_get_drvdata(&pdev->dev);
-}
-
-static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
-{
- dev_set_drvdata(&pdev->dev, data);
-}
-
-/* If you want to know what to call your pci_dev, ask this function.
- * Again, it's a wrapper around the generic device.
- */
-static inline char *pci_name(struct pci_dev *pdev)
-{
- return pdev->dev.bus_id;
-}
-
-
-/* Some archs don't want to expose struct resource to userland as-is
- * in sysfs and /proc
- */
-#ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
-static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
- const struct resource *rsrc, resource_size_t *start,
- resource_size_t *end)
-{
- *start = rsrc->start;
- *end = rsrc->end;
-}
-#endif /* HAVE_ARCH_PCI_RESOURCE_TO_USER */
-
-
-/*
- * The world is not perfect and supplies us with broken PCI devices.
- * For at least a part of these bugs we need a work-around, so both
- * generic (drivers/pci/quirks.c) and per-architecture code can define
- * fixup hooks to be called for particular buggy devices.
- */
-
-struct pci_fixup {
- u16 vendor, device; /* You can use PCI_ANY_ID here of course */
- void (*hook)(struct pci_dev *dev);
-};
-
-enum pci_fixup_pass {
- pci_fixup_early, /* Before probing BARs */
- pci_fixup_header, /* After reading configuration header */
- pci_fixup_final, /* Final phase of device fixups */
- pci_fixup_enable, /* pci_enable_device() time */
-};
-
-/* Anonymous variables would be nice... */
-#define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook) \
- static const struct pci_fixup __pci_fixup_##name __attribute_used__ \
- __attribute__((__section__(#section))) = { vendor, device, hook };
-#define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook) \
- DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early, \
- vendor##device##hook, vendor, device, hook)
-#define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook) \
- DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header, \
- vendor##device##hook, vendor, device, hook)
-#define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook) \
- DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final, \
- vendor##device##hook, vendor, device, hook)
-#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \
- DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \
- vendor##device##hook, vendor, device, hook)
-
-
-void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
-
-extern int pci_pci_problems;
-#define PCIPCI_FAIL 1
-#define PCIPCI_TRITON 2
-#define PCIPCI_NATOMA 4
-#define PCIPCI_VIAETBF 8
-#define PCIPCI_VSFX 16
-#define PCIPCI_ALIMAGIK 32
-
-#endif /* __KERNEL__ */
-#endif /* LINUX_PCI_H */
diff --git a/original/linux/pci_ids.h b/original/linux/pci_ids.h
deleted file mode 100644
index 7a24915..0000000
--- a/original/linux/pci_ids.h
+++ /dev/null
@@ -1,2331 +0,0 @@
-/*
- * PCI Class, Vendor and Device IDs
- *
- * Please keep sorted.
- */
-
-/* Device classes and subclasses */
-
-#define PCI_CLASS_NOT_DEFINED 0x0000
-#define PCI_CLASS_NOT_DEFINED_VGA 0x0001
-
-#define PCI_BASE_CLASS_STORAGE 0x01
-#define PCI_CLASS_STORAGE_SCSI 0x0100
-#define PCI_CLASS_STORAGE_IDE 0x0101
-#define PCI_CLASS_STORAGE_FLOPPY 0x0102
-#define PCI_CLASS_STORAGE_IPI 0x0103
-#define PCI_CLASS_STORAGE_RAID 0x0104
-#define PCI_CLASS_STORAGE_SAS 0x0107
-#define PCI_CLASS_STORAGE_OTHER 0x0180
-
-#define PCI_BASE_CLASS_NETWORK 0x02
-#define PCI_CLASS_NETWORK_ETHERNET 0x0200
-#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201
-#define PCI_CLASS_NETWORK_FDDI 0x0202
-#define PCI_CLASS_NETWORK_ATM 0x0203
-#define PCI_CLASS_NETWORK_OTHER 0x0280
-
-#define PCI_BASE_CLASS_DISPLAY 0x03
-#define PCI_CLASS_DISPLAY_VGA 0x0300
-#define PCI_CLASS_DISPLAY_XGA 0x0301
-#define PCI_CLASS_DISPLAY_3D 0x0302
-#define PCI_CLASS_DISPLAY_OTHER 0x0380
-
-#define PCI_BASE_CLASS_MULTIMEDIA 0x04
-#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400
-#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401
-#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402
-#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480
-
-#define PCI_BASE_CLASS_MEMORY 0x05
-#define PCI_CLASS_MEMORY_RAM 0x0500
-#define PCI_CLASS_MEMORY_FLASH 0x0501
-#define PCI_CLASS_MEMORY_OTHER 0x0580
-
-#define PCI_BASE_CLASS_BRIDGE 0x06
-#define PCI_CLASS_BRIDGE_HOST 0x0600
-#define PCI_CLASS_BRIDGE_ISA 0x0601
-#define PCI_CLASS_BRIDGE_EISA 0x0602
-#define PCI_CLASS_BRIDGE_MC 0x0603
-#define PCI_CLASS_BRIDGE_PCI 0x0604
-#define PCI_CLASS_BRIDGE_PCMCIA 0x0605
-#define PCI_CLASS_BRIDGE_NUBUS 0x0606
-#define PCI_CLASS_BRIDGE_CARDBUS 0x0607
-#define PCI_CLASS_BRIDGE_RACEWAY 0x0608
-#define PCI_CLASS_BRIDGE_OTHER 0x0680
-
-#define PCI_BASE_CLASS_COMMUNICATION 0x07
-#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700
-#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
-#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702
-#define PCI_CLASS_COMMUNICATION_MODEM 0x0703
-#define PCI_CLASS_COMMUNICATION_OTHER 0x0780
-
-#define PCI_BASE_CLASS_SYSTEM 0x08
-#define PCI_CLASS_SYSTEM_PIC 0x0800
-#define PCI_CLASS_SYSTEM_PIC_IOAPIC 0x080010
-#define PCI_CLASS_SYSTEM_PIC_IOXAPIC 0x080020
-#define PCI_CLASS_SYSTEM_DMA 0x0801
-#define PCI_CLASS_SYSTEM_TIMER 0x0802
-#define PCI_CLASS_SYSTEM_RTC 0x0803
-#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804
-#define PCI_CLASS_SYSTEM_SDHCI 0x0805
-#define PCI_CLASS_SYSTEM_OTHER 0x0880
-
-#define PCI_BASE_CLASS_INPUT 0x09
-#define PCI_CLASS_INPUT_KEYBOARD 0x0900
-#define PCI_CLASS_INPUT_PEN 0x0901
-#define PCI_CLASS_INPUT_MOUSE 0x0902
-#define PCI_CLASS_INPUT_SCANNER 0x0903
-#define PCI_CLASS_INPUT_GAMEPORT 0x0904
-#define PCI_CLASS_INPUT_OTHER 0x0980
-
-#define PCI_BASE_CLASS_DOCKING 0x0a
-#define PCI_CLASS_DOCKING_GENERIC 0x0a00
-#define PCI_CLASS_DOCKING_OTHER 0x0a80
-
-#define PCI_BASE_CLASS_PROCESSOR 0x0b
-#define PCI_CLASS_PROCESSOR_386 0x0b00
-#define PCI_CLASS_PROCESSOR_486 0x0b01
-#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02
-#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10
-#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20
-#define PCI_CLASS_PROCESSOR_MIPS 0x0b30
-#define PCI_CLASS_PROCESSOR_CO 0x0b40
-
-#define PCI_BASE_CLASS_SERIAL 0x0c
-#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00
-#define PCI_CLASS_SERIAL_ACCESS 0x0c01
-#define PCI_CLASS_SERIAL_SSA 0x0c02
-#define PCI_CLASS_SERIAL_USB 0x0c03
-#define PCI_CLASS_SERIAL_USB_UHCI 0x0c0300
-#define PCI_CLASS_SERIAL_USB_OHCI 0x0c0310
-#define PCI_CLASS_SERIAL_USB_EHCI 0x0c0320
-#define PCI_CLASS_SERIAL_FIBER 0x0c04
-#define PCI_CLASS_SERIAL_SMBUS 0x0c05
-
-#define PCI_BASE_CLASS_INTELLIGENT 0x0e
-#define PCI_CLASS_INTELLIGENT_I2O 0x0e00
-
-#define PCI_BASE_CLASS_SATELLITE 0x0f
-#define PCI_CLASS_SATELLITE_TV 0x0f00
-#define PCI_CLASS_SATELLITE_AUDIO 0x0f01
-#define PCI_CLASS_SATELLITE_VOICE 0x0f03
-#define PCI_CLASS_SATELLITE_DATA 0x0f04
-
-#define PCI_BASE_CLASS_CRYPT 0x10
-#define PCI_CLASS_CRYPT_NETWORK 0x1000
-#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001
-#define PCI_CLASS_CRYPT_OTHER 0x1080
-
-#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11
-#define PCI_CLASS_SP_DPIO 0x1100
-#define PCI_CLASS_SP_OTHER 0x1180
-
-#define PCI_CLASS_OTHERS 0xff
-
-/* Vendors and devices. Sort key: vendor first, device next. */
-
-#define PCI_VENDOR_ID_DYNALINK 0x0675
-#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702
-
-#define PCI_VENDOR_ID_BERKOM 0x0871
-#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1
-#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2
-#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4
-#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8
-
-#define PCI_VENDOR_ID_COMPAQ 0x0e11
-#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508
-#define PCI_DEVICE_ID_COMPAQ_TACHYON 0xa0fc
-#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10
-#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32
-#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34
-#define PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE 0xae33
-#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35
-#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40
-#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43
-#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011
-#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060
-#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178
-#define PCI_DEVICE_ID_COMPAQ_CISSC 0x46
-#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130
-#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150
-
-#define PCI_VENDOR_ID_NCR 0x1000
-#define PCI_VENDOR_ID_LSI_LOGIC 0x1000
-#define PCI_DEVICE_ID_NCR_53C810 0x0001
-#define PCI_DEVICE_ID_NCR_53C820 0x0002
-#define PCI_DEVICE_ID_NCR_53C825 0x0003
-#define PCI_DEVICE_ID_NCR_53C815 0x0004
-#define PCI_DEVICE_ID_LSI_53C810AP 0x0005
-#define PCI_DEVICE_ID_NCR_53C860 0x0006
-#define PCI_DEVICE_ID_LSI_53C1510 0x000a
-#define PCI_DEVICE_ID_NCR_53C896 0x000b
-#define PCI_DEVICE_ID_NCR_53C895 0x000c
-#define PCI_DEVICE_ID_NCR_53C885 0x000d
-#define PCI_DEVICE_ID_NCR_53C875 0x000f
-#define PCI_DEVICE_ID_NCR_53C1510 0x0010
-#define PCI_DEVICE_ID_LSI_53C895A 0x0012
-#define PCI_DEVICE_ID_LSI_53C875A 0x0013
-#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020
-#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021
-#define PCI_DEVICE_ID_LSI_53C1030 0x0030
-#define PCI_DEVICE_ID_LSI_1030_53C1035 0x0032
-#define PCI_DEVICE_ID_LSI_53C1035 0x0040
-#define PCI_DEVICE_ID_NCR_53C875J 0x008f
-#define PCI_DEVICE_ID_LSI_FC909 0x0621
-#define PCI_DEVICE_ID_LSI_FC929 0x0622
-#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623
-#define PCI_DEVICE_ID_LSI_FC919 0x0624
-#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625
-#define PCI_DEVICE_ID_LSI_FC929X 0x0626
-#define PCI_DEVICE_ID_LSI_FC939X 0x0642
-#define PCI_DEVICE_ID_LSI_FC949X 0x0640
-#define PCI_DEVICE_ID_LSI_FC949ES 0x0646
-#define PCI_DEVICE_ID_LSI_FC919X 0x0628
-#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701
-#define PCI_DEVICE_ID_LSI_61C102 0x0901
-#define PCI_DEVICE_ID_LSI_63C815 0x1000
-#define PCI_DEVICE_ID_LSI_SAS1064 0x0050
-#define PCI_DEVICE_ID_LSI_SAS1064R 0x0411
-#define PCI_DEVICE_ID_LSI_SAS1066 0x005E
-#define PCI_DEVICE_ID_LSI_SAS1068 0x0054
-#define PCI_DEVICE_ID_LSI_SAS1064A 0x005C
-#define PCI_DEVICE_ID_LSI_SAS1064E 0x0056
-#define PCI_DEVICE_ID_LSI_SAS1066E 0x005A
-#define PCI_DEVICE_ID_LSI_SAS1068E 0x0058
-#define PCI_DEVICE_ID_LSI_SAS1078 0x0060
-
-#define PCI_VENDOR_ID_ATI 0x1002
-/* Mach64 */
-#define PCI_DEVICE_ID_ATI_68800 0x4158
-#define PCI_DEVICE_ID_ATI_215CT222 0x4354
-#define PCI_DEVICE_ID_ATI_210888CX 0x4358
-#define PCI_DEVICE_ID_ATI_215ET222 0x4554
-/* Mach64 / Rage */
-#define PCI_DEVICE_ID_ATI_215GB 0x4742
-#define PCI_DEVICE_ID_ATI_215GD 0x4744
-#define PCI_DEVICE_ID_ATI_215GI 0x4749
-#define PCI_DEVICE_ID_ATI_215GP 0x4750
-#define PCI_DEVICE_ID_ATI_215GQ 0x4751
-#define PCI_DEVICE_ID_ATI_215XL 0x4752
-#define PCI_DEVICE_ID_ATI_215GT 0x4754
-#define PCI_DEVICE_ID_ATI_215GTB 0x4755
-#define PCI_DEVICE_ID_ATI_215_IV 0x4756
-#define PCI_DEVICE_ID_ATI_215_IW 0x4757
-#define PCI_DEVICE_ID_ATI_215_IZ 0x475A
-#define PCI_DEVICE_ID_ATI_210888GX 0x4758
-#define PCI_DEVICE_ID_ATI_215_LB 0x4c42
-#define PCI_DEVICE_ID_ATI_215_LD 0x4c44
-#define PCI_DEVICE_ID_ATI_215_LG 0x4c47
-#define PCI_DEVICE_ID_ATI_215_LI 0x4c49
-#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D
-#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E
-#define PCI_DEVICE_ID_ATI_215_LR 0x4c52
-#define PCI_DEVICE_ID_ATI_215_LS 0x4c53
-#define PCI_DEVICE_ID_ATI_264_LT 0x4c54
-/* Mach64 VT */
-#define PCI_DEVICE_ID_ATI_264VT 0x5654
-#define PCI_DEVICE_ID_ATI_264VU 0x5655
-#define PCI_DEVICE_ID_ATI_264VV 0x5656
-/* Rage128 GL */
-#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245
-#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246
-#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x5247
-/* Rage128 VR */
-#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b
-#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c
-#define PCI_DEVICE_ID_ATI_RAGE128_SE 0x5345
-#define PCI_DEVICE_ID_ATI_RAGE128_SF 0x5346
-#define PCI_DEVICE_ID_ATI_RAGE128_SG 0x5347
-#define PCI_DEVICE_ID_ATI_RAGE128_SH 0x5348
-#define PCI_DEVICE_ID_ATI_RAGE128_SK 0x534b
-#define PCI_DEVICE_ID_ATI_RAGE128_SL 0x534c
-#define PCI_DEVICE_ID_ATI_RAGE128_SM 0x534d
-#define PCI_DEVICE_ID_ATI_RAGE128_SN 0x534e
-/* Rage128 Ultra */
-#define PCI_DEVICE_ID_ATI_RAGE128_TF 0x5446
-#define PCI_DEVICE_ID_ATI_RAGE128_TL 0x544c
-#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452
-#define PCI_DEVICE_ID_ATI_RAGE128_TS 0x5453
-#define PCI_DEVICE_ID_ATI_RAGE128_TT 0x5454
-#define PCI_DEVICE_ID_ATI_RAGE128_TU 0x5455
-/* Rage128 M3 */
-#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45
-#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46
-/* Rage128 M4 */
-#define PCI_DEVICE_ID_ATI_RAGE128_MF 0x4d46
-#define PCI_DEVICE_ID_ATI_RAGE128_ML 0x4d4c
-/* Rage128 Pro GL */
-#define PCI_DEVICE_ID_ATI_RAGE128_PA 0x5041
-#define PCI_DEVICE_ID_ATI_RAGE128_PB 0x5042
-#define PCI_DEVICE_ID_ATI_RAGE128_PC 0x5043
-#define PCI_DEVICE_ID_ATI_RAGE128_PD 0x5044
-#define PCI_DEVICE_ID_ATI_RAGE128_PE 0x5045
-#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046
-/* Rage128 Pro VR */
-#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047
-#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048
-#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049
-#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A
-#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B
-#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C
-#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D
-#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E
-#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F
-#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050
-#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051
-#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052
-#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053
-#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054
-#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055
-#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056
-#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057
-#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058
-/* Rage128 M4 */
-/* Radeon R100 */
-#define PCI_DEVICE_ID_ATI_RADEON_QD 0x5144
-#define PCI_DEVICE_ID_ATI_RADEON_QE 0x5145
-#define PCI_DEVICE_ID_ATI_RADEON_QF 0x5146
-#define PCI_DEVICE_ID_ATI_RADEON_QG 0x5147
-/* Radeon RV100 (VE) */
-#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159
-#define PCI_DEVICE_ID_ATI_RADEON_QZ 0x515a
-/* Radeon R200 (8500) */
-#define PCI_DEVICE_ID_ATI_RADEON_QL 0x514c
-#define PCI_DEVICE_ID_ATI_RADEON_QN 0x514e
-#define PCI_DEVICE_ID_ATI_RADEON_QO 0x514f
-#define PCI_DEVICE_ID_ATI_RADEON_Ql 0x516c
-#define PCI_DEVICE_ID_ATI_RADEON_BB 0x4242
-/* Radeon R200 (9100) */
-#define PCI_DEVICE_ID_ATI_RADEON_QM 0x514d
-/* Radeon RV200 (7500) */
-#define PCI_DEVICE_ID_ATI_RADEON_QW 0x5157
-#define PCI_DEVICE_ID_ATI_RADEON_QX 0x5158
-/* Radeon NV-100 */
-/* Radeon RV250 (9000) */
-#define PCI_DEVICE_ID_ATI_RADEON_Id 0x4964
-#define PCI_DEVICE_ID_ATI_RADEON_Ie 0x4965
-#define PCI_DEVICE_ID_ATI_RADEON_If 0x4966
-#define PCI_DEVICE_ID_ATI_RADEON_Ig 0x4967
-/* Radeon RV280 (9200) */
-#define PCI_DEVICE_ID_ATI_RADEON_Ya 0x5961
-#define PCI_DEVICE_ID_ATI_RADEON_Yd 0x5964
-/* Radeon R300 (9500) */
-/* Radeon R300 (9700) */
-#define PCI_DEVICE_ID_ATI_RADEON_ND 0x4e44
-#define PCI_DEVICE_ID_ATI_RADEON_NE 0x4e45
-#define PCI_DEVICE_ID_ATI_RADEON_NF 0x4e46
-#define PCI_DEVICE_ID_ATI_RADEON_NG 0x4e47
-/* Radeon R350 (9800) */
-/* Radeon RV350 (9600) */
-/* Radeon M6 */
-#define PCI_DEVICE_ID_ATI_RADEON_LY 0x4c59
-#define PCI_DEVICE_ID_ATI_RADEON_LZ 0x4c5a
-/* Radeon M7 */
-#define PCI_DEVICE_ID_ATI_RADEON_LW 0x4c57
-#define PCI_DEVICE_ID_ATI_RADEON_LX 0x4c58
-/* Radeon M9 */
-#define PCI_DEVICE_ID_ATI_RADEON_Ld 0x4c64
-#define PCI_DEVICE_ID_ATI_RADEON_Le 0x4c65
-#define PCI_DEVICE_ID_ATI_RADEON_Lf 0x4c66
-#define PCI_DEVICE_ID_ATI_RADEON_Lg 0x4c67
-/* Radeon */
-/* RadeonIGP */
-#define PCI_DEVICE_ID_ATI_RS100 0xcab0
-#define PCI_DEVICE_ID_ATI_RS200 0xcab2
-#define PCI_DEVICE_ID_ATI_RS200_B 0xcbb2
-#define PCI_DEVICE_ID_ATI_RS250 0xcab3
-#define PCI_DEVICE_ID_ATI_RS300_100 0x5830
-#define PCI_DEVICE_ID_ATI_RS300_133 0x5831
-#define PCI_DEVICE_ID_ATI_RS300_166 0x5832
-#define PCI_DEVICE_ID_ATI_RS300_200 0x5833
-#define PCI_DEVICE_ID_ATI_RS350_100 0x7830
-#define PCI_DEVICE_ID_ATI_RS350_133 0x7831
-#define PCI_DEVICE_ID_ATI_RS350_166 0x7832
-#define PCI_DEVICE_ID_ATI_RS350_200 0x7833
-#define PCI_DEVICE_ID_ATI_RS400_100 0x5a30
-#define PCI_DEVICE_ID_ATI_RS400_133 0x5a31
-#define PCI_DEVICE_ID_ATI_RS400_166 0x5a32
-#define PCI_DEVICE_ID_ATI_RS400_200 0x5a33
-#define PCI_DEVICE_ID_ATI_RS480 0x5950
-/* ATI IXP Chipset */
-#define PCI_DEVICE_ID_ATI_IXP200_IDE 0x4349
-#define PCI_DEVICE_ID_ATI_IXP200_SMBUS 0x4353
-#define PCI_DEVICE_ID_ATI_IXP300_SMBUS 0x4363
-#define PCI_DEVICE_ID_ATI_IXP300_IDE 0x4369
-#define PCI_DEVICE_ID_ATI_IXP300_SATA 0x436e
-#define PCI_DEVICE_ID_ATI_IXP400_SMBUS 0x4372
-#define PCI_DEVICE_ID_ATI_IXP400_IDE 0x4376
-#define PCI_DEVICE_ID_ATI_IXP400_SATA 0x4379
-#define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a
-#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
-#define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
-#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
-
-#define PCI_VENDOR_ID_VLSI 0x1004
-#define PCI_DEVICE_ID_VLSI_82C592 0x0005
-#define PCI_DEVICE_ID_VLSI_82C593 0x0006
-#define PCI_DEVICE_ID_VLSI_82C594 0x0007
-#define PCI_DEVICE_ID_VLSI_82C597 0x0009
-#define PCI_DEVICE_ID_VLSI_82C541 0x000c
-#define PCI_DEVICE_ID_VLSI_82C543 0x000d
-#define PCI_DEVICE_ID_VLSI_82C532 0x0101
-#define PCI_DEVICE_ID_VLSI_82C534 0x0102
-#define PCI_DEVICE_ID_VLSI_82C535 0x0104
-#define PCI_DEVICE_ID_VLSI_82C147 0x0105
-#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702
-
-#define PCI_VENDOR_ID_ADL 0x1005
-#define PCI_DEVICE_ID_ADL_2301 0x2301
-
-#define PCI_VENDOR_ID_NS 0x100b
-#define PCI_DEVICE_ID_NS_87415 0x0002
-#define PCI_DEVICE_ID_NS_87560_LIO 0x000e
-#define PCI_DEVICE_ID_NS_87560_USB 0x0012
-#define PCI_DEVICE_ID_NS_83815 0x0020
-#define PCI_DEVICE_ID_NS_83820 0x0022
-#define PCI_DEVICE_ID_NS_CS5535_ISA 0x002b
-#define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d
-#define PCI_DEVICE_ID_NS_CS5535_AUDIO 0x002e
-#define PCI_DEVICE_ID_NS_CS5535_USB 0x002f
-#define PCI_DEVICE_ID_NS_CS5535_VIDEO 0x0030
-#define PCI_DEVICE_ID_NS_SATURN 0x0035
-#define PCI_DEVICE_ID_NS_SCx200_BRIDGE 0x0500
-#define PCI_DEVICE_ID_NS_SCx200_SMI 0x0501
-#define PCI_DEVICE_ID_NS_SCx200_IDE 0x0502
-#define PCI_DEVICE_ID_NS_SCx200_AUDIO 0x0503
-#define PCI_DEVICE_ID_NS_SCx200_VIDEO 0x0504
-#define PCI_DEVICE_ID_NS_SCx200_XBUS 0x0505
-#define PCI_DEVICE_ID_NS_SC1100_BRIDGE 0x0510
-#define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511
-#define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515
-#define PCI_DEVICE_ID_NS_87410 0xd001
-
-#define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028
-#define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b
-
-#define PCI_VENDOR_ID_TSENG 0x100c
-#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202
-#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205
-#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206
-#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207
-#define PCI_DEVICE_ID_TSENG_ET6000 0x3208
-
-#define PCI_VENDOR_ID_WEITEK 0x100e
-#define PCI_DEVICE_ID_WEITEK_P9000 0x9001
-#define PCI_DEVICE_ID_WEITEK_P9100 0x9100
-
-#define PCI_VENDOR_ID_DEC 0x1011
-#define PCI_DEVICE_ID_DEC_BRD 0x0001
-#define PCI_DEVICE_ID_DEC_TULIP 0x0002
-#define PCI_DEVICE_ID_DEC_TGA 0x0004
-#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009
-#define PCI_DEVICE_ID_DEC_TGA2 0x000D
-#define PCI_DEVICE_ID_DEC_FDDI 0x000F
-#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014
-#define PCI_DEVICE_ID_DEC_21142 0x0019
-#define PCI_DEVICE_ID_DEC_21052 0x0021
-#define PCI_DEVICE_ID_DEC_21150 0x0022
-#define PCI_DEVICE_ID_DEC_21152 0x0024
-#define PCI_DEVICE_ID_DEC_21153 0x0025
-#define PCI_DEVICE_ID_DEC_21154 0x0026
-#define PCI_DEVICE_ID_DEC_21285 0x1065
-#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046
-
-#define PCI_VENDOR_ID_CIRRUS 0x1013
-#define PCI_DEVICE_ID_CIRRUS_7548 0x0038
-#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0
-#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4
-#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8
-#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac
-#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8
-#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc
-#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0
-#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4
-#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6
-#define PCI_DEVICE_ID_CIRRUS_6729 0x1100
-#define PCI_DEVICE_ID_CIRRUS_6832 0x1110
-#define PCI_DEVICE_ID_CIRRUS_7543 0x1202
-#define PCI_DEVICE_ID_CIRRUS_4610 0x6001
-#define PCI_DEVICE_ID_CIRRUS_4612 0x6003
-#define PCI_DEVICE_ID_CIRRUS_4615 0x6004
-
-#define PCI_VENDOR_ID_IBM 0x1014
-#define PCI_DEVICE_ID_IBM_TR 0x0018
-#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e
-#define PCI_DEVICE_ID_IBM_CPC710_PCI64 0x00fc
-#define PCI_DEVICE_ID_IBM_SNIPE 0x0180
-#define PCI_DEVICE_ID_IBM_CITRINE 0x028C
-#define PCI_DEVICE_ID_IBM_GEMSTONE 0xB166
-#define PCI_DEVICE_ID_IBM_OBSIDIAN 0x02BD
-#define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_1 0x0031
-#define PCI_DEVICE_ID_IBM_ICOM_DEV_ID_2 0x0219
-#define PCI_DEVICE_ID_IBM_ICOM_V2_TWO_PORTS_RVX 0x021A
-#define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM 0x0251
-#define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252
-
-#define PCI_VENDOR_ID_COMPEX2 0x101a /* pci.ids says "AT&T GIS (NCR)" */
-#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005
-
-#define PCI_VENDOR_ID_WD 0x101c
-#define PCI_DEVICE_ID_WD_90C 0xc24a
-
-#define PCI_VENDOR_ID_AMI 0x101e
-#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960
-#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010
-#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060
-
-#define PCI_VENDOR_ID_AMD 0x1022
-#define PCI_DEVICE_ID_AMD_K8_NB 0x1100
-#define PCI_DEVICE_ID_AMD_LANCE 0x2000
-#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
-#define PCI_DEVICE_ID_AMD_SCSI 0x2020
-#define PCI_DEVICE_ID_AMD_SERENADE 0x36c0
-#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006
-#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007
-#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C
-#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E
-#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401
-#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409
-#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B
-#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410
-#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411
-#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413
-#define PCI_DEVICE_ID_AMD_VIPER_7440 0x7440
-#define PCI_DEVICE_ID_AMD_OPUS_7441 0x7441
-#define PCI_DEVICE_ID_AMD_OPUS_7443 0x7443
-#define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443
-#define PCI_DEVICE_ID_AMD_OPUS_7445 0x7445
-#define PCI_DEVICE_ID_AMD_8111_LPC 0x7468
-#define PCI_DEVICE_ID_AMD_8111_IDE 0x7469
-#define PCI_DEVICE_ID_AMD_8111_SMBUS2 0x746a
-#define PCI_DEVICE_ID_AMD_8111_SMBUS 0x746b
-#define PCI_DEVICE_ID_AMD_8111_AUDIO 0x746d
-#define PCI_DEVICE_ID_AMD_8151_0 0x7454
-#define PCI_DEVICE_ID_AMD_8131_BRIDGE 0x7450
-#define PCI_DEVICE_ID_AMD_8131_APIC 0x7451
-#define PCI_DEVICE_ID_AMD_CS5536_ISA 0x2090
-#define PCI_DEVICE_ID_AMD_CS5536_FLASH 0x2091
-#define PCI_DEVICE_ID_AMD_CS5536_AUDIO 0x2093
-#define PCI_DEVICE_ID_AMD_CS5536_OHC 0x2094
-#define PCI_DEVICE_ID_AMD_CS5536_EHC 0x2095
-#define PCI_DEVICE_ID_AMD_CS5536_UDC 0x2096
-#define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097
-#define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A
-
-#define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081
-#define PCI_DEVICE_ID_AMD_LX_AES 0x2082
-
-#define PCI_VENDOR_ID_TRIDENT 0x1023
-#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000
-#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001
-#define PCI_DEVICE_ID_TRIDENT_9320 0x9320
-#define PCI_DEVICE_ID_TRIDENT_9388 0x9388
-#define PCI_DEVICE_ID_TRIDENT_9397 0x9397
-#define PCI_DEVICE_ID_TRIDENT_939A 0x939A
-#define PCI_DEVICE_ID_TRIDENT_9520 0x9520
-#define PCI_DEVICE_ID_TRIDENT_9525 0x9525
-#define PCI_DEVICE_ID_TRIDENT_9420 0x9420
-#define PCI_DEVICE_ID_TRIDENT_9440 0x9440
-#define PCI_DEVICE_ID_TRIDENT_9660 0x9660
-#define PCI_DEVICE_ID_TRIDENT_9750 0x9750
-#define PCI_DEVICE_ID_TRIDENT_9850 0x9850
-#define PCI_DEVICE_ID_TRIDENT_9880 0x9880
-#define PCI_DEVICE_ID_TRIDENT_8400 0x8400
-#define PCI_DEVICE_ID_TRIDENT_8420 0x8420
-#define PCI_DEVICE_ID_TRIDENT_8500 0x8500
-
-#define PCI_VENDOR_ID_AI 0x1025
-#define PCI_DEVICE_ID_AI_M1435 0x1435
-
-#define PCI_VENDOR_ID_DELL 0x1028
-#define PCI_DEVICE_ID_DELL_RACIII 0x0008
-#define PCI_DEVICE_ID_DELL_RAC4 0x0012
-#define PCI_DEVICE_ID_DELL_PERC5 0x0015
-
-#define PCI_VENDOR_ID_MATROX 0x102B
-#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518
-#define PCI_DEVICE_ID_MATROX_MIL 0x0519
-#define PCI_DEVICE_ID_MATROX_MYS 0x051A
-#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b
-#define PCI_DEVICE_ID_MATROX_MYS_AGP 0x051e
-#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f
-#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10
-#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000
-#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001
-#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520
-#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521
-#define PCI_DEVICE_ID_MATROX_G400 0x0525
-#define PCI_DEVICE_ID_MATROX_G550 0x2527
-#define PCI_DEVICE_ID_MATROX_VIA 0x4536
-
-#define PCI_VENDOR_ID_CT 0x102c
-#define PCI_DEVICE_ID_CT_69000 0x00c0
-#define PCI_DEVICE_ID_CT_65545 0x00d8
-#define PCI_DEVICE_ID_CT_65548 0x00dc
-#define PCI_DEVICE_ID_CT_65550 0x00e0
-#define PCI_DEVICE_ID_CT_65554 0x00e4
-#define PCI_DEVICE_ID_CT_65555 0x00e5
-
-#define PCI_VENDOR_ID_MIRO 0x1031
-#define PCI_DEVICE_ID_MIRO_36050 0x5601
-#define PCI_DEVICE_ID_MIRO_DC10PLUS 0x7efe
-#define PCI_DEVICE_ID_MIRO_DC30PLUS 0xd801
-
-#define PCI_VENDOR_ID_NEC 0x1033
-#define PCI_DEVICE_ID_NEC_CBUS_1 0x0001 /* PCI-Cbus Bridge */
-#define PCI_DEVICE_ID_NEC_LOCAL 0x0002 /* Local Bridge */
-#define PCI_DEVICE_ID_NEC_ATM 0x0003 /* ATM LAN Controller */
-#define PCI_DEVICE_ID_NEC_R4000 0x0004 /* R4000 Bridge */
-#define PCI_DEVICE_ID_NEC_486 0x0005 /* 486 Like Peripheral Bus Bridge */
-#define PCI_DEVICE_ID_NEC_ACCEL_1 0x0006 /* Graphic Accelerator */
-#define PCI_DEVICE_ID_NEC_UXBUS 0x0007 /* UX-Bus Bridge */
-#define PCI_DEVICE_ID_NEC_ACCEL_2 0x0008 /* Graphic Accelerator */
-#define PCI_DEVICE_ID_NEC_GRAPH 0x0009 /* PCI-CoreGraph Bridge */
-#define PCI_DEVICE_ID_NEC_VL 0x0016 /* PCI-VL Bridge */
-#define PCI_DEVICE_ID_NEC_STARALPHA2 0x002c /* STAR ALPHA2 */
-#define PCI_DEVICE_ID_NEC_CBUS_2 0x002d /* PCI-Cbus Bridge */
-#define PCI_DEVICE_ID_NEC_USB 0x0035 /* PCI-USB Host */
-#define PCI_DEVICE_ID_NEC_CBUS_3 0x003b
-#define PCI_DEVICE_ID_NEC_NAPCCARD 0x003e
-#define PCI_DEVICE_ID_NEC_PCX2 0x0046 /* PowerVR */
-#define PCI_DEVICE_ID_NEC_NILE4 0x005a
-#define PCI_DEVICE_ID_NEC_VRC5476 0x009b
-#define PCI_DEVICE_ID_NEC_VRC4173 0x00a5
-#define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6
-#define PCI_DEVICE_ID_NEC_PC9821CS01 0x800c /* PC-9821-CS01 */
-#define PCI_DEVICE_ID_NEC_PC9821NRB06 0x800d /* PC-9821NR-B06 */
-
-#define PCI_VENDOR_ID_FD 0x1036
-#define PCI_DEVICE_ID_FD_36C70 0x0000
-
-#define PCI_VENDOR_ID_SI 0x1039
-#define PCI_DEVICE_ID_SI_5591_AGP 0x0001
-#define PCI_DEVICE_ID_SI_6202 0x0002
-#define PCI_DEVICE_ID_SI_503 0x0008
-#define PCI_DEVICE_ID_SI_ACPI 0x0009
-#define PCI_DEVICE_ID_SI_SMBUS 0x0016
-#define PCI_DEVICE_ID_SI_LPC 0x0018
-#define PCI_DEVICE_ID_SI_5597_VGA 0x0200
-#define PCI_DEVICE_ID_SI_6205 0x0205
-#define PCI_DEVICE_ID_SI_501 0x0406
-#define PCI_DEVICE_ID_SI_496 0x0496
-#define PCI_DEVICE_ID_SI_300 0x0300
-#define PCI_DEVICE_ID_SI_315H 0x0310
-#define PCI_DEVICE_ID_SI_315 0x0315
-#define PCI_DEVICE_ID_SI_315PRO 0x0325
-#define PCI_DEVICE_ID_SI_530 0x0530
-#define PCI_DEVICE_ID_SI_540 0x0540
-#define PCI_DEVICE_ID_SI_550 0x0550
-#define PCI_DEVICE_ID_SI_540_VGA 0x5300
-#define PCI_DEVICE_ID_SI_550_VGA 0x5315
-#define PCI_DEVICE_ID_SI_620 0x0620
-#define PCI_DEVICE_ID_SI_630 0x0630
-#define PCI_DEVICE_ID_SI_633 0x0633
-#define PCI_DEVICE_ID_SI_635 0x0635
-#define PCI_DEVICE_ID_SI_640 0x0640
-#define PCI_DEVICE_ID_SI_645 0x0645
-#define PCI_DEVICE_ID_SI_646 0x0646
-#define PCI_DEVICE_ID_SI_648 0x0648
-#define PCI_DEVICE_ID_SI_650 0x0650
-#define PCI_DEVICE_ID_SI_651 0x0651
-#define PCI_DEVICE_ID_SI_655 0x0655
-#define PCI_DEVICE_ID_SI_661 0x0661
-#define PCI_DEVICE_ID_SI_730 0x0730
-#define PCI_DEVICE_ID_SI_733 0x0733
-#define PCI_DEVICE_ID_SI_630_VGA 0x6300
-#define PCI_DEVICE_ID_SI_735 0x0735
-#define PCI_DEVICE_ID_SI_740 0x0740
-#define PCI_DEVICE_ID_SI_741 0x0741
-#define PCI_DEVICE_ID_SI_745 0x0745
-#define PCI_DEVICE_ID_SI_746 0x0746
-#define PCI_DEVICE_ID_SI_755 0x0755
-#define PCI_DEVICE_ID_SI_760 0x0760
-#define PCI_DEVICE_ID_SI_900 0x0900
-#define PCI_DEVICE_ID_SI_961 0x0961
-#define PCI_DEVICE_ID_SI_962 0x0962
-#define PCI_DEVICE_ID_SI_963 0x0963
-#define PCI_DEVICE_ID_SI_965 0x0965
-#define PCI_DEVICE_ID_SI_966 0x0966
-#define PCI_DEVICE_ID_SI_968 0x0968
-#define PCI_DEVICE_ID_SI_5511 0x5511
-#define PCI_DEVICE_ID_SI_5513 0x5513
-#define PCI_DEVICE_ID_SI_5517 0x5517
-#define PCI_DEVICE_ID_SI_5518 0x5518
-#define PCI_DEVICE_ID_SI_5571 0x5571
-#define PCI_DEVICE_ID_SI_5581 0x5581
-#define PCI_DEVICE_ID_SI_5582 0x5582
-#define PCI_DEVICE_ID_SI_5591 0x5591
-#define PCI_DEVICE_ID_SI_5596 0x5596
-#define PCI_DEVICE_ID_SI_5597 0x5597
-#define PCI_DEVICE_ID_SI_5598 0x5598
-#define PCI_DEVICE_ID_SI_5600 0x5600
-#define PCI_DEVICE_ID_SI_7012 0x7012
-#define PCI_DEVICE_ID_SI_7013 0x7013
-#define PCI_DEVICE_ID_SI_7016 0x7016
-#define PCI_DEVICE_ID_SI_7018 0x7018
-
-#define PCI_VENDOR_ID_HP 0x103c
-#define PCI_DEVICE_ID_HP_VISUALIZE_EG 0x1005
-#define PCI_DEVICE_ID_HP_VISUALIZE_FX6 0x1006
-#define PCI_DEVICE_ID_HP_VISUALIZE_FX4 0x1008
-#define PCI_DEVICE_ID_HP_VISUALIZE_FX2 0x100a
-#define PCI_DEVICE_ID_HP_TACHYON 0x1028
-#define PCI_DEVICE_ID_HP_TACHLITE 0x1029
-#define PCI_DEVICE_ID_HP_J2585A 0x1030
-#define PCI_DEVICE_ID_HP_J2585B 0x1031
-#define PCI_DEVICE_ID_HP_J2973A 0x1040
-#define PCI_DEVICE_ID_HP_J2970A 0x1042
-#define PCI_DEVICE_ID_HP_DIVA 0x1048
-#define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049
-#define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A
-#define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B
-#define PCI_DEVICE_ID_HP_REO_IOC 0x10f1
-#define PCI_DEVICE_ID_HP_VISUALIZE_FXE 0x108b
-#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223
-#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226
-#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227
-#define PCI_DEVICE_ID_HP_ZX1_IOC 0x122a
-#define PCI_DEVICE_ID_HP_PCIX_LBA 0x122e
-#define PCI_DEVICE_ID_HP_SX1000_IOC 0x127c
-#define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282
-#define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290
-#define PCI_DEVICE_ID_HP_DIVA_RMP3 0x1301
-#define PCI_DEVICE_ID_HP_DIVA_HURRICANE 0x132a
-#define PCI_DEVICE_ID_HP_CISSA 0x3220
-#define PCI_DEVICE_ID_HP_CISSC 0x3230
-#define PCI_DEVICE_ID_HP_CISSD 0x3238
-#define PCI_DEVICE_ID_HP_ZX2_IOC 0x4031
-
-#define PCI_VENDOR_ID_PCTECH 0x1042
-#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000
-#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001
-#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020
-
-#define PCI_VENDOR_ID_ASUSTEK 0x1043
-#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675
-
-#define PCI_VENDOR_ID_DPT 0x1044
-#define PCI_DEVICE_ID_DPT 0xa400
-
-#define PCI_VENDOR_ID_OPTI 0x1045
-#define PCI_DEVICE_ID_OPTI_82C558 0xc558
-#define PCI_DEVICE_ID_OPTI_82C621 0xc621
-#define PCI_DEVICE_ID_OPTI_82C700 0xc700
-#define PCI_DEVICE_ID_OPTI_82C825 0xd568
-
-#define PCI_VENDOR_ID_ELSA 0x1048
-#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000
-#define PCI_DEVICE_ID_ELSA_QS3000 0x3000
-
-
-#define PCI_VENDOR_ID_BUSLOGIC 0x104B
-#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140
-#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040
-#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130
-
-#define PCI_VENDOR_ID_TI 0x104c
-#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
-#define PCI_DEVICE_ID_TI_4450 0x8011
-#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
-#define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034
-#define PCI_DEVICE_ID_TI_X515 0x8036
-#define PCI_DEVICE_ID_TI_XX12 0x8039
-#define PCI_DEVICE_ID_TI_1130 0xac12
-#define PCI_DEVICE_ID_TI_1031 0xac13
-#define PCI_DEVICE_ID_TI_1131 0xac15
-#define PCI_DEVICE_ID_TI_1250 0xac16
-#define PCI_DEVICE_ID_TI_1220 0xac17
-#define PCI_DEVICE_ID_TI_1221 0xac19
-#define PCI_DEVICE_ID_TI_1210 0xac1a
-#define PCI_DEVICE_ID_TI_1450 0xac1b
-#define PCI_DEVICE_ID_TI_1225 0xac1c
-#define PCI_DEVICE_ID_TI_1251A 0xac1d
-#define PCI_DEVICE_ID_TI_1211 0xac1e
-#define PCI_DEVICE_ID_TI_1251B 0xac1f
-#define PCI_DEVICE_ID_TI_4410 0xac41
-#define PCI_DEVICE_ID_TI_4451 0xac42
-#define PCI_DEVICE_ID_TI_4510 0xac44
-#define PCI_DEVICE_ID_TI_4520 0xac46
-#define PCI_DEVICE_ID_TI_7510 0xac47
-#define PCI_DEVICE_ID_TI_7610 0xac48
-#define PCI_DEVICE_ID_TI_7410 0xac49
-#define PCI_DEVICE_ID_TI_1410 0xac50
-#define PCI_DEVICE_ID_TI_1420 0xac51
-#define PCI_DEVICE_ID_TI_1451A 0xac52
-#define PCI_DEVICE_ID_TI_1620 0xac54
-#define PCI_DEVICE_ID_TI_1520 0xac55
-#define PCI_DEVICE_ID_TI_1510 0xac56
-#define PCI_DEVICE_ID_TI_X620 0xac8d
-#define PCI_DEVICE_ID_TI_X420 0xac8e
-
-#define PCI_VENDOR_ID_SONY 0x104d
-
-
-/* Winbond have two vendor IDs! See 0x10ad as well */
-#define PCI_VENDOR_ID_WINBOND2 0x1050
-#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a
-#define PCI_DEVICE_ID_WINBOND2_6692 0x6692
-
-#define PCI_VENDOR_ID_ANIGMA 0x1051
-#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100
-
-#define PCI_VENDOR_ID_EFAR 0x1055
-#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130
-#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463
-
-#define PCI_VENDOR_ID_MOTOROLA 0x1057
-#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001
-#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002
-#define PCI_DEVICE_ID_MOTOROLA_MPC107 0x0004
-#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801
-#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802
-#define PCI_DEVICE_ID_MOTOROLA_HAWK 0x4803
-#define PCI_DEVICE_ID_MOTOROLA_HARRIER 0x480b
-#define PCI_DEVICE_ID_MOTOROLA_MPC5200 0x5803
-#define PCI_DEVICE_ID_MOTOROLA_MPC5200B 0x5809
-
-#define PCI_VENDOR_ID_PROMISE 0x105a
-#define PCI_DEVICE_ID_PROMISE_20265 0x0d30
-#define PCI_DEVICE_ID_PROMISE_20267 0x4d30
-#define PCI_DEVICE_ID_PROMISE_20246 0x4d33
-#define PCI_DEVICE_ID_PROMISE_20262 0x4d38
-#define PCI_DEVICE_ID_PROMISE_20263 0x0D38
-#define PCI_DEVICE_ID_PROMISE_20268 0x4d68
-#define PCI_DEVICE_ID_PROMISE_20269 0x4d69
-#define PCI_DEVICE_ID_PROMISE_20270 0x6268
-#define PCI_DEVICE_ID_PROMISE_20271 0x6269
-#define PCI_DEVICE_ID_PROMISE_20275 0x1275
-#define PCI_DEVICE_ID_PROMISE_20276 0x5275
-#define PCI_DEVICE_ID_PROMISE_20277 0x7275
-
-
-#define PCI_VENDOR_ID_UMC 0x1060
-#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
-#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a
-#define PCI_DEVICE_ID_UMC_UM8886A 0x886a
-
-
-#define PCI_VENDOR_ID_MYLEX 0x1069
-#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001
-#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002
-#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010
-#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020
-#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050
-#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56
-#define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166
-
-
-#define PCI_VENDOR_ID_APPLE 0x106b
-#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001
-#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e
-#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018
-#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020
-#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021
-#define PCI_DEVICE_ID_APPLE_UNI_N_GMACP 0x0024
-#define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027
-#define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d
-#define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e
-#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032
-#define PCI_DEVICE_ID_APPLE_UNI_N_ATA 0x0033
-#define PCI_DEVICE_ID_APPLE_UNI_N_AGP2 0x0034
-#define PCI_DEVICE_ID_APPLE_IPID_ATA100 0x003b
-#define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043
-#define PCI_DEVICE_ID_APPLE_U3_AGP 0x004b
-#define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c
-#define PCI_DEVICE_ID_APPLE_SH_ATA 0x0050
-#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051
-#define PCI_DEVICE_ID_APPLE_U3L_AGP 0x0058
-#define PCI_DEVICE_ID_APPLE_U3H_AGP 0x0059
-#define PCI_DEVICE_ID_APPLE_IPID2_AGP 0x0066
-#define PCI_DEVICE_ID_APPLE_IPID2_ATA 0x0069
-#define PCI_DEVICE_ID_APPLE_IPID2_FW 0x006a
-#define PCI_DEVICE_ID_APPLE_IPID2_GMAC 0x006b
-#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645
-
-#define PCI_VENDOR_ID_YAMAHA 0x1073
-#define PCI_DEVICE_ID_YAMAHA_724 0x0004
-#define PCI_DEVICE_ID_YAMAHA_724F 0x000d
-#define PCI_DEVICE_ID_YAMAHA_740 0x000a
-#define PCI_DEVICE_ID_YAMAHA_740C 0x000c
-#define PCI_DEVICE_ID_YAMAHA_744 0x0010
-#define PCI_DEVICE_ID_YAMAHA_754 0x0012
-
-
-#define PCI_VENDOR_ID_QLOGIC 0x1077
-#define PCI_DEVICE_ID_QLOGIC_ISP10160 0x1016
-#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020
-#define PCI_DEVICE_ID_QLOGIC_ISP1080 0x1080
-#define PCI_DEVICE_ID_QLOGIC_ISP12160 0x1216
-#define PCI_DEVICE_ID_QLOGIC_ISP1240 0x1240
-#define PCI_DEVICE_ID_QLOGIC_ISP1280 0x1280
-#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100
-#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200
-#define PCI_DEVICE_ID_QLOGIC_ISP2300 0x2300
-#define PCI_DEVICE_ID_QLOGIC_ISP2312 0x2312
-#define PCI_DEVICE_ID_QLOGIC_ISP2322 0x2322
-#define PCI_DEVICE_ID_QLOGIC_ISP6312 0x6312
-#define PCI_DEVICE_ID_QLOGIC_ISP6322 0x6322
-#define PCI_DEVICE_ID_QLOGIC_ISP2422 0x2422
-#define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432
-#define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512
-#define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522
-#define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422
-#define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432
-
-#define PCI_VENDOR_ID_CYRIX 0x1078
-#define PCI_DEVICE_ID_CYRIX_5510 0x0000
-#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001
-#define PCI_DEVICE_ID_CYRIX_5520 0x0002
-#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100
-#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102
-#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103
-#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104
-
-
-
-#define PCI_VENDOR_ID_CONTAQ 0x1080
-#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693
-
-
-#define PCI_VENDOR_ID_OLICOM 0x108d
-#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012
-#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013
-#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014
-
-#define PCI_VENDOR_ID_SUN 0x108e
-#define PCI_DEVICE_ID_SUN_EBUS 0x1000
-#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001
-#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100
-#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101
-#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102
-#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103
-#define PCI_DEVICE_ID_SUN_GEM 0x2bad
-#define PCI_DEVICE_ID_SUN_SIMBA 0x5000
-#define PCI_DEVICE_ID_SUN_PBM 0x8000
-#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001
-#define PCI_DEVICE_ID_SUN_SABRE 0xa000
-#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001
-#define PCI_DEVICE_ID_SUN_TOMATILLO 0xa801
-#define PCI_DEVICE_ID_SUN_CASSINI 0xabba
-
-#define PCI_VENDOR_ID_CMD 0x1095
-#define PCI_DEVICE_ID_CMD_643 0x0643
-#define PCI_DEVICE_ID_CMD_646 0x0646
-#define PCI_DEVICE_ID_CMD_648 0x0648
-#define PCI_DEVICE_ID_CMD_649 0x0649
-
-#define PCI_DEVICE_ID_SII_680 0x0680
-#define PCI_DEVICE_ID_SII_3112 0x3112
-#define PCI_DEVICE_ID_SII_1210SA 0x0240
-
-
-#define PCI_VENDOR_ID_BROOKTREE 0x109e
-#define PCI_DEVICE_ID_BROOKTREE_878 0x0878
-#define PCI_DEVICE_ID_BROOKTREE_879 0x0879
-
-
-#define PCI_VENDOR_ID_SGI 0x10a9
-#define PCI_DEVICE_ID_SGI_IOC3 0x0003
-#define PCI_DEVICE_ID_SGI_IOC4 0x100a
-#define PCI_VENDOR_ID_SGI_LITHIUM 0x1002
-
-
-#define PCI_VENDOR_ID_WINBOND 0x10ad
-#define PCI_DEVICE_ID_WINBOND_82C105 0x0105
-#define PCI_DEVICE_ID_WINBOND_83C553 0x0565
-
-
-#define PCI_VENDOR_ID_PLX 0x10b5
-#define PCI_DEVICE_ID_PLX_R685 0x1030
-#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a
-#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076
-#define PCI_DEVICE_ID_PLX_1077 0x1077
-#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103
-#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151
-#define PCI_DEVICE_ID_PLX_R753 0x1152
-#define PCI_DEVICE_ID_PLX_OLITEC 0x1187
-#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196
-#define PCI_DEVICE_ID_PLX_9050 0x9050
-#define PCI_DEVICE_ID_PLX_9080 0x9080
-#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
-
-#define PCI_VENDOR_ID_MADGE 0x10b6
-#define PCI_DEVICE_ID_MADGE_MK2 0x0002
-
-#define PCI_VENDOR_ID_3COM 0x10b7
-#define PCI_DEVICE_ID_3COM_3C985 0x0001
-#define PCI_DEVICE_ID_3COM_3C940 0x1700
-#define PCI_DEVICE_ID_3COM_3C339 0x3390
-#define PCI_DEVICE_ID_3COM_3C359 0x3590
-#define PCI_DEVICE_ID_3COM_3C940B 0x80eb
-#define PCI_DEVICE_ID_3COM_3CR990 0x9900
-#define PCI_DEVICE_ID_3COM_3CR990_TX_95 0x9902
-#define PCI_DEVICE_ID_3COM_3CR990_TX_97 0x9903
-#define PCI_DEVICE_ID_3COM_3CR990B 0x9904
-#define PCI_DEVICE_ID_3COM_3CR990_FX 0x9905
-#define PCI_DEVICE_ID_3COM_3CR990SVR95 0x9908
-#define PCI_DEVICE_ID_3COM_3CR990SVR97 0x9909
-#define PCI_DEVICE_ID_3COM_3CR990SVR 0x990a
-
-
-#define PCI_VENDOR_ID_AL 0x10b9
-#define PCI_DEVICE_ID_AL_M1533 0x1533
-#define PCI_DEVICE_ID_AL_M1535 0x1535
-#define PCI_DEVICE_ID_AL_M1541 0x1541
-#define PCI_DEVICE_ID_AL_M1563 0x1563
-#define PCI_DEVICE_ID_AL_M1621 0x1621
-#define PCI_DEVICE_ID_AL_M1631 0x1631
-#define PCI_DEVICE_ID_AL_M1632 0x1632
-#define PCI_DEVICE_ID_AL_M1641 0x1641
-#define PCI_DEVICE_ID_AL_M1644 0x1644
-#define PCI_DEVICE_ID_AL_M1647 0x1647
-#define PCI_DEVICE_ID_AL_M1651 0x1651
-#define PCI_DEVICE_ID_AL_M1671 0x1671
-#define PCI_DEVICE_ID_AL_M1681 0x1681
-#define PCI_DEVICE_ID_AL_M1683 0x1683
-#define PCI_DEVICE_ID_AL_M1689 0x1689
-#define PCI_DEVICE_ID_AL_M5219 0x5219
-#define PCI_DEVICE_ID_AL_M5228 0x5228
-#define PCI_DEVICE_ID_AL_M5229 0x5229
-#define PCI_DEVICE_ID_AL_M5451 0x5451
-#define PCI_DEVICE_ID_AL_M7101 0x7101
-
-
-
-#define PCI_VENDOR_ID_NEOMAGIC 0x10c8
-#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005
-#define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006
-#define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016
-
-
-#define PCI_VENDOR_ID_TCONRAD 0x10da
-#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508
-
-
-#define PCI_VENDOR_ID_NVIDIA 0x10de
-#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020
-#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028
-#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029
-#define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a
-#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C
-#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036
-#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037
-#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_ULTRA 0x0040
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800 0x0041
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_LE 0x0042
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x0045
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_4000 0x004E
-#define PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS 0x0052
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055
-#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
-#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
-#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
-#define PCI_DEVICE_ID_NVIDIA_CK804_PCIE 0x005d
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
-#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
-#define PCI_DEVICE_ID_NVIDIA_MCP2_MODEM 0x0069
-#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS 0x0084
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085
-#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086
-#define PCI_DEVICE_ID_NVIDIA_MCP2S_MODEM 0x0089
-#define PCI_DEVICE_ID_NVIDIA_CK8_AUDIO 0x008a
-#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GT 0x0090
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_7800_GTX 0x0091
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800 0x0098
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_7800_GTX 0x0099
-#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0
-#define PCI_DEVICE_ID_GEFORCE_6800A 0x00c1
-#define PCI_DEVICE_ID_GEFORCE_6800A_LE 0x00c2
-#define PCI_DEVICE_ID_GEFORCE_GO_6800 0x00c8
-#define PCI_DEVICE_ID_GEFORCE_GO_6800_ULTRA 0x00c9
-#define PCI_DEVICE_ID_QUADRO_FX_GO1400 0x00cc
-#define PCI_DEVICE_ID_QUADRO_FX_1400 0x00ce
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
-#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
-#define PCI_DEVICE_ID_NVIDIA_MCP3_MODEM 0x00d9
-#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
-#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SMBUS 0x00e4
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5
-#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6
-#define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee
-#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_ALT1 0x00f0
-#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT1 0x00f1
-#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6600_ALT2 0x00f2
-#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6200_ALT1 0x00f3
-#define PCIE_DEVICE_ID_NVIDIA_GEFORCE_6800_GT 0x00f9
-#define PCIE_DEVICE_ID_NVIDIA_QUADRO_NVS280 0x00fd
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101
-#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GO 0x0112
-#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6600_GT 0x0140
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6600 0x0141
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6610_XL 0x0145
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_540 0x014E
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6200 0x014F
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152
-#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6200_TURBOCACHE 0x0161
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6200 0x0164
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6250 0x0166
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6200_1 0x0167
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_GO_6250_1 0x0168
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_460 0x0170
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440 0x0171
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420 0x0172
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_SE 0x0173
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO 0x0174
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO 0x0175
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_420_GO_M32 0x0176
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_460_GO 0x0177
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_500XGL 0x0178
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_440_GO_M64 0x0179
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_200 0x017A
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_550XGL 0x017B
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_500_GOGL 0x017C
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_410_GO_M16 0x017D
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_MAC 0x0189
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_280_NVS 0x018A
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_380_XGL 0x018B
-#define PCI_DEVICE_ID_NVIDIA_IGEFORCE2 0x01a0
-#define PCI_DEVICE_ID_NVIDIA_NFORCE 0x01a4
-#define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_SMBUS 0x01b4
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc
-#define PCI_DEVICE_ID_NVIDIA_MCP1_MODEM 0x01c1
-#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE3_2 0x0202
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_DDC 0x0203
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B 0x0211
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B_LE 0x0212
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_6800B_GT 0x0215
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4600 0x0250
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4400 0x0251
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200 0x0253
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS 0x0264
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F
-#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268
-#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_4200_GO 0x0286
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_980_XGL 0x0288
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_780_XGL 0x0289
-#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700_GOGL 0x028C
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA 0x0301
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800 0x0302
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_2000 0x0308
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1000 0x0309
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA 0x0311
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600 0x0312
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600SE 0x0314
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5600 0x031A
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5650 0x031B
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO700 0x031C
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200 0x0320
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_ULTRA 0x0321
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_1 0x0322
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200SE 0x0323
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5200 0x0324
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5250 0x0325
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5500 0x0326
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5100 0x0327
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5250_32 0x0328
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200 0x0329
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_NVS_280_PCI 0x032A
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_500 0x032B
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5300 0x032C
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5100 0x032D
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ULTRA 0x0330
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900 0x0331
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900XT 0x0332
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5950_ULTRA 0x0333
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900ZT 0x0334
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_3000 0x0338
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_700 0x033F
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA 0x0341
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700 0x0342
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700LE 0x0343
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700VE 0x0344
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_1 0x0347
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C
-#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E
-#define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372
-#define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373
-#define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5
-#define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC
-#define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE
-#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7
-#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448
-#define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450
-#define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451
-#define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452
-#define PCI_DEVICE_ID_NVIDIA_NVENET_23 0x0453
-
-#define PCI_VENDOR_ID_IMS 0x10e0
-#define PCI_DEVICE_ID_IMS_TT128 0x9128
-#define PCI_DEVICE_ID_IMS_TT3D 0x9135
-
-
-
-
-#define PCI_VENDOR_ID_INTERG 0x10ea
-#define PCI_DEVICE_ID_INTERG_1682 0x1682
-#define PCI_DEVICE_ID_INTERG_2000 0x2000
-#define PCI_DEVICE_ID_INTERG_2010 0x2010
-#define PCI_DEVICE_ID_INTERG_5000 0x5000
-#define PCI_DEVICE_ID_INTERG_5050 0x5050
-
-#define PCI_VENDOR_ID_REALTEK 0x10ec
-#define PCI_DEVICE_ID_REALTEK_8139 0x8139
-
-#define PCI_VENDOR_ID_XILINX 0x10ee
-#define PCI_DEVICE_ID_RME_DIGI96 0x3fc0
-#define PCI_DEVICE_ID_RME_DIGI96_8 0x3fc1
-#define PCI_DEVICE_ID_RME_DIGI96_8_PRO 0x3fc2
-#define PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST 0x3fc3
-#define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP 0x3fc5
-#define PCI_DEVICE_ID_XILINX_HAMMERFALL_DSP_MADI 0x3fc6
-
-
-#define PCI_VENDOR_ID_INIT 0x1101
-
-#define PCI_VENDOR_ID_CREATIVE 0x1102 /* duplicate: ECTIVA */
-#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002
-
-#define PCI_VENDOR_ID_ECTIVA 0x1102 /* duplicate: CREATIVE */
-#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938
-
-#define PCI_VENDOR_ID_TTI 0x1103
-#define PCI_DEVICE_ID_TTI_HPT343 0x0003
-#define PCI_DEVICE_ID_TTI_HPT366 0x0004
-#define PCI_DEVICE_ID_TTI_HPT372 0x0005
-#define PCI_DEVICE_ID_TTI_HPT302 0x0006
-#define PCI_DEVICE_ID_TTI_HPT371 0x0007
-#define PCI_DEVICE_ID_TTI_HPT374 0x0008
-#define PCI_DEVICE_ID_TTI_HPT372N 0x0009 /* apparently a 372N variant? */
-
-#define PCI_VENDOR_ID_VIA 0x1106
-#define PCI_DEVICE_ID_VIA_8763_0 0x0198
-#define PCI_DEVICE_ID_VIA_8380_0 0x0204
-#define PCI_DEVICE_ID_VIA_3238_0 0x0238
-#define PCI_DEVICE_ID_VIA_PT880 0x0258
-#define PCI_DEVICE_ID_VIA_PT880ULTRA 0x0308
-#define PCI_DEVICE_ID_VIA_PX8X0_0 0x0259
-#define PCI_DEVICE_ID_VIA_3269_0 0x0269
-#define PCI_DEVICE_ID_VIA_K8T800PRO_0 0x0282
-#define PCI_DEVICE_ID_VIA_3296_0 0x0296
-#define PCI_DEVICE_ID_VIA_8363_0 0x0305
-#define PCI_DEVICE_ID_VIA_P4M800CE 0x0314
-#define PCI_DEVICE_ID_VIA_8371_0 0x0391
-#define PCI_DEVICE_ID_VIA_8501_0 0x0501
-#define PCI_DEVICE_ID_VIA_82C561 0x0561
-#define PCI_DEVICE_ID_VIA_82C586_1 0x0571
-#define PCI_DEVICE_ID_VIA_82C576 0x0576
-#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x0581
-#define PCI_DEVICE_ID_VIA_82C586_0 0x0586
-#define PCI_DEVICE_ID_VIA_82C596 0x0596
-#define PCI_DEVICE_ID_VIA_82C597_0 0x0597
-#define PCI_DEVICE_ID_VIA_82C598_0 0x0598
-#define PCI_DEVICE_ID_VIA_8601_0 0x0601
-#define PCI_DEVICE_ID_VIA_8605_0 0x0605
-#define PCI_DEVICE_ID_VIA_82C686 0x0686
-#define PCI_DEVICE_ID_VIA_82C691_0 0x0691
-#define PCI_DEVICE_ID_VIA_82C576_1 0x1571
-#define PCI_DEVICE_ID_VIA_82C586_2 0x3038
-#define PCI_DEVICE_ID_VIA_82C586_3 0x3040
-#define PCI_DEVICE_ID_VIA_82C596_3 0x3050
-#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051
-#define PCI_DEVICE_ID_VIA_82C686_4 0x3057
-#define PCI_DEVICE_ID_VIA_82C686_5 0x3058
-#define PCI_DEVICE_ID_VIA_8233_5 0x3059
-#define PCI_DEVICE_ID_VIA_8233_0 0x3074
-#define PCI_DEVICE_ID_VIA_8633_0 0x3091
-#define PCI_DEVICE_ID_VIA_8367_0 0x3099
-#define PCI_DEVICE_ID_VIA_8653_0 0x3101
-#define PCI_DEVICE_ID_VIA_8622 0x3102
-#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104
-#define PCI_DEVICE_ID_VIA_8233C_0 0x3109
-#define PCI_DEVICE_ID_VIA_8361 0x3112
-#define PCI_DEVICE_ID_VIA_XM266 0x3116
-#define PCI_DEVICE_ID_VIA_612X 0x3119
-#define PCI_DEVICE_ID_VIA_862X_0 0x3123
-#define PCI_DEVICE_ID_VIA_8753_0 0x3128
-#define PCI_DEVICE_ID_VIA_8233A 0x3147
-#define PCI_DEVICE_ID_VIA_8703_51_0 0x3148
-#define PCI_DEVICE_ID_VIA_8237_SATA 0x3149
-#define PCI_DEVICE_ID_VIA_XN266 0x3156
-#define PCI_DEVICE_ID_VIA_6410 0x3164
-#define PCI_DEVICE_ID_VIA_8754C_0 0x3168
-#define PCI_DEVICE_ID_VIA_8235 0x3177
-#define PCI_DEVICE_ID_VIA_8385_0 0x3188
-#define PCI_DEVICE_ID_VIA_8377_0 0x3189
-#define PCI_DEVICE_ID_VIA_8378_0 0x3205
-#define PCI_DEVICE_ID_VIA_8783_0 0x3208
-#define PCI_DEVICE_ID_VIA_8237 0x3227
-#define PCI_DEVICE_ID_VIA_8251 0x3287
-#define PCI_DEVICE_ID_VIA_8237A 0x3337
-#define PCI_DEVICE_ID_VIA_8231 0x8231
-#define PCI_DEVICE_ID_VIA_8231_4 0x8235
-#define PCI_DEVICE_ID_VIA_8365_1 0x8305
-#define PCI_DEVICE_ID_VIA_CX700 0x8324
-#define PCI_DEVICE_ID_VIA_8371_1 0x8391
-#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
-#define PCI_DEVICE_ID_VIA_838X_1 0xB188
-#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
-
-#define PCI_VENDOR_ID_SIEMENS 0x110A
-#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
-
-
-#define PCI_VENDOR_ID_VORTEX 0x1119
-#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000
-#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001
-#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002
-#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003
-#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004
-#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005
-#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006
-#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007
-#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008
-#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009
-#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a
-#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b
-#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c
-#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d
-#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100
-#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101
-#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102
-#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103
-#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104
-#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105
-
-#define PCI_VENDOR_ID_EF 0x111a
-#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000
-#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002
-#define PCI_VENDOR_ID_EF_ATM_LANAI2 0x0003
-#define PCI_VENDOR_ID_EF_ATM_LANAIHB 0x0005
-
-#define PCI_VENDOR_ID_IDT 0x111d
-#define PCI_DEVICE_ID_IDT_IDT77201 0x0001
-
-#define PCI_VENDOR_ID_FORE 0x1127
-#define PCI_DEVICE_ID_FORE_PCA200E 0x0300
-
-
-#define PCI_VENDOR_ID_PHILIPS 0x1131
-#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146
-#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730
-
-#define PCI_VENDOR_ID_EICON 0x1133
-#define PCI_DEVICE_ID_EICON_DIVA20 0xe002
-#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004
-#define PCI_DEVICE_ID_EICON_DIVA201 0xe005
-#define PCI_DEVICE_ID_EICON_DIVA202 0xe00b
-#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010
-#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012
-#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013
-#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014
-
-#define PCI_VENDOR_ID_ZIATECH 0x1138
-#define PCI_DEVICE_ID_ZIATECH_5550_HC 0x5550
-
-
-
-#define PCI_VENDOR_ID_SYSKONNECT 0x1148
-#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200
-#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300
-#define PCI_DEVICE_ID_SYSKONNECT_YU 0x4320
-#define PCI_DEVICE_ID_SYSKONNECT_9DXX 0x4400
-#define PCI_DEVICE_ID_SYSKONNECT_9MXX 0x4500
-
-
-#define PCI_VENDOR_ID_DIGI 0x114f
-#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070
-#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071
-#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072
-#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073
-#define PCI_DEVICE_ID_NEO_2DB9 0x00C8
-#define PCI_DEVICE_ID_NEO_2DB9PRI 0x00C9
-#define PCI_DEVICE_ID_NEO_2RJ45 0x00CA
-#define PCI_DEVICE_ID_NEO_2RJ45PRI 0x00CB
-
-
-#define PCI_VENDOR_ID_XIRCOM 0x115d
-#define PCI_DEVICE_ID_XIRCOM_RBM56G 0x0101
-#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103
-
-
-#define PCI_VENDOR_ID_SERVERWORKS 0x1166
-#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008
-#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009
-#define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017
-#define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103
-#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200
-#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201
-#define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203
-#define PCI_DEVICE_ID_SERVERWORKS_HT1000SB 0x0205
-#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211
-#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212
-#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE 0x0213
-#define PCI_DEVICE_ID_SERVERWORKS_HT1000IDE 0x0214
-#define PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2 0x0217
-#define PCI_DEVICE_ID_SERVERWORKS_CSB6LPC 0x0227
-
-#define PCI_VENDOR_ID_SBE 0x1176
-#define PCI_DEVICE_ID_SBE_WANXL100 0x0301
-#define PCI_DEVICE_ID_SBE_WANXL200 0x0302
-#define PCI_DEVICE_ID_SBE_WANXL400 0x0104
-
-#define PCI_VENDOR_ID_TOSHIBA 0x1179
-#define PCI_DEVICE_ID_TOSHIBA_PICCOLO 0x0102
-#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_1 0x0103
-#define PCI_DEVICE_ID_TOSHIBA_PICCOLO_2 0x0105
-#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a
-#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f
-#define PCI_DEVICE_ID_TOSHIBA_TOPIC100 0x0617
-
-#define PCI_VENDOR_ID_TOSHIBA_2 0x102f
-#define PCI_DEVICE_ID_TOSHIBA_TC35815CF 0x0030
-#define PCI_DEVICE_ID_TOSHIBA_TC86C001_MISC 0x0108
-#define PCI_DEVICE_ID_TOSHIBA_SPIDER_NET 0x01b3
-
-#define PCI_VENDOR_ID_RICOH 0x1180
-#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465
-#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466
-#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
-#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
-#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
-#define PCI_DEVICE_ID_RICOH_R5C822 0x0822
-
-#define PCI_VENDOR_ID_DLINK 0x1186
-#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00
-
-#define PCI_VENDOR_ID_ARTOP 0x1191
-#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005
-#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006
-#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007
-#define PCI_DEVICE_ID_ARTOP_ATP865 0x0008
-#define PCI_DEVICE_ID_ARTOP_ATP865R 0x0009
-#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002
-#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010
-#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020
-#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030
-#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040
-#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050
-#define PCI_DEVICE_ID_ARTOP_8060 0x8060
-
-#define PCI_VENDOR_ID_ZEITNET 0x1193
-#define PCI_DEVICE_ID_ZEITNET_1221 0x0001
-#define PCI_DEVICE_ID_ZEITNET_1225 0x0002
-
-
-#define PCI_VENDOR_ID_FUJITSU_ME 0x119e
-#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001
-#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003
-
-#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9
-#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334
-
-#define PCI_VENDOR_ID_MARVELL 0x11ab
-#define PCI_DEVICE_ID_MARVELL_GT64111 0x4146
-#define PCI_DEVICE_ID_MARVELL_GT64260 0x6430
-#define PCI_DEVICE_ID_MARVELL_MV64360 0x6460
-#define PCI_DEVICE_ID_MARVELL_MV64460 0x6480
-#define PCI_DEVICE_ID_MARVELL_GT96100 0x9652
-#define PCI_DEVICE_ID_MARVELL_GT96100A 0x9653
-
-
-#define PCI_VENDOR_ID_V3 0x11b0
-#define PCI_DEVICE_ID_V3_V960 0x0001
-#define PCI_DEVICE_ID_V3_V351 0x0002
-
-
-#define PCI_VENDOR_ID_ATT 0x11c1
-#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480
-
-
-#define PCI_VENDOR_ID_SPECIALIX 0x11cb
-#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000
-#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000
-#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004
-
-
-#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4
-#define PCI_DEVICE_ID_AD1889JS 0x1889
-
-
-#define PCI_DEVICE_ID_SEGA_BBA 0x1234
-
-#define PCI_VENDOR_ID_ZORAN 0x11de
-#define PCI_DEVICE_ID_ZORAN_36057 0x6057
-#define PCI_DEVICE_ID_ZORAN_36120 0x6120
-
-
-#define PCI_VENDOR_ID_COMPEX 0x11f6
-#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
-
-#define PCI_VENDOR_ID_RP 0x11fe
-#define PCI_DEVICE_ID_RP32INTF 0x0001
-#define PCI_DEVICE_ID_RP8INTF 0x0002
-#define PCI_DEVICE_ID_RP16INTF 0x0003
-#define PCI_DEVICE_ID_RP4QUAD 0x0004
-#define PCI_DEVICE_ID_RP8OCTA 0x0005
-#define PCI_DEVICE_ID_RP8J 0x0006
-#define PCI_DEVICE_ID_RP4J 0x0007
-#define PCI_DEVICE_ID_RP8SNI 0x0008
-#define PCI_DEVICE_ID_RP16SNI 0x0009
-#define PCI_DEVICE_ID_RPP4 0x000A
-#define PCI_DEVICE_ID_RPP8 0x000B
-#define PCI_DEVICE_ID_RP4M 0x000D
-#define PCI_DEVICE_ID_RP2_232 0x000E
-#define PCI_DEVICE_ID_RP2_422 0x000F
-#define PCI_DEVICE_ID_URP32INTF 0x0801
-#define PCI_DEVICE_ID_URP8INTF 0x0802
-#define PCI_DEVICE_ID_URP16INTF 0x0803
-#define PCI_DEVICE_ID_URP8OCTA 0x0805
-#define PCI_DEVICE_ID_UPCI_RM3_8PORT 0x080C
-#define PCI_DEVICE_ID_UPCI_RM3_4PORT 0x080D
-#define PCI_DEVICE_ID_CRP16INTF 0x0903
-
-#define PCI_VENDOR_ID_CYCLADES 0x120e
-#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100
-#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101
-#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102
-#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103
-#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104
-#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105
-#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200
-#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201
-#define PCI_DEVICE_ID_PC300_RX_2 0x0300
-#define PCI_DEVICE_ID_PC300_RX_1 0x0301
-#define PCI_DEVICE_ID_PC300_TE_2 0x0310
-#define PCI_DEVICE_ID_PC300_TE_1 0x0311
-#define PCI_DEVICE_ID_PC300_TE_M_2 0x0320
-#define PCI_DEVICE_ID_PC300_TE_M_1 0x0321
-
-#define PCI_VENDOR_ID_ESSENTIAL 0x120f
-#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001
-
-#define PCI_VENDOR_ID_O2 0x1217
-#define PCI_DEVICE_ID_O2_6729 0x6729
-#define PCI_DEVICE_ID_O2_6730 0x673a
-#define PCI_DEVICE_ID_O2_6832 0x6832
-#define PCI_DEVICE_ID_O2_6836 0x6836
-
-#define PCI_VENDOR_ID_3DFX 0x121a
-#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001
-#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002
-#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003
-#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005
-#define PCI_DEVICE_ID_3DFX_VOODOO5 0x0009
-
-
-
-#define PCI_VENDOR_ID_AVM 0x1244
-#define PCI_DEVICE_ID_AVM_B1 0x0700
-#define PCI_DEVICE_ID_AVM_C4 0x0800
-#define PCI_DEVICE_ID_AVM_A1 0x0a00
-#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00
-#define PCI_DEVICE_ID_AVM_C2 0x1100
-#define PCI_DEVICE_ID_AVM_T1 0x1200
-
-
-#define PCI_VENDOR_ID_STALLION 0x124d
-
-/* Allied Telesyn */
-#define PCI_VENDOR_ID_AT 0x1259
-#define PCI_SUBDEVICE_ID_AT_2700FX 0x2701
-#define PCI_SUBDEVICE_ID_AT_2701FX 0x2703
-
-#define PCI_VENDOR_ID_ESS 0x125d
-#define PCI_DEVICE_ID_ESS_ESS1968 0x1968
-#define PCI_DEVICE_ID_ESS_ESS1978 0x1978
-#define PCI_DEVICE_ID_ESS_ALLEGRO_1 0x1988
-#define PCI_DEVICE_ID_ESS_ALLEGRO 0x1989
-#define PCI_DEVICE_ID_ESS_CANYON3D_2LE 0x1990
-#define PCI_DEVICE_ID_ESS_CANYON3D_2 0x1992
-#define PCI_DEVICE_ID_ESS_MAESTRO3 0x1998
-#define PCI_DEVICE_ID_ESS_MAESTRO3_1 0x1999
-#define PCI_DEVICE_ID_ESS_MAESTRO3_HW 0x199a
-#define PCI_DEVICE_ID_ESS_MAESTRO3_2 0x199b
-
-#define PCI_VENDOR_ID_SATSAGEM 0x1267
-#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016
-
-
-#define PCI_VENDOR_ID_ENSONIQ 0x1274
-#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880
-#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000
-#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371
-
-#define PCI_VENDOR_ID_TRANSMETA 0x1279
-#define PCI_DEVICE_ID_EFFICEON 0x0060
-
-#define PCI_VENDOR_ID_ROCKWELL 0x127A
-
-#define PCI_VENDOR_ID_ITE 0x1283
-#define PCI_DEVICE_ID_ITE_IT8172G 0x8172
-#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801
-#define PCI_DEVICE_ID_ITE_8211 0x8211
-#define PCI_DEVICE_ID_ITE_8212 0x8212
-#define PCI_DEVICE_ID_ITE_8872 0x8872
-#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
-
-/* formerly Platform Tech */
-#define PCI_DEVICE_ID_ESS_ESS0100 0x0100
-
-#define PCI_VENDOR_ID_ALTEON 0x12ae
-
-
-#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_20MHZ 0x000C
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_PTM 0x000D
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_NT960PCI 0x0100
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_2 0x0201
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_TITAN_4 0x0202
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_232 0x0300
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_232 0x0301
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_232 0x0302
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_1_1 0x0310
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_2 0x0311
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_4 0x0312
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2 0x0320
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4 0x0321
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8 0x0322
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_2_485 0x0330
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_4_485 0x0331
-#define PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485 0x0332
-
-
-#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2
-#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018
-
-#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0
-#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031
-#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021
-#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011
-#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041
-#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D
-#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001
-#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010
-
-#define PCI_VENDOR_ID_AUREAL 0x12eb
-#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001
-#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002
-#define PCI_DEVICE_ID_AUREAL_ADVANTAGE 0x0003
-
-#define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
-#define PCI_DEVICE_ID_LML_33R10 0x8a02
-
-
-#define PCI_VENDOR_ID_SIIG 0x131f
-#define PCI_SUBVENDOR_ID_SIIG 0x131f
-#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000
-#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001
-#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002
-#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010
-#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011
-#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012
-#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020
-#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021
-#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030
-#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031
-#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032
-#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034
-#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035
-#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036
-#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050
-#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051
-#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052
-#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000
-#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001
-#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002
-#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020
-#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021
-#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030
-#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031
-#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032
-#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040
-#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041
-#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042
-#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010
-#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011
-#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012
-#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050
-#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051
-#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052
-#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060
-#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061
-#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062
-#define PCI_DEVICE_ID_SIIG_8S_20x_550 0x2080
-#define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081
-#define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082
-#define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050
-
-#define PCI_VENDOR_ID_RADISYS 0x1331
-
-#define PCI_VENDOR_ID_DOMEX 0x134a
-#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001
-
-#define PCI_VENDOR_ID_INTASHIELD 0x135a
-#define PCI_DEVICE_ID_INTASHIELD_IS200 0x0d80
-
-#define PCI_VENDOR_ID_QUATECH 0x135C
-#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010
-#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020
-#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050
-#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060
-
-#define PCI_VENDOR_ID_SEALEVEL 0x135e
-#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101
-#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201
-#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402
-#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202
-#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401
-#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801
-#define PCI_DEVICE_ID_SEALEVEL_UCOMM8 0x7804
-
-#define PCI_VENDOR_ID_HYPERCOPE 0x1365
-#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050
-#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104
-#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106
-#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107
-#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108
-
-#define PCI_VENDOR_ID_KAWASAKI 0x136b
-#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01
-
-#define PCI_VENDOR_ID_CNET 0x1371
-#define PCI_DEVICE_ID_CNET_GIGACARD 0x434e
-
-#define PCI_VENDOR_ID_LMC 0x1376
-#define PCI_DEVICE_ID_LMC_HSSI 0x0003
-#define PCI_DEVICE_ID_LMC_DS3 0x0004
-#define PCI_DEVICE_ID_LMC_SSI 0x0005
-#define PCI_DEVICE_ID_LMC_T1 0x0006
-
-
-#define PCI_VENDOR_ID_NETGEAR 0x1385
-#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a
-
-#define PCI_VENDOR_ID_APPLICOM 0x1389
-#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001
-#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002
-#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003
-
-#define PCI_VENDOR_ID_MOXA 0x1393
-#define PCI_DEVICE_ID_MOXA_RC7000 0x0001
-#define PCI_DEVICE_ID_MOXA_CP102 0x1020
-#define PCI_DEVICE_ID_MOXA_CP102UL 0x1021
-#define PCI_DEVICE_ID_MOXA_CP102U 0x1022
-#define PCI_DEVICE_ID_MOXA_C104 0x1040
-#define PCI_DEVICE_ID_MOXA_CP104U 0x1041
-#define PCI_DEVICE_ID_MOXA_CP104JU 0x1042
-#define PCI_DEVICE_ID_MOXA_CT114 0x1140
-#define PCI_DEVICE_ID_MOXA_CP114 0x1141
-#define PCI_DEVICE_ID_MOXA_CP118U 0x1180
-#define PCI_DEVICE_ID_MOXA_CP132 0x1320
-#define PCI_DEVICE_ID_MOXA_CP132U 0x1321
-#define PCI_DEVICE_ID_MOXA_CP134U 0x1340
-#define PCI_DEVICE_ID_MOXA_C168 0x1680
-#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
-
-#define PCI_VENDOR_ID_CCD 0x1397
-#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0
-#define PCI_DEVICE_ID_CCD_B000 0xb000
-#define PCI_DEVICE_ID_CCD_B006 0xb006
-#define PCI_DEVICE_ID_CCD_B007 0xb007
-#define PCI_DEVICE_ID_CCD_B008 0xb008
-#define PCI_DEVICE_ID_CCD_B009 0xb009
-#define PCI_DEVICE_ID_CCD_B00A 0xb00a
-#define PCI_DEVICE_ID_CCD_B00B 0xb00b
-#define PCI_DEVICE_ID_CCD_B00C 0xb00c
-#define PCI_DEVICE_ID_CCD_B100 0xb100
-#define PCI_DEVICE_ID_CCD_B700 0xb700
-#define PCI_DEVICE_ID_CCD_B701 0xb701
-
-#define PCI_VENDOR_ID_EXAR 0x13a8
-#define PCI_DEVICE_ID_EXAR_XR17C152 0x0152
-#define PCI_DEVICE_ID_EXAR_XR17C154 0x0154
-#define PCI_DEVICE_ID_EXAR_XR17C158 0x0158
-
-#define PCI_VENDOR_ID_MICROGATE 0x13c0
-#define PCI_DEVICE_ID_MICROGATE_USC 0x0010
-#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030
-
-#define PCI_VENDOR_ID_3WARE 0x13C1
-#define PCI_DEVICE_ID_3WARE_1000 0x1000
-#define PCI_DEVICE_ID_3WARE_7000 0x1001
-#define PCI_DEVICE_ID_3WARE_9000 0x1002
-
-#define PCI_VENDOR_ID_IOMEGA 0x13ca
-#define PCI_DEVICE_ID_IOMEGA_BUZ 0x4231
-
-#define PCI_VENDOR_ID_ABOCOM 0x13D1
-#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1
-
-#define PCI_VENDOR_ID_CMEDIA 0x13f6
-#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100
-#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101
-#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111
-#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112
-
-#define PCI_VENDOR_ID_LAVA 0x1407
-#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */
-#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */
-#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */
-#define PCI_DEVICE_ID_LAVA_OCTO_A 0x0180 /* 4x 16550A, half of 8 port */
-#define PCI_DEVICE_ID_LAVA_OCTO_B 0x0181 /* 4x 16550A, half of 8 port */
-#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */
-#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201 /* 2x 16650, half of 4 port */
-#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202 /* 2x 16650, half of 4 port */
-#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500 /* 1x 16550 */
-#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600 /* 1x 16650 */
-#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000
-#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002 /* The Lava Dual Parallel is */
-#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003 /* two PCI devices on a card */
-#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800
-
-#define PCI_VENDOR_ID_TIMEDIA 0x1409
-#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168
-
-#define PCI_VENDOR_ID_ICE 0x1412
-#define PCI_DEVICE_ID_ICE_1712 0x1712
-#define PCI_DEVICE_ID_VT1724 0x1724
-
-#define PCI_VENDOR_ID_OXSEMI 0x1415
-#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403
-#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501
-#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511
-#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513
-#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x9521
-
-#define PCI_VENDOR_ID_SAMSUNG 0x144d
-
-#define PCI_VENDOR_ID_MYRICOM 0x14c1
-
-#define PCI_VENDOR_ID_TITAN 0x14D2
-#define PCI_DEVICE_ID_TITAN_010L 0x8001
-#define PCI_DEVICE_ID_TITAN_100L 0x8010
-#define PCI_DEVICE_ID_TITAN_110L 0x8011
-#define PCI_DEVICE_ID_TITAN_200L 0x8020
-#define PCI_DEVICE_ID_TITAN_210L 0x8021
-#define PCI_DEVICE_ID_TITAN_400L 0x8040
-#define PCI_DEVICE_ID_TITAN_800L 0x8080
-#define PCI_DEVICE_ID_TITAN_100 0xA001
-#define PCI_DEVICE_ID_TITAN_200 0xA005
-#define PCI_DEVICE_ID_TITAN_400 0xA003
-#define PCI_DEVICE_ID_TITAN_800B 0xA004
-
-#define PCI_VENDOR_ID_PANACOM 0x14d4
-#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400
-#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402
-
-
-#define PCI_VENDOR_ID_AFAVLAB 0x14db
-#define PCI_DEVICE_ID_AFAVLAB_P028 0x2180
-#define PCI_DEVICE_ID_AFAVLAB_P030 0x2182
-#define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150
-
-#define PCI_VENDOR_ID_BROADCOM 0x14e4
-#define PCI_DEVICE_ID_TIGON3_5752 0x1600
-#define PCI_DEVICE_ID_TIGON3_5752M 0x1601
-#define PCI_DEVICE_ID_TIGON3_5700 0x1644
-#define PCI_DEVICE_ID_TIGON3_5701 0x1645
-#define PCI_DEVICE_ID_TIGON3_5702 0x1646
-#define PCI_DEVICE_ID_TIGON3_5703 0x1647
-#define PCI_DEVICE_ID_TIGON3_5704 0x1648
-#define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649
-#define PCI_DEVICE_ID_NX2_5706 0x164a
-#define PCI_DEVICE_ID_NX2_5708 0x164c
-#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d
-#define PCI_DEVICE_ID_TIGON3_5705 0x1653
-#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654
-#define PCI_DEVICE_ID_TIGON3_5720 0x1658
-#define PCI_DEVICE_ID_TIGON3_5721 0x1659
-#define PCI_DEVICE_ID_TIGON3_5705M 0x165d
-#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e
-#define PCI_DEVICE_ID_TIGON3_5714 0x1668
-#define PCI_DEVICE_ID_TIGON3_5714S 0x1669
-#define PCI_DEVICE_ID_TIGON3_5780 0x166a
-#define PCI_DEVICE_ID_TIGON3_5780S 0x166b
-#define PCI_DEVICE_ID_TIGON3_5705F 0x166e
-#define PCI_DEVICE_ID_TIGON3_5754M 0x1672
-#define PCI_DEVICE_ID_TIGON3_5755M 0x1673
-#define PCI_DEVICE_ID_TIGON3_5750 0x1676
-#define PCI_DEVICE_ID_TIGON3_5751 0x1677
-#define PCI_DEVICE_ID_TIGON3_5715 0x1678
-#define PCI_DEVICE_ID_TIGON3_5715S 0x1679
-#define PCI_DEVICE_ID_TIGON3_5754 0x167a
-#define PCI_DEVICE_ID_TIGON3_5755 0x167b
-#define PCI_DEVICE_ID_TIGON3_5750M 0x167c
-#define PCI_DEVICE_ID_TIGON3_5751M 0x167d
-#define PCI_DEVICE_ID_TIGON3_5751F 0x167e
-#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
-#define PCI_DEVICE_ID_TIGON3_5782 0x1696
-#define PCI_DEVICE_ID_TIGON3_5786 0x169a
-#define PCI_DEVICE_ID_TIGON3_5787 0x169b
-#define PCI_DEVICE_ID_TIGON3_5788 0x169c
-#define PCI_DEVICE_ID_TIGON3_5789 0x169d
-#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6
-#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7
-#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8
-#define PCI_DEVICE_ID_NX2_5706S 0x16aa
-#define PCI_DEVICE_ID_NX2_5708S 0x16ac
-#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6
-#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7
-#define PCI_DEVICE_ID_TIGON3_5781 0x16dd
-#define PCI_DEVICE_ID_TIGON3_5753 0x16f7
-#define PCI_DEVICE_ID_TIGON3_5753M 0x16fd
-#define PCI_DEVICE_ID_TIGON3_5753F 0x16fe
-#define PCI_DEVICE_ID_TIGON3_5901 0x170d
-#define PCI_DEVICE_ID_BCM4401B1 0x170c
-#define PCI_DEVICE_ID_TIGON3_5901_2 0x170e
-#define PCI_DEVICE_ID_BCM4401 0x4401
-#define PCI_DEVICE_ID_BCM4401B0 0x4402
-
-#define PCI_VENDOR_ID_TOPIC 0x151f
-#define PCI_DEVICE_ID_TOPIC_TP560 0x0000
-
-#define PCI_VENDOR_ID_ENE 0x1524
-#define PCI_DEVICE_ID_ENE_1211 0x1211
-#define PCI_DEVICE_ID_ENE_1225 0x1225
-#define PCI_DEVICE_ID_ENE_1410 0x1410
-#define PCI_DEVICE_ID_ENE_710 0x1411
-#define PCI_DEVICE_ID_ENE_712 0x1412
-#define PCI_DEVICE_ID_ENE_1420 0x1420
-#define PCI_DEVICE_ID_ENE_720 0x1421
-#define PCI_DEVICE_ID_ENE_722 0x1422
-
-#define PCI_VENDOR_ID_CHELSIO 0x1425
-
-
-#define PCI_VENDOR_ID_SYBA 0x1592
-#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
-#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783
-
-#define PCI_VENDOR_ID_MORETON 0x15aa
-#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000
-
-#define PCI_VENDOR_ID_ZOLTRIX 0x15b0
-#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0
-
-#define PCI_VENDOR_ID_MELLANOX 0x15b3
-#define PCI_DEVICE_ID_MELLANOX_TAVOR 0x5a44
-#define PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE 0x5a46
-#define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278
-#define PCI_DEVICE_ID_MELLANOX_ARBEL 0x6282
-#define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c
-#define PCI_DEVICE_ID_MELLANOX_SINAI 0x6274
-
-#define PCI_VENDOR_ID_PDC 0x15e9
-
-
-#define PCI_VENDOR_ID_FARSITE 0x1619
-#define PCI_DEVICE_ID_FARSITE_T2P 0x0400
-#define PCI_DEVICE_ID_FARSITE_T4P 0x0440
-#define PCI_DEVICE_ID_FARSITE_T1U 0x0610
-#define PCI_DEVICE_ID_FARSITE_T2U 0x0620
-#define PCI_DEVICE_ID_FARSITE_T4U 0x0640
-#define PCI_DEVICE_ID_FARSITE_TE1 0x1610
-#define PCI_DEVICE_ID_FARSITE_TE1C 0x1612
-
-#define PCI_VENDOR_ID_SIBYTE 0x166d
-#define PCI_DEVICE_ID_BCM1250_HT 0x0002
-
-#define PCI_VENDOR_ID_NETCELL 0x169c
-#define PCI_DEVICE_ID_REVOLUTION 0x0044
-
-#define PCI_VENDOR_ID_VITESSE 0x1725
-#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
-
-#define PCI_VENDOR_ID_LINKSYS 0x1737
-#define PCI_DEVICE_ID_LINKSYS_EG1064 0x1064
-
-#define PCI_VENDOR_ID_ALTIMA 0x173b
-#define PCI_DEVICE_ID_ALTIMA_AC1000 0x03e8
-#define PCI_DEVICE_ID_ALTIMA_AC1001 0x03e9
-#define PCI_DEVICE_ID_ALTIMA_AC9100 0x03ea
-#define PCI_DEVICE_ID_ALTIMA_AC1003 0x03eb
-
-#define PCI_VENDOR_ID_S2IO 0x17d5
-#define PCI_DEVICE_ID_S2IO_WIN 0x5731
-#define PCI_DEVICE_ID_S2IO_UNI 0x5831
-#define PCI_DEVICE_ID_HERC_WIN 0x5732
-#define PCI_DEVICE_ID_HERC_UNI 0x5832
-
-
-#define PCI_VENDOR_ID_SITECOM 0x182d
-#define PCI_DEVICE_ID_SITECOM_DC105V2 0x3069
-
-#define PCI_VENDOR_ID_TOPSPIN 0x1867
-
-#define PCI_VENDOR_ID_TDI 0x192E
-#define PCI_DEVICE_ID_TDI_EHCI 0x0101
-
-#define PCI_VENDOR_ID_JMICRON 0x197B
-#define PCI_DEVICE_ID_JMICRON_JMB360 0x2360
-#define PCI_DEVICE_ID_JMICRON_JMB361 0x2361
-#define PCI_DEVICE_ID_JMICRON_JMB363 0x2363
-#define PCI_DEVICE_ID_JMICRON_JMB365 0x2365
-#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
-#define PCI_DEVICE_ID_JMICRON_JMB368 0x2368
-
-#define PCI_VENDOR_ID_TEKRAM 0x1de1
-#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29
-
-#define PCI_VENDOR_ID_HINT 0x3388
-#define PCI_DEVICE_ID_HINT_VXPROII_IDE 0x8013
-
-#define PCI_VENDOR_ID_3DLABS 0x3d3d
-#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007
-#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009
-
-
-#define PCI_VENDOR_ID_AKS 0x416c
-#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100
-
-
-
-#define PCI_VENDOR_ID_S3 0x5333
-#define PCI_DEVICE_ID_S3_TRIO 0x8811
-#define PCI_DEVICE_ID_S3_868 0x8880
-#define PCI_DEVICE_ID_S3_968 0x88f0
-#define PCI_DEVICE_ID_S3_SAVAGE4 0x8a25
-#define PCI_DEVICE_ID_S3_PROSAVAGE8 0x8d04
-#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00
-
-#define PCI_VENDOR_ID_DUNORD 0x5544
-#define PCI_DEVICE_ID_DUNORD_I3000 0x0001
-
-
-#define PCI_VENDOR_ID_DCI 0x6666
-#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001
-#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002
-#define PCI_DEVICE_ID_DCI_PCCOM2 0x0004
-
-#define PCI_VENDOR_ID_INTEL 0x8086
-#define PCI_DEVICE_ID_INTEL_EESSC 0x0008
-#define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320
-#define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321
-#define PCI_DEVICE_ID_INTEL_PXH_0 0x0329
-#define PCI_DEVICE_ID_INTEL_PXH_1 0x032A
-#define PCI_DEVICE_ID_INTEL_PXHV 0x032C
-#define PCI_DEVICE_ID_INTEL_82375 0x0482
-#define PCI_DEVICE_ID_INTEL_82424 0x0483
-#define PCI_DEVICE_ID_INTEL_82378 0x0484
-#define PCI_DEVICE_ID_INTEL_I960 0x0960
-#define PCI_DEVICE_ID_INTEL_I960RM 0x0962
-#define PCI_DEVICE_ID_INTEL_82815_MC 0x1130
-#define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132
-#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221
-#define PCI_DEVICE_ID_INTEL_7505_0 0x2550
-#define PCI_DEVICE_ID_INTEL_7205_0 0x255d
-#define PCI_DEVICE_ID_INTEL_82437 0x122d
-#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e
-#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230
-#define PCI_DEVICE_ID_INTEL_82371MX 0x1234
-#define PCI_DEVICE_ID_INTEL_82441 0x1237
-#define PCI_DEVICE_ID_INTEL_82380FB 0x124b
-#define PCI_DEVICE_ID_INTEL_82439 0x1250
-#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960
-#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21
-#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30
-#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38
-#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
-#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
-#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413
-#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415
-#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416
-#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418
-#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420
-#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421
-#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423
-#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425
-#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426
-#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428
-#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440
-#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443
-#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445
-#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448
-#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a
-#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b
-#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c
-#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e
-#define PCI_DEVICE_ID_INTEL_82801E_0 0x2450
-#define PCI_DEVICE_ID_INTEL_82801E_11 0x245b
-#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480
-#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483
-#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485
-#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486
-#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a
-#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b
-#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c
-#define PCI_DEVICE_ID_INTEL_82801DB_0 0x24c0
-#define PCI_DEVICE_ID_INTEL_82801DB_1 0x24c1
-#define PCI_DEVICE_ID_INTEL_82801DB_3 0x24c3
-#define PCI_DEVICE_ID_INTEL_82801DB_5 0x24c5
-#define PCI_DEVICE_ID_INTEL_82801DB_6 0x24c6
-#define PCI_DEVICE_ID_INTEL_82801DB_9 0x24c9
-#define PCI_DEVICE_ID_INTEL_82801DB_10 0x24ca
-#define PCI_DEVICE_ID_INTEL_82801DB_11 0x24cb
-#define PCI_DEVICE_ID_INTEL_82801DB_12 0x24cc
-#define PCI_DEVICE_ID_INTEL_82801EB_0 0x24d0
-#define PCI_DEVICE_ID_INTEL_82801EB_1 0x24d1
-#define PCI_DEVICE_ID_INTEL_82801EB_3 0x24d3
-#define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5
-#define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6
-#define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db
-#define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd
-#define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1
-#define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2
-#define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4
-#define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6
-#define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab
-#define PCI_DEVICE_ID_INTEL_82820_HB 0x2500
-#define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501
-#define PCI_DEVICE_ID_INTEL_82850_HB 0x2530
-#define PCI_DEVICE_ID_INTEL_82860_HB 0x2531
-#define PCI_DEVICE_ID_INTEL_E7501_MCH 0x254c
-#define PCI_DEVICE_ID_INTEL_82845G_HB 0x2560
-#define PCI_DEVICE_ID_INTEL_82845G_IG 0x2562
-#define PCI_DEVICE_ID_INTEL_82865_HB 0x2570
-#define PCI_DEVICE_ID_INTEL_82865_IG 0x2572
-#define PCI_DEVICE_ID_INTEL_82875_HB 0x2578
-#define PCI_DEVICE_ID_INTEL_82915G_HB 0x2580
-#define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582
-#define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590
-#define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592
-#define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770
-#define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772
-#define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0
-#define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2
-#define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640
-#define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641
-#define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642
-#define PCI_DEVICE_ID_INTEL_ICH6_16 0x266a
-#define PCI_DEVICE_ID_INTEL_ICH6_17 0x266d
-#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e
-#define PCI_DEVICE_ID_INTEL_ICH6_19 0x266f
-#define PCI_DEVICE_ID_INTEL_ESB2_0 0x2670
-#define PCI_DEVICE_ID_INTEL_ESB2_14 0x2698
-#define PCI_DEVICE_ID_INTEL_ESB2_17 0x269b
-#define PCI_DEVICE_ID_INTEL_ESB2_18 0x269e
-#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
-#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
-#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
-#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
-#define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da
-#define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd
-#define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de
-#define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df
-#define PCI_DEVICE_ID_INTEL_ICH8_0 0x2810
-#define PCI_DEVICE_ID_INTEL_ICH8_1 0x2811
-#define PCI_DEVICE_ID_INTEL_ICH8_2 0x2812
-#define PCI_DEVICE_ID_INTEL_ICH8_3 0x2814
-#define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815
-#define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e
-#define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850
-#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
-#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
-#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
-#define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580
-#define PCI_DEVICE_ID_INTEL_82855GM_IG 0x3582
-#define PCI_DEVICE_ID_INTEL_E7520_MCH 0x3590
-#define PCI_DEVICE_ID_INTEL_E7320_MCH 0x3592
-#define PCI_DEVICE_ID_INTEL_MCH_PA 0x3595
-#define PCI_DEVICE_ID_INTEL_MCH_PA1 0x3596
-#define PCI_DEVICE_ID_INTEL_MCH_PB 0x3597
-#define PCI_DEVICE_ID_INTEL_MCH_PB1 0x3598
-#define PCI_DEVICE_ID_INTEL_MCH_PC 0x3599
-#define PCI_DEVICE_ID_INTEL_MCH_PC1 0x359a
-#define PCI_DEVICE_ID_INTEL_E7525_MCH 0x359e
-#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000
-#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010
-#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
-#define PCI_DEVICE_ID_INTEL_82437VX 0x7030
-#define PCI_DEVICE_ID_INTEL_82439TX 0x7100
-#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110
-#define PCI_DEVICE_ID_INTEL_82371AB 0x7111
-#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112
-#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113
-#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120
-#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121
-#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122
-#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123
-#define PCI_DEVICE_ID_INTEL_82810E_MC 0x7124
-#define PCI_DEVICE_ID_INTEL_82810E_IG 0x7125
-#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180
-#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181
-#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190
-#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191
-#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192
-#define PCI_DEVICE_ID_INTEL_440MX 0x7195
-#define PCI_DEVICE_ID_INTEL_440MX_6 0x7196
-#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198
-#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199
-#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b
-#define PCI_DEVICE_ID_INTEL_82443GX_0 0x71a0
-#define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2
-#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601
-#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4
-#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5
-#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca
-#define PCI_DEVICE_ID_INTEL_82454NX 0x84cb
-#define PCI_DEVICE_ID_INTEL_84460GX 0x84ea
-#define PCI_DEVICE_ID_INTEL_IXP4XX 0x8500
-#define PCI_DEVICE_ID_INTEL_IXP2800 0x9004
-#define PCI_DEVICE_ID_INTEL_S21152BB 0xb152
-
-#define PCI_VENDOR_ID_SCALEMP 0x8686
-#define PCI_DEVICE_ID_SCALEMP_VSMP_CTL 0x1010
-
-#define PCI_VENDOR_ID_COMPUTONE 0x8e0e
-#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291
-#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302
-#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e
-#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001
-#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002
-#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003
-
-#define PCI_VENDOR_ID_KTI 0x8e2e
-
-#define PCI_VENDOR_ID_ADAPTEC 0x9004
-#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078
-#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178
-#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860
-#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078
-#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578
-#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038
-#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075
-#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078
-#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178
-#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078
-#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178
-#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278
-#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378
-#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478
-#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895
-#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078
-#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178
-#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278
-#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378
-#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478
-#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578
-#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678
-#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778
-#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878
-
-#define PCI_VENDOR_ID_ADAPTEC2 0x9005
-#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010
-#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011
-#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013
-#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f
-#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050
-#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051
-#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f
-#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080
-#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081
-#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083
-#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f
-#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0
-#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1
-#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3
-#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf
-#define PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN 0x0500
-#define PCI_DEVICE_ID_ADAPTEC2_SCAMP 0x0503
-
-
-#define PCI_VENDOR_ID_HOLTEK 0x9412
-#define PCI_DEVICE_ID_HOLTEK_6565 0x6565
-
-#define PCI_VENDOR_ID_NETMOS 0x9710
-#define PCI_DEVICE_ID_NETMOS_9705 0x9705
-#define PCI_DEVICE_ID_NETMOS_9715 0x9715
-#define PCI_DEVICE_ID_NETMOS_9735 0x9735
-#define PCI_DEVICE_ID_NETMOS_9745 0x9745
-#define PCI_DEVICE_ID_NETMOS_9755 0x9755
-#define PCI_DEVICE_ID_NETMOS_9805 0x9805
-#define PCI_DEVICE_ID_NETMOS_9815 0x9815
-#define PCI_DEVICE_ID_NETMOS_9835 0x9835
-#define PCI_DEVICE_ID_NETMOS_9845 0x9845
-#define PCI_DEVICE_ID_NETMOS_9855 0x9855
-
-#define PCI_SUBVENDOR_ID_EXSYS 0xd84d
-#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014
-#define PCI_SUBDEVICE_ID_EXSYS_4055 0x4055
-
-#define PCI_VENDOR_ID_TIGERJET 0xe159
-#define PCI_DEVICE_ID_TIGERJET_300 0x0001
-#define PCI_DEVICE_ID_TIGERJET_100 0x0002
-
-#define PCI_VENDOR_ID_TTTECH 0x0357
-#define PCI_DEVICE_ID_TTTECH_MC322 0x000A
-
-#define PCI_VENDOR_ID_XILINX_RME 0xea60
-#define PCI_DEVICE_ID_RME_DIGI32 0x9896
-#define PCI_DEVICE_ID_RME_DIGI32_PRO 0x9897
-#define PCI_DEVICE_ID_RME_DIGI32_8 0x9898
-
diff --git a/original/linux/pci_regs.h b/original/linux/pci_regs.h
deleted file mode 100644
index 96930cb..0000000
--- a/original/linux/pci_regs.h
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * pci_regs.h
- *
- * PCI standard defines
- * Copyright 1994, Drew Eckhardt
- * Copyright 1997--1999 Martin Mares <mj@ucw.cz>
- *
- * For more information, please consult the following manuals (look at
- * http://www.pcisig.com/ for how to get them):
- *
- * PCI BIOS Specification
- * PCI Local Bus Specification
- * PCI to PCI Bridge Specification
- * PCI System Design Guide
- */
-
-#ifndef LINUX_PCI_REGS_H
-#define LINUX_PCI_REGS_H
-
-/*
- * Under PCI, each device has 256 bytes of configuration address space,
- * of which the first 64 bytes are standardized as follows:
- */
-#define PCI_VENDOR_ID 0x00 /* 16 bits */
-#define PCI_DEVICE_ID 0x02 /* 16 bits */
-#define PCI_COMMAND 0x04 /* 16 bits */
-#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */
-#define PCI_COMMAND_MEMORY 0x2 /* Enable response in Memory space */
-#define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */
-#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */
-#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */
-#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */
-#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */
-#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */
-#define PCI_COMMAND_SERR 0x100 /* Enable SERR */
-#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */
-#define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */
-
-#define PCI_STATUS 0x06 /* 16 bits */
-#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */
-#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */
-#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */
-#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */
-#define PCI_STATUS_PARITY 0x100 /* Detected parity error */
-#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */
-#define PCI_STATUS_DEVSEL_FAST 0x000
-#define PCI_STATUS_DEVSEL_MEDIUM 0x200
-#define PCI_STATUS_DEVSEL_SLOW 0x400
-#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */
-#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */
-#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */
-#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */
-#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */
-
-#define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
-#define PCI_REVISION_ID 0x08 /* Revision ID */
-#define PCI_CLASS_PROG 0x09 /* Reg. Level Programming Interface */
-#define PCI_CLASS_DEVICE 0x0a /* Device class */
-
-#define PCI_CACHE_LINE_SIZE 0x0c /* 8 bits */
-#define PCI_LATENCY_TIMER 0x0d /* 8 bits */
-#define PCI_HEADER_TYPE 0x0e /* 8 bits */
-#define PCI_HEADER_TYPE_NORMAL 0
-#define PCI_HEADER_TYPE_BRIDGE 1
-#define PCI_HEADER_TYPE_CARDBUS 2
-
-#define PCI_BIST 0x0f /* 8 bits */
-#define PCI_BIST_CODE_MASK 0x0f /* Return result */
-#define PCI_BIST_START 0x40 /* 1 to start BIST, 2 secs or less */
-#define PCI_BIST_CAPABLE 0x80 /* 1 if BIST capable */
-
-/*
- * Base addresses specify locations in memory or I/O space.
- * Decoded size can be determined by writing a value of
- * 0xffffffff to the register, and reading it back. Only
- * 1 bits are decoded.
- */
-#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */
-#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits [htype 0,1 only] */
-#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits [htype 0 only] */
-#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */
-#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */
-#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */
-#define PCI_BASE_ADDRESS_SPACE 0x01 /* 0 = memory, 1 = I/O */
-#define PCI_BASE_ADDRESS_SPACE_IO 0x01
-#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
-#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
-#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */
-#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */
-#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */
-#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */
-#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
-#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL)
-/* bit 1 is reserved if address_space = 1 */
-
-/* Header type 0 (normal devices) */
-#define PCI_CARDBUS_CIS 0x28
-#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
-#define PCI_SUBSYSTEM_ID 0x2e
-#define PCI_ROM_ADDRESS 0x30 /* Bits 31..11 are address, 10..1 reserved */
-#define PCI_ROM_ADDRESS_ENABLE 0x01
-#define PCI_ROM_ADDRESS_MASK (~0x7ffUL)
-
-#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */
-
-/* 0x35-0x3b are reserved */
-#define PCI_INTERRUPT_LINE 0x3c /* 8 bits */
-#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */
-#define PCI_MIN_GNT 0x3e /* 8 bits */
-#define PCI_MAX_LAT 0x3f /* 8 bits */
-
-/* Header type 1 (PCI-to-PCI bridges) */
-#define PCI_PRIMARY_BUS 0x18 /* Primary bus number */
-#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */
-#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */
-#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */
-#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */
-#define PCI_IO_LIMIT 0x1d
-#define PCI_IO_RANGE_TYPE_MASK 0x0fUL /* I/O bridging type */
-#define PCI_IO_RANGE_TYPE_16 0x00
-#define PCI_IO_RANGE_TYPE_32 0x01
-#define PCI_IO_RANGE_MASK (~0x0fUL)
-#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */
-#define PCI_MEMORY_BASE 0x20 /* Memory range behind */
-#define PCI_MEMORY_LIMIT 0x22
-#define PCI_MEMORY_RANGE_TYPE_MASK 0x0fUL
-#define PCI_MEMORY_RANGE_MASK (~0x0fUL)
-#define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */
-#define PCI_PREF_MEMORY_LIMIT 0x26
-#define PCI_PREF_RANGE_TYPE_MASK 0x0fUL
-#define PCI_PREF_RANGE_TYPE_32 0x00
-#define PCI_PREF_RANGE_TYPE_64 0x01
-#define PCI_PREF_RANGE_MASK (~0x0fUL)
-#define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */
-#define PCI_PREF_LIMIT_UPPER32 0x2c
-#define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */
-#define PCI_IO_LIMIT_UPPER16 0x32
-/* 0x34 same as for htype 0 */
-/* 0x35-0x3b is reserved */
-#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */
-/* 0x3c-0x3d are same as for htype 0 */
-#define PCI_BRIDGE_CONTROL 0x3e
-#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */
-#define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */
-#define PCI_BRIDGE_CTL_NO_ISA 0x04 /* Disable bridging of ISA ports */
-#define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */
-#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */
-#define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */
-#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */
-
-/* Header type 2 (CardBus bridges) */
-#define PCI_CB_CAPABILITY_LIST 0x14
-/* 0x15 reserved */
-#define PCI_CB_SEC_STATUS 0x16 /* Secondary status */
-#define PCI_CB_PRIMARY_BUS 0x18 /* PCI bus number */
-#define PCI_CB_CARD_BUS 0x19 /* CardBus bus number */
-#define PCI_CB_SUBORDINATE_BUS 0x1a /* Subordinate bus number */
-#define PCI_CB_LATENCY_TIMER 0x1b /* CardBus latency timer */
-#define PCI_CB_MEMORY_BASE_0 0x1c
-#define PCI_CB_MEMORY_LIMIT_0 0x20
-#define PCI_CB_MEMORY_BASE_1 0x24
-#define PCI_CB_MEMORY_LIMIT_1 0x28
-#define PCI_CB_IO_BASE_0 0x2c
-#define PCI_CB_IO_BASE_0_HI 0x2e
-#define PCI_CB_IO_LIMIT_0 0x30
-#define PCI_CB_IO_LIMIT_0_HI 0x32
-#define PCI_CB_IO_BASE_1 0x34
-#define PCI_CB_IO_BASE_1_HI 0x36
-#define PCI_CB_IO_LIMIT_1 0x38
-#define PCI_CB_IO_LIMIT_1_HI 0x3a
-#define PCI_CB_IO_RANGE_MASK (~0x03UL)
-/* 0x3c-0x3d are same as for htype 0 */
-#define PCI_CB_BRIDGE_CONTROL 0x3e
-#define PCI_CB_BRIDGE_CTL_PARITY 0x01 /* Similar to standard bridge control register */
-#define PCI_CB_BRIDGE_CTL_SERR 0x02
-#define PCI_CB_BRIDGE_CTL_ISA 0x04
-#define PCI_CB_BRIDGE_CTL_VGA 0x08
-#define PCI_CB_BRIDGE_CTL_MASTER_ABORT 0x20
-#define PCI_CB_BRIDGE_CTL_CB_RESET 0x40 /* CardBus reset */
-#define PCI_CB_BRIDGE_CTL_16BIT_INT 0x80 /* Enable interrupt for 16-bit cards */
-#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100 /* Prefetch enable for both memory regions */
-#define PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200
-#define PCI_CB_BRIDGE_CTL_POST_WRITES 0x400
-#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40
-#define PCI_CB_SUBSYSTEM_ID 0x42
-#define PCI_CB_LEGACY_MODE_BASE 0x44 /* 16-bit PC Card legacy mode base address (ExCa) */
-/* 0x48-0x7f reserved */
-
-/* Capability lists */
-
-#define PCI_CAP_LIST_ID 0 /* Capability ID */
-#define PCI_CAP_ID_PM 0x01 /* Power Management */
-#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */
-#define PCI_CAP_ID_VPD 0x03 /* Vital Product Data */
-#define PCI_CAP_ID_SLOTID 0x04 /* Slot Identification */
-#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
-#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */
-#define PCI_CAP_ID_PCIX 0x07 /* PCI-X */
-#define PCI_CAP_ID_HT_IRQCONF 0x08 /* HyperTransport IRQ Configuration */
-#define PCI_CAP_ID_VNDR 0x09 /* Vendor specific capability */
-#define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */
-#define PCI_CAP_ID_EXP 0x10 /* PCI Express */
-#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */
-#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */
-#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */
-#define PCI_CAP_SIZEOF 4
-
-/* Power Management Registers */
-
-#define PCI_PM_PMC 2 /* PM Capabilities Register */
-#define PCI_PM_CAP_VER_MASK 0x0007 /* Version */
-#define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */
-#define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */
-#define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */
-#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */
-#define PCI_PM_CAP_D1 0x0200 /* D1 power state support */
-#define PCI_PM_CAP_D2 0x0400 /* D2 power state support */
-#define PCI_PM_CAP_PME 0x0800 /* PME pin supported */
-#define PCI_PM_CAP_PME_MASK 0xF800 /* PME Mask of all supported states */
-#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */
-#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */
-#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */
-#define PCI_PM_CAP_PME_D3 0x4000 /* PME# from D3 (hot) */
-#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */
-#define PCI_PM_CTRL 4 /* PM control and status register */
-#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */
-#define PCI_PM_CTRL_NO_SOFT_RESET 0x0004 /* No reset for D3hot->D0 */
-#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */
-#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */
-#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */
-#define PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */
-#define PCI_PM_PPB_EXTENSIONS 6 /* PPB support extensions (??) */
-#define PCI_PM_PPB_B2_B3 0x40 /* Stop clock when in D3hot (??) */
-#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */
-#define PCI_PM_DATA_REGISTER 7 /* (??) */
-#define PCI_PM_SIZEOF 8
-
-/* AGP registers */
-
-#define PCI_AGP_VERSION 2 /* BCD version number */
-#define PCI_AGP_RFU 3 /* Rest of capability flags */
-#define PCI_AGP_STATUS 4 /* Status register */
-#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */
-#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */
-#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */
-#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */
-#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */
-#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */
-#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */
-#define PCI_AGP_COMMAND 8 /* Control register */
-#define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */
-#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */
-#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */
-#define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */
-#define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */
-#define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */
-#define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */
-#define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */
-#define PCI_AGP_SIZEOF 12
-
-/* Vital Product Data */
-
-#define PCI_VPD_ADDR 2 /* Address to access (15 bits!) */
-#define PCI_VPD_ADDR_MASK 0x7fff /* Address mask */
-#define PCI_VPD_ADDR_F 0x8000 /* Write 0, 1 indicates completion */
-#define PCI_VPD_DATA 4 /* 32-bits of data returned here */
-
-/* Slot Identification */
-
-#define PCI_SID_ESR 2 /* Expansion Slot Register */
-#define PCI_SID_ESR_NSLOTS 0x1f /* Number of expansion slots available */
-#define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */
-#define PCI_SID_CHASSIS_NR 3 /* Chassis Number */
-
-/* Message Signalled Interrupts registers */
-
-#define PCI_MSI_FLAGS 2 /* Various flags */
-#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */
-#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */
-#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */
-#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */
-#define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */
-#define PCI_MSI_RFU 3 /* Rest of capability flags */
-#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */
-#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
-#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */
-#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */
-#define PCI_MSI_MASK_BIT 16 /* Mask bits register */
-
-/* CompactPCI Hotswap Register */
-
-#define PCI_CHSWP_CSR 2 /* Control and Status Register */
-#define PCI_CHSWP_DHA 0x01 /* Device Hiding Arm */
-#define PCI_CHSWP_EIM 0x02 /* ENUM# Signal Mask */
-#define PCI_CHSWP_PIE 0x04 /* Pending Insert or Extract */
-#define PCI_CHSWP_LOO 0x08 /* LED On / Off */
-#define PCI_CHSWP_PI 0x30 /* Programming Interface */
-#define PCI_CHSWP_EXT 0x40 /* ENUM# status - extraction */
-#define PCI_CHSWP_INS 0x80 /* ENUM# status - insertion */
-
-/* PCI-X registers */
-
-#define PCI_X_CMD 2 /* Modes & Features */
-#define PCI_X_CMD_DPERR_E 0x0001 /* Data Parity Error Recovery Enable */
-#define PCI_X_CMD_ERO 0x0002 /* Enable Relaxed Ordering */
-#define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */
-#define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */
-#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */
-#define PCI_X_STATUS 4 /* PCI-X capabilities */
-#define PCI_X_STATUS_DEVFN 0x000000ff /* A copy of devfn */
-#define PCI_X_STATUS_BUS 0x0000ff00 /* A copy of bus nr */
-#define PCI_X_STATUS_64BIT 0x00010000 /* 64-bit device */
-#define PCI_X_STATUS_133MHZ 0x00020000 /* 133 MHz capable */
-#define PCI_X_STATUS_SPL_DISC 0x00040000 /* Split Completion Discarded */
-#define PCI_X_STATUS_UNX_SPL 0x00080000 /* Unexpected Split Completion */
-#define PCI_X_STATUS_COMPLEX 0x00100000 /* Device Complexity */
-#define PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory Read Count */
-#define PCI_X_STATUS_MAX_SPLIT 0x03800000 /* Designed Max Outstanding Split Transactions */
-#define PCI_X_STATUS_MAX_CUM 0x1c000000 /* Designed Max Cumulative Read Size */
-#define PCI_X_STATUS_SPL_ERR 0x20000000 /* Rcvd Split Completion Error Msg */
-#define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */
-#define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */
-
-/* PCI Express capability registers */
-
-#define PCI_EXP_FLAGS 2 /* Capabilities register */
-#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */
-#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */
-#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */
-#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */
-#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */
-#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */
-#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */
-#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */
-#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */
-#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */
-#define PCI_EXP_DEVCAP 4 /* Device capabilities */
-#define PCI_EXP_DEVCAP_PAYLOAD 0x07 /* Max_Payload_Size */
-#define PCI_EXP_DEVCAP_PHANTOM 0x18 /* Phantom functions */
-#define PCI_EXP_DEVCAP_EXT_TAG 0x20 /* Extended tags */
-#define PCI_EXP_DEVCAP_L0S 0x1c0 /* L0s Acceptable Latency */
-#define PCI_EXP_DEVCAP_L1 0xe00 /* L1 Acceptable Latency */
-#define PCI_EXP_DEVCAP_ATN_BUT 0x1000 /* Attention Button Present */
-#define PCI_EXP_DEVCAP_ATN_IND 0x2000 /* Attention Indicator Present */
-#define PCI_EXP_DEVCAP_PWR_IND 0x4000 /* Power Indicator Present */
-#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */
-#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */
-#define PCI_EXP_DEVCTL 8 /* Device Control */
-#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */
-#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */
-#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */
-#define PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */
-#define PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */
-#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */
-#define PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */
-#define PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */
-#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */
-#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */
-#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */
-#define PCI_EXP_DEVSTA 10 /* Device Status */
-#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */
-#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */
-#define PCI_EXP_DEVSTA_FED 0x04 /* Fatal Error Detected */
-#define PCI_EXP_DEVSTA_URD 0x08 /* Unsupported Request Detected */
-#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */
-#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */
-#define PCI_EXP_LNKCAP 12 /* Link Capabilities */
-#define PCI_EXP_LNKCTL 16 /* Link Control */
-#define PCI_EXP_LNKSTA 18 /* Link Status */
-#define PCI_EXP_SLTCAP 20 /* Slot Capabilities */
-#define PCI_EXP_SLTCTL 24 /* Slot Control */
-#define PCI_EXP_SLTSTA 26 /* Slot Status */
-#define PCI_EXP_RTCTL 28 /* Root Control */
-#define PCI_EXP_RTCTL_SECEE 0x01 /* System Error on Correctable Error */
-#define PCI_EXP_RTCTL_SENFEE 0x02 /* System Error on Non-Fatal Error */
-#define PCI_EXP_RTCTL_SEFEE 0x04 /* System Error on Fatal Error */
-#define PCI_EXP_RTCTL_PMEIE 0x08 /* PME Interrupt Enable */
-#define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */
-#define PCI_EXP_RTCAP 30 /* Root Capabilities */
-#define PCI_EXP_RTSTA 32 /* Root Status */
-
-/* Extended Capabilities (PCI-X 2.0 and Express) */
-#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
-#define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf)
-#define PCI_EXT_CAP_NEXT(header) ((header >> 20) & 0xffc)
-
-#define PCI_EXT_CAP_ID_ERR 1
-#define PCI_EXT_CAP_ID_VC 2
-#define PCI_EXT_CAP_ID_DSN 3
-#define PCI_EXT_CAP_ID_PWR 4
-
-/* Advanced Error Reporting */
-#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
-#define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */
-#define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */
-#define PCI_ERR_UNC_POISON_TLP 0x00001000 /* Poisoned TLP */
-#define PCI_ERR_UNC_FCP 0x00002000 /* Flow Control Protocol */
-#define PCI_ERR_UNC_COMP_TIME 0x00004000 /* Completion Timeout */
-#define PCI_ERR_UNC_COMP_ABORT 0x00008000 /* Completer Abort */
-#define PCI_ERR_UNC_UNX_COMP 0x00010000 /* Unexpected Completion */
-#define PCI_ERR_UNC_RX_OVER 0x00020000 /* Receiver Overflow */
-#define PCI_ERR_UNC_MALF_TLP 0x00040000 /* Malformed TLP */
-#define PCI_ERR_UNC_ECRC 0x00080000 /* ECRC Error Status */
-#define PCI_ERR_UNC_UNSUP 0x00100000 /* Unsupported Request */
-#define PCI_ERR_UNCOR_MASK 8 /* Uncorrectable Error Mask */
- /* Same bits as above */
-#define PCI_ERR_UNCOR_SEVER 12 /* Uncorrectable Error Severity */
- /* Same bits as above */
-#define PCI_ERR_COR_STATUS 16 /* Correctable Error Status */
-#define PCI_ERR_COR_RCVR 0x00000001 /* Receiver Error Status */
-#define PCI_ERR_COR_BAD_TLP 0x00000040 /* Bad TLP Status */
-#define PCI_ERR_COR_BAD_DLLP 0x00000080 /* Bad DLLP Status */
-#define PCI_ERR_COR_REP_ROLL 0x00000100 /* REPLAY_NUM Rollover */
-#define PCI_ERR_COR_REP_TIMER 0x00001000 /* Replay Timer Timeout */
-#define PCI_ERR_COR_MASK 20 /* Correctable Error Mask */
- /* Same bits as above */
-#define PCI_ERR_CAP 24 /* Advanced Error Capabilities */
-#define PCI_ERR_CAP_FEP(x) ((x) & 31) /* First Error Pointer */
-#define PCI_ERR_CAP_ECRC_GENC 0x00000020 /* ECRC Generation Capable */
-#define PCI_ERR_CAP_ECRC_GENE 0x00000040 /* ECRC Generation Enable */
-#define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */
-#define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */
-#define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */
-#define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */
-/* Correctable Err Reporting Enable */
-#define PCI_ERR_ROOT_CMD_COR_EN 0x00000001
-/* Non-fatal Err Reporting Enable */
-#define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002
-/* Fatal Err Reporting Enable */
-#define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004
-#define PCI_ERR_ROOT_STATUS 48
-#define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */
-/* Multi ERR_COR Received */
-#define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002
-/* ERR_FATAL/NONFATAL Recevied */
-#define PCI_ERR_ROOT_UNCOR_RCV 0x00000004
-/* Multi ERR_FATAL/NONFATAL Recevied */
-#define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008
-#define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First Fatal */
-#define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */
-#define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */
-#define PCI_ERR_ROOT_COR_SRC 52
-#define PCI_ERR_ROOT_SRC 54
-
-/* Virtual Channel */
-#define PCI_VC_PORT_REG1 4
-#define PCI_VC_PORT_REG2 8
-#define PCI_VC_PORT_CTRL 12
-#define PCI_VC_PORT_STATUS 14
-#define PCI_VC_RES_CAP 16
-#define PCI_VC_RES_CTRL 20
-#define PCI_VC_RES_STATUS 26
-
-/* Power Budgeting */
-#define PCI_PWR_DSR 4 /* Data Select Register */
-#define PCI_PWR_DATA 8 /* Data Register */
-#define PCI_PWR_DATA_BASE(x) ((x) & 0xff) /* Base Power */
-#define PCI_PWR_DATA_SCALE(x) (((x) >> 8) & 3) /* Data Scale */
-#define PCI_PWR_DATA_PM_SUB(x) (((x) >> 10) & 7) /* PM Sub State */
-#define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3) /* PM State */
-#define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7) /* Type */
-#define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */
-#define PCI_PWR_CAP 12 /* Capability */
-#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */
-
-#endif /* LINUX_PCI_REGS_H */
diff --git a/original/linux/percpu.h b/original/linux/percpu.h
deleted file mode 100644
index cb9039a..0000000
--- a/original/linux/percpu.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __LINUX_PERCPU_H
-#define __LINUX_PERCPU_H
-#include <linux/spinlock.h> /* For preempt_disable() */
-#include <linux/slab.h> /* For kmalloc() */
-#include <linux/smp.h>
-#include <linux/string.h> /* For memset() */
-#include <asm/percpu.h>
-
-/* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
-#ifndef PERCPU_ENOUGH_ROOM
-#define PERCPU_ENOUGH_ROOM 32768
-#endif
-
-/* Must be an lvalue. */
-#define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); }))
-#define put_cpu_var(var) preempt_enable()
-
-#ifdef CONFIG_SMP
-
-struct percpu_data {
- void *ptrs[NR_CPUS];
-};
-
-/*
- * Use this to get to a cpu's version of the per-cpu object allocated using
- * alloc_percpu. Non-atomic access to the current CPU's version should
- * probably be combined with get_cpu()/put_cpu().
- */
-#define per_cpu_ptr(ptr, cpu) \
-({ \
- struct percpu_data *__p = (struct percpu_data *)~(unsigned long)(ptr); \
- (__typeof__(ptr))__p->ptrs[(cpu)]; \
-})
-
-extern void *__alloc_percpu(size_t size);
-extern void free_percpu(const void *);
-
-#else /* CONFIG_SMP */
-
-#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); })
-
-static inline void *__alloc_percpu(size_t size)
-{
- void *ret = kmalloc(size, GFP_KERNEL);
- if (ret)
- memset(ret, 0, size);
- return ret;
-}
-static inline void free_percpu(const void *ptr)
-{
- kfree(ptr);
-}
-
-#endif /* CONFIG_SMP */
-
-/* Simple wrapper for the common case: zeros memory. */
-#define alloc_percpu(type) ((type *)(__alloc_percpu(sizeof(type))))
-
-#endif /* __LINUX_PERCPU_H */
diff --git a/original/linux/percpu_counter.h b/original/linux/percpu_counter.h
deleted file mode 100644
index f5aa593..0000000
--- a/original/linux/percpu_counter.h
+++ /dev/null
@@ -1,114 +0,0 @@
-#ifndef _LINUX_PERCPU_COUNTER_H
-#define _LINUX_PERCPU_COUNTER_H
-/*
- * A simple "approximate counter" for use in ext2 and ext3 superblocks.
- *
- * WARNING: these things are HUGE. 4 kbytes per counter on 32-way P4.
- */
-
-#include <linux/spinlock.h>
-#include <linux/smp.h>
-#include <linux/threads.h>
-#include <linux/percpu.h>
-#include <linux/types.h>
-
-#ifdef CONFIG_SMP
-
-struct percpu_counter {
- spinlock_t lock;
- s64 count;
- s32 *counters;
-};
-
-#if NR_CPUS >= 16
-#define FBC_BATCH (NR_CPUS*2)
-#else
-#define FBC_BATCH (NR_CPUS*4)
-#endif
-
-static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount)
-{
- spin_lock_init(&fbc->lock);
- fbc->count = amount;
- fbc->counters = alloc_percpu(s32);
-}
-
-static inline void percpu_counter_destroy(struct percpu_counter *fbc)
-{
- free_percpu(fbc->counters);
-}
-
-void percpu_counter_mod(struct percpu_counter *fbc, s32 amount);
-s64 percpu_counter_sum(struct percpu_counter *fbc);
-
-static inline s64 percpu_counter_read(struct percpu_counter *fbc)
-{
- return fbc->count;
-}
-
-/*
- * It is possible for the percpu_counter_read() to return a small negative
- * number for some counter which should never be negative.
- *
- */
-static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
-{
- s64 ret = fbc->count;
-
- barrier(); /* Prevent reloads of fbc->count */
- if (ret >= 0)
- return ret;
- return 1;
-}
-
-#else
-
-struct percpu_counter {
- s64 count;
-};
-
-static inline void percpu_counter_init(struct percpu_counter *fbc, s64 amount)
-{
- fbc->count = amount;
-}
-
-static inline void percpu_counter_destroy(struct percpu_counter *fbc)
-{
-}
-
-static inline void
-percpu_counter_mod(struct percpu_counter *fbc, s32 amount)
-{
- preempt_disable();
- fbc->count += amount;
- preempt_enable();
-}
-
-static inline s64 percpu_counter_read(struct percpu_counter *fbc)
-{
- return fbc->count;
-}
-
-static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
-{
- return fbc->count;
-}
-
-static inline s64 percpu_counter_sum(struct percpu_counter *fbc)
-{
- return percpu_counter_read_positive(fbc);
-}
-
-#endif /* CONFIG_SMP */
-
-static inline void percpu_counter_inc(struct percpu_counter *fbc)
-{
- percpu_counter_mod(fbc, 1);
-}
-
-static inline void percpu_counter_dec(struct percpu_counter *fbc)
-{
- percpu_counter_mod(fbc, -1);
-}
-
-#endif /* _LINUX_PERCPU_COUNTER_H */
diff --git a/original/linux/perf_event.h b/original/linux/perf_event.h
deleted file mode 100644
index 5d0266d..0000000
--- a/original/linux/perf_event.h
+++ /dev/null
@@ -1,1082 +0,0 @@
-/*
- * Performance events:
- *
- * Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de>
- * Copyright (C) 2008-2009, Red Hat, Inc., Ingo Molnar
- * Copyright (C) 2008-2009, Red Hat, Inc., Peter Zijlstra
- *
- * Data type definitions, declarations, prototypes.
- *
- * Started by: Thomas Gleixner and Ingo Molnar
- *
- * For licencing details see kernel-base/COPYING
- */
-#ifndef _LINUX_PERF_EVENT_H
-#define _LINUX_PERF_EVENT_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <asm/byteorder.h>
-
-/*
- * User-space ABI bits:
- */
-
-/*
- * attr.type
- */
-enum perf_type_id {
- PERF_TYPE_HARDWARE = 0,
- PERF_TYPE_SOFTWARE = 1,
- PERF_TYPE_TRACEPOINT = 2,
- PERF_TYPE_HW_CACHE = 3,
- PERF_TYPE_RAW = 4,
- PERF_TYPE_BREAKPOINT = 5,
-
- PERF_TYPE_MAX, /* non-ABI */
-};
-
-/*
- * Generalized performance event event_id types, used by the
- * attr.event_id parameter of the sys_perf_event_open()
- * syscall:
- */
-enum perf_hw_id {
- /*
- * Common hardware events, generalized by the kernel:
- */
- PERF_COUNT_HW_CPU_CYCLES = 0,
- PERF_COUNT_HW_INSTRUCTIONS = 1,
- PERF_COUNT_HW_CACHE_REFERENCES = 2,
- PERF_COUNT_HW_CACHE_MISSES = 3,
- PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
- PERF_COUNT_HW_BRANCH_MISSES = 5,
- PERF_COUNT_HW_BUS_CYCLES = 6,
-
- PERF_COUNT_HW_MAX, /* non-ABI */
-};
-
-/*
- * Generalized hardware cache events:
- *
- * { L1-D, L1-I, LLC, ITLB, DTLB, BPU } x
- * { read, write, prefetch } x
- * { accesses, misses }
- */
-enum perf_hw_cache_id {
- PERF_COUNT_HW_CACHE_L1D = 0,
- PERF_COUNT_HW_CACHE_L1I = 1,
- PERF_COUNT_HW_CACHE_LL = 2,
- PERF_COUNT_HW_CACHE_DTLB = 3,
- PERF_COUNT_HW_CACHE_ITLB = 4,
- PERF_COUNT_HW_CACHE_BPU = 5,
-
- PERF_COUNT_HW_CACHE_MAX, /* non-ABI */
-};
-
-enum perf_hw_cache_op_id {
- PERF_COUNT_HW_CACHE_OP_READ = 0,
- PERF_COUNT_HW_CACHE_OP_WRITE = 1,
- PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
-
- PERF_COUNT_HW_CACHE_OP_MAX, /* non-ABI */
-};
-
-enum perf_hw_cache_op_result_id {
- PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
- PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
-
- PERF_COUNT_HW_CACHE_RESULT_MAX, /* non-ABI */
-};
-
-/*
- * Special "software" events provided by the kernel, even if the hardware
- * does not support performance events. These events measure various
- * physical and sw events of the kernel (and allow the profiling of them as
- * well):
- */
-enum perf_sw_ids {
- PERF_COUNT_SW_CPU_CLOCK = 0,
- PERF_COUNT_SW_TASK_CLOCK = 1,
- PERF_COUNT_SW_PAGE_FAULTS = 2,
- PERF_COUNT_SW_CONTEXT_SWITCHES = 3,
- PERF_COUNT_SW_CPU_MIGRATIONS = 4,
- PERF_COUNT_SW_PAGE_FAULTS_MIN = 5,
- PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6,
- PERF_COUNT_SW_ALIGNMENT_FAULTS = 7,
- PERF_COUNT_SW_EMULATION_FAULTS = 8,
-
- PERF_COUNT_SW_MAX, /* non-ABI */
-};
-
-/*
- * Bits that can be set in attr.sample_type to request information
- * in the overflow packets.
- */
-enum perf_event_sample_format {
- PERF_SAMPLE_IP = 1U << 0,
- PERF_SAMPLE_TID = 1U << 1,
- PERF_SAMPLE_TIME = 1U << 2,
- PERF_SAMPLE_ADDR = 1U << 3,
- PERF_SAMPLE_READ = 1U << 4,
- PERF_SAMPLE_CALLCHAIN = 1U << 5,
- PERF_SAMPLE_ID = 1U << 6,
- PERF_SAMPLE_CPU = 1U << 7,
- PERF_SAMPLE_PERIOD = 1U << 8,
- PERF_SAMPLE_STREAM_ID = 1U << 9,
- PERF_SAMPLE_RAW = 1U << 10,
-
- PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */
-};
-
-/*
- * The format of the data returned by read() on a perf event fd,
- * as specified by attr.read_format:
- *
- * struct read_format {
- * { u64 value;
- * { u64 time_enabled; } && PERF_FORMAT_ENABLED
- * { u64 time_running; } && PERF_FORMAT_RUNNING
- * { u64 id; } && PERF_FORMAT_ID
- * } && !PERF_FORMAT_GROUP
- *
- * { u64 nr;
- * { u64 time_enabled; } && PERF_FORMAT_ENABLED
- * { u64 time_running; } && PERF_FORMAT_RUNNING
- * { u64 value;
- * { u64 id; } && PERF_FORMAT_ID
- * } cntr[nr];
- * } && PERF_FORMAT_GROUP
- * };
- */
-enum perf_event_read_format {
- PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0,
- PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1,
- PERF_FORMAT_ID = 1U << 2,
- PERF_FORMAT_GROUP = 1U << 3,
-
- PERF_FORMAT_MAX = 1U << 4, /* non-ABI */
-};
-
-#define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */
-
-/*
- * Hardware event_id to monitor via a performance monitoring event:
- */
-struct perf_event_attr {
-
- /*
- * Major type: hardware/software/tracepoint/etc.
- */
- __u32 type;
-
- /*
- * Size of the attr structure, for fwd/bwd compat.
- */
- __u32 size;
-
- /*
- * Type specific configuration information.
- */
- __u64 config;
-
- union {
- __u64 sample_period;
- __u64 sample_freq;
- };
-
- __u64 sample_type;
- __u64 read_format;
-
- __u64 disabled : 1, /* off by default */
- inherit : 1, /* children inherit it */
- pinned : 1, /* must always be on PMU */
- exclusive : 1, /* only group on PMU */
- exclude_user : 1, /* don't count user */
- exclude_kernel : 1, /* ditto kernel */
- exclude_hv : 1, /* ditto hypervisor */
- exclude_idle : 1, /* don't count when idle */
- mmap : 1, /* include mmap data */
- comm : 1, /* include comm data */
- freq : 1, /* use freq, not period */
- inherit_stat : 1, /* per task counts */
- enable_on_exec : 1, /* next exec enables */
- task : 1, /* trace fork/exit */
- watermark : 1, /* wakeup_watermark */
- /*
- * precise_ip:
- *
- * 0 - SAMPLE_IP can have arbitrary skid
- * 1 - SAMPLE_IP must have constant skid
- * 2 - SAMPLE_IP requested to have 0 skid
- * 3 - SAMPLE_IP must have 0 skid
- *
- * See also PERF_RECORD_MISC_EXACT_IP
- */
- precise_ip : 2, /* skid constraint */
-
- __reserved_1 : 47;
-
- union {
- __u32 wakeup_events; /* wakeup every n events */
- __u32 wakeup_watermark; /* bytes before wakeup */
- };
-
- __u32 bp_type;
- __u64 bp_addr;
- __u64 bp_len;
-};
-
-/*
- * Ioctls that can be done on a perf event fd:
- */
-#define PERF_EVENT_IOC_ENABLE _IO ('$', 0)
-#define PERF_EVENT_IOC_DISABLE _IO ('$', 1)
-#define PERF_EVENT_IOC_REFRESH _IO ('$', 2)
-#define PERF_EVENT_IOC_RESET _IO ('$', 3)
-#define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64)
-#define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5)
-#define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *)
-
-enum perf_event_ioc_flags {
- PERF_IOC_FLAG_GROUP = 1U << 0,
-};
-
-/*
- * Structure of the page that can be mapped via mmap
- */
-struct perf_event_mmap_page {
- __u32 version; /* version number of this structure */
- __u32 compat_version; /* lowest version this is compat with */
-
- /*
- * Bits needed to read the hw events in user-space.
- *
- * u32 seq;
- * s64 count;
- *
- * do {
- * seq = pc->lock;
- *
- * barrier()
- * if (pc->index) {
- * count = pmc_read(pc->index - 1);
- * count += pc->offset;
- * } else
- * goto regular_read;
- *
- * barrier();
- * } while (pc->lock != seq);
- *
- * NOTE: for obvious reason this only works on self-monitoring
- * processes.
- */
- __u32 lock; /* seqlock for synchronization */
- __u32 index; /* hardware event identifier */
- __s64 offset; /* add to hardware event value */
- __u64 time_enabled; /* time event active */
- __u64 time_running; /* time event on cpu */
-
- /*
- * Hole for extension of the self monitor capabilities
- */
-
- __u64 __reserved[123]; /* align to 1k */
-
- /*
- * Control data for the mmap() data buffer.
- *
- * User-space reading the @data_head value should issue an rmb(), on
- * SMP capable platforms, after reading this value -- see
- * perf_event_wakeup().
- *
- * When the mapping is PROT_WRITE the @data_tail value should be
- * written by userspace to reflect the last read data. In this case
- * the kernel will not over-write unread data.
- */
- __u64 data_head; /* head in the data section */
- __u64 data_tail; /* user-space written tail */
-};
-
-#define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0)
-#define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0)
-#define PERF_RECORD_MISC_KERNEL (1 << 0)
-#define PERF_RECORD_MISC_USER (2 << 0)
-#define PERF_RECORD_MISC_HYPERVISOR (3 << 0)
-#define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0)
-#define PERF_RECORD_MISC_GUEST_USER (5 << 0)
-
-/*
- * Indicates that the content of PERF_SAMPLE_IP points to
- * the actual instruction that triggered the event. See also
- * perf_event_attr::precise_ip.
- */
-#define PERF_RECORD_MISC_EXACT_IP (1 << 14)
-/*
- * Reserve the last bit to indicate some extended misc field
- */
-#define PERF_RECORD_MISC_EXT_RESERVED (1 << 15)
-
-struct perf_event_header {
- __u32 type;
- __u16 misc;
- __u16 size;
-};
-
-enum perf_event_type {
-
- /*
- * The MMAP events record the PROT_EXEC mappings so that we can
- * correlate userspace IPs to code. They have the following structure:
- *
- * struct {
- * struct perf_event_header header;
- *
- * u32 pid, tid;
- * u64 addr;
- * u64 len;
- * u64 pgoff;
- * char filename[];
- * };
- */
- PERF_RECORD_MMAP = 1,
-
- /*
- * struct {
- * struct perf_event_header header;
- * u64 id;
- * u64 lost;
- * };
- */
- PERF_RECORD_LOST = 2,
-
- /*
- * struct {
- * struct perf_event_header header;
- *
- * u32 pid, tid;
- * char comm[];
- * };
- */
- PERF_RECORD_COMM = 3,
-
- /*
- * struct {
- * struct perf_event_header header;
- * u32 pid, ppid;
- * u32 tid, ptid;
- * u64 time;
- * };
- */
- PERF_RECORD_EXIT = 4,
-
- /*
- * struct {
- * struct perf_event_header header;
- * u64 time;
- * u64 id;
- * u64 stream_id;
- * };
- */
- PERF_RECORD_THROTTLE = 5,
- PERF_RECORD_UNTHROTTLE = 6,
-
- /*
- * struct {
- * struct perf_event_header header;
- * u32 pid, ppid;
- * u32 tid, ptid;
- * u64 time;
- * };
- */
- PERF_RECORD_FORK = 7,
-
- /*
- * struct {
- * struct perf_event_header header;
- * u32 pid, tid;
- *
- * struct read_format values;
- * };
- */
- PERF_RECORD_READ = 8,
-
- /*
- * struct {
- * struct perf_event_header header;
- *
- * { u64 ip; } && PERF_SAMPLE_IP
- * { u32 pid, tid; } && PERF_SAMPLE_TID
- * { u64 time; } && PERF_SAMPLE_TIME
- * { u64 addr; } && PERF_SAMPLE_ADDR
- * { u64 id; } && PERF_SAMPLE_ID
- * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID
- * { u32 cpu, res; } && PERF_SAMPLE_CPU
- * { u64 period; } && PERF_SAMPLE_PERIOD
- *
- * { struct read_format values; } && PERF_SAMPLE_READ
- *
- * { u64 nr,
- * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN
- *
- * #
- * # The RAW record below is opaque data wrt the ABI
- * #
- * # That is, the ABI doesn't make any promises wrt to
- * # the stability of its content, it may vary depending
- * # on event, hardware, kernel version and phase of
- * # the moon.
- * #
- * # In other words, PERF_SAMPLE_RAW contents are not an ABI.
- * #
- *
- * { u32 size;
- * char data[size];}&& PERF_SAMPLE_RAW
- * };
- */
- PERF_RECORD_SAMPLE = 9,
-
- PERF_RECORD_MAX, /* non-ABI */
-};
-
-enum perf_callchain_context {
- PERF_CONTEXT_HV = (__u64)-32,
- PERF_CONTEXT_KERNEL = (__u64)-128,
- PERF_CONTEXT_USER = (__u64)-512,
-
- PERF_CONTEXT_GUEST = (__u64)-2048,
- PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176,
- PERF_CONTEXT_GUEST_USER = (__u64)-2560,
-
- PERF_CONTEXT_MAX = (__u64)-4095,
-};
-
-#define PERF_FLAG_FD_NO_GROUP (1U << 0)
-#define PERF_FLAG_FD_OUTPUT (1U << 1)
-
-#ifdef __KERNEL__
-/*
- * Kernel-internal data types and definitions:
- */
-
-#ifdef CONFIG_PERF_EVENTS
-# include <asm/perf_event.h>
-#endif
-
-struct perf_guest_info_callbacks {
- int (*is_in_guest) (void);
- int (*is_user_mode) (void);
- unsigned long (*get_guest_ip) (void);
-};
-
-#ifdef CONFIG_HAVE_HW_BREAKPOINT
-#include <asm/hw_breakpoint.h>
-#endif
-
-#include <linux/list.h>
-#include <linux/mutex.h>
-#include <linux/rculist.h>
-#include <linux/rcupdate.h>
-#include <linux/spinlock.h>
-#include <linux/hrtimer.h>
-#include <linux/fs.h>
-#include <linux/pid_namespace.h>
-#include <linux/workqueue.h>
-#include <linux/ftrace.h>
-#include <linux/cpu.h>
-#include <asm/atomic.h>
-#include <asm/local.h>
-
-#define PERF_MAX_STACK_DEPTH 255
-
-struct perf_callchain_entry {
- __u64 nr;
- __u64 ip[PERF_MAX_STACK_DEPTH];
-};
-
-struct perf_raw_record {
- u32 size;
- void *data;
-};
-
-struct perf_branch_entry {
- __u64 from;
- __u64 to;
- __u64 flags;
-};
-
-struct perf_branch_stack {
- __u64 nr;
- struct perf_branch_entry entries[0];
-};
-
-struct task_struct;
-
-/**
- * struct hw_perf_event - performance event hardware details:
- */
-struct hw_perf_event {
-#ifdef CONFIG_PERF_EVENTS
- union {
- struct { /* hardware */
- u64 config;
- u64 last_tag;
- unsigned long config_base;
- unsigned long event_base;
- int idx;
- int last_cpu;
- };
- struct { /* software */
- s64 remaining;
- struct hrtimer hrtimer;
- };
-#ifdef CONFIG_HAVE_HW_BREAKPOINT
- /* breakpoint */
- struct arch_hw_breakpoint info;
-#endif
- };
- atomic64_t prev_count;
- u64 sample_period;
- u64 last_period;
- atomic64_t period_left;
- u64 interrupts;
-
- u64 freq_time_stamp;
- u64 freq_count_stamp;
-#endif
-};
-
-struct perf_event;
-
-#define PERF_EVENT_TXN_STARTED 1
-
-/**
- * struct pmu - generic performance monitoring unit
- */
-struct pmu {
- int (*enable) (struct perf_event *event);
- void (*disable) (struct perf_event *event);
- int (*start) (struct perf_event *event);
- void (*stop) (struct perf_event *event);
- void (*read) (struct perf_event *event);
- void (*unthrottle) (struct perf_event *event);
-
- /*
- * group events scheduling is treated as a transaction,
- * add group events as a whole and perform one schedulability test.
- * If test fails, roll back the whole group
- */
-
- void (*start_txn) (const struct pmu *pmu);
- void (*cancel_txn) (const struct pmu *pmu);
- int (*commit_txn) (const struct pmu *pmu);
-};
-
-/**
- * enum perf_event_active_state - the states of a event
- */
-enum perf_event_active_state {
- PERF_EVENT_STATE_ERROR = -2,
- PERF_EVENT_STATE_OFF = -1,
- PERF_EVENT_STATE_INACTIVE = 0,
- PERF_EVENT_STATE_ACTIVE = 1,
-};
-
-struct file;
-
-struct perf_mmap_data {
- atomic_t refcount;
- struct rcu_head rcu_head;
-#ifdef CONFIG_PERF_USE_VMALLOC
- struct work_struct work;
- int page_order; /* allocation order */
-#endif
- int nr_pages; /* nr of data pages */
- int writable; /* are we writable */
-
- atomic_t poll; /* POLL_ for wakeups */
-
- local_t head; /* write position */
- local_t nest; /* nested writers */
- local_t events; /* event limit */
- local_t wakeup; /* wakeup stamp */
- local_t lost; /* nr records lost */
-
- long watermark; /* wakeup watermark */
-
- struct perf_event_mmap_page *user_page;
- void *data_pages[0];
-};
-
-struct perf_pending_entry {
- struct perf_pending_entry *next;
- void (*func)(struct perf_pending_entry *);
-};
-
-struct perf_sample_data;
-
-typedef void (*perf_overflow_handler_t)(struct perf_event *, int,
- struct perf_sample_data *,
- struct pt_regs *regs);
-
-enum perf_group_flag {
- PERF_GROUP_SOFTWARE = 0x1,
-};
-
-#define SWEVENT_HLIST_BITS 8
-#define SWEVENT_HLIST_SIZE (1 << SWEVENT_HLIST_BITS)
-
-struct swevent_hlist {
- struct hlist_head heads[SWEVENT_HLIST_SIZE];
- struct rcu_head rcu_head;
-};
-
-#define PERF_ATTACH_CONTEXT 0x01
-#define PERF_ATTACH_GROUP 0x02
-
-/**
- * struct perf_event - performance event kernel representation:
- */
-struct perf_event {
-#ifdef CONFIG_PERF_EVENTS
- struct list_head group_entry;
- struct list_head event_entry;
- struct list_head sibling_list;
- struct hlist_node hlist_entry;
- int nr_siblings;
- int group_flags;
- struct perf_event *group_leader;
- const struct pmu *pmu;
-
- enum perf_event_active_state state;
- unsigned int attach_state;
- atomic64_t count;
-
- /*
- * These are the total time in nanoseconds that the event
- * has been enabled (i.e. eligible to run, and the task has
- * been scheduled in, if this is a per-task event)
- * and running (scheduled onto the CPU), respectively.
- *
- * They are computed from tstamp_enabled, tstamp_running and
- * tstamp_stopped when the event is in INACTIVE or ACTIVE state.
- */
- u64 total_time_enabled;
- u64 total_time_running;
-
- /*
- * These are timestamps used for computing total_time_enabled
- * and total_time_running when the event is in INACTIVE or
- * ACTIVE state, measured in nanoseconds from an arbitrary point
- * in time.
- * tstamp_enabled: the notional time when the event was enabled
- * tstamp_running: the notional time when the event was scheduled on
- * tstamp_stopped: in INACTIVE state, the notional time when the
- * event was scheduled off.
- */
- u64 tstamp_enabled;
- u64 tstamp_running;
- u64 tstamp_stopped;
-
- struct perf_event_attr attr;
- struct hw_perf_event hw;
-
- struct perf_event_context *ctx;
- struct file *filp;
-
- /*
- * These accumulate total time (in nanoseconds) that children
- * events have been enabled and running, respectively.
- */
- atomic64_t child_total_time_enabled;
- atomic64_t child_total_time_running;
-
- /*
- * Protect attach/detach and child_list:
- */
- struct mutex child_mutex;
- struct list_head child_list;
- struct perf_event *parent;
-
- int oncpu;
- int cpu;
-
- struct list_head owner_entry;
- struct task_struct *owner;
-
- /* mmap bits */
- struct mutex mmap_mutex;
- atomic_t mmap_count;
- int mmap_locked;
- struct user_struct *mmap_user;
- struct perf_mmap_data *data;
-
- /* poll related */
- wait_queue_head_t waitq;
- struct fasync_struct *fasync;
-
- /* delayed work for NMIs and such */
- int pending_wakeup;
- int pending_kill;
- int pending_disable;
- struct perf_pending_entry pending;
-
- atomic_t event_limit;
-
- void (*destroy)(struct perf_event *);
- struct rcu_head rcu_head;
-
- struct pid_namespace *ns;
- u64 id;
-
- perf_overflow_handler_t overflow_handler;
-
-#ifdef CONFIG_EVENT_TRACING
- struct ftrace_event_call *tp_event;
- struct event_filter *filter;
-#endif
-
-#endif /* CONFIG_PERF_EVENTS */
-};
-
-/**
- * struct perf_event_context - event context structure
- *
- * Used as a container for task events and CPU events as well:
- */
-struct perf_event_context {
- /*
- * Protect the states of the events in the list,
- * nr_active, and the list:
- */
- raw_spinlock_t lock;
- /*
- * Protect the list of events. Locking either mutex or lock
- * is sufficient to ensure the list doesn't change; to change
- * the list you need to lock both the mutex and the spinlock.
- */
- struct mutex mutex;
-
- struct list_head pinned_groups;
- struct list_head flexible_groups;
- struct list_head event_list;
- int nr_events;
- int nr_active;
- int is_active;
- int nr_stat;
- atomic_t refcount;
- struct task_struct *task;
-
- /*
- * Context clock, runs when context enabled.
- */
- u64 time;
- u64 timestamp;
-
- /*
- * These fields let us detect when two contexts have both
- * been cloned (inherited) from a common ancestor.
- */
- struct perf_event_context *parent_ctx;
- u64 parent_gen;
- u64 generation;
- int pin_count;
- struct rcu_head rcu_head;
-};
-
-/**
- * struct perf_event_cpu_context - per cpu event context structure
- */
-struct perf_cpu_context {
- struct perf_event_context ctx;
- struct perf_event_context *task_ctx;
- int active_oncpu;
- int max_pertask;
- int exclusive;
- struct swevent_hlist *swevent_hlist;
- struct mutex hlist_mutex;
- int hlist_refcount;
-
- /*
- * Recursion avoidance:
- *
- * task, softirq, irq, nmi context
- */
- int recursion[4];
-};
-
-struct perf_output_handle {
- struct perf_event *event;
- struct perf_mmap_data *data;
- unsigned long wakeup;
- unsigned long size;
- void *addr;
- int page;
- int nmi;
- int sample;
-};
-
-#ifdef CONFIG_PERF_EVENTS
-
-/*
- * Set by architecture code:
- */
-extern int perf_max_events;
-
-extern const struct pmu *hw_perf_event_init(struct perf_event *event);
-
-extern void perf_event_task_sched_in(struct task_struct *task);
-extern void perf_event_task_sched_out(struct task_struct *task, struct task_struct *next);
-extern void perf_event_task_tick(struct task_struct *task);
-extern int perf_event_init_task(struct task_struct *child);
-extern void perf_event_exit_task(struct task_struct *child);
-extern void perf_event_free_task(struct task_struct *task);
-extern void set_perf_event_pending(void);
-extern void perf_event_do_pending(void);
-extern void perf_event_print_debug(void);
-extern void __perf_disable(void);
-extern bool __perf_enable(void);
-extern void perf_disable(void);
-extern void perf_enable(void);
-extern int perf_event_task_disable(void);
-extern int perf_event_task_enable(void);
-extern void perf_event_update_userpage(struct perf_event *event);
-extern int perf_event_release_kernel(struct perf_event *event);
-extern struct perf_event *
-perf_event_create_kernel_counter(struct perf_event_attr *attr,
- int cpu,
- pid_t pid,
- perf_overflow_handler_t callback);
-extern u64 perf_event_read_value(struct perf_event *event,
- u64 *enabled, u64 *running);
-
-struct perf_sample_data {
- u64 type;
-
- u64 ip;
- struct {
- u32 pid;
- u32 tid;
- } tid_entry;
- u64 time;
- u64 addr;
- u64 id;
- u64 stream_id;
- struct {
- u32 cpu;
- u32 reserved;
- } cpu_entry;
- u64 period;
- struct perf_callchain_entry *callchain;
- struct perf_raw_record *raw;
-};
-
-static inline
-void perf_sample_data_init(struct perf_sample_data *data, u64 addr)
-{
- data->addr = addr;
- data->raw = NULL;
-}
-
-extern void perf_output_sample(struct perf_output_handle *handle,
- struct perf_event_header *header,
- struct perf_sample_data *data,
- struct perf_event *event);
-extern void perf_prepare_sample(struct perf_event_header *header,
- struct perf_sample_data *data,
- struct perf_event *event,
- struct pt_regs *regs);
-
-extern int perf_event_overflow(struct perf_event *event, int nmi,
- struct perf_sample_data *data,
- struct pt_regs *regs);
-
-/*
- * Return 1 for a software event, 0 for a hardware event
- */
-static inline int is_software_event(struct perf_event *event)
-{
- switch (event->attr.type) {
- case PERF_TYPE_SOFTWARE:
- case PERF_TYPE_TRACEPOINT:
- /* for now the breakpoint stuff also works as software event */
- case PERF_TYPE_BREAKPOINT:
- return 1;
- }
- return 0;
-}
-
-extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX];
-
-extern void __perf_sw_event(u32, u64, int, struct pt_regs *, u64);
-
-extern void
-perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip);
-
-/*
- * Take a snapshot of the regs. Skip ip and frame pointer to
- * the nth caller. We only need a few of the regs:
- * - ip for PERF_SAMPLE_IP
- * - cs for user_mode() tests
- * - bp for callchains
- * - eflags, for future purposes, just in case
- */
-static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip)
-{
- unsigned long ip;
-
- memset(regs, 0, sizeof(*regs));
-
- switch (skip) {
- case 1 :
- ip = CALLER_ADDR0;
- break;
- case 2 :
- ip = CALLER_ADDR1;
- break;
- case 3 :
- ip = CALLER_ADDR2;
- break;
- case 4:
- ip = CALLER_ADDR3;
- break;
- /* No need to support further for now */
- default:
- ip = 0;
- }
-
- return perf_arch_fetch_caller_regs(regs, ip, skip);
-}
-
-static inline void
-perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
-{
- if (atomic_read(&perf_swevent_enabled[event_id])) {
- struct pt_regs hot_regs;
-
- if (!regs) {
- perf_fetch_caller_regs(&hot_regs, 1);
- regs = &hot_regs;
- }
- __perf_sw_event(event_id, nr, nmi, regs, addr);
- }
-}
-
-extern void __perf_event_mmap(struct vm_area_struct *vma);
-
-static inline void perf_event_mmap(struct vm_area_struct *vma)
-{
- if (vma->vm_flags & VM_EXEC)
- __perf_event_mmap(vma);
-}
-
-extern struct perf_guest_info_callbacks *perf_guest_cbs;
-extern int perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
-extern int perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *callbacks);
-
-extern void perf_event_comm(struct task_struct *tsk);
-extern void perf_event_fork(struct task_struct *tsk);
-
-extern struct perf_callchain_entry *perf_callchain(struct pt_regs *regs);
-
-extern int sysctl_perf_event_paranoid;
-extern int sysctl_perf_event_mlock;
-extern int sysctl_perf_event_sample_rate;
-
-static inline bool perf_paranoid_tracepoint_raw(void)
-{
- return sysctl_perf_event_paranoid > -1;
-}
-
-static inline bool perf_paranoid_cpu(void)
-{
- return sysctl_perf_event_paranoid > 0;
-}
-
-static inline bool perf_paranoid_kernel(void)
-{
- return sysctl_perf_event_paranoid > 1;
-}
-
-extern void perf_event_init(void);
-extern void perf_tp_event(u64 addr, u64 count, void *record,
- int entry_size, struct pt_regs *regs,
- struct hlist_head *head);
-extern void perf_bp_event(struct perf_event *event, void *data);
-
-#ifndef perf_misc_flags
-#define perf_misc_flags(regs) (user_mode(regs) ? PERF_RECORD_MISC_USER : \
- PERF_RECORD_MISC_KERNEL)
-#define perf_instruction_pointer(regs) instruction_pointer(regs)
-#endif
-
-extern int perf_output_begin(struct perf_output_handle *handle,
- struct perf_event *event, unsigned int size,
- int nmi, int sample);
-extern void perf_output_end(struct perf_output_handle *handle);
-extern void perf_output_copy(struct perf_output_handle *handle,
- const void *buf, unsigned int len);
-extern int perf_swevent_get_recursion_context(void);
-extern void perf_swevent_put_recursion_context(int rctx);
-extern void perf_event_enable(struct perf_event *event);
-extern void perf_event_disable(struct perf_event *event);
-#else
-static inline void
-perf_event_task_sched_in(struct task_struct *task) { }
-static inline void
-perf_event_task_sched_out(struct task_struct *task,
- struct task_struct *next) { }
-static inline void
-perf_event_task_tick(struct task_struct *task) { }
-static inline int perf_event_init_task(struct task_struct *child) { return 0; }
-static inline void perf_event_exit_task(struct task_struct *child) { }
-static inline void perf_event_free_task(struct task_struct *task) { }
-static inline void perf_event_do_pending(void) { }
-static inline void perf_event_print_debug(void) { }
-static inline void perf_disable(void) { }
-static inline void perf_enable(void) { }
-static inline int perf_event_task_disable(void) { return -EINVAL; }
-static inline int perf_event_task_enable(void) { return -EINVAL; }
-
-static inline void
-perf_sw_event(u32 event_id, u64 nr, int nmi,
- struct pt_regs *regs, u64 addr) { }
-static inline void
-perf_bp_event(struct perf_event *event, void *data) { }
-
-static inline int perf_register_guest_info_callbacks
-(struct perf_guest_info_callbacks *callbacks) { return 0; }
-static inline int perf_unregister_guest_info_callbacks
-(struct perf_guest_info_callbacks *callbacks) { return 0; }
-
-static inline void perf_event_mmap(struct vm_area_struct *vma) { }
-static inline void perf_event_comm(struct task_struct *tsk) { }
-static inline void perf_event_fork(struct task_struct *tsk) { }
-static inline void perf_event_init(void) { }
-static inline int perf_swevent_get_recursion_context(void) { return -1; }
-static inline void perf_swevent_put_recursion_context(int rctx) { }
-static inline void perf_event_enable(struct perf_event *event) { }
-static inline void perf_event_disable(struct perf_event *event) { }
-#endif
-
-#define perf_output_put(handle, x) \
- perf_output_copy((handle), &(x), sizeof(x))
-
-/*
- * This has to have a higher priority than migration_notifier in sched.c.
- */
-#define perf_cpu_notifier(fn) \
-do { \
- static struct notifier_block fn##_nb __cpuinitdata = \
- { .notifier_call = fn, .priority = 20 }; \
- fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE, \
- (void *)(unsigned long)smp_processor_id()); \
- fn(&fn##_nb, (unsigned long)CPU_STARTING, \
- (void *)(unsigned long)smp_processor_id()); \
- fn(&fn##_nb, (unsigned long)CPU_ONLINE, \
- (void *)(unsigned long)smp_processor_id()); \
- register_cpu_notifier(&fn##_nb); \
-} while (0)
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_PERF_EVENT_H */
diff --git a/original/linux/personality.h b/original/linux/personality.h
deleted file mode 100644
index 8fc7dd1..0000000
--- a/original/linux/personality.h
+++ /dev/null
@@ -1,121 +0,0 @@
-#ifndef _LINUX_PERSONALITY_H
-#define _LINUX_PERSONALITY_H
-
-#ifdef __KERNEL__
-
-/*
- * Handling of different ABIs (personalities).
- */
-
-struct exec_domain;
-struct pt_regs;
-
-extern int register_exec_domain(struct exec_domain *);
-extern int unregister_exec_domain(struct exec_domain *);
-extern int __set_personality(unsigned int);
-
-#endif /* __KERNEL__ */
-
-/*
- * Flags for bug emulation.
- *
- * These occupy the top three bytes.
- */
-enum {
- UNAME26 = 0x0020000,
- ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */
- FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors
- * (signal handling)
- */
- MMAP_PAGE_ZERO = 0x0100000,
- ADDR_COMPAT_LAYOUT = 0x0200000,
- READ_IMPLIES_EXEC = 0x0400000,
- ADDR_LIMIT_32BIT = 0x0800000,
- SHORT_INODE = 0x1000000,
- WHOLE_SECONDS = 0x2000000,
- STICKY_TIMEOUTS = 0x4000000,
- ADDR_LIMIT_3GB = 0x8000000,
-};
-
-/*
- * Security-relevant compatibility flags that must be
- * cleared upon setuid or setgid exec:
- */
-#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC | \
- ADDR_NO_RANDOMIZE | \
- ADDR_COMPAT_LAYOUT | \
- MMAP_PAGE_ZERO)
-
-/*
- * Personality types.
- *
- * These go in the low byte. Avoid using the top bit, it will
- * conflict with error returns.
- */
-enum {
- PER_LINUX = 0x0000,
- PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT,
- PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS,
- PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
- PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE,
- PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS |
- WHOLE_SECONDS | SHORT_INODE,
- PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS,
- PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE,
- PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS,
- PER_BSD = 0x0006,
- PER_SUNOS = 0x0006 | STICKY_TIMEOUTS,
- PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE,
- PER_LINUX32 = 0x0008,
- PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB,
- PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS,/* IRIX5 32-bit */
- PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS,/* IRIX6 new 32-bit */
- PER_IRIX64 = 0x000b | STICKY_TIMEOUTS,/* IRIX6 64-bit */
- PER_RISCOS = 0x000c,
- PER_SOLARIS = 0x000d | STICKY_TIMEOUTS,
- PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
- PER_OSF4 = 0x000f, /* OSF/1 v4 */
- PER_HPUX = 0x0010,
- PER_MASK = 0x00ff,
-};
-
-#ifdef __KERNEL__
-
-/*
- * Description of an execution domain.
- *
- * The first two members are refernced from assembly source
- * and should stay where they are unless explicitly needed.
- */
-typedef void (*handler_t)(int, struct pt_regs *);
-
-struct exec_domain {
- const char *name; /* name of the execdomain */
- handler_t handler; /* handler for syscalls */
- unsigned char pers_low; /* lowest personality */
- unsigned char pers_high; /* highest personality */
- unsigned long *signal_map; /* signal mapping */
- unsigned long *signal_invmap; /* reverse signal mapping */
- struct map_segment *err_map; /* error mapping */
- struct map_segment *socktype_map; /* socket type mapping */
- struct map_segment *sockopt_map; /* socket option mapping */
- struct map_segment *af_map; /* address family mapping */
- struct module *module; /* module context of the ed. */
- struct exec_domain *next; /* linked list (internal) */
-};
-
-/*
- * Return the base personality without flags.
- */
-#define personality(pers) (pers & PER_MASK)
-
-
-/*
- * Change personality of the currently running process.
- */
-#define set_personality(pers) \
- ((current->personality == (pers)) ? 0 : __set_personality(pers))
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_PERSONALITY_H */
diff --git a/original/linux/pfkeyv2.h b/original/linux/pfkeyv2.h
deleted file mode 100644
index d5dd471..0000000
--- a/original/linux/pfkeyv2.h
+++ /dev/null
@@ -1,348 +0,0 @@
-/* PF_KEY user interface, this is defined by rfc2367 so
- * do not make arbitrary modifications or else this header
- * file will not be compliant.
- */
-
-#ifndef _LINUX_PFKEY2_H
-#define _LINUX_PFKEY2_H
-
-#include <linux/types.h>
-
-#define PF_KEY_V2 2
-#define PFKEYV2_REVISION 199806L
-
-struct sadb_msg {
- uint8_t sadb_msg_version;
- uint8_t sadb_msg_type;
- uint8_t sadb_msg_errno;
- uint8_t sadb_msg_satype;
- uint16_t sadb_msg_len;
- uint16_t sadb_msg_reserved;
- uint32_t sadb_msg_seq;
- uint32_t sadb_msg_pid;
-} __attribute__((packed));
-/* sizeof(struct sadb_msg) == 16 */
-
-struct sadb_ext {
- uint16_t sadb_ext_len;
- uint16_t sadb_ext_type;
-} __attribute__((packed));
-/* sizeof(struct sadb_ext) == 4 */
-
-struct sadb_sa {
- uint16_t sadb_sa_len;
- uint16_t sadb_sa_exttype;
- uint32_t sadb_sa_spi;
- uint8_t sadb_sa_replay;
- uint8_t sadb_sa_state;
- uint8_t sadb_sa_auth;
- uint8_t sadb_sa_encrypt;
- uint32_t sadb_sa_flags;
-} __attribute__((packed));
-/* sizeof(struct sadb_sa) == 16 */
-
-struct sadb_lifetime {
- uint16_t sadb_lifetime_len;
- uint16_t sadb_lifetime_exttype;
- uint32_t sadb_lifetime_allocations;
- uint64_t sadb_lifetime_bytes;
- uint64_t sadb_lifetime_addtime;
- uint64_t sadb_lifetime_usetime;
-} __attribute__((packed));
-/* sizeof(struct sadb_lifetime) == 32 */
-
-struct sadb_address {
- uint16_t sadb_address_len;
- uint16_t sadb_address_exttype;
- uint8_t sadb_address_proto;
- uint8_t sadb_address_prefixlen;
- uint16_t sadb_address_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_address) == 8 */
-
-struct sadb_key {
- uint16_t sadb_key_len;
- uint16_t sadb_key_exttype;
- uint16_t sadb_key_bits;
- uint16_t sadb_key_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_key) == 8 */
-
-struct sadb_ident {
- uint16_t sadb_ident_len;
- uint16_t sadb_ident_exttype;
- uint16_t sadb_ident_type;
- uint16_t sadb_ident_reserved;
- uint64_t sadb_ident_id;
-} __attribute__((packed));
-/* sizeof(struct sadb_ident) == 16 */
-
-struct sadb_sens {
- uint16_t sadb_sens_len;
- uint16_t sadb_sens_exttype;
- uint32_t sadb_sens_dpd;
- uint8_t sadb_sens_sens_level;
- uint8_t sadb_sens_sens_len;
- uint8_t sadb_sens_integ_level;
- uint8_t sadb_sens_integ_len;
- uint32_t sadb_sens_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_sens) == 16 */
-
-/* followed by:
- uint64_t sadb_sens_bitmap[sens_len];
- uint64_t sadb_integ_bitmap[integ_len]; */
-
-struct sadb_prop {
- uint16_t sadb_prop_len;
- uint16_t sadb_prop_exttype;
- uint8_t sadb_prop_replay;
- uint8_t sadb_prop_reserved[3];
-} __attribute__((packed));
-/* sizeof(struct sadb_prop) == 8 */
-
-/* followed by:
- struct sadb_comb sadb_combs[(sadb_prop_len +
- sizeof(uint64_t) - sizeof(struct sadb_prop)) /
- sizeof(struct sadb_comb)]; */
-
-struct sadb_comb {
- uint8_t sadb_comb_auth;
- uint8_t sadb_comb_encrypt;
- uint16_t sadb_comb_flags;
- uint16_t sadb_comb_auth_minbits;
- uint16_t sadb_comb_auth_maxbits;
- uint16_t sadb_comb_encrypt_minbits;
- uint16_t sadb_comb_encrypt_maxbits;
- uint32_t sadb_comb_reserved;
- uint32_t sadb_comb_soft_allocations;
- uint32_t sadb_comb_hard_allocations;
- uint64_t sadb_comb_soft_bytes;
- uint64_t sadb_comb_hard_bytes;
- uint64_t sadb_comb_soft_addtime;
- uint64_t sadb_comb_hard_addtime;
- uint64_t sadb_comb_soft_usetime;
- uint64_t sadb_comb_hard_usetime;
-} __attribute__((packed));
-/* sizeof(struct sadb_comb) == 72 */
-
-struct sadb_supported {
- uint16_t sadb_supported_len;
- uint16_t sadb_supported_exttype;
- uint32_t sadb_supported_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_supported) == 8 */
-
-/* followed by:
- struct sadb_alg sadb_algs[(sadb_supported_len +
- sizeof(uint64_t) - sizeof(struct sadb_supported)) /
- sizeof(struct sadb_alg)]; */
-
-struct sadb_alg {
- uint8_t sadb_alg_id;
- uint8_t sadb_alg_ivlen;
- uint16_t sadb_alg_minbits;
- uint16_t sadb_alg_maxbits;
- uint16_t sadb_alg_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_alg) == 8 */
-
-struct sadb_spirange {
- uint16_t sadb_spirange_len;
- uint16_t sadb_spirange_exttype;
- uint32_t sadb_spirange_min;
- uint32_t sadb_spirange_max;
- uint32_t sadb_spirange_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_spirange) == 16 */
-
-struct sadb_x_kmprivate {
- uint16_t sadb_x_kmprivate_len;
- uint16_t sadb_x_kmprivate_exttype;
- uint32_t sadb_x_kmprivate_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_x_kmprivate) == 8 */
-
-struct sadb_x_sa2 {
- uint16_t sadb_x_sa2_len;
- uint16_t sadb_x_sa2_exttype;
- uint8_t sadb_x_sa2_mode;
- uint8_t sadb_x_sa2_reserved1;
- uint16_t sadb_x_sa2_reserved2;
- uint32_t sadb_x_sa2_sequence;
- uint32_t sadb_x_sa2_reqid;
-} __attribute__((packed));
-/* sizeof(struct sadb_x_sa2) == 16 */
-
-struct sadb_x_policy {
- uint16_t sadb_x_policy_len;
- uint16_t sadb_x_policy_exttype;
- uint16_t sadb_x_policy_type;
- uint8_t sadb_x_policy_dir;
- uint8_t sadb_x_policy_reserved;
- uint32_t sadb_x_policy_id;
- uint32_t sadb_x_policy_priority;
-} __attribute__((packed));
-/* sizeof(struct sadb_x_policy) == 16 */
-
-struct sadb_x_ipsecrequest {
- uint16_t sadb_x_ipsecrequest_len;
- uint16_t sadb_x_ipsecrequest_proto;
- uint8_t sadb_x_ipsecrequest_mode;
- uint8_t sadb_x_ipsecrequest_level;
- uint16_t sadb_x_ipsecrequest_reserved1;
- uint32_t sadb_x_ipsecrequest_reqid;
- uint32_t sadb_x_ipsecrequest_reserved2;
-} __attribute__((packed));
-/* sizeof(struct sadb_x_ipsecrequest) == 16 */
-
-/* This defines the TYPE of Nat Traversal in use. Currently only one
- * type of NAT-T is supported, draft-ietf-ipsec-udp-encaps-06
- */
-struct sadb_x_nat_t_type {
- uint16_t sadb_x_nat_t_type_len;
- uint16_t sadb_x_nat_t_type_exttype;
- uint8_t sadb_x_nat_t_type_type;
- uint8_t sadb_x_nat_t_type_reserved[3];
-} __attribute__((packed));
-/* sizeof(struct sadb_x_nat_t_type) == 8 */
-
-/* Pass a NAT Traversal port (Source or Dest port) */
-struct sadb_x_nat_t_port {
- uint16_t sadb_x_nat_t_port_len;
- uint16_t sadb_x_nat_t_port_exttype;
- uint16_t sadb_x_nat_t_port_port;
- uint16_t sadb_x_nat_t_port_reserved;
-} __attribute__((packed));
-/* sizeof(struct sadb_x_nat_t_port) == 8 */
-
-/* Generic LSM security context */
-struct sadb_x_sec_ctx {
- uint16_t sadb_x_sec_len;
- uint16_t sadb_x_sec_exttype;
- uint8_t sadb_x_ctx_alg; /* LSMs: e.g., selinux == 1 */
- uint8_t sadb_x_ctx_doi;
- uint16_t sadb_x_ctx_len;
-} __attribute__((packed));
-/* sizeof(struct sadb_sec_ctx) = 8 */
-
-/* Message types */
-#define SADB_RESERVED 0
-#define SADB_GETSPI 1
-#define SADB_UPDATE 2
-#define SADB_ADD 3
-#define SADB_DELETE 4
-#define SADB_GET 5
-#define SADB_ACQUIRE 6
-#define SADB_REGISTER 7
-#define SADB_EXPIRE 8
-#define SADB_FLUSH 9
-#define SADB_DUMP 10
-#define SADB_X_PROMISC 11
-#define SADB_X_PCHANGE 12
-#define SADB_X_SPDUPDATE 13
-#define SADB_X_SPDADD 14
-#define SADB_X_SPDDELETE 15
-#define SADB_X_SPDGET 16
-#define SADB_X_SPDACQUIRE 17
-#define SADB_X_SPDDUMP 18
-#define SADB_X_SPDFLUSH 19
-#define SADB_X_SPDSETIDX 20
-#define SADB_X_SPDEXPIRE 21
-#define SADB_X_SPDDELETE2 22
-#define SADB_X_NAT_T_NEW_MAPPING 23
-#define SADB_MAX 23
-
-/* Security Association flags */
-#define SADB_SAFLAGS_PFS 1
-#define SADB_SAFLAGS_NOPMTUDISC 0x20000000
-#define SADB_SAFLAGS_DECAP_DSCP 0x40000000
-#define SADB_SAFLAGS_NOECN 0x80000000
-
-/* Security Association states */
-#define SADB_SASTATE_LARVAL 0
-#define SADB_SASTATE_MATURE 1
-#define SADB_SASTATE_DYING 2
-#define SADB_SASTATE_DEAD 3
-#define SADB_SASTATE_MAX 3
-
-/* Security Association types */
-#define SADB_SATYPE_UNSPEC 0
-#define SADB_SATYPE_AH 2
-#define SADB_SATYPE_ESP 3
-#define SADB_SATYPE_RSVP 5
-#define SADB_SATYPE_OSPFV2 6
-#define SADB_SATYPE_RIPV2 7
-#define SADB_SATYPE_MIP 8
-#define SADB_X_SATYPE_IPCOMP 9
-#define SADB_SATYPE_MAX 9
-
-/* Authentication algorithms */
-#define SADB_AALG_NONE 0
-#define SADB_AALG_MD5HMAC 2
-#define SADB_AALG_SHA1HMAC 3
-#define SADB_X_AALG_SHA2_256HMAC 5
-#define SADB_X_AALG_SHA2_384HMAC 6
-#define SADB_X_AALG_SHA2_512HMAC 7
-#define SADB_X_AALG_RIPEMD160HMAC 8
-#define SADB_X_AALG_NULL 251 /* kame */
-#define SADB_AALG_MAX 251
-
-/* Encryption algorithms */
-#define SADB_EALG_NONE 0
-#define SADB_EALG_DESCBC 2
-#define SADB_EALG_3DESCBC 3
-#define SADB_X_EALG_CASTCBC 6
-#define SADB_X_EALG_BLOWFISHCBC 7
-#define SADB_EALG_NULL 11
-#define SADB_X_EALG_AESCBC 12
-#define SADB_EALG_MAX 253 /* last EALG */
-/* private allocations should use 249-255 (RFC2407) */
-#define SADB_X_EALG_SERPENTCBC 252 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
-#define SADB_X_EALG_TWOFISHCBC 253 /* draft-ietf-ipsec-ciph-aes-cbc-00 */
-
-/* Compression algorithms */
-#define SADB_X_CALG_NONE 0
-#define SADB_X_CALG_OUI 1
-#define SADB_X_CALG_DEFLATE 2
-#define SADB_X_CALG_LZS 3
-#define SADB_X_CALG_LZJH 4
-#define SADB_X_CALG_MAX 4
-
-/* Extension Header values */
-#define SADB_EXT_RESERVED 0
-#define SADB_EXT_SA 1
-#define SADB_EXT_LIFETIME_CURRENT 2
-#define SADB_EXT_LIFETIME_HARD 3
-#define SADB_EXT_LIFETIME_SOFT 4
-#define SADB_EXT_ADDRESS_SRC 5
-#define SADB_EXT_ADDRESS_DST 6
-#define SADB_EXT_ADDRESS_PROXY 7
-#define SADB_EXT_KEY_AUTH 8
-#define SADB_EXT_KEY_ENCRYPT 9
-#define SADB_EXT_IDENTITY_SRC 10
-#define SADB_EXT_IDENTITY_DST 11
-#define SADB_EXT_SENSITIVITY 12
-#define SADB_EXT_PROPOSAL 13
-#define SADB_EXT_SUPPORTED_AUTH 14
-#define SADB_EXT_SUPPORTED_ENCRYPT 15
-#define SADB_EXT_SPIRANGE 16
-#define SADB_X_EXT_KMPRIVATE 17
-#define SADB_X_EXT_POLICY 18
-#define SADB_X_EXT_SA2 19
-/* The next four entries are for setting up NAT Traversal */
-#define SADB_X_EXT_NAT_T_TYPE 20
-#define SADB_X_EXT_NAT_T_SPORT 21
-#define SADB_X_EXT_NAT_T_DPORT 22
-#define SADB_X_EXT_NAT_T_OA 23
-#define SADB_X_EXT_SEC_CTX 24
-#define SADB_EXT_MAX 24
-
-/* Identity Extension values */
-#define SADB_IDENTTYPE_RESERVED 0
-#define SADB_IDENTTYPE_PREFIX 1
-#define SADB_IDENTTYPE_FQDN 2
-#define SADB_IDENTTYPE_USERFQDN 3
-#define SADB_IDENTTYPE_MAX 3
-
-#endif /* !(_LINUX_PFKEY2_H) */
diff --git a/original/linux/pkt_cls.h b/original/linux/pkt_cls.h
deleted file mode 100644
index 3c842ed..0000000
--- a/original/linux/pkt_cls.h
+++ /dev/null
@@ -1,494 +0,0 @@
-#ifndef __LINUX_PKT_CLS_H
-#define __LINUX_PKT_CLS_H
-
-#include <linux/types.h>
-#include <linux/pkt_sched.h>
-
-/* I think i could have done better macros ; for now this is stolen from
- * some arch/mips code - jhs
-*/
-#define _TC_MAKE32(x) ((x))
-
-#define _TC_MAKEMASK1(n) (_TC_MAKE32(1) << _TC_MAKE32(n))
-#define _TC_MAKEMASK(v,n) (_TC_MAKE32((_TC_MAKE32(1)<<(v))-1) << _TC_MAKE32(n))
-#define _TC_MAKEVALUE(v,n) (_TC_MAKE32(v) << _TC_MAKE32(n))
-#define _TC_GETVALUE(v,n,m) ((_TC_MAKE32(v) & _TC_MAKE32(m)) >> _TC_MAKE32(n))
-
-/* verdict bit breakdown
- *
-bit 0: when set -> this packet has been munged already
-
-bit 1: when set -> It is ok to munge this packet
-
-bit 2,3,4,5: Reclassify counter - sort of reverse TTL - if exceeded
-assume loop
-
-bit 6,7: Where this packet was last seen
-0: Above the transmit example at the socket level
-1: on the Ingress
-2: on the Egress
-
-bit 8: when set --> Request not to classify on ingress.
-
-bits 9,10,11: redirect counter - redirect TTL. Loop avoidance
-
- *
- * */
-
-#define TC_MUNGED _TC_MAKEMASK1(0)
-#define SET_TC_MUNGED(v) ( TC_MUNGED | (v & ~TC_MUNGED))
-#define CLR_TC_MUNGED(v) ( v & ~TC_MUNGED)
-
-#define TC_OK2MUNGE _TC_MAKEMASK1(1)
-#define SET_TC_OK2MUNGE(v) ( TC_OK2MUNGE | (v & ~TC_OK2MUNGE))
-#define CLR_TC_OK2MUNGE(v) ( v & ~TC_OK2MUNGE)
-
-#define S_TC_VERD _TC_MAKE32(2)
-#define M_TC_VERD _TC_MAKEMASK(4,S_TC_VERD)
-#define G_TC_VERD(x) _TC_GETVALUE(x,S_TC_VERD,M_TC_VERD)
-#define V_TC_VERD(x) _TC_MAKEVALUE(x,S_TC_VERD)
-#define SET_TC_VERD(v,n) ((V_TC_VERD(n)) | (v & ~M_TC_VERD))
-
-#define S_TC_FROM _TC_MAKE32(6)
-#define M_TC_FROM _TC_MAKEMASK(2,S_TC_FROM)
-#define G_TC_FROM(x) _TC_GETVALUE(x,S_TC_FROM,M_TC_FROM)
-#define V_TC_FROM(x) _TC_MAKEVALUE(x,S_TC_FROM)
-#define SET_TC_FROM(v,n) ((V_TC_FROM(n)) | (v & ~M_TC_FROM))
-#define AT_STACK 0x0
-#define AT_INGRESS 0x1
-#define AT_EGRESS 0x2
-
-#define TC_NCLS _TC_MAKEMASK1(8)
-#define SET_TC_NCLS(v) ( TC_NCLS | (v & ~TC_NCLS))
-#define CLR_TC_NCLS(v) ( v & ~TC_NCLS)
-
-#define S_TC_RTTL _TC_MAKE32(9)
-#define M_TC_RTTL _TC_MAKEMASK(3,S_TC_RTTL)
-#define G_TC_RTTL(x) _TC_GETVALUE(x,S_TC_RTTL,M_TC_RTTL)
-#define V_TC_RTTL(x) _TC_MAKEVALUE(x,S_TC_RTTL)
-#define SET_TC_RTTL(v,n) ((V_TC_RTTL(n)) | (v & ~M_TC_RTTL))
-
-#define S_TC_AT _TC_MAKE32(12)
-#define M_TC_AT _TC_MAKEMASK(2,S_TC_AT)
-#define G_TC_AT(x) _TC_GETVALUE(x,S_TC_AT,M_TC_AT)
-#define V_TC_AT(x) _TC_MAKEVALUE(x,S_TC_AT)
-#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT))
-
-/* Action attributes */
-enum
-{
- TCA_ACT_UNSPEC,
- TCA_ACT_KIND,
- TCA_ACT_OPTIONS,
- TCA_ACT_INDEX,
- TCA_ACT_STATS,
- __TCA_ACT_MAX
-};
-
-#define TCA_ACT_MAX __TCA_ACT_MAX
-#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
-#define TCA_ACT_MAX_PRIO 32
-#define TCA_ACT_BIND 1
-#define TCA_ACT_NOBIND 0
-#define TCA_ACT_UNBIND 1
-#define TCA_ACT_NOUNBIND 0
-#define TCA_ACT_REPLACE 1
-#define TCA_ACT_NOREPLACE 0
-#define MAX_REC_LOOP 4
-#define MAX_RED_LOOP 4
-
-#define TC_ACT_UNSPEC (-1)
-#define TC_ACT_OK 0
-#define TC_ACT_RECLASSIFY 1
-#define TC_ACT_SHOT 2
-#define TC_ACT_PIPE 3
-#define TC_ACT_STOLEN 4
-#define TC_ACT_QUEUED 5
-#define TC_ACT_REPEAT 6
-#define TC_ACT_JUMP 0x10000000
-
-/* Action type identifiers*/
-enum
-{
- TCA_ID_UNSPEC=0,
- TCA_ID_POLICE=1,
- /* other actions go here */
- __TCA_ID_MAX=255
-};
-
-#define TCA_ID_MAX __TCA_ID_MAX
-
-struct tc_police
-{
- __u32 index;
- int action;
-#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
-#define TC_POLICE_OK TC_ACT_OK
-#define TC_POLICE_RECLASSIFY TC_ACT_RECLASSIFY
-#define TC_POLICE_SHOT TC_ACT_SHOT
-#define TC_POLICE_PIPE TC_ACT_PIPE
-
- __u32 limit;
- __u32 burst;
- __u32 mtu;
- struct tc_ratespec rate;
- struct tc_ratespec peakrate;
- int refcnt;
- int bindcnt;
- __u32 capab;
-};
-
-struct tcf_t
-{
- __u64 install;
- __u64 lastuse;
- __u64 expires;
-};
-
-struct tc_cnt
-{
- int refcnt;
- int bindcnt;
-};
-
-#define tc_gen \
- __u32 index; \
- __u32 capab; \
- int action; \
- int refcnt; \
- int bindcnt
-
-enum
-{
- TCA_POLICE_UNSPEC,
- TCA_POLICE_TBF,
- TCA_POLICE_RATE,
- TCA_POLICE_PEAKRATE,
- TCA_POLICE_AVRATE,
- TCA_POLICE_RESULT,
- __TCA_POLICE_MAX
-#define TCA_POLICE_RESULT TCA_POLICE_RESULT
-};
-
-#define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
-
-/* U32 filters */
-
-#define TC_U32_HTID(h) ((h)&0xFFF00000)
-#define TC_U32_USERHTID(h) (TC_U32_HTID(h)>>20)
-#define TC_U32_HASH(h) (((h)>>12)&0xFF)
-#define TC_U32_NODE(h) ((h)&0xFFF)
-#define TC_U32_KEY(h) ((h)&0xFFFFF)
-#define TC_U32_UNSPEC 0
-#define TC_U32_ROOT (0xFFF00000)
-
-enum
-{
- TCA_U32_UNSPEC,
- TCA_U32_CLASSID,
- TCA_U32_HASH,
- TCA_U32_LINK,
- TCA_U32_DIVISOR,
- TCA_U32_SEL,
- TCA_U32_POLICE,
- TCA_U32_ACT,
- TCA_U32_INDEV,
- TCA_U32_PCNT,
- TCA_U32_MARK,
- __TCA_U32_MAX
-};
-
-#define TCA_U32_MAX (__TCA_U32_MAX - 1)
-
-struct tc_u32_key
-{
- __be32 mask;
- __be32 val;
- int off;
- int offmask;
-};
-
-struct tc_u32_sel
-{
- unsigned char flags;
- unsigned char offshift;
- unsigned char nkeys;
-
- __be16 offmask;
- __u16 off;
- short offoff;
-
- short hoff;
- __be32 hmask;
- struct tc_u32_key keys[0];
-};
-
-struct tc_u32_mark
-{
- __u32 val;
- __u32 mask;
- __u32 success;
-};
-
-struct tc_u32_pcnt
-{
- __u64 rcnt;
- __u64 rhit;
- __u64 kcnts[0];
-};
-
-/* Flags */
-
-#define TC_U32_TERMINAL 1
-#define TC_U32_OFFSET 2
-#define TC_U32_VAROFFSET 4
-#define TC_U32_EAT 8
-
-#define TC_U32_MAXDEPTH 8
-
-
-/* RSVP filter */
-
-enum
-{
- TCA_RSVP_UNSPEC,
- TCA_RSVP_CLASSID,
- TCA_RSVP_DST,
- TCA_RSVP_SRC,
- TCA_RSVP_PINFO,
- TCA_RSVP_POLICE,
- TCA_RSVP_ACT,
- __TCA_RSVP_MAX
-};
-
-#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
-
-struct tc_rsvp_gpi
-{
- __u32 key;
- __u32 mask;
- int offset;
-};
-
-struct tc_rsvp_pinfo
-{
- struct tc_rsvp_gpi dpi;
- struct tc_rsvp_gpi spi;
- __u8 protocol;
- __u8 tunnelid;
- __u8 tunnelhdr;
- __u8 pad;
-};
-
-/* ROUTE filter */
-
-enum
-{
- TCA_ROUTE4_UNSPEC,
- TCA_ROUTE4_CLASSID,
- TCA_ROUTE4_TO,
- TCA_ROUTE4_FROM,
- TCA_ROUTE4_IIF,
- TCA_ROUTE4_POLICE,
- TCA_ROUTE4_ACT,
- __TCA_ROUTE4_MAX
-};
-
-#define TCA_ROUTE4_MAX (__TCA_ROUTE4_MAX - 1)
-
-
-/* FW filter */
-
-enum
-{
- TCA_FW_UNSPEC,
- TCA_FW_CLASSID,
- TCA_FW_POLICE,
- TCA_FW_INDEV, /* used by CONFIG_NET_CLS_IND */
- TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */
- TCA_FW_MASK,
- __TCA_FW_MAX
-};
-
-#define TCA_FW_MAX (__TCA_FW_MAX - 1)
-
-/* TC index filter */
-
-enum
-{
- TCA_TCINDEX_UNSPEC,
- TCA_TCINDEX_HASH,
- TCA_TCINDEX_MASK,
- TCA_TCINDEX_SHIFT,
- TCA_TCINDEX_FALL_THROUGH,
- TCA_TCINDEX_CLASSID,
- TCA_TCINDEX_POLICE,
- TCA_TCINDEX_ACT,
- __TCA_TCINDEX_MAX
-};
-
-#define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1)
-
-/* Flow filter */
-
-enum
-{
- FLOW_KEY_SRC,
- FLOW_KEY_DST,
- FLOW_KEY_PROTO,
- FLOW_KEY_PROTO_SRC,
- FLOW_KEY_PROTO_DST,
- FLOW_KEY_IIF,
- FLOW_KEY_PRIORITY,
- FLOW_KEY_MARK,
- FLOW_KEY_NFCT,
- FLOW_KEY_NFCT_SRC,
- FLOW_KEY_NFCT_DST,
- FLOW_KEY_NFCT_PROTO_SRC,
- FLOW_KEY_NFCT_PROTO_DST,
- FLOW_KEY_RTCLASSID,
- FLOW_KEY_SKUID,
- FLOW_KEY_SKGID,
- FLOW_KEY_VLAN_TAG,
- __FLOW_KEY_MAX,
-};
-
-#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1)
-
-enum
-{
- FLOW_MODE_MAP,
- FLOW_MODE_HASH,
-};
-
-enum
-{
- TCA_FLOW_UNSPEC,
- TCA_FLOW_KEYS,
- TCA_FLOW_MODE,
- TCA_FLOW_BASECLASS,
- TCA_FLOW_RSHIFT,
- TCA_FLOW_ADDEND,
- TCA_FLOW_MASK,
- TCA_FLOW_XOR,
- TCA_FLOW_DIVISOR,
- TCA_FLOW_ACT,
- TCA_FLOW_POLICE,
- TCA_FLOW_EMATCHES,
- TCA_FLOW_PERTURB,
- __TCA_FLOW_MAX
-};
-
-#define TCA_FLOW_MAX (__TCA_FLOW_MAX - 1)
-
-/* Basic filter */
-
-enum
-{
- TCA_BASIC_UNSPEC,
- TCA_BASIC_CLASSID,
- TCA_BASIC_EMATCHES,
- TCA_BASIC_ACT,
- TCA_BASIC_POLICE,
- __TCA_BASIC_MAX
-};
-
-#define TCA_BASIC_MAX (__TCA_BASIC_MAX - 1)
-
-
-/* Cgroup classifier */
-
-enum
-{
- TCA_CGROUP_UNSPEC,
- TCA_CGROUP_ACT,
- TCA_CGROUP_POLICE,
- TCA_CGROUP_EMATCHES,
- __TCA_CGROUP_MAX,
-};
-
-#define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1)
-
-/* Extended Matches */
-
-struct tcf_ematch_tree_hdr
-{
- __u16 nmatches;
- __u16 progid;
-};
-
-enum
-{
- TCA_EMATCH_TREE_UNSPEC,
- TCA_EMATCH_TREE_HDR,
- TCA_EMATCH_TREE_LIST,
- __TCA_EMATCH_TREE_MAX
-};
-#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
-
-struct tcf_ematch_hdr
-{
- __u16 matchid;
- __u16 kind;
- __u16 flags;
- __u16 pad; /* currently unused */
-};
-
-/* 0 1
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
- * +-----------------------+-+-+---+
- * | Unused |S|I| R |
- * +-----------------------+-+-+---+
- *
- * R(2) ::= relation to next ematch
- * where: 0 0 END (last ematch)
- * 0 1 AND
- * 1 0 OR
- * 1 1 Unused (invalid)
- * I(1) ::= invert result
- * S(1) ::= simple payload
- */
-#define TCF_EM_REL_END 0
-#define TCF_EM_REL_AND (1<<0)
-#define TCF_EM_REL_OR (1<<1)
-#define TCF_EM_INVERT (1<<2)
-#define TCF_EM_SIMPLE (1<<3)
-
-#define TCF_EM_REL_MASK 3
-#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
-
-enum
-{
- TCF_LAYER_LINK,
- TCF_LAYER_NETWORK,
- TCF_LAYER_TRANSPORT,
- __TCF_LAYER_MAX
-};
-#define TCF_LAYER_MAX (__TCF_LAYER_MAX - 1)
-
-/* Ematch type assignments
- * 1..32767 Reserved for ematches inside kernel tree
- * 32768..65535 Free to use, not reliable
- */
-#define TCF_EM_CONTAINER 0
-#define TCF_EM_CMP 1
-#define TCF_EM_NBYTE 2
-#define TCF_EM_U32 3
-#define TCF_EM_META 4
-#define TCF_EM_TEXT 5
-#define TCF_EM_VLAN 6
-#define TCF_EM_MAX 6
-
-enum
-{
- TCF_EM_PROG_TC
-};
-
-enum
-{
- TCF_EM_OPND_EQ,
- TCF_EM_OPND_GT,
- TCF_EM_OPND_LT
-};
-
-#endif
diff --git a/original/linux/pkt_sched.h b/original/linux/pkt_sched.h
deleted file mode 100644
index d51a2b3..0000000
--- a/original/linux/pkt_sched.h
+++ /dev/null
@@ -1,521 +0,0 @@
-#ifndef __LINUX_PKT_SCHED_H
-#define __LINUX_PKT_SCHED_H
-
-#include <linux/types.h>
-
-/* Logical priority bands not depending on specific packet scheduler.
- Every scheduler will map them to real traffic classes, if it has
- no more precise mechanism to classify packets.
-
- These numbers have no special meaning, though their coincidence
- with obsolete IPv6 values is not occasional :-). New IPv6 drafts
- preferred full anarchy inspired by diffserv group.
-
- Note: TC_PRIO_BESTEFFORT does not mean that it is the most unhappy
- class, actually, as rule it will be handled with more care than
- filler or even bulk.
- */
-
-#define TC_PRIO_BESTEFFORT 0
-#define TC_PRIO_FILLER 1
-#define TC_PRIO_BULK 2
-#define TC_PRIO_INTERACTIVE_BULK 4
-#define TC_PRIO_INTERACTIVE 6
-#define TC_PRIO_CONTROL 7
-
-#define TC_PRIO_MAX 15
-
-/* Generic queue statistics, available for all the elements.
- Particular schedulers may have also their private records.
- */
-
-struct tc_stats
-{
- __u64 bytes; /* NUmber of enqueues bytes */
- __u32 packets; /* Number of enqueued packets */
- __u32 drops; /* Packets dropped because of lack of resources */
- __u32 overlimits; /* Number of throttle events when this
- * flow goes out of allocated bandwidth */
- __u32 bps; /* Current flow byte rate */
- __u32 pps; /* Current flow packet rate */
- __u32 qlen;
- __u32 backlog;
-};
-
-struct tc_estimator
-{
- signed char interval;
- unsigned char ewma_log;
-};
-
-/* "Handles"
- ---------
-
- All the traffic control objects have 32bit identifiers, or "handles".
-
- They can be considered as opaque numbers from user API viewpoint,
- but actually they always consist of two fields: major and
- minor numbers, which are interpreted by kernel specially,
- that may be used by applications, though not recommended.
-
- F.e. qdisc handles always have minor number equal to zero,
- classes (or flows) have major equal to parent qdisc major, and
- minor uniquely identifying class inside qdisc.
-
- Macros to manipulate handles:
- */
-
-#define TC_H_MAJ_MASK (0xFFFF0000U)
-#define TC_H_MIN_MASK (0x0000FFFFU)
-#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
-#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
-#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))
-
-#define TC_H_UNSPEC (0U)
-#define TC_H_ROOT (0xFFFFFFFFU)
-#define TC_H_INGRESS (0xFFFFFFF1U)
-
-struct tc_ratespec
-{
- unsigned char cell_log;
- unsigned char __reserved;
- unsigned short overhead;
- short cell_align;
- unsigned short mpu;
- __u32 rate;
-};
-
-#define TC_RTAB_SIZE 1024
-
-struct tc_sizespec {
- unsigned char cell_log;
- unsigned char size_log;
- short cell_align;
- int overhead;
- unsigned int linklayer;
- unsigned int mpu;
- unsigned int mtu;
- unsigned int tsize;
-};
-
-enum {
- TCA_STAB_UNSPEC,
- TCA_STAB_BASE,
- TCA_STAB_DATA,
- __TCA_STAB_MAX
-};
-
-#define TCA_STAB_MAX (__TCA_STAB_MAX - 1)
-
-/* FIFO section */
-
-struct tc_fifo_qopt
-{
- __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */
-};
-
-/* PRIO section */
-
-#define TCQ_PRIO_BANDS 16
-#define TCQ_MIN_PRIO_BANDS 2
-
-struct tc_prio_qopt
-{
- int bands; /* Number of bands */
- __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
-};
-
-/* MULTIQ section */
-
-struct tc_multiq_qopt {
- __u16 bands; /* Number of bands */
- __u16 max_bands; /* Maximum number of queues */
-};
-
-/* TBF section */
-
-struct tc_tbf_qopt
-{
- struct tc_ratespec rate;
- struct tc_ratespec peakrate;
- __u32 limit;
- __u32 buffer;
- __u32 mtu;
-};
-
-enum
-{
- TCA_TBF_UNSPEC,
- TCA_TBF_PARMS,
- TCA_TBF_RTAB,
- TCA_TBF_PTAB,
- __TCA_TBF_MAX,
-};
-
-#define TCA_TBF_MAX (__TCA_TBF_MAX - 1)
-
-
-/* TEQL section */
-
-/* TEQL does not require any parameters */
-
-/* SFQ section */
-
-struct tc_sfq_qopt
-{
- unsigned quantum; /* Bytes per round allocated to flow */
- int perturb_period; /* Period of hash perturbation */
- __u32 limit; /* Maximal packets in queue */
- unsigned divisor; /* Hash divisor */
- unsigned flows; /* Maximal number of flows */
-};
-
-struct tc_sfq_xstats
-{
- __s32 allot;
-};
-
-/*
- * NOTE: limit, divisor and flows are hardwired to code at the moment.
- *
- * limit=flows=128, divisor=1024;
- *
- * The only reason for this is efficiency, it is possible
- * to change these parameters in compile time.
- */
-
-/* RED section */
-
-enum
-{
- TCA_RED_UNSPEC,
- TCA_RED_PARMS,
- TCA_RED_STAB,
- __TCA_RED_MAX,
-};
-
-#define TCA_RED_MAX (__TCA_RED_MAX - 1)
-
-struct tc_red_qopt
-{
- __u32 limit; /* HARD maximal queue length (bytes) */
- __u32 qth_min; /* Min average length threshold (bytes) */
- __u32 qth_max; /* Max average length threshold (bytes) */
- unsigned char Wlog; /* log(W) */
- unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */
- unsigned char Scell_log; /* cell size for idle damping */
- unsigned char flags;
-#define TC_RED_ECN 1
-#define TC_RED_HARDDROP 2
-};
-
-struct tc_red_xstats
-{
- __u32 early; /* Early drops */
- __u32 pdrop; /* Drops due to queue limits */
- __u32 other; /* Drops due to drop() calls */
- __u32 marked; /* Marked packets */
-};
-
-/* GRED section */
-
-#define MAX_DPs 16
-
-enum
-{
- TCA_GRED_UNSPEC,
- TCA_GRED_PARMS,
- TCA_GRED_STAB,
- TCA_GRED_DPS,
- __TCA_GRED_MAX,
-};
-
-#define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
-
-struct tc_gred_qopt
-{
- __u32 limit; /* HARD maximal queue length (bytes) */
- __u32 qth_min; /* Min average length threshold (bytes) */
- __u32 qth_max; /* Max average length threshold (bytes) */
- __u32 DP; /* upto 2^32 DPs */
- __u32 backlog;
- __u32 qave;
- __u32 forced;
- __u32 early;
- __u32 other;
- __u32 pdrop;
- __u8 Wlog; /* log(W) */
- __u8 Plog; /* log(P_max/(qth_max-qth_min)) */
- __u8 Scell_log; /* cell size for idle damping */
- __u8 prio; /* prio of this VQ */
- __u32 packets;
- __u32 bytesin;
-};
-
-/* gred setup */
-struct tc_gred_sopt
-{
- __u32 DPs;
- __u32 def_DP;
- __u8 grio;
- __u8 flags;
- __u16 pad1;
-};
-
-/* HTB section */
-#define TC_HTB_NUMPRIO 8
-#define TC_HTB_MAXDEPTH 8
-#define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */
-
-struct tc_htb_opt
-{
- struct tc_ratespec rate;
- struct tc_ratespec ceil;
- __u32 buffer;
- __u32 cbuffer;
- __u32 quantum;
- __u32 level; /* out only */
- __u32 prio;
-};
-struct tc_htb_glob
-{
- __u32 version; /* to match HTB/TC */
- __u32 rate2quantum; /* bps->quantum divisor */
- __u32 defcls; /* default class number */
- __u32 debug; /* debug flags */
-
- /* stats */
- __u32 direct_pkts; /* count of non shapped packets */
-};
-enum
-{
- TCA_HTB_UNSPEC,
- TCA_HTB_PARMS,
- TCA_HTB_INIT,
- TCA_HTB_CTAB,
- TCA_HTB_RTAB,
- __TCA_HTB_MAX,
-};
-
-#define TCA_HTB_MAX (__TCA_HTB_MAX - 1)
-
-struct tc_htb_xstats
-{
- __u32 lends;
- __u32 borrows;
- __u32 giants; /* too big packets (rate will not be accurate) */
- __u32 tokens;
- __u32 ctokens;
-};
-
-/* HFSC section */
-
-struct tc_hfsc_qopt
-{
- __u16 defcls; /* default class */
-};
-
-struct tc_service_curve
-{
- __u32 m1; /* slope of the first segment in bps */
- __u32 d; /* x-projection of the first segment in us */
- __u32 m2; /* slope of the second segment in bps */
-};
-
-struct tc_hfsc_stats
-{
- __u64 work; /* total work done */
- __u64 rtwork; /* work done by real-time criteria */
- __u32 period; /* current period */
- __u32 level; /* class level in hierarchy */
-};
-
-enum
-{
- TCA_HFSC_UNSPEC,
- TCA_HFSC_RSC,
- TCA_HFSC_FSC,
- TCA_HFSC_USC,
- __TCA_HFSC_MAX,
-};
-
-#define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1)
-
-
-/* CBQ section */
-
-#define TC_CBQ_MAXPRIO 8
-#define TC_CBQ_MAXLEVEL 8
-#define TC_CBQ_DEF_EWMA 5
-
-struct tc_cbq_lssopt
-{
- unsigned char change;
- unsigned char flags;
-#define TCF_CBQ_LSS_BOUNDED 1
-#define TCF_CBQ_LSS_ISOLATED 2
- unsigned char ewma_log;
- unsigned char level;
-#define TCF_CBQ_LSS_FLAGS 1
-#define TCF_CBQ_LSS_EWMA 2
-#define TCF_CBQ_LSS_MAXIDLE 4
-#define TCF_CBQ_LSS_MINIDLE 8
-#define TCF_CBQ_LSS_OFFTIME 0x10
-#define TCF_CBQ_LSS_AVPKT 0x20
- __u32 maxidle;
- __u32 minidle;
- __u32 offtime;
- __u32 avpkt;
-};
-
-struct tc_cbq_wrropt
-{
- unsigned char flags;
- unsigned char priority;
- unsigned char cpriority;
- unsigned char __reserved;
- __u32 allot;
- __u32 weight;
-};
-
-struct tc_cbq_ovl
-{
- unsigned char strategy;
-#define TC_CBQ_OVL_CLASSIC 0
-#define TC_CBQ_OVL_DELAY 1
-#define TC_CBQ_OVL_LOWPRIO 2
-#define TC_CBQ_OVL_DROP 3
-#define TC_CBQ_OVL_RCLASSIC 4
- unsigned char priority2;
- __u16 pad;
- __u32 penalty;
-};
-
-struct tc_cbq_police
-{
- unsigned char police;
- unsigned char __res1;
- unsigned short __res2;
-};
-
-struct tc_cbq_fopt
-{
- __u32 split;
- __u32 defmap;
- __u32 defchange;
-};
-
-struct tc_cbq_xstats
-{
- __u32 borrows;
- __u32 overactions;
- __s32 avgidle;
- __s32 undertime;
-};
-
-enum
-{
- TCA_CBQ_UNSPEC,
- TCA_CBQ_LSSOPT,
- TCA_CBQ_WRROPT,
- TCA_CBQ_FOPT,
- TCA_CBQ_OVL_STRATEGY,
- TCA_CBQ_RATE,
- TCA_CBQ_RTAB,
- TCA_CBQ_POLICE,
- __TCA_CBQ_MAX,
-};
-
-#define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1)
-
-/* dsmark section */
-
-enum {
- TCA_DSMARK_UNSPEC,
- TCA_DSMARK_INDICES,
- TCA_DSMARK_DEFAULT_INDEX,
- TCA_DSMARK_SET_TC_INDEX,
- TCA_DSMARK_MASK,
- TCA_DSMARK_VALUE,
- __TCA_DSMARK_MAX,
-};
-
-#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1)
-
-/* ATM section */
-
-enum {
- TCA_ATM_UNSPEC,
- TCA_ATM_FD, /* file/socket descriptor */
- TCA_ATM_PTR, /* pointer to descriptor - later */
- TCA_ATM_HDR, /* LL header */
- TCA_ATM_EXCESS, /* excess traffic class (0 for CLP) */
- TCA_ATM_ADDR, /* PVC address (for output only) */
- TCA_ATM_STATE, /* VC state (ATM_VS_*; for output only) */
- __TCA_ATM_MAX,
-};
-
-#define TCA_ATM_MAX (__TCA_ATM_MAX - 1)
-
-/* Network emulator */
-
-enum
-{
- TCA_NETEM_UNSPEC,
- TCA_NETEM_CORR,
- TCA_NETEM_DELAY_DIST,
- TCA_NETEM_REORDER,
- TCA_NETEM_CORRUPT,
- __TCA_NETEM_MAX,
-};
-
-#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1)
-
-struct tc_netem_qopt
-{
- __u32 latency; /* added delay (us) */
- __u32 limit; /* fifo limit (packets) */
- __u32 loss; /* random packet loss (0=none ~0=100%) */
- __u32 gap; /* re-ordering gap (0 for none) */
- __u32 duplicate; /* random packet dup (0=none ~0=100%) */
- __u32 jitter; /* random jitter in latency (us) */
-};
-
-struct tc_netem_corr
-{
- __u32 delay_corr; /* delay correlation */
- __u32 loss_corr; /* packet loss correlation */
- __u32 dup_corr; /* duplicate correlation */
-};
-
-struct tc_netem_reorder
-{
- __u32 probability;
- __u32 correlation;
-};
-
-struct tc_netem_corrupt
-{
- __u32 probability;
- __u32 correlation;
-};
-
-#define NETEM_DIST_SCALE 8192
-
-/* DRR */
-
-enum
-{
- TCA_DRR_UNSPEC,
- TCA_DRR_QUANTUM,
- __TCA_DRR_MAX
-};
-
-#define TCA_DRR_MAX (__TCA_DRR_MAX - 1)
-
-struct tc_drr_stats
-{
- __u32 deficit;
-};
-
-#endif
diff --git a/original/linux/platform_device.h b/original/linux/platform_device.h
deleted file mode 100644
index 782090c..0000000
--- a/original/linux/platform_device.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * platform_device.h - generic, centralized driver model
- *
- * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
- *
- * This file is released under the GPLv2
- *
- * See Documentation/driver-model/ for more information.
- */
-
-#ifndef _PLATFORM_DEVICE_H_
-#define _PLATFORM_DEVICE_H_
-
-#include <linux/device.h>
-
-struct platform_device {
- const char * name;
- u32 id;
- struct device dev;
- u32 num_resources;
- struct resource * resource;
-};
-
-#define to_platform_device(x) container_of((x), struct platform_device, dev)
-
-extern int platform_device_register(struct platform_device *);
-extern void platform_device_unregister(struct platform_device *);
-
-extern struct bus_type platform_bus_type;
-extern struct device platform_bus;
-
-extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int);
-extern int platform_get_irq(struct platform_device *, unsigned int);
-extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, char *);
-extern int platform_get_irq_byname(struct platform_device *, char *);
-extern int platform_add_devices(struct platform_device **, int);
-
-extern struct platform_device *platform_device_register_simple(char *, unsigned int, struct resource *, unsigned int);
-
-extern struct platform_device *platform_device_alloc(const char *name, unsigned int id);
-extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num);
-extern int platform_device_add_data(struct platform_device *pdev, void *data, size_t size);
-extern int platform_device_add(struct platform_device *pdev);
-extern void platform_device_del(struct platform_device *pdev);
-extern void platform_device_put(struct platform_device *pdev);
-
-struct platform_driver {
- int (*probe)(struct platform_device *);
- int (*remove)(struct platform_device *);
- void (*shutdown)(struct platform_device *);
- int (*suspend)(struct platform_device *, pm_message_t state);
- int (*resume)(struct platform_device *);
- struct device_driver driver;
-};
-
-extern int platform_driver_register(struct platform_driver *);
-extern void platform_driver_unregister(struct platform_driver *);
-
-#define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
-#define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))
-
-#endif /* _PLATFORM_DEVICE_H_ */
diff --git a/original/linux/plist.h b/original/linux/plist.h
deleted file mode 100644
index b95818a..0000000
--- a/original/linux/plist.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Descending-priority-sorted double-linked list
- *
- * (C) 2002-2003 Intel Corp
- * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>.
- *
- * 2001-2005 (c) MontaVista Software, Inc.
- * Daniel Walker <dwalker@mvista.com>
- *
- * (C) 2005 Thomas Gleixner <tglx@linutronix.de>
- *
- * Simplifications of the original code by
- * Oleg Nesterov <oleg@tv-sign.ru>
- *
- * Licensed under the FSF's GNU Public License v2 or later.
- *
- * Based on simple lists (include/linux/list.h).
- *
- * This is a priority-sorted list of nodes; each node has a
- * priority from INT_MIN (highest) to INT_MAX (lowest).
- *
- * Addition is O(K), removal is O(1), change of priority of a node is
- * O(K) and K is the number of RT priority levels used in the system.
- * (1 <= K <= 99)
- *
- * This list is really a list of lists:
- *
- * - The tier 1 list is the prio_list, different priority nodes.
- *
- * - The tier 2 list is the node_list, serialized nodes.
- *
- * Simple ASCII art explanation:
- *
- * |HEAD |
- * | |
- * |prio_list.prev|<------------------------------------|
- * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-|
- * |10 | |10| |21| |21| |21| |40| (prio)
- * | | | | | | | | | | | |
- * | | | | | | | | | | | |
- * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-|
- * |node_list.prev|<------------------------------------|
- *
- * The nodes on the prio_list list are sorted by priority to simplify
- * the insertion of new nodes. There are no nodes with duplicate
- * priorites on the list.
- *
- * The nodes on the node_list is ordered by priority and can contain
- * entries which have the same priority. Those entries are ordered
- * FIFO
- *
- * Addition means: look for the prio_list node in the prio_list
- * for the priority of the node and insert it before the node_list
- * entry of the next prio_list node. If it is the first node of
- * that priority, add it to the prio_list in the right position and
- * insert it into the serialized node_list list
- *
- * Removal means remove it from the node_list and remove it from
- * the prio_list if the node_list list_head is non empty. In case
- * of removal from the prio_list it must be checked whether other
- * entries of the same priority are on the list or not. If there
- * is another entry of the same priority then this entry has to
- * replace the removed entry on the prio_list. If the entry which
- * is removed is the only entry of this priority then a simple
- * remove from both list is sufficient.
- *
- * INT_MIN is the highest priority, 0 is the medium highest, INT_MAX
- * is lowest priority.
- *
- * No locking is done, up to the caller.
- *
- */
-#ifndef _LINUX_PLIST_H_
-#define _LINUX_PLIST_H_
-
-#include <linux/kernel.h>
-#include <linux/list.h>
-#include <linux/spinlock_types.h>
-
-struct plist_head {
- struct list_head prio_list;
- struct list_head node_list;
-#ifdef CONFIG_DEBUG_PI_LIST
- spinlock_t *lock;
-#endif
-};
-
-struct plist_node {
- int prio;
- struct plist_head plist;
-};
-
-#ifdef CONFIG_DEBUG_PI_LIST
-# define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock
-#else
-# define PLIST_HEAD_LOCK_INIT(_lock)
-#endif
-
-/**
- * #PLIST_HEAD_INIT - static struct plist_head initializer
- *
- * @head: struct plist_head variable name
- */
-#define PLIST_HEAD_INIT(head, _lock) \
-{ \
- .prio_list = LIST_HEAD_INIT((head).prio_list), \
- .node_list = LIST_HEAD_INIT((head).node_list), \
- PLIST_HEAD_LOCK_INIT(&(_lock)) \
-}
-
-/**
- * #PLIST_NODE_INIT - static struct plist_node initializer
- *
- * @node: struct plist_node variable name
- * @__prio: initial node priority
- */
-#define PLIST_NODE_INIT(node, __prio) \
-{ \
- .prio = (__prio), \
- .plist = PLIST_HEAD_INIT((node).plist, NULL), \
-}
-
-/**
- * plist_head_init - dynamic struct plist_head initializer
- *
- * @head: &struct plist_head pointer
- */
-static inline void
-plist_head_init(struct plist_head *head, spinlock_t *lock)
-{
- INIT_LIST_HEAD(&head->prio_list);
- INIT_LIST_HEAD(&head->node_list);
-#ifdef CONFIG_DEBUG_PI_LIST
- head->lock = lock;
-#endif
-}
-
-/**
- * plist_node_init - Dynamic struct plist_node initializer
- *
- * @node: &struct plist_node pointer
- * @prio: initial node priority
- */
-static inline void plist_node_init(struct plist_node *node, int prio)
-{
- node->prio = prio;
- plist_head_init(&node->plist, NULL);
-}
-
-extern void plist_add(struct plist_node *node, struct plist_head *head);
-extern void plist_del(struct plist_node *node, struct plist_head *head);
-
-/**
- * plist_for_each - iterate over the plist
- *
- * @pos1: the type * to use as a loop counter.
- * @head: the head for your list.
- */
-#define plist_for_each(pos, head) \
- list_for_each_entry(pos, &(head)->node_list, plist.node_list)
-
-/**
- * plist_for_each_entry_safe - iterate over a plist of given type safe
- * against removal of list entry
- *
- * @pos1: the type * to use as a loop counter.
- * @n1: another type * to use as temporary storage
- * @head: the head for your list.
- */
-#define plist_for_each_safe(pos, n, head) \
- list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
-
-/**
- * plist_for_each_entry - iterate over list of given type
- *
- * @pos: the type * to use as a loop counter.
- * @head: the head for your list.
- * @member: the name of the list_struct within the struct.
- */
-#define plist_for_each_entry(pos, head, mem) \
- list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
-
-/**
- * plist_for_each_entry_safe - iterate over list of given type safe against
- * removal of list entry
- *
- * @pos: the type * to use as a loop counter.
- * @n: another type * to use as temporary storage
- * @head: the head for your list.
- * @m: the name of the list_struct within the struct.
- */
-#define plist_for_each_entry_safe(pos, n, head, m) \
- list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
-
-/**
- * plist_head_empty - return !0 if a plist_head is empty
- *
- * @head: &struct plist_head pointer
- */
-static inline int plist_head_empty(const struct plist_head *head)
-{
- return list_empty(&head->node_list);
-}
-
-/**
- * plist_node_empty - return !0 if plist_node is not on a list
- *
- * @node: &struct plist_node pointer
- */
-static inline int plist_node_empty(const struct plist_node *node)
-{
- return plist_head_empty(&node->plist);
-}
-
-/* All functions below assume the plist_head is not empty. */
-
-/**
- * plist_first_entry - get the struct for the first entry
- *
- * @ptr: the &struct plist_head pointer.
- * @type: the type of the struct this is embedded in.
- * @member: the name of the list_struct within the struct.
- */
-#ifdef CONFIG_DEBUG_PI_LIST
-# define plist_first_entry(head, type, member) \
-({ \
- WARN_ON(plist_head_empty(head)); \
- container_of(plist_first(head), type, member); \
-})
-#else
-# define plist_first_entry(head, type, member) \
- container_of(plist_first(head), type, member)
-#endif
-
-/**
- * plist_first - return the first node (and thus, highest priority)
- *
- * @head: the &struct plist_head pointer
- *
- * Assumes the plist is _not_ empty.
- */
-static inline struct plist_node* plist_first(const struct plist_head *head)
-{
- return list_entry(head->node_list.next,
- struct plist_node, plist.node_list);
-}
-
-#endif
diff --git a/original/linux/pm.h b/original/linux/pm.h
deleted file mode 100644
index 658c1b9..0000000
--- a/original/linux/pm.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * pm.h - Power management interface
- *
- * Copyright (C) 2000 Andrew Henroid
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _LINUX_PM_H
-#define _LINUX_PM_H
-
-#ifdef __KERNEL__
-
-#include <linux/list.h>
-#include <asm/atomic.h>
-
-/*
- * Power management requests... these are passed to pm_send_all() and friends.
- *
- * these functions are old and deprecated, see below.
- */
-typedef int __bitwise pm_request_t;
-
-#define PM_SUSPEND ((__force pm_request_t) 1) /* enter D1-D3 */
-#define PM_RESUME ((__force pm_request_t) 2) /* enter D0 */
-
-
-/*
- * Device types... these are passed to pm_register
- */
-typedef int __bitwise pm_dev_t;
-
-#define PM_UNKNOWN_DEV ((__force pm_dev_t) 0) /* generic */
-#define PM_SYS_DEV ((__force pm_dev_t) 1) /* system device (fan, KB controller, ...) */
-#define PM_PCI_DEV ((__force pm_dev_t) 2) /* PCI device */
-#define PM_USB_DEV ((__force pm_dev_t) 3) /* USB device */
-#define PM_SCSI_DEV ((__force pm_dev_t) 4) /* SCSI device */
-#define PM_ISA_DEV ((__force pm_dev_t) 5) /* ISA device */
-#define PM_MTD_DEV ((__force pm_dev_t) 6) /* Memory Technology Device */
-
-/*
- * System device hardware ID (PnP) values
- */
-enum
-{
- PM_SYS_UNKNOWN = 0x00000000, /* generic */
- PM_SYS_KBC = 0x41d00303, /* keyboard controller */
- PM_SYS_COM = 0x41d00500, /* serial port */
- PM_SYS_IRDA = 0x41d00510, /* IRDA controller */
- PM_SYS_FDC = 0x41d00700, /* floppy controller */
- PM_SYS_VGA = 0x41d00900, /* VGA controller */
- PM_SYS_PCMCIA = 0x41d00e00, /* PCMCIA controller */
-};
-
-/*
- * Device identifier
- */
-#define PM_PCI_ID(dev) ((dev)->bus->number << 16 | (dev)->devfn)
-
-/*
- * Request handler callback
- */
-struct pm_dev;
-
-typedef int (*pm_callback)(struct pm_dev *dev, pm_request_t rqst, void *data);
-
-/*
- * Dynamic device information
- */
-struct pm_dev
-{
- pm_dev_t type;
- unsigned long id;
- pm_callback callback;
- void *data;
-
- unsigned long flags;
- unsigned long state;
- unsigned long prev_state;
-
- struct list_head entry;
-};
-
-/* Functions above this comment are list-based old-style power
- * managment. Please avoid using them. */
-
-/*
- * Callbacks for platform drivers to implement.
- */
-extern void (*pm_idle)(void);
-extern void (*pm_power_off)(void);
-
-typedef int __bitwise suspend_state_t;
-
-#define PM_SUSPEND_ON ((__force suspend_state_t) 0)
-#define PM_SUSPEND_STANDBY ((__force suspend_state_t) 1)
-#define PM_SUSPEND_MEM ((__force suspend_state_t) 3)
-#define PM_SUSPEND_DISK ((__force suspend_state_t) 4)
-#define PM_SUSPEND_MAX ((__force suspend_state_t) 5)
-
-typedef int __bitwise suspend_disk_method_t;
-
-#define PM_DISK_FIRMWARE ((__force suspend_disk_method_t) 1)
-#define PM_DISK_PLATFORM ((__force suspend_disk_method_t) 2)
-#define PM_DISK_SHUTDOWN ((__force suspend_disk_method_t) 3)
-#define PM_DISK_REBOOT ((__force suspend_disk_method_t) 4)
-#define PM_DISK_MAX ((__force suspend_disk_method_t) 5)
-
-struct pm_ops {
- suspend_disk_method_t pm_disk_mode;
- int (*valid)(suspend_state_t state);
- int (*prepare)(suspend_state_t state);
- int (*enter)(suspend_state_t state);
- int (*finish)(suspend_state_t state);
-};
-
-extern void pm_set_ops(struct pm_ops *);
-extern struct pm_ops *pm_ops;
-extern int pm_suspend(suspend_state_t state);
-
-
-/*
- * Device power management
- */
-
-struct device;
-
-typedef struct pm_message {
- int event;
-} pm_message_t;
-
-/*
- * There are 4 important states driver can be in:
- * ON -- driver is working
- * FREEZE -- stop operations and apply whatever policy is applicable to a
- * suspended driver of that class, freeze queues for block like IDE
- * does, drop packets for ethernet, etc... stop DMA engine too etc...
- * so a consistent image can be saved; but do not power any hardware
- * down.
- * SUSPEND - like FREEZE, but hardware is doing as much powersaving as
- * possible. Roughly pci D3.
- *
- * Unfortunately, current drivers only recognize numeric values 0 (ON) and 3
- * (SUSPEND). We'll need to fix the drivers. So yes, putting 3 to all different
- * defines is intentional, and will go away as soon as drivers are fixed. Also
- * note that typedef is neccessary, we'll probably want to switch to
- * typedef struct pm_message_t { int event; int flags; } pm_message_t
- * or something similar soon.
- */
-
-#define PM_EVENT_ON 0
-#define PM_EVENT_FREEZE 1
-#define PM_EVENT_SUSPEND 2
-
-#define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, })
-#define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, })
-#define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, })
-
-struct dev_pm_info {
- pm_message_t power_state;
- unsigned can_wakeup:1;
-#ifdef CONFIG_PM
- unsigned should_wakeup:1;
- pm_message_t prev_state;
- void * saved_state;
- struct device * pm_parent;
- struct list_head entry;
-#endif
-};
-
-extern void device_pm_set_parent(struct device * dev, struct device * parent);
-
-extern int device_power_down(pm_message_t state);
-extern void device_power_up(void);
-extern void device_resume(void);
-
-#ifdef CONFIG_PM
-extern suspend_disk_method_t pm_disk_mode;
-
-extern int device_suspend(pm_message_t state);
-
-#define device_set_wakeup_enable(dev,val) \
- ((dev)->power.should_wakeup = !!(val))
-#define device_may_wakeup(dev) \
- (device_can_wakeup(dev) && (dev)->power.should_wakeup)
-
-extern int dpm_runtime_suspend(struct device *, pm_message_t);
-extern void dpm_runtime_resume(struct device *);
-extern void __suspend_report_result(const char *function, void *fn, int ret);
-
-#define suspend_report_result(fn, ret) \
- do { \
- __suspend_report_result(__FUNCTION__, fn, ret); \
- } while (0)
-
-#else /* !CONFIG_PM */
-
-static inline int device_suspend(pm_message_t state)
-{
- return 0;
-}
-
-#define device_set_wakeup_enable(dev,val) do{}while(0)
-#define device_may_wakeup(dev) (0)
-
-static inline int dpm_runtime_suspend(struct device * dev, pm_message_t state)
-{
- return 0;
-}
-
-static inline void dpm_runtime_resume(struct device * dev)
-{
-}
-
-#define suspend_report_result(fn, ret) do { } while (0)
-
-#endif
-
-/* changes to device_may_wakeup take effect on the next pm state change.
- * by default, devices should wakeup if they can.
- */
-#define device_can_wakeup(dev) \
- ((dev)->power.can_wakeup)
-#define device_init_wakeup(dev,val) \
- do { \
- device_can_wakeup(dev) = !!(val); \
- device_set_wakeup_enable(dev,val); \
- } while(0)
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_PM_H */
diff --git a/original/linux/pn544.h b/original/linux/pn544.h
deleted file mode 100755
index 9285000..0000000
--- a/original/linux/pn544.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2010 Trusted Logic S.A.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#define PN544_MAGIC 0xE9
-
-/*
- * PN544 power control via ioctl
- * PN544_SET_PWR(0): power off
- * PN544_SET_PWR(1): power on
- * PN544_SET_PWR(2): reset and power on with firmware download enabled
- */
-#define PN544_SET_PWR _IOW(PN544_MAGIC, 0x01, unsigned int)
-
-struct pn544_i2c_platform_data {
- unsigned int irq_gpio;
- unsigned int ven_gpio;
- unsigned int firm_gpio;
-};
diff --git a/original/linux/pnp.h b/original/linux/pnp.h
deleted file mode 100644
index ab8a8dd..0000000
--- a/original/linux/pnp.h
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * Linux Plug and Play Support
- * Copyright by Adam Belay <ambx1@neo.rr.com>
- *
- */
-
-#ifndef _LINUX_PNP_H
-#define _LINUX_PNP_H
-
-#ifdef __KERNEL__
-
-#include <linux/device.h>
-#include <linux/list.h>
-#include <linux/errno.h>
-#include <linux/mod_devicetable.h>
-
-#define PNP_MAX_PORT 8
-#define PNP_MAX_MEM 4
-#define PNP_MAX_IRQ 2
-#define PNP_MAX_DMA 2
-#define PNP_NAME_LEN 50
-
-struct pnp_protocol;
-struct pnp_dev;
-
-
-/*
- * Resource Management
- */
-
-/* Use these instead of directly reading pnp_dev to get resource information */
-#define pnp_port_start(dev,bar) ((dev)->res.port_resource[(bar)].start)
-#define pnp_port_end(dev,bar) ((dev)->res.port_resource[(bar)].end)
-#define pnp_port_flags(dev,bar) ((dev)->res.port_resource[(bar)].flags)
-#define pnp_port_valid(dev,bar) \
- ((pnp_port_flags((dev),(bar)) & (IORESOURCE_IO | IORESOURCE_UNSET)) \
- == IORESOURCE_IO)
-#define pnp_port_len(dev,bar) \
- ((pnp_port_start((dev),(bar)) == 0 && \
- pnp_port_end((dev),(bar)) == \
- pnp_port_start((dev),(bar))) ? 0 : \
- \
- (pnp_port_end((dev),(bar)) - \
- pnp_port_start((dev),(bar)) + 1))
-
-#define pnp_mem_start(dev,bar) ((dev)->res.mem_resource[(bar)].start)
-#define pnp_mem_end(dev,bar) ((dev)->res.mem_resource[(bar)].end)
-#define pnp_mem_flags(dev,bar) ((dev)->res.mem_resource[(bar)].flags)
-#define pnp_mem_valid(dev,bar) \
- ((pnp_mem_flags((dev),(bar)) & (IORESOURCE_MEM | IORESOURCE_UNSET)) \
- == IORESOURCE_MEM)
-#define pnp_mem_len(dev,bar) \
- ((pnp_mem_start((dev),(bar)) == 0 && \
- pnp_mem_end((dev),(bar)) == \
- pnp_mem_start((dev),(bar))) ? 0 : \
- \
- (pnp_mem_end((dev),(bar)) - \
- pnp_mem_start((dev),(bar)) + 1))
-
-#define pnp_irq(dev,bar) ((dev)->res.irq_resource[(bar)].start)
-#define pnp_irq_flags(dev,bar) ((dev)->res.irq_resource[(bar)].flags)
-#define pnp_irq_valid(dev,bar) \
- ((pnp_irq_flags((dev),(bar)) & (IORESOURCE_IRQ | IORESOURCE_UNSET)) \
- == IORESOURCE_IRQ)
-
-#define pnp_dma(dev,bar) ((dev)->res.dma_resource[(bar)].start)
-#define pnp_dma_flags(dev,bar) ((dev)->res.dma_resource[(bar)].flags)
-#define pnp_dma_valid(dev,bar) \
- ((pnp_dma_flags((dev),(bar)) & (IORESOURCE_DMA | IORESOURCE_UNSET)) \
- == IORESOURCE_DMA)
-
-#define PNP_PORT_FLAG_16BITADDR (1<<0)
-#define PNP_PORT_FLAG_FIXED (1<<1)
-
-struct pnp_port {
- unsigned short min; /* min base number */
- unsigned short max; /* max base number */
- unsigned char align; /* align boundary */
- unsigned char size; /* size of range */
- unsigned char flags; /* port flags */
- unsigned char pad; /* pad */
- struct pnp_port *next; /* next port */
-};
-
-#define PNP_IRQ_NR 256
-struct pnp_irq {
- DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmaks for IRQ lines */
- unsigned char flags; /* IRQ flags */
- unsigned char pad; /* pad */
- struct pnp_irq *next; /* next IRQ */
-};
-
-struct pnp_dma {
- unsigned char map; /* bitmask for DMA channels */
- unsigned char flags; /* DMA flags */
- struct pnp_dma *next; /* next port */
-};
-
-struct pnp_mem {
- unsigned int min; /* min base number */
- unsigned int max; /* max base number */
- unsigned int align; /* align boundary */
- unsigned int size; /* size of range */
- unsigned char flags; /* memory flags */
- unsigned char pad; /* pad */
- struct pnp_mem *next; /* next memory resource */
-};
-
-#define PNP_RES_PRIORITY_PREFERRED 0
-#define PNP_RES_PRIORITY_ACCEPTABLE 1
-#define PNP_RES_PRIORITY_FUNCTIONAL 2
-#define PNP_RES_PRIORITY_INVALID 65535
-
-struct pnp_option {
- unsigned short priority; /* priority */
- struct pnp_port *port; /* first port */
- struct pnp_irq *irq; /* first IRQ */
- struct pnp_dma *dma; /* first DMA */
- struct pnp_mem *mem; /* first memory resource */
- struct pnp_option *next; /* used to chain dependent resources */
-};
-
-struct pnp_resource_table {
- struct resource port_resource[PNP_MAX_PORT];
- struct resource mem_resource[PNP_MAX_MEM];
- struct resource dma_resource[PNP_MAX_DMA];
- struct resource irq_resource[PNP_MAX_IRQ];
-};
-
-
-/*
- * Device Managemnt
- */
-
-struct pnp_card {
- struct device dev; /* Driver Model device interface */
- unsigned char number; /* used as an index, must be unique */
- struct list_head global_list; /* node in global list of cards */
- struct list_head protocol_list; /* node in protocol's list of cards */
- struct list_head devices; /* devices attached to the card */
-
- struct pnp_protocol * protocol;
- struct pnp_id * id; /* contains supported EISA IDs*/
-
- char name[PNP_NAME_LEN]; /* contains a human-readable name */
- unsigned char pnpver; /* Plug & Play version */
- unsigned char productver; /* product version */
- unsigned int serial; /* serial number */
- unsigned char checksum; /* if zero - checksum passed */
- struct proc_dir_entry *procdir; /* directory entry in /proc/bus/isapnp */
-};
-
-#define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list)
-#define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list)
-#define to_pnp_card(n) container_of(n, struct pnp_card, dev)
-#define pnp_for_each_card(card) \
- for((card) = global_to_pnp_card(pnp_cards.next); \
- (card) != global_to_pnp_card(&pnp_cards); \
- (card) = global_to_pnp_card((card)->global_list.next))
-
-struct pnp_card_link {
- struct pnp_card * card;
- struct pnp_card_driver * driver;
- void * driver_data;
- pm_message_t pm_state;
-};
-
-static inline void *pnp_get_card_drvdata (struct pnp_card_link *pcard)
-{
- return pcard->driver_data;
-}
-
-static inline void pnp_set_card_drvdata (struct pnp_card_link *pcard, void *data)
-{
- pcard->driver_data = data;
-}
-
-struct pnp_dev {
- struct device dev; /* Driver Model device interface */
- unsigned char number; /* used as an index, must be unique */
- int status;
-
- struct list_head global_list; /* node in global list of devices */
- struct list_head protocol_list; /* node in list of device's protocol */
- struct list_head card_list; /* node in card's list of devices */
- struct list_head rdev_list; /* node in cards list of requested devices */
-
- struct pnp_protocol * protocol;
- struct pnp_card * card; /* card the device is attached to, none if NULL */
- struct pnp_driver * driver;
- struct pnp_card_link * card_link;
-
- struct pnp_id * id; /* supported EISA IDs*/
-
- int active;
- int capabilities;
- struct pnp_option * independent;
- struct pnp_option * dependent;
- struct pnp_resource_table res;
-
- char name[PNP_NAME_LEN]; /* contains a human-readable name */
- unsigned short regs; /* ISAPnP: supported registers */
- int flags; /* used by protocols */
- struct proc_dir_entry *procent; /* device entry in /proc/bus/isapnp */
- void *data;
-};
-
-#define global_to_pnp_dev(n) list_entry(n, struct pnp_dev, global_list)
-#define card_to_pnp_dev(n) list_entry(n, struct pnp_dev, card_list)
-#define protocol_to_pnp_dev(n) list_entry(n, struct pnp_dev, protocol_list)
-#define to_pnp_dev(n) container_of(n, struct pnp_dev, dev)
-#define pnp_for_each_dev(dev) \
- for((dev) = global_to_pnp_dev(pnp_global.next); \
- (dev) != global_to_pnp_dev(&pnp_global); \
- (dev) = global_to_pnp_dev((dev)->global_list.next))
-#define card_for_each_dev(card,dev) \
- for((dev) = card_to_pnp_dev((card)->devices.next); \
- (dev) != card_to_pnp_dev(&(card)->devices); \
- (dev) = card_to_pnp_dev((dev)->card_list.next))
-#define pnp_dev_name(dev) (dev)->name
-
-static inline void *pnp_get_drvdata (struct pnp_dev *pdev)
-{
- return dev_get_drvdata(&pdev->dev);
-}
-
-static inline void pnp_set_drvdata (struct pnp_dev *pdev, void *data)
-{
- dev_set_drvdata(&pdev->dev, data);
-}
-
-struct pnp_fixup {
- char id[7];
- void (*quirk_function)(struct pnp_dev *dev); /* fixup function */
-};
-
-/* config parameters */
-#define PNP_CONFIG_NORMAL 0x0001
-#define PNP_CONFIG_FORCE 0x0002 /* disables validity checking */
-
-/* capabilities */
-#define PNP_READ 0x0001
-#define PNP_WRITE 0x0002
-#define PNP_DISABLE 0x0004
-#define PNP_CONFIGURABLE 0x0008
-#define PNP_REMOVABLE 0x0010
-
-#define pnp_can_read(dev) (((dev)->protocol) && ((dev)->protocol->get) && \
- ((dev)->capabilities & PNP_READ))
-#define pnp_can_write(dev) (((dev)->protocol) && ((dev)->protocol->set) && \
- ((dev)->capabilities & PNP_WRITE))
-#define pnp_can_disable(dev) (((dev)->protocol) && ((dev)->protocol->disable) && \
- ((dev)->capabilities & PNP_DISABLE))
-#define pnp_can_configure(dev) ((!(dev)->active) && \
- ((dev)->capabilities & PNP_CONFIGURABLE))
-
-#ifdef CONFIG_ISAPNP
-extern struct pnp_protocol isapnp_protocol;
-#define pnp_device_is_isapnp(dev) ((dev)->protocol == (&isapnp_protocol))
-#else
-#define pnp_device_is_isapnp(dev) 0
-#endif
-
-#ifdef CONFIG_PNPBIOS
-extern struct pnp_protocol pnpbios_protocol;
-#define pnp_device_is_pnpbios(dev) ((dev)->protocol == (&pnpbios_protocol))
-#else
-#define pnp_device_is_pnpbios(dev) 0
-#endif
-
-
-/* status */
-#define PNP_READY 0x0000
-#define PNP_ATTACHED 0x0001
-#define PNP_BUSY 0x0002
-#define PNP_FAULTY 0x0004
-
-/* isapnp specific macros */
-
-#define isapnp_card_number(dev) ((dev)->card ? (dev)->card->number : -1)
-#define isapnp_csn_number(dev) ((dev)->number)
-
-/*
- * Driver Management
- */
-
-struct pnp_id {
- char id[PNP_ID_LEN];
- struct pnp_id * next;
-};
-
-struct pnp_driver {
- char * name;
- const struct pnp_device_id *id_table;
- unsigned int flags;
- int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id);
- void (*remove) (struct pnp_dev *dev);
- int (*suspend) (struct pnp_dev *dev, pm_message_t state);
- int (*resume) (struct pnp_dev *dev);
- struct device_driver driver;
-};
-
-#define to_pnp_driver(drv) container_of(drv, struct pnp_driver, driver)
-
-struct pnp_card_driver {
- struct list_head global_list;
- char * name;
- const struct pnp_card_device_id *id_table;
- unsigned int flags;
- int (*probe) (struct pnp_card_link *card, const struct pnp_card_device_id *card_id);
- void (*remove) (struct pnp_card_link *card);
- int (*suspend) (struct pnp_card_link *card, pm_message_t state);
- int (*resume) (struct pnp_card_link *card);
- struct pnp_driver link;
-};
-
-#define to_pnp_card_driver(drv) container_of(drv, struct pnp_card_driver, link)
-
-/* pnp driver flags */
-#define PNP_DRIVER_RES_DO_NOT_CHANGE 0x0001 /* do not change the state of the device */
-#define PNP_DRIVER_RES_DISABLE 0x0003 /* ensure the device is disabled */
-
-
-/*
- * Protocol Management
- */
-
-struct pnp_protocol {
- struct list_head protocol_list;
- char * name;
-
- /* resource control functions */
- int (*get)(struct pnp_dev *dev, struct pnp_resource_table *res);
- int (*set)(struct pnp_dev *dev, struct pnp_resource_table *res);
- int (*disable)(struct pnp_dev *dev);
-
- /* used by pnp layer only (look but don't touch) */
- unsigned char number; /* protocol number*/
- struct device dev; /* link to driver model */
- struct list_head cards;
- struct list_head devices;
-};
-
-#define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list)
-#define protocol_for_each_card(protocol,card) \
- for((card) = protocol_to_pnp_card((protocol)->cards.next); \
- (card) != protocol_to_pnp_card(&(protocol)->cards); \
- (card) = protocol_to_pnp_card((card)->protocol_list.next))
-#define protocol_for_each_dev(protocol,dev) \
- for((dev) = protocol_to_pnp_dev((protocol)->devices.next); \
- (dev) != protocol_to_pnp_dev(&(protocol)->devices); \
- (dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
-
-
-#if defined(CONFIG_PNP)
-
-/* device management */
-int pnp_register_protocol(struct pnp_protocol *protocol);
-void pnp_unregister_protocol(struct pnp_protocol *protocol);
-int pnp_add_device(struct pnp_dev *dev);
-int pnp_device_attach(struct pnp_dev *pnp_dev);
-void pnp_device_detach(struct pnp_dev *pnp_dev);
-extern struct list_head pnp_global;
-
-/* multidevice card support */
-int pnp_add_card(struct pnp_card *card);
-void pnp_remove_card(struct pnp_card *card);
-int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev);
-void pnp_remove_card_device(struct pnp_dev *dev);
-int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card);
-struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char * id, struct pnp_dev * from);
-void pnp_release_card_device(struct pnp_dev * dev);
-int pnp_register_card_driver(struct pnp_card_driver * drv);
-void pnp_unregister_card_driver(struct pnp_card_driver * drv);
-extern struct list_head pnp_cards;
-
-/* resource management */
-struct pnp_option * pnp_register_independent_option(struct pnp_dev *dev);
-struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int priority);
-int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data);
-int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data);
-int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data);
-int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data);
-void pnp_init_resource_table(struct pnp_resource_table *table);
-int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode);
-int pnp_auto_config_dev(struct pnp_dev *dev);
-int pnp_validate_config(struct pnp_dev *dev);
-int pnp_start_dev(struct pnp_dev *dev);
-int pnp_stop_dev(struct pnp_dev *dev);
-int pnp_activate_dev(struct pnp_dev *dev);
-int pnp_disable_dev(struct pnp_dev *dev);
-void pnp_resource_change(struct resource *resource, resource_size_t start,
- resource_size_t size);
-
-/* protocol helpers */
-int pnp_is_active(struct pnp_dev * dev);
-int compare_pnp_id(struct pnp_id * pos, const char * id);
-int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev);
-int pnp_register_driver(struct pnp_driver *drv);
-void pnp_unregister_driver(struct pnp_driver *drv);
-
-#else
-
-/* device management */
-static inline int pnp_register_protocol(struct pnp_protocol *protocol) { return -ENODEV; }
-static inline void pnp_unregister_protocol(struct pnp_protocol *protocol) { }
-static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; }
-static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; }
-
-/* multidevice card support */
-static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; }
-static inline void pnp_remove_card(struct pnp_card *card) { ; }
-static inline int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { return -ENODEV; }
-static inline void pnp_remove_card_device(struct pnp_dev *dev) { ; }
-static inline int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card) { return -ENODEV; }
-static inline struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char * id, struct pnp_dev * from) { return NULL; }
-static inline void pnp_release_card_device(struct pnp_dev * dev) { ; }
-static inline int pnp_register_card_driver(struct pnp_card_driver * drv) { return -ENODEV; }
-static inline void pnp_unregister_card_driver(struct pnp_card_driver * drv) { ; }
-
-/* resource management */
-static inline struct pnp_option * pnp_register_independent_option(struct pnp_dev *dev) { return NULL; }
-static inline struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int priority) { return NULL; }
-static inline int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) { return -ENODEV; }
-static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; }
-static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; }
-static inline int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; }
-static inline void pnp_init_resource_table(struct pnp_resource_table *table) { }
-static inline int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
-static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_validate_config(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
-static inline void pnp_resource_change(struct resource *resource,
- resource_size_t start,
- resource_size_t size) { }
-
-/* protocol helpers */
-static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
-static inline int compare_pnp_id(struct pnp_id * pos, const char * id) { return -ENODEV; }
-static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; }
-static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; }
-static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; }
-
-#endif /* CONFIG_PNP */
-
-
-#define pnp_err(format, arg...) printk(KERN_ERR "pnp: " format "\n" , ## arg)
-#define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg)
-#define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg)
-
-#ifdef CONFIG_PNP_DEBUG
-#define pnp_dbg(format, arg...) printk(KERN_DEBUG "pnp: " format "\n" , ## arg)
-#else
-#define pnp_dbg(format, arg...) do {} while (0)
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_PNP_H */
diff --git a/original/linux/poll.h b/original/linux/poll.h
deleted file mode 100644
index 51e1b56..0000000
--- a/original/linux/poll.h
+++ /dev/null
@@ -1,120 +0,0 @@
-#ifndef _LINUX_POLL_H
-#define _LINUX_POLL_H
-
-#include <asm/poll.h>
-
-#ifdef __KERNEL__
-
-#include <linux/compiler.h>
-#include <linux/wait.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <asm/uaccess.h>
-
-/* ~832 bytes of stack space used max in sys_select/sys_poll before allocating
- additional memory. */
-#define MAX_STACK_ALLOC 832
-#define FRONTEND_STACK_ALLOC 256
-#define SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC
-#define POLL_STACK_ALLOC FRONTEND_STACK_ALLOC
-#define WQUEUES_STACK_ALLOC (MAX_STACK_ALLOC - FRONTEND_STACK_ALLOC)
-#define N_INLINE_POLL_ENTRIES (WQUEUES_STACK_ALLOC / sizeof(struct poll_table_entry))
-
-struct poll_table_struct;
-
-/*
- * structures and helpers for f_op->poll implementations
- */
-typedef void (*poll_queue_proc)(struct file *, wait_queue_head_t *, struct poll_table_struct *);
-
-typedef struct poll_table_struct {
- poll_queue_proc qproc;
-} poll_table;
-
-static inline void poll_wait(struct file * filp, wait_queue_head_t * wait_address, poll_table *p)
-{
- if (p && wait_address)
- p->qproc(filp, wait_address, p);
-}
-
-static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
-{
- pt->qproc = qproc;
-}
-
-struct poll_table_entry {
- struct file * filp;
- wait_queue_t wait;
- wait_queue_head_t * wait_address;
-};
-
-/*
- * Structures and helpers for sys_poll/sys_poll
- */
-struct poll_wqueues {
- poll_table pt;
- struct poll_table_page * table;
- int error;
- int inline_index;
- struct poll_table_entry inline_entries[N_INLINE_POLL_ENTRIES];
-};
-
-extern void poll_initwait(struct poll_wqueues *pwq);
-extern void poll_freewait(struct poll_wqueues *pwq);
-
-/*
- * Scaleable version of the fd_set.
- */
-
-typedef struct {
- unsigned long *in, *out, *ex;
- unsigned long *res_in, *res_out, *res_ex;
-} fd_set_bits;
-
-/*
- * How many longwords for "nr" bits?
- */
-#define FDS_BITPERLONG (8*sizeof(long))
-#define FDS_LONGS(nr) (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG)
-#define FDS_BYTES(nr) (FDS_LONGS(nr)*sizeof(long))
-
-/*
- * We do a VERIFY_WRITE here even though we are only reading this time:
- * we'll write to it eventually..
- *
- * Use "unsigned long" accesses to let user-mode fd_set's be long-aligned.
- */
-static inline
-int get_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset)
-{
- nr = FDS_BYTES(nr);
- if (ufdset)
- return copy_from_user(fdset, ufdset, nr) ? -EFAULT : 0;
-
- memset(fdset, 0, nr);
- return 0;
-}
-
-static inline unsigned long __must_check
-set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset)
-{
- if (ufdset)
- return __copy_to_user(ufdset, fdset, FDS_BYTES(nr));
- return 0;
-}
-
-static inline
-void zero_fd_set(unsigned long nr, unsigned long *fdset)
-{
- memset(fdset, 0, FDS_BYTES(nr));
-}
-
-#define MAX_INT64_SECONDS (((s64)(~((u64)0)>>1)/HZ)-1)
-
-extern int do_select(int n, fd_set_bits *fds, s64 *timeout);
-extern int do_sys_poll(struct pollfd __user * ufds, unsigned int nfds,
- s64 *timeout);
-
-#endif /* KERNEL */
-
-#endif /* _LINUX_POLL_H */
diff --git a/original/linux/posix_acl.h b/original/linux/posix_acl.h
deleted file mode 100644
index 4bc2412..0000000
--- a/original/linux/posix_acl.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- File: linux/posix_acl.h
-
- (C) 2002 Andreas Gruenbacher, <a.gruenbacher@computer.org>
-*/
-
-
-#ifndef __LINUX_POSIX_ACL_H
-#define __LINUX_POSIX_ACL_H
-
-#include <linux/slab.h>
-
-#define ACL_UNDEFINED_ID (-1)
-
-/* a_type field in acl_user_posix_entry_t */
-#define ACL_TYPE_ACCESS (0x8000)
-#define ACL_TYPE_DEFAULT (0x4000)
-
-/* e_tag entry in struct posix_acl_entry */
-#define ACL_USER_OBJ (0x01)
-#define ACL_USER (0x02)
-#define ACL_GROUP_OBJ (0x04)
-#define ACL_GROUP (0x08)
-#define ACL_MASK (0x10)
-#define ACL_OTHER (0x20)
-
-/* permissions in the e_perm field */
-#define ACL_READ (0x04)
-#define ACL_WRITE (0x02)
-#define ACL_EXECUTE (0x01)
-//#define ACL_ADD (0x08)
-//#define ACL_DELETE (0x10)
-
-struct posix_acl_entry {
- short e_tag;
- unsigned short e_perm;
- unsigned int e_id;
-};
-
-struct posix_acl {
- atomic_t a_refcount;
- unsigned int a_count;
- struct posix_acl_entry a_entries[0];
-};
-
-#define FOREACH_ACL_ENTRY(pa, acl, pe) \
- for(pa=(acl)->a_entries, pe=pa+(acl)->a_count; pa<pe; pa++)
-
-
-/*
- * Duplicate an ACL handle.
- */
-static inline struct posix_acl *
-posix_acl_dup(struct posix_acl *acl)
-{
- if (acl)
- atomic_inc(&acl->a_refcount);
- return acl;
-}
-
-/*
- * Free an ACL handle.
- */
-static inline void
-posix_acl_release(struct posix_acl *acl)
-{
- if (acl && atomic_dec_and_test(&acl->a_refcount))
- kfree(acl);
-}
-
-
-/* posix_acl.c */
-
-extern struct posix_acl *posix_acl_alloc(int, gfp_t);
-extern struct posix_acl *posix_acl_clone(const struct posix_acl *, gfp_t);
-extern int posix_acl_valid(const struct posix_acl *);
-extern int posix_acl_permission(struct inode *, const struct posix_acl *, int);
-extern struct posix_acl *posix_acl_from_mode(mode_t, gfp_t);
-extern int posix_acl_equiv_mode(const struct posix_acl *, mode_t *);
-extern int posix_acl_create_masq(struct posix_acl *, mode_t *);
-extern int posix_acl_chmod_masq(struct posix_acl *, mode_t);
-
-extern struct posix_acl *get_posix_acl(struct inode *, int);
-extern int set_posix_acl(struct inode *, int, struct posix_acl *);
-
-#endif /* __LINUX_POSIX_ACL_H */
diff --git a/original/linux/posix_types.h b/original/linux/posix_types.h
deleted file mode 100644
index 988f76e..0000000
--- a/original/linux/posix_types.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef _LINUX_POSIX_TYPES_H
-#define _LINUX_POSIX_TYPES_H
-
-#include <linux/stddef.h>
-
-/*
- * This allows for 1024 file descriptors: if NR_OPEN is ever grown
- * beyond that you'll have to change this too. But 1024 fd's seem to be
- * enough even for such "real" unices like OSF/1, so hopefully this is
- * one limit that doesn't have to be changed [again].
- *
- * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in
- * <sys/time.h> (and thus <linux/time.h>) - but this is a more logical
- * place for them. Solved by having dummy defines in <sys/time.h>.
- */
-
-/*
- * This macro may have been defined in <gnu/types.h>. But we always
- * use the one here.
- */
-#undef __FD_SETSIZE
-#define __FD_SETSIZE 1024
-
-typedef struct {
- unsigned long fds_bits[__FD_SETSIZE / (8 * sizeof(long))];
-} __kernel_fd_set;
-
-/* Type of a signal handler. */
-typedef void (*__kernel_sighandler_t)(int);
-
-/* Type of a SYSV IPC key. */
-typedef int __kernel_key_t;
-typedef int __kernel_mqd_t;
-
-#include <asm/posix_types.h>
-
-#endif /* _LINUX_POSIX_TYPES_H */
diff --git a/original/linux/ppdev.h b/original/linux/ppdev.h
deleted file mode 100644
index f376a75..0000000
--- a/original/linux/ppdev.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * linux/drivers/char/ppdev.h
- *
- * User-space parallel port device driver (header file).
- *
- * Copyright (C) 1998-9 Tim Waugh <tim@cyberelk.demon.co.uk>
- *
- * 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.
- *
- * Added PPGETTIME/PPSETTIME, Fred Barnes, 1999
- * Added PPGETMODES/PPGETMODE/PPGETPHASE, Fred Barnes <frmb2@ukc.ac.uk>, 03/01/2001
- */
-
-#define PP_IOCTL 'p'
-
-/* Set mode for read/write (e.g. IEEE1284_MODE_EPP) */
-#define PPSETMODE _IOW(PP_IOCTL, 0x80, int)
-
-/* Read status */
-#define PPRSTATUS _IOR(PP_IOCTL, 0x81, unsigned char)
-#define PPWSTATUS OBSOLETE__IOW(PP_IOCTL, 0x82, unsigned char)
-
-/* Read/write control */
-#define PPRCONTROL _IOR(PP_IOCTL, 0x83, unsigned char)
-#define PPWCONTROL _IOW(PP_IOCTL, 0x84, unsigned char)
-
-struct ppdev_frob_struct {
- unsigned char mask;
- unsigned char val;
-};
-#define PPFCONTROL _IOW(PP_IOCTL, 0x8e, struct ppdev_frob_struct)
-
-/* Read/write data */
-#define PPRDATA _IOR(PP_IOCTL, 0x85, unsigned char)
-#define PPWDATA _IOW(PP_IOCTL, 0x86, unsigned char)
-
-/* Read/write econtrol (not used) */
-#define PPRECONTROL OBSOLETE__IOR(PP_IOCTL, 0x87, unsigned char)
-#define PPWECONTROL OBSOLETE__IOW(PP_IOCTL, 0x88, unsigned char)
-
-/* Read/write FIFO (not used) */
-#define PPRFIFO OBSOLETE__IOR(PP_IOCTL, 0x89, unsigned char)
-#define PPWFIFO OBSOLETE__IOW(PP_IOCTL, 0x8a, unsigned char)
-
-/* Claim the port to start using it */
-#define PPCLAIM _IO(PP_IOCTL, 0x8b)
-
-/* Release the port when you aren't using it */
-#define PPRELEASE _IO(PP_IOCTL, 0x8c)
-
-/* Yield the port (release it if another driver is waiting,
- * then reclaim) */
-#define PPYIELD _IO(PP_IOCTL, 0x8d)
-
-/* Register device exclusively (must be before PPCLAIM). */
-#define PPEXCL _IO(PP_IOCTL, 0x8f)
-
-/* Data line direction: non-zero for input mode. */
-#define PPDATADIR _IOW(PP_IOCTL, 0x90, int)
-
-/* Negotiate a particular IEEE 1284 mode. */
-#define PPNEGOT _IOW(PP_IOCTL, 0x91, int)
-
-/* Set control lines when an interrupt occurs. */
-#define PPWCTLONIRQ _IOW(PP_IOCTL, 0x92, unsigned char)
-
-/* Clear (and return) interrupt count. */
-#define PPCLRIRQ _IOR(PP_IOCTL, 0x93, int)
-
-/* Set the IEEE 1284 phase that we're in (e.g. IEEE1284_PH_FWD_IDLE) */
-#define PPSETPHASE _IOW(PP_IOCTL, 0x94, int)
-
-/* Set and get port timeout (struct timeval's) */
-#define PPGETTIME _IOR(PP_IOCTL, 0x95, struct timeval)
-#define PPSETTIME _IOW(PP_IOCTL, 0x96, struct timeval)
-
-/* Get available modes (what the hardware can do) */
-#define PPGETMODES _IOR(PP_IOCTL, 0x97, unsigned int)
-
-/* Get the current mode and phaze */
-#define PPGETMODE _IOR(PP_IOCTL, 0x98, int)
-#define PPGETPHASE _IOR(PP_IOCTL, 0x99, int)
-
-/* get/set flags */
-#define PPGETFLAGS _IOR(PP_IOCTL, 0x9a, int)
-#define PPSETFLAGS _IOW(PP_IOCTL, 0x9b, int)
-
-/* flags visible to the world */
-#define PP_FASTWRITE (1<<2)
-#define PP_FASTREAD (1<<3)
-#define PP_W91284PIC (1<<4)
-
-/* only masks user-visible flags */
-#define PP_FLAGMASK (PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC)
-
-
diff --git a/original/linux/ppp_defs.h b/original/linux/ppp_defs.h
deleted file mode 100644
index c6b13ff..0000000
--- a/original/linux/ppp_defs.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* $Id: ppp_defs.h,v 1.2 1994/09/21 01:31:06 paulus Exp $ */
-
-/*
- * ppp_defs.h - PPP definitions.
- *
- * Copyright (c) 1994 The Australian National University.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation is hereby granted, provided that the above copyright
- * notice appears in all copies. This software is provided without any
- * warranty, express or implied. The Australian National University
- * makes no representations about the suitability of this software for
- * any purpose.
- *
- * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
- * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
- * OF SUCH DAMAGE.
- *
- * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
- * OR MODIFICATIONS.
- */
-
-/*
- * ==FILEVERSION 20000114==
- *
- * NOTE TO MAINTAINERS:
- * If you modify this file at all, please set the above date.
- * ppp_defs.h is shipped with a PPP distribution as well as with the kernel;
- * if everyone increases the FILEVERSION number above, then scripts
- * can do the right thing when deciding whether to install a new ppp_defs.h
- * file. Don't change the format of that line otherwise, so the
- * installation script can recognize it.
- */
-
-#ifndef _PPP_DEFS_H_
-#define _PPP_DEFS_H_
-
-/*
- * The basic PPP frame.
- */
-#define PPP_HDRLEN 4 /* octets for standard ppp header */
-#define PPP_FCSLEN 2 /* octets for FCS */
-#define PPP_MRU 1500 /* default MRU = max length of info field */
-
-#define PPP_ADDRESS(p) (((__u8 *)(p))[0])
-#define PPP_CONTROL(p) (((__u8 *)(p))[1])
-#define PPP_PROTOCOL(p) ((((__u8 *)(p))[2] << 8) + ((__u8 *)(p))[3])
-
-/*
- * Significant octet values.
- */
-#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
-#define PPP_UI 0x03 /* Unnumbered Information */
-#define PPP_FLAG 0x7e /* Flag Sequence */
-#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */
-#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */
-
-/*
- * Protocol field values.
- */
-#define PPP_IP 0x21 /* Internet Protocol */
-#define PPP_AT 0x29 /* AppleTalk Protocol */
-#define PPP_IPX 0x2b /* IPX protocol */
-#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
-#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
-#define PPP_MP 0x3d /* Multilink protocol */
-#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
-#define PPP_COMPFRAG 0xfb /* fragment compressed below bundle */
-#define PPP_COMP 0xfd /* compressed packet */
-#define PPP_MPLS_UC 0x0281 /* Multi Protocol Label Switching - Unicast */
-#define PPP_MPLS_MC 0x0283 /* Multi Protocol Label Switching - Multicast */
-#define PPP_IPCP 0x8021 /* IP Control Protocol */
-#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
-#define PPP_IPXCP 0x802b /* IPX Control Protocol */
-#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
-#define PPP_CCPFRAG 0x80fb /* CCP at link level (below MP bundle) */
-#define PPP_CCP 0x80fd /* Compression Control Protocol */
-#define PPP_MPLSCP 0x80fd /* MPLS Control Protocol */
-#define PPP_LCP 0xc021 /* Link Control Protocol */
-#define PPP_PAP 0xc023 /* Password Authentication Protocol */
-#define PPP_LQR 0xc025 /* Link Quality Report protocol */
-#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
-#define PPP_CBCP 0xc029 /* Callback Control Protocol */
-
-/*
- * Values for FCS calculations.
- */
-
-#define PPP_INITFCS 0xffff /* Initial FCS value */
-#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */
-
-#ifdef __KERNEL__
-#include <linux/crc-ccitt.h>
-#define PPP_FCS(fcs, c) crc_ccitt_byte(fcs, c)
-#endif
-
-/*
- * Extended asyncmap - allows any character to be escaped.
- */
-
-typedef __u32 ext_accm[8];
-
-/*
- * What to do with network protocol (NP) packets.
- */
-enum NPmode {
- NPMODE_PASS, /* pass the packet through */
- NPMODE_DROP, /* silently drop the packet */
- NPMODE_ERROR, /* return an error */
- NPMODE_QUEUE /* save it up for later. */
-};
-
-/*
- * Statistics for LQRP and pppstats
- */
-struct pppstat {
- __u32 ppp_discards; /* # frames discarded */
-
- __u32 ppp_ibytes; /* bytes received */
- __u32 ppp_ioctects; /* bytes received not in error */
- __u32 ppp_ipackets; /* packets received */
- __u32 ppp_ierrors; /* receive errors */
- __u32 ppp_ilqrs; /* # LQR frames received */
-
- __u32 ppp_obytes; /* raw bytes sent */
- __u32 ppp_ooctects; /* frame bytes sent */
- __u32 ppp_opackets; /* packets sent */
- __u32 ppp_oerrors; /* transmit errors */
- __u32 ppp_olqrs; /* # LQR frames sent */
-};
-
-struct vjstat {
- __u32 vjs_packets; /* outbound packets */
- __u32 vjs_compressed; /* outbound compressed packets */
- __u32 vjs_searches; /* searches for connection state */
- __u32 vjs_misses; /* times couldn't find conn. state */
- __u32 vjs_uncompressedin; /* inbound uncompressed packets */
- __u32 vjs_compressedin; /* inbound compressed packets */
- __u32 vjs_errorin; /* inbound unknown type packets */
- __u32 vjs_tossed; /* inbound packets tossed because of error */
-};
-
-struct compstat {
- __u32 unc_bytes; /* total uncompressed bytes */
- __u32 unc_packets; /* total uncompressed packets */
- __u32 comp_bytes; /* compressed bytes */
- __u32 comp_packets; /* compressed packets */
- __u32 inc_bytes; /* incompressible bytes */
- __u32 inc_packets; /* incompressible packets */
-
- /* the compression ratio is defined as in_count / bytes_out */
- __u32 in_count; /* Bytes received */
- __u32 bytes_out; /* Bytes transmitted */
-
- double ratio; /* not computed in kernel. */
-};
-
-struct ppp_stats {
- struct pppstat p; /* basic PPP statistics */
- struct vjstat vj; /* VJ header compression statistics */
-};
-
-struct ppp_comp_stats {
- struct compstat c; /* packet compression statistics */
- struct compstat d; /* packet decompression statistics */
-};
-
-/*
- * The following structure records the time in seconds since
- * the last NP packet was sent or received.
- */
-struct ppp_idle {
- time_t xmit_idle; /* time since last NP packet sent */
- time_t recv_idle; /* time since last NP packet received */
-};
-
-#endif /* _PPP_DEFS_H_ */
diff --git a/original/linux/prctl.h b/original/linux/prctl.h
deleted file mode 100644
index 3988012..0000000
--- a/original/linux/prctl.h
+++ /dev/null
@@ -1,150 +0,0 @@
-#ifndef _LINUX_PRCTL_H
-#define _LINUX_PRCTL_H
-
-/* Values to pass as first argument to prctl() */
-
-#define PR_SET_PDEATHSIG 1 /* Second arg is a signal */
-#define PR_GET_PDEATHSIG 2 /* Second arg is a ptr to return the signal */
-
-/* Get/set current->mm->dumpable */
-#define PR_GET_DUMPABLE 3
-#define PR_SET_DUMPABLE 4
-
-/* Get/set unaligned access control bits (if meaningful) */
-#define PR_GET_UNALIGN 5
-#define PR_SET_UNALIGN 6
-# define PR_UNALIGN_NOPRINT 1 /* silently fix up unaligned user accesses */
-# define PR_UNALIGN_SIGBUS 2 /* generate SIGBUS on unaligned user access */
-
-/* Get/set whether or not to drop capabilities on setuid() away from
- * uid 0 (as per security/commoncap.c) */
-#define PR_GET_KEEPCAPS 7
-#define PR_SET_KEEPCAPS 8
-
-/* Get/set floating-point emulation control bits (if meaningful) */
-#define PR_GET_FPEMU 9
-#define PR_SET_FPEMU 10
-# define PR_FPEMU_NOPRINT 1 /* silently emulate fp operations accesses */
-# define PR_FPEMU_SIGFPE 2 /* don't emulate fp operations, send SIGFPE instead */
-
-/* Get/set floating-point exception mode (if meaningful) */
-#define PR_GET_FPEXC 11
-#define PR_SET_FPEXC 12
-# define PR_FP_EXC_SW_ENABLE 0x80 /* Use FPEXC for FP exception enables */
-# define PR_FP_EXC_DIV 0x010000 /* floating point divide by zero */
-# define PR_FP_EXC_OVF 0x020000 /* floating point overflow */
-# define PR_FP_EXC_UND 0x040000 /* floating point underflow */
-# define PR_FP_EXC_RES 0x080000 /* floating point inexact result */
-# define PR_FP_EXC_INV 0x100000 /* floating point invalid operation */
-# define PR_FP_EXC_DISABLED 0 /* FP exceptions disabled */
-# define PR_FP_EXC_NONRECOV 1 /* async non-recoverable exc. mode */
-# define PR_FP_EXC_ASYNC 2 /* async recoverable exception mode */
-# define PR_FP_EXC_PRECISE 3 /* precise exception mode */
-
-/* Get/set whether we use statistical process timing or accurate timestamp
- * based process timing */
-#define PR_GET_TIMING 13
-#define PR_SET_TIMING 14
-# define PR_TIMING_STATISTICAL 0 /* Normal, traditional,
- statistical process timing */
-# define PR_TIMING_TIMESTAMP 1 /* Accurate timestamp based
- process timing */
-
-#define PR_SET_NAME 15 /* Set process name */
-#define PR_GET_NAME 16 /* Get process name */
-
-/* Get/set process endian */
-#define PR_GET_ENDIAN 19
-#define PR_SET_ENDIAN 20
-# define PR_ENDIAN_BIG 0
-# define PR_ENDIAN_LITTLE 1 /* True little endian mode */
-# define PR_ENDIAN_PPC_LITTLE 2 /* "PowerPC" pseudo little endian */
-
-/* Get/set process seccomp mode */
-#define PR_GET_SECCOMP 21
-#define PR_SET_SECCOMP 22
-
-/* Get/set the capability bounding set (as per security/commoncap.c) */
-#define PR_CAPBSET_READ 23
-#define PR_CAPBSET_DROP 24
-
-/* Get/set the process' ability to use the timestamp counter instruction */
-#define PR_GET_TSC 25
-#define PR_SET_TSC 26
-# define PR_TSC_ENABLE 1 /* allow the use of the timestamp counter */
-# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
-
-/* Get/set securebits (as per security/commoncap.c) */
-#define PR_GET_SECUREBITS 27
-#define PR_SET_SECUREBITS 28
-
-/*
- * Get/set the timerslack as used by poll/select/nanosleep
- * A value of 0 means "use default"
- */
-#define PR_SET_TIMERSLACK 29
-#define PR_GET_TIMERSLACK 30
-
-#define PR_TASK_PERF_EVENTS_DISABLE 31
-#define PR_TASK_PERF_EVENTS_ENABLE 32
-
-/*
- * Set early/late kill mode for hwpoison memory corruption.
- * This influences when the process gets killed on a memory corruption.
- */
-#define PR_MCE_KILL 33
-# define PR_MCE_KILL_CLEAR 0
-# define PR_MCE_KILL_SET 1
-
-# define PR_MCE_KILL_LATE 0
-# define PR_MCE_KILL_EARLY 1
-# define PR_MCE_KILL_DEFAULT 2
-
-#define PR_MCE_KILL_GET 34
-
-/*
- * Tune up process memory map specifics.
- */
-#define PR_SET_MM 35
-# define PR_SET_MM_START_CODE 1
-# define PR_SET_MM_END_CODE 2
-# define PR_SET_MM_START_DATA 3
-# define PR_SET_MM_END_DATA 4
-# define PR_SET_MM_START_STACK 5
-# define PR_SET_MM_START_BRK 6
-# define PR_SET_MM_BRK 7
-# define PR_SET_MM_ARG_START 8
-# define PR_SET_MM_ARG_END 9
-# define PR_SET_MM_ENV_START 10
-# define PR_SET_MM_ENV_END 11
-# define PR_SET_MM_AUXV 12
-# define PR_SET_MM_EXE_FILE 13
-
-/*
- * Set specific pid that is allowed to ptrace the current task.
- * A value of 0 mean "no process".
- */
-#define PR_SET_PTRACER 0x59616d61
-# define PR_SET_PTRACER_ANY ((unsigned long)-1)
-
-#define PR_SET_CHILD_SUBREAPER 36
-#define PR_GET_CHILD_SUBREAPER 37
-
-/*
- * If no_new_privs is set, then operations that grant new privileges (i.e.
- * execve) will either fail or not grant them. This affects suid/sgid,
- * file capabilities, and LSMs.
- *
- * Operations that merely manipulate or drop existing privileges (setresuid,
- * capset, etc.) will still work. Drop those privileges if you want them gone.
- *
- * Changing LSM security domain is considered a new privilege. So, for example,
- * asking selinux for a specific new context (e.g. with runcon) will result
- * in execve returning -EPERM.
- */
-#define PR_SET_NO_NEW_PRIVS 38
-#define PR_GET_NO_NEW_PRIVS 39
-
-#define PR_GET_TID_ADDRESS 40
-
-#endif /* _LINUX_PRCTL_H */
diff --git a/original/linux/preempt.h b/original/linux/preempt.h
deleted file mode 100644
index d0926d6..0000000
--- a/original/linux/preempt.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef __LINUX_PREEMPT_H
-#define __LINUX_PREEMPT_H
-
-/*
- * include/linux/preempt.h - macros for accessing and manipulating
- * preempt_count (used for kernel preemption, interrupt count, etc.)
- */
-
-#include <linux/thread_info.h>
-#include <linux/linkage.h>
-
-#ifdef CONFIG_DEBUG_PREEMPT
- extern void fastcall add_preempt_count(int val);
- extern void fastcall sub_preempt_count(int val);
-#else
-# define add_preempt_count(val) do { preempt_count() += (val); } while (0)
-# define sub_preempt_count(val) do { preempt_count() -= (val); } while (0)
-#endif
-
-#define inc_preempt_count() add_preempt_count(1)
-#define dec_preempt_count() sub_preempt_count(1)
-
-#define preempt_count() (current_thread_info()->preempt_count)
-
-#ifdef CONFIG_PREEMPT
-
-asmlinkage void preempt_schedule(void);
-
-#define preempt_disable() \
-do { \
- inc_preempt_count(); \
- barrier(); \
-} while (0)
-
-#define preempt_enable_no_resched() \
-do { \
- barrier(); \
- dec_preempt_count(); \
-} while (0)
-
-#define preempt_check_resched() \
-do { \
- if (unlikely(test_thread_flag(TIF_NEED_RESCHED))) \
- preempt_schedule(); \
-} while (0)
-
-#define preempt_enable() \
-do { \
- preempt_enable_no_resched(); \
- barrier(); \
- preempt_check_resched(); \
-} while (0)
-
-#else
-
-#define preempt_disable() do { } while (0)
-#define preempt_enable_no_resched() do { } while (0)
-#define preempt_enable() do { } while (0)
-#define preempt_check_resched() do { } while (0)
-
-#endif
-
-#endif /* __LINUX_PREEMPT_H */
diff --git a/original/linux/proc_fs.h b/original/linux/proc_fs.h
deleted file mode 100644
index 17e7578..0000000
--- a/original/linux/proc_fs.h
+++ /dev/null
@@ -1,275 +0,0 @@
-#ifndef _LINUX_PROC_FS_H
-#define _LINUX_PROC_FS_H
-
-#include <linux/slab.h>
-#include <linux/fs.h>
-#include <linux/spinlock.h>
-#include <asm/atomic.h>
-
-/*
- * The proc filesystem constants/structures
- */
-
-/*
- * Offset of the first process in the /proc root directory..
- */
-#define FIRST_PROCESS_ENTRY 256
-
-
-/*
- * We always define these enumerators
- */
-
-enum {
- PROC_ROOT_INO = 1,
-};
-
-#define PROC_SUPER_MAGIC 0x9fa0
-
-/*
- * This is not completely implemented yet. The idea is to
- * create an in-memory tree (like the actual /proc filesystem
- * tree) of these proc_dir_entries, so that we can dynamically
- * add new files to /proc.
- *
- * The "next" pointer creates a linked list of one /proc directory,
- * while parent/subdir create the directory structure (every
- * /proc file has a parent, but "subdir" is NULL for all
- * non-directory entries).
- *
- * "get_info" is called at "read", while "owner" is used to protect module
- * from unloading while proc_dir_entry is in use
- */
-
-typedef int (read_proc_t)(char *page, char **start, off_t off,
- int count, int *eof, void *data);
-typedef int (write_proc_t)(struct file *file, const char __user *buffer,
- unsigned long count, void *data);
-typedef int (get_info_t)(char *, char **, off_t, int);
-
-struct proc_dir_entry {
- unsigned int low_ino;
- unsigned short namelen;
- const char *name;
- mode_t mode;
- nlink_t nlink;
- uid_t uid;
- gid_t gid;
- loff_t size;
- struct inode_operations * proc_iops;
- const struct file_operations * proc_fops;
- get_info_t *get_info;
- struct module *owner;
- struct proc_dir_entry *next, *parent, *subdir;
- void *data;
- read_proc_t *read_proc;
- write_proc_t *write_proc;
- atomic_t count; /* use count */
- int deleted; /* delete flag */
- void *set;
-};
-
-struct kcore_list {
- struct kcore_list *next;
- unsigned long addr;
- size_t size;
-};
-
-struct vmcore {
- struct list_head list;
- unsigned long long paddr;
- unsigned long long size;
- loff_t offset;
-};
-
-#ifdef CONFIG_PROC_FS
-
-extern struct proc_dir_entry proc_root;
-extern struct proc_dir_entry *proc_root_fs;
-extern struct proc_dir_entry *proc_net;
-extern struct proc_dir_entry *proc_net_stat;
-extern struct proc_dir_entry *proc_bus;
-extern struct proc_dir_entry *proc_root_driver;
-extern struct proc_dir_entry *proc_root_kcore;
-
-extern spinlock_t proc_subdir_lock;
-
-extern void proc_root_init(void);
-extern void proc_misc_init(void);
-
-struct mm_struct;
-
-void proc_flush_task(struct task_struct *task);
-struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
-int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
-unsigned long task_vsize(struct mm_struct *);
-int task_statm(struct mm_struct *, int *, int *, int *, int *);
-char *task_mem(struct mm_struct *, char *);
-
-extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
- struct proc_dir_entry *parent);
-extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent);
-
-extern struct vfsmount *proc_mnt;
-extern int proc_fill_super(struct super_block *,void *,int);
-extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *);
-
-extern int proc_match(int, const char *,struct proc_dir_entry *);
-
-/*
- * These are generic /proc routines that use the internal
- * "struct proc_dir_entry" tree to traverse the filesystem.
- *
- * The /proc root directory has extended versions to take care
- * of the /proc/<pid> subdirectories.
- */
-extern int proc_readdir(struct file *, void *, filldir_t);
-extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct nameidata *);
-
-extern const struct file_operations proc_kcore_operations;
-extern const struct file_operations proc_kmsg_operations;
-extern const struct file_operations ppc_htab_operations;
-
-/*
- * proc_tty.c
- */
-struct tty_driver;
-extern void proc_tty_init(void);
-extern void proc_tty_register_driver(struct tty_driver *driver);
-extern void proc_tty_unregister_driver(struct tty_driver *driver);
-
-/*
- * proc_devtree.c
- */
-#ifdef CONFIG_PROC_DEVICETREE
-struct device_node;
-struct property;
-extern void proc_device_tree_init(void);
-extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
-extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop);
-extern void proc_device_tree_remove_prop(struct proc_dir_entry *pde,
- struct property *prop);
-extern void proc_device_tree_update_prop(struct proc_dir_entry *pde,
- struct property *newprop,
- struct property *oldprop);
-#endif /* CONFIG_PROC_DEVICETREE */
-
-extern struct proc_dir_entry *proc_symlink(const char *,
- struct proc_dir_entry *, const char *);
-extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
-extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode,
- struct proc_dir_entry *parent);
-
-static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
- mode_t mode, struct proc_dir_entry *base,
- read_proc_t *read_proc, void * data)
-{
- struct proc_dir_entry *res=create_proc_entry(name,mode,base);
- if (res) {
- res->read_proc=read_proc;
- res->data=data;
- }
- return res;
-}
-
-static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
- mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
-{
- struct proc_dir_entry *res=create_proc_entry(name,mode,base);
- if (res) res->get_info=get_info;
- return res;
-}
-
-static inline struct proc_dir_entry *proc_net_create(const char *name,
- mode_t mode, get_info_t *get_info)
-{
- return create_proc_info_entry(name,mode,proc_net,get_info);
-}
-
-static inline struct proc_dir_entry *proc_net_fops_create(const char *name,
- mode_t mode, const struct file_operations *fops)
-{
- struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net);
- if (res)
- res->proc_fops = fops;
- return res;
-}
-
-static inline void proc_net_remove(const char *name)
-{
- remove_proc_entry(name,proc_net);
-}
-
-#else
-
-#define proc_root_driver NULL
-#define proc_net NULL
-#define proc_bus NULL
-
-#define proc_net_fops_create(name, mode, fops) ({ (void)(mode), NULL; })
-#define proc_net_create(name, mode, info) ({ (void)(mode), NULL; })
-static inline void proc_net_remove(const char *name) {}
-
-static inline void proc_flush_task(struct task_struct *task) { }
-
-static inline struct proc_dir_entry *create_proc_entry(const char *name,
- mode_t mode, struct proc_dir_entry *parent) { return NULL; }
-
-#define remove_proc_entry(name, parent) do {} while (0)
-
-static inline struct proc_dir_entry *proc_symlink(const char *name,
- struct proc_dir_entry *parent,const char *dest) {return NULL;}
-static inline struct proc_dir_entry *proc_mkdir(const char *name,
- struct proc_dir_entry *parent) {return NULL;}
-
-static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
- mode_t mode, struct proc_dir_entry *base,
- read_proc_t *read_proc, void * data) { return NULL; }
-static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
- mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
- { return NULL; }
-
-struct tty_driver;
-static inline void proc_tty_register_driver(struct tty_driver *driver) {};
-static inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
-
-extern struct proc_dir_entry proc_root;
-
-#endif /* CONFIG_PROC_FS */
-
-#if !defined(CONFIG_PROC_KCORE)
-static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
-{
-}
-#else
-extern void kclist_add(struct kcore_list *, void *, size_t);
-#endif
-
-struct proc_inode {
- struct pid *pid;
- int fd;
- union {
- int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
- int (*proc_read)(struct task_struct *task, char *page);
- } op;
- struct proc_dir_entry *pde;
- struct inode vfs_inode;
-};
-
-static inline struct proc_inode *PROC_I(const struct inode *inode)
-{
- return container_of(inode, struct proc_inode, vfs_inode);
-}
-
-static inline struct proc_dir_entry *PDE(const struct inode *inode)
-{
- return PROC_I(inode)->pde;
-}
-
-struct proc_maps_private {
- struct pid *pid;
- struct task_struct *task;
- struct vm_area_struct *tail_vma;
-};
-
-#endif /* _LINUX_PROC_FS_H */
diff --git a/original/linux/ptrace.h b/original/linux/ptrace.h
deleted file mode 100644
index 8b2749a..0000000
--- a/original/linux/ptrace.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef _LINUX_PTRACE_H
-#define _LINUX_PTRACE_H
-/* ptrace.h */
-/* structs and defines to help the user use the ptrace system call. */
-
-/* has the defines to get at the registers. */
-
-#define PTRACE_TRACEME 0
-#define PTRACE_PEEKTEXT 1
-#define PTRACE_PEEKDATA 2
-#define PTRACE_PEEKUSR 3
-#define PTRACE_POKETEXT 4
-#define PTRACE_POKEDATA 5
-#define PTRACE_POKEUSR 6
-#define PTRACE_CONT 7
-#define PTRACE_KILL 8
-#define PTRACE_SINGLESTEP 9
-
-#define PTRACE_ATTACH 0x10
-#define PTRACE_DETACH 0x11
-
-#define PTRACE_SYSCALL 24
-
-/* 0x4200-0x4300 are reserved for architecture-independent additions. */
-#define PTRACE_SETOPTIONS 0x4200
-#define PTRACE_GETEVENTMSG 0x4201
-#define PTRACE_GETSIGINFO 0x4202
-#define PTRACE_SETSIGINFO 0x4203
-
-/* options set using PTRACE_SETOPTIONS */
-#define PTRACE_O_TRACESYSGOOD 0x00000001
-#define PTRACE_O_TRACEFORK 0x00000002
-#define PTRACE_O_TRACEVFORK 0x00000004
-#define PTRACE_O_TRACECLONE 0x00000008
-#define PTRACE_O_TRACEEXEC 0x00000010
-#define PTRACE_O_TRACEVFORKDONE 0x00000020
-#define PTRACE_O_TRACEEXIT 0x00000040
-
-#define PTRACE_O_MASK 0x0000007f
-
-/* Wait extended result codes for the above trace options. */
-#define PTRACE_EVENT_FORK 1
-#define PTRACE_EVENT_VFORK 2
-#define PTRACE_EVENT_CLONE 3
-#define PTRACE_EVENT_EXEC 4
-#define PTRACE_EVENT_VFORK_DONE 5
-#define PTRACE_EVENT_EXIT 6
-
-#include <asm/ptrace.h>
-
-#ifdef __KERNEL__
-/*
- * Ptrace flags
- *
- * The owner ship rules for task->ptrace which holds the ptrace
- * flags is simple. When a task is running it owns it's task->ptrace
- * flags. When the a task is stopped the ptracer owns task->ptrace.
- */
-
-#define PT_PTRACED 0x00000001
-#define PT_DTRACE 0x00000002 /* delayed trace (used on m68k, i386) */
-#define PT_TRACESYSGOOD 0x00000004
-#define PT_PTRACE_CAP 0x00000008 /* ptracer can follow suid-exec */
-#define PT_TRACE_FORK 0x00000010
-#define PT_TRACE_VFORK 0x00000020
-#define PT_TRACE_CLONE 0x00000040
-#define PT_TRACE_EXEC 0x00000080
-#define PT_TRACE_VFORK_DONE 0x00000100
-#define PT_TRACE_EXIT 0x00000200
-#define PT_ATTACHED 0x00000400 /* parent != real_parent */
-
-#define PT_TRACE_MASK 0x000003f4
-
-/* single stepping state bits (used on ARM and PA-RISC) */
-#define PT_SINGLESTEP_BIT 31
-#define PT_SINGLESTEP (1<<PT_SINGLESTEP_BIT)
-#define PT_BLOCKSTEP_BIT 30
-#define PT_BLOCKSTEP (1<<PT_BLOCKSTEP_BIT)
-
-#include <linux/compiler.h> /* For unlikely. */
-#include <linux/sched.h> /* For struct task_struct. */
-
-
-extern long arch_ptrace(struct task_struct *child, long request, long addr, long data);
-extern struct task_struct *ptrace_get_task_struct(pid_t pid);
-extern int ptrace_traceme(void);
-extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len);
-extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
-extern int ptrace_attach(struct task_struct *tsk);
-extern int ptrace_detach(struct task_struct *, unsigned int);
-extern void ptrace_disable(struct task_struct *);
-extern int ptrace_check_attach(struct task_struct *task, int kill);
-extern int ptrace_request(struct task_struct *child, long request, long addr, long data);
-extern void ptrace_notify(int exit_code);
-extern void __ptrace_link(struct task_struct *child,
- struct task_struct *new_parent);
-extern void __ptrace_unlink(struct task_struct *child);
-extern void ptrace_untrace(struct task_struct *child);
-extern int ptrace_may_attach(struct task_struct *task);
-
-static inline void ptrace_link(struct task_struct *child,
- struct task_struct *new_parent)
-{
- if (unlikely(child->ptrace))
- __ptrace_link(child, new_parent);
-}
-static inline void ptrace_unlink(struct task_struct *child)
-{
- if (unlikely(child->ptrace))
- __ptrace_unlink(child);
-}
-
-
-#ifndef force_successful_syscall_return
-/*
- * System call handlers that, upon successful completion, need to return a
- * negative value should call force_successful_syscall_return() right before
- * returning. On architectures where the syscall convention provides for a
- * separate error flag (e.g., alpha, ia64, ppc{,64}, sparc{,64}, possibly
- * others), this macro can be used to ensure that the error flag will not get
- * set. On architectures which do not support a separate error flag, the macro
- * is a no-op and the spurious error condition needs to be filtered out by some
- * other means (e.g., in user-level, by passing an extra argument to the
- * syscall handler, or something along those lines).
- */
-#define force_successful_syscall_return() do { } while (0)
-#endif
-
-#endif
-
-#endif
diff --git a/original/linux/qic117.h b/original/linux/qic117.h
deleted file mode 100644
index 07b537e..0000000
--- a/original/linux/qic117.h
+++ /dev/null
@@ -1,290 +0,0 @@
-#ifndef _QIC117_H
-#define _QIC117_H
-
-/*
- * Copyright (C) 1993-1996 Bas Laarhoven,
- * (C) 1997 Claus-Justus Heine.
-
- 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, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- *
- * $Source: /homes/cvs/ftape-stacked/include/linux/qic117.h,v $
- * $Revision: 1.2 $
- * $Date: 1997/10/05 19:19:32 $
- *
- * This file contains QIC-117 spec. related definitions for the
- * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux.
- *
- * These data were taken from the Quarter-Inch Cartridge
- * Drive Standards, Inc. document titled:
- * `Common Command Set Interface Specification for Flexible
- * Disk Controller Based Minicartridge Tape Drives'
- * document QIC-117 Revision J, 28 Aug 96.
- * For more information, contact:
- * Quarter-Inch Cartridge Drive Standards, Inc.
- * 311 East Carrillo Street
- * Santa Barbara, California 93101
- * Telephone (805) 963-3853
- * Fax (805) 962-1541
- * WWW http://www.qic.org
- *
- * Current QIC standard revisions (of interest) are:
- * QIC-40-MC, Rev. M, 2 Sep 92.
- * QIC-80-MC, Rev. N, 20 Mar 96.
- * QIC-80-MC, Rev. K, 15 Dec 94.
- * QIC-113, Rev. G, 15 Jun 95.
- * QIC-117, Rev. J, 28 Aug 96.
- * QIC-122, Rev. B, 6 Mar 91.
- * QIC-130, Rev. C, 2 Sep 92.
- * QIC-3010-MC, Rev. F, 14 Jun 95.
- * QIC-3020-MC, Rev. G, 31 Aug 95.
- * QIC-CRF3, Rev. B, 15 Jun 95.
- * */
-
-/*
- * QIC-117 common command set rev. J.
- * These commands are sent to the tape unit
- * as number of pulses over the step line.
- */
-
-typedef enum {
- QIC_NO_COMMAND = 0,
- QIC_RESET = 1,
- QIC_REPORT_NEXT_BIT = 2,
- QIC_PAUSE = 3,
- QIC_MICRO_STEP_PAUSE = 4,
- QIC_ALTERNATE_TIMEOUT = 5,
- QIC_REPORT_DRIVE_STATUS = 6,
- QIC_REPORT_ERROR_CODE = 7,
- QIC_REPORT_DRIVE_CONFIGURATION = 8,
- QIC_REPORT_ROM_VERSION = 9,
- QIC_LOGICAL_FORWARD = 10,
- QIC_PHYSICAL_REVERSE = 11,
- QIC_PHYSICAL_FORWARD = 12,
- QIC_SEEK_HEAD_TO_TRACK = 13,
- QIC_SEEK_LOAD_POINT = 14,
- QIC_ENTER_FORMAT_MODE = 15,
- QIC_WRITE_REFERENCE_BURST = 16,
- QIC_ENTER_VERIFY_MODE = 17,
- QIC_STOP_TAPE = 18,
-/* commands 19-20: reserved */
- QIC_MICRO_STEP_HEAD_UP = 21,
- QIC_MICRO_STEP_HEAD_DOWN = 22,
- QIC_SOFT_SELECT = 23,
- QIC_SOFT_DESELECT = 24,
- QIC_SKIP_REVERSE = 25,
- QIC_SKIP_FORWARD = 26,
- QIC_SELECT_RATE = 27,
-/* command 27, in ccs2: Select Rate or Format */
- QIC_ENTER_DIAGNOSTIC_1 = 28,
- QIC_ENTER_DIAGNOSTIC_2 = 29,
- QIC_ENTER_PRIMARY_MODE = 30,
-/* command 31: vendor unique */
- QIC_REPORT_VENDOR_ID = 32,
- QIC_REPORT_TAPE_STATUS = 33,
- QIC_SKIP_EXTENDED_REVERSE = 34,
- QIC_SKIP_EXTENDED_FORWARD = 35,
- QIC_CALIBRATE_TAPE_LENGTH = 36,
- QIC_REPORT_FORMAT_SEGMENTS = 37,
- QIC_SET_FORMAT_SEGMENTS = 38,
-/* commands 39-45: reserved */
- QIC_PHANTOM_SELECT = 46,
- QIC_PHANTOM_DESELECT = 47
-} qic117_cmd_t;
-
-typedef enum {
- discretional = 0, required, ccs1, ccs2
-} qic_compatibility;
-
-typedef enum {
- unused, mode, motion, report
-} command_types;
-
-struct qic117_command_table {
- char *name;
- __u8 mask;
- __u8 state;
- __u8 cmd_type;
- __u8 non_intr;
- __u8 level;
-};
-
-#define QIC117_COMMANDS {\
-/* command mask state cmd_type */\
-/* | name | | | non_intr */\
-/* | | | | | | level */\
-/* 0*/ {NULL, 0x00, 0x00, mode, 0, discretional},\
-/* 1*/ {"soft reset", 0x00, 0x00, motion, 1, required},\
-/* 2*/ {"report next bit", 0x00, 0x00, report, 0, required},\
-/* 3*/ {"pause", 0x36, 0x24, motion, 1, required},\
-/* 4*/ {"micro step pause", 0x36, 0x24, motion, 1, required},\
-/* 5*/ {"alternate command timeout", 0x00, 0x00, mode, 0, required},\
-/* 6*/ {"report drive status", 0x00, 0x00, report, 0, required},\
-/* 7*/ {"report error code", 0x01, 0x01, report, 0, required},\
-/* 8*/ {"report drive configuration",0x00, 0x00, report, 0, required},\
-/* 9*/ {"report rom version", 0x00, 0x00, report, 0, required},\
-/*10*/ {"logical forward", 0x37, 0x25, motion, 0, required},\
-/*11*/ {"physical reverse", 0x17, 0x05, motion, 0, required},\
-/*12*/ {"physical forward", 0x17, 0x05, motion, 0, required},\
-/*13*/ {"seek head to track", 0x37, 0x25, motion, 0, required},\
-/*14*/ {"seek load point", 0x17, 0x05, motion, 1, required},\
-/*15*/ {"enter format mode", 0x1f, 0x05, mode, 0, required},\
-/*16*/ {"write reference burst", 0x1f, 0x05, motion, 1, required},\
-/*17*/ {"enter verify mode", 0x37, 0x25, mode, 0, required},\
-/*18*/ {"stop tape", 0x00, 0x00, motion, 1, required},\
-/*19*/ {"reserved (19)", 0x00, 0x00, unused, 0, discretional},\
-/*20*/ {"reserved (20)", 0x00, 0x00, unused, 0, discretional},\
-/*21*/ {"micro step head up", 0x02, 0x00, motion, 0, required},\
-/*22*/ {"micro step head down", 0x02, 0x00, motion, 0, required},\
-/*23*/ {"soft select", 0x00, 0x00, mode, 0, discretional},\
-/*24*/ {"soft deselect", 0x00, 0x00, mode, 0, discretional},\
-/*25*/ {"skip segments reverse", 0x36, 0x24, motion, 1, required},\
-/*26*/ {"skip segments forward", 0x36, 0x24, motion, 1, required},\
-/*27*/ {"select rate or format", 0x03, 0x01, mode, 0, required /* [ccs2] */},\
-/*28*/ {"enter diag mode 1", 0x00, 0x00, mode, 0, discretional},\
-/*29*/ {"enter diag mode 2", 0x00, 0x00, mode, 0, discretional},\
-/*30*/ {"enter primary mode", 0x00, 0x00, mode, 0, required},\
-/*31*/ {"vendor unique (31)", 0x00, 0x00, unused, 0, discretional},\
-/*32*/ {"report vendor id", 0x00, 0x00, report, 0, required},\
-/*33*/ {"report tape status", 0x04, 0x04, report, 0, ccs1},\
-/*34*/ {"skip extended reverse", 0x36, 0x24, motion, 1, ccs1},\
-/*35*/ {"skip extended forward", 0x36, 0x24, motion, 1, ccs1},\
-/*36*/ {"calibrate tape length", 0x17, 0x05, motion, 1, ccs2},\
-/*37*/ {"report format segments", 0x17, 0x05, report, 0, ccs2},\
-/*38*/ {"set format segments", 0x17, 0x05, mode, 0, ccs2},\
-/*39*/ {"reserved (39)", 0x00, 0x00, unused, 0, discretional},\
-/*40*/ {"vendor unique (40)", 0x00, 0x00, unused, 0, discretional},\
-/*41*/ {"vendor unique (41)", 0x00, 0x00, unused, 0, discretional},\
-/*42*/ {"vendor unique (42)", 0x00, 0x00, unused, 0, discretional},\
-/*43*/ {"vendor unique (43)", 0x00, 0x00, unused, 0, discretional},\
-/*44*/ {"vendor unique (44)", 0x00, 0x00, unused, 0, discretional},\
-/*45*/ {"vendor unique (45)", 0x00, 0x00, unused, 0, discretional},\
-/*46*/ {"phantom select", 0x00, 0x00, mode, 0, discretional},\
-/*47*/ {"phantom deselect", 0x00, 0x00, mode, 0, discretional},\
-}
-
-/*
- * Status bits returned by QIC_REPORT_DRIVE_STATUS
- */
-
-#define QIC_STATUS_READY 0x01 /* Drive is ready or idle. */
-#define QIC_STATUS_ERROR 0x02 /* Error detected, must read
- error code to clear this */
-#define QIC_STATUS_CARTRIDGE_PRESENT 0x04 /* Tape is present */
-#define QIC_STATUS_WRITE_PROTECT 0x08 /* Tape is write protected */
-#define QIC_STATUS_NEW_CARTRIDGE 0x10 /* New cartridge inserted, must
- read error status to clear. */
-#define QIC_STATUS_REFERENCED 0x20 /* Cartridge appears to have been
- formatted. */
-#define QIC_STATUS_AT_BOT 0x40 /* Cartridge is at physical
- beginning of tape. */
-#define QIC_STATUS_AT_EOT 0x80 /* Cartridge is at physical end
- of tape. */
-/*
- * Status bits returned by QIC_REPORT_DRIVE_CONFIGURATION
- */
-
-#define QIC_CONFIG_RATE_MASK 0x18
-#define QIC_CONFIG_RATE_SHIFT 3
-#define QIC_CONFIG_RATE_250 0
-#define QIC_CONFIG_RATE_500 2
-#define QIC_CONFIG_RATE_1000 3
-#define QIC_CONFIG_RATE_2000 1
-#define QIC_CONFIG_RATE_4000 0 /* since QIC-117 Rev. J */
-
-#define QIC_CONFIG_LONG 0x40 /* Extra Length Tape Detected */
-#define QIC_CONFIG_80 0x80 /* QIC-80 detected. */
-
-/*
- * Status bits returned by QIC_REPORT_TAPE_STATUS
- */
-
-#define QIC_TAPE_STD_MASK 0x0f
-#define QIC_TAPE_QIC40 0x01
-#define QIC_TAPE_QIC80 0x02
-#define QIC_TAPE_QIC3020 0x03
-#define QIC_TAPE_QIC3010 0x04
-
-#define QIC_TAPE_LEN_MASK 0x70
-#define QIC_TAPE_205FT 0x10
-#define QIC_TAPE_307FT 0x20
-#define QIC_TAPE_VARIABLE 0x30
-#define QIC_TAPE_1100FT 0x40
-#define QIC_TAPE_FLEX 0x60
-
-#define QIC_TAPE_WIDE 0x80
-
-/* Define a value (in feet) slightly higher than
- * the possible maximum tape length.
- */
-#define QIC_TOP_TAPE_LEN 1500
-
-/*
- * Errors: List of error codes, and their severity.
- */
-
-typedef struct {
- char *message; /* Text describing the error. */
- unsigned int fatal:1; /* Non-zero if the error is fatal. */
-} ftape_error;
-
-#define QIC117_ERRORS {\
- /* 0*/ { "No error", 0, },\
- /* 1*/ { "Command Received while Drive Not Ready", 0, },\
- /* 2*/ { "Cartridge Not Present or Removed", 1, },\
- /* 3*/ { "Motor Speed Error (not within 1%)", 1, },\
- /* 4*/ { "Motor Speed Fault (jammed, or gross speed error", 1, },\
- /* 5*/ { "Cartridge Write Protected", 1, },\
- /* 6*/ { "Undefined or Reserved Command Code", 1, },\
- /* 7*/ { "Illegal Track Address Specified for Seek", 1, },\
- /* 8*/ { "Illegal Command in Report Subcontext", 0, },\
- /* 9*/ { "Illegal Entry into a Diagnostic Mode", 1, },\
- /*10*/ { "Broken Tape Detected (based on hole sensor)", 1, },\
- /*11*/ { "Warning--Read Gain Setting Error", 1, },\
- /*12*/ { "Command Received While Error Status Pending (obs)", 1, },\
- /*13*/ { "Command Received While New Cartridge Pending", 1, },\
- /*14*/ { "Command Illegal or Undefined in Primary Mode", 1, },\
- /*15*/ { "Command Illegal or Undefined in Format Mode", 1, },\
- /*16*/ { "Command Illegal or Undefined in Verify Mode", 1, },\
- /*17*/ { "Logical Forward Not at Logical BOT or no Format Segments in Format Mode", 1, },\
- /*18*/ { "Logical EOT Before All Segments generated", 1, },\
- /*19*/ { "Command Illegal When Cartridge Not Referenced", 1, },\
- /*20*/ { "Self-Diagnostic Failed (cannot be cleared)", 1, },\
- /*21*/ { "Warning EEPROM Not Initialized, Defaults Set", 1, },\
- /*22*/ { "EEPROM Corrupted or Hardware Failure", 1, },\
- /*23*/ { "Motion Time-out Error", 1, },\
- /*24*/ { "Data Segment Too Long -- Logical Forward or Pause", 1, },\
- /*25*/ { "Transmit Overrun (obs)", 1, },\
- /*26*/ { "Power On Reset Occurred", 0, },\
- /*27*/ { "Software Reset Occurred", 0, },\
- /*28*/ { "Diagnostic Mode 1 Error", 1, },\
- /*29*/ { "Diagnostic Mode 2 Error", 1, },\
- /*30*/ { "Command Received During Non-Interruptible Process", 1, },\
- /*31*/ { "Rate or Format Selection Error", 1, },\
- /*32*/ { "Illegal Command While in High Speed Mode", 1, },\
- /*33*/ { "Illegal Seek Segment Value", 1, },\
- /*34*/ { "Invalid Media", 1, },\
- /*35*/ { "Head Positioning Failure", 1, },\
- /*36*/ { "Write Reference Burst Failure", 1, },\
- /*37*/ { "Prom Code Missing", 1, },\
- /*38*/ { "Invalid Format", 1, },\
- /*39*/ { "EOT/BOT System Failure", 1, },\
- /*40*/ { "Prom A Checksum Error", 1, },\
- /*41*/ { "Drive Wakeup Reset Occurred", 1, },\
- /*42*/ { "Prom B Checksum Error", 1, },\
- /*43*/ { "Illegal Entry into Format Mode", 1, },\
-}
-
-#endif /* _QIC117_H */
diff --git a/original/linux/qnxtypes.h b/original/linux/qnxtypes.h
deleted file mode 100644
index a3eb113..0000000
--- a/original/linux/qnxtypes.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Name : qnxtypes.h
- * Author : Richard Frowijn
- * Function : standard qnx types
- * Version : 1.0.2
- * Last modified : 2000-01-06
- *
- * History : 22-03-1998 created
- *
- */
-
-#ifndef _QNX4TYPES_H
-#define _QNX4TYPES_H
-
-typedef __le16 qnx4_nxtnt_t;
-typedef __u8 qnx4_ftype_t;
-
-typedef struct {
- __le32 xtnt_blk;
- __le32 xtnt_size;
-} qnx4_xtnt_t;
-
-typedef __le16 qnx4_mode_t;
-typedef __le16 qnx4_muid_t;
-typedef __le16 qnx4_mgid_t;
-typedef __le32 qnx4_off_t;
-typedef __le16 qnx4_nlink_t;
-
-#endif
diff --git a/original/linux/quota.h b/original/linux/quota.h
deleted file mode 100644
index b8fbf26..0000000
--- a/original/linux/quota.h
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Robert Elz at The University of Melbourne.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Version: $Id: quota.h,v 2.0 1996/11/17 16:48:14 mvw Exp mvw $
- */
-
-#ifndef _LINUX_QUOTA_
-#define _LINUX_QUOTA_
-
-#include <linux/errno.h>
-#include <linux/types.h>
-
-#define __DQUOT_VERSION__ "dquot_6.5.1"
-#define __DQUOT_NUM_VERSION__ 6*10000+5*100+1
-
-typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */
-typedef __u64 qsize_t; /* Type in which we store sizes */
-
-extern spinlock_t dq_data_lock;
-
-/* Size of blocks in which are counted size limits */
-#define QUOTABLOCK_BITS 10
-#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
-
-/* Conversion routines from and to quota blocks */
-#define qb2kb(x) ((x) << (QUOTABLOCK_BITS-10))
-#define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10))
-#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
-
-#define MAXQUOTAS 2
-#define USRQUOTA 0 /* element used for user quotas */
-#define GRPQUOTA 1 /* element used for group quotas */
-
-/*
- * Definitions for the default names of the quotas files.
- */
-#define INITQFNAMES { \
- "user", /* USRQUOTA */ \
- "group", /* GRPQUOTA */ \
- "undefined", \
-};
-
-/*
- * Command definitions for the 'quotactl' system call.
- * The commands are broken into a main command defined below
- * and a subcommand that is used to convey the type of
- * quota that is being manipulated (see above).
- */
-#define SUBCMDMASK 0x00ff
-#define SUBCMDSHIFT 8
-#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
-
-#define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */
-#define Q_QUOTAON 0x800002 /* turn quotas on */
-#define Q_QUOTAOFF 0x800003 /* turn quotas off */
-#define Q_GETFMT 0x800004 /* get quota format used on given filesystem */
-#define Q_GETINFO 0x800005 /* get information about quota files */
-#define Q_SETINFO 0x800006 /* set information about quota files */
-#define Q_GETQUOTA 0x800007 /* get user quota structure */
-#define Q_SETQUOTA 0x800008 /* set user quota structure */
-
-/*
- * Quota structure used for communication with userspace via quotactl
- * Following flags are used to specify which fields are valid
- */
-#define QIF_BLIMITS 1
-#define QIF_SPACE 2
-#define QIF_ILIMITS 4
-#define QIF_INODES 8
-#define QIF_BTIME 16
-#define QIF_ITIME 32
-#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
-#define QIF_USAGE (QIF_SPACE | QIF_INODES)
-#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
-#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
-
-struct if_dqblk {
- __u64 dqb_bhardlimit;
- __u64 dqb_bsoftlimit;
- __u64 dqb_curspace;
- __u64 dqb_ihardlimit;
- __u64 dqb_isoftlimit;
- __u64 dqb_curinodes;
- __u64 dqb_btime;
- __u64 dqb_itime;
- __u32 dqb_valid;
-};
-
-/*
- * Structure used for setting quota information about file via quotactl
- * Following flags are used to specify which fields are valid
- */
-#define IIF_BGRACE 1
-#define IIF_IGRACE 2
-#define IIF_FLAGS 4
-#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
-
-struct if_dqinfo {
- __u64 dqi_bgrace;
- __u64 dqi_igrace;
- __u32 dqi_flags;
- __u32 dqi_valid;
-};
-
-#ifdef __KERNEL__
-#include <linux/spinlock.h>
-#include <linux/mutex.h>
-
-#include <linux/dqblk_xfs.h>
-#include <linux/dqblk_v1.h>
-#include <linux/dqblk_v2.h>
-
-/* Maximal numbers of writes for quota operation (insert/delete/update)
- * (over VFS all formats) */
-#define DQUOT_INIT_ALLOC max(V1_INIT_ALLOC, V2_INIT_ALLOC)
-#define DQUOT_INIT_REWRITE max(V1_INIT_REWRITE, V2_INIT_REWRITE)
-#define DQUOT_DEL_ALLOC max(V1_DEL_ALLOC, V2_DEL_ALLOC)
-#define DQUOT_DEL_REWRITE max(V1_DEL_REWRITE, V2_DEL_REWRITE)
-
-/*
- * Data for one user/group kept in memory
- */
-struct mem_dqblk {
- __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */
- __u32 dqb_bsoftlimit; /* preferred limit on disk blks */
- qsize_t dqb_curspace; /* current used space */
- __u32 dqb_ihardlimit; /* absolute limit on allocated inodes */
- __u32 dqb_isoftlimit; /* preferred inode limit */
- __u32 dqb_curinodes; /* current # allocated inodes */
- time_t dqb_btime; /* time limit for excessive disk use */
- time_t dqb_itime; /* time limit for excessive inode use */
-};
-
-/*
- * Data for one quotafile kept in memory
- */
-struct quota_format_type;
-
-struct mem_dqinfo {
- struct quota_format_type *dqi_format;
- struct list_head dqi_dirty_list; /* List of dirty dquots */
- unsigned long dqi_flags;
- unsigned int dqi_bgrace;
- unsigned int dqi_igrace;
- union {
- struct v1_mem_dqinfo v1_i;
- struct v2_mem_dqinfo v2_i;
- } u;
-};
-
-struct super_block;
-
-#define DQF_MASK 0xffff /* Mask for format specific flags */
-#define DQF_INFO_DIRTY_B 16
-#define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B) /* Is info dirty? */
-
-extern void mark_info_dirty(struct super_block *sb, int type);
-#define info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags)
-#define info_any_dquot_dirty(info) (!list_empty(&(info)->dqi_dirty_list))
-#define info_any_dirty(info) (info_dirty(info) || info_any_dquot_dirty(info))
-
-#define sb_dqopt(sb) (&(sb)->s_dquot)
-#define sb_dqinfo(sb, type) (sb_dqopt(sb)->info+(type))
-
-struct dqstats {
- int lookups;
- int drops;
- int reads;
- int writes;
- int cache_hits;
- int allocated_dquots;
- int free_dquots;
- int syncs;
-};
-
-extern struct dqstats dqstats;
-
-#define DQ_MOD_B 0 /* dquot modified since read */
-#define DQ_BLKS_B 1 /* uid/gid has been warned about blk limit */
-#define DQ_INODES_B 2 /* uid/gid has been warned about inode limit */
-#define DQ_FAKE_B 3 /* no limits only usage */
-#define DQ_READ_B 4 /* dquot was read into memory */
-#define DQ_ACTIVE_B 5 /* dquot is active (dquot_release not called) */
-
-struct dquot {
- struct hlist_node dq_hash; /* Hash list in memory */
- struct list_head dq_inuse; /* List of all quotas */
- struct list_head dq_free; /* Free list element */
- struct list_head dq_dirty; /* List of dirty dquots */
- struct mutex dq_lock; /* dquot IO lock */
- atomic_t dq_count; /* Use count */
- wait_queue_head_t dq_wait_unused; /* Wait queue for dquot to become unused */
- struct super_block *dq_sb; /* superblock this applies to */
- unsigned int dq_id; /* ID this applies to (uid, gid) */
- loff_t dq_off; /* Offset of dquot on disk */
- unsigned long dq_flags; /* See DQ_* */
- short dq_type; /* Type of quota */
- struct mem_dqblk dq_dqb; /* Diskquota usage */
-};
-
-#define NODQUOT (struct dquot *)NULL
-
-#define QUOTA_OK 0
-#define NO_QUOTA 1
-
-/* Operations which must be implemented by each quota format */
-struct quota_format_ops {
- int (*check_quota_file)(struct super_block *sb, int type); /* Detect whether file is in our format */
- int (*read_file_info)(struct super_block *sb, int type); /* Read main info about file - called on quotaon() */
- int (*write_file_info)(struct super_block *sb, int type); /* Write main info about file */
- int (*free_file_info)(struct super_block *sb, int type); /* Called on quotaoff() */
- int (*read_dqblk)(struct dquot *dquot); /* Read structure for one user */
- int (*commit_dqblk)(struct dquot *dquot); /* Write structure for one user */
- int (*release_dqblk)(struct dquot *dquot); /* Called when last reference to dquot is being dropped */
-};
-
-/* Operations working with dquots */
-struct dquot_operations {
- int (*initialize) (struct inode *, int);
- int (*drop) (struct inode *);
- int (*alloc_space) (struct inode *, qsize_t, int);
- int (*alloc_inode) (const struct inode *, unsigned long);
- int (*free_space) (struct inode *, qsize_t);
- int (*free_inode) (const struct inode *, unsigned long);
- int (*transfer) (struct inode *, struct iattr *);
- int (*write_dquot) (struct dquot *); /* Ordinary dquot write */
- int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */
- int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */
- int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */
- int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */
-};
-
-/* Operations handling requests from userspace */
-struct quotactl_ops {
- int (*quota_on)(struct super_block *, int, int, char *);
- int (*quota_off)(struct super_block *, int);
- int (*quota_sync)(struct super_block *, int);
- int (*get_info)(struct super_block *, int, struct if_dqinfo *);
- int (*set_info)(struct super_block *, int, struct if_dqinfo *);
- int (*get_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
- int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
- int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
- int (*set_xstate)(struct super_block *, unsigned int, int);
- int (*get_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
- int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
-};
-
-struct quota_format_type {
- int qf_fmt_id; /* Quota format id */
- struct quota_format_ops *qf_ops; /* Operations of format */
- struct module *qf_owner; /* Module implementing quota format */
- struct quota_format_type *qf_next;
-};
-
-#define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */
-#define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */
-
-struct quota_info {
- unsigned int flags; /* Flags for diskquotas on this device */
- struct mutex dqio_mutex; /* lock device while I/O in progress */
- struct mutex dqonoff_mutex; /* Serialize quotaon & quotaoff */
- struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */
- struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */
- struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */
- struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */
-};
-
-/* Inline would be better but we need to dereference super_block which is not defined yet */
-int mark_dquot_dirty(struct dquot *dquot);
-
-#define dquot_dirty(dquot) test_bit(DQ_MOD_B, &(dquot)->dq_flags)
-
-#define sb_has_quota_enabled(sb, type) ((type)==USRQUOTA ? \
- (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED) : (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED))
-
-#define sb_any_quota_enabled(sb) (sb_has_quota_enabled(sb, USRQUOTA) | \
- sb_has_quota_enabled(sb, GRPQUOTA))
-
-int register_quota_format(struct quota_format_type *fmt);
-void unregister_quota_format(struct quota_format_type *fmt);
-
-struct quota_module_name {
- int qm_fmt_id;
- char *qm_mod_name;
-};
-
-#define INIT_QUOTA_MODULE_NAMES {\
- {QFMT_VFS_OLD, "quota_v1"},\
- {QFMT_VFS_V0, "quota_v2"},\
- {0, NULL}}
-
-#else
-
-# /* nodep */ include <sys/cdefs.h>
-
-__BEGIN_DECLS
-long quotactl __P ((unsigned int, const char *, int, caddr_t));
-__END_DECLS
-
-#endif /* __KERNEL__ */
-#endif /* _QUOTA_ */
diff --git a/original/linux/raid/md.h b/original/linux/raid/md.h
deleted file mode 100644
index eb3e547..0000000
--- a/original/linux/raid/md.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- md.h : Multiple Devices driver for Linux
- Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
- Copyright (C) 1994-96 Marc ZYNGIER
- <zyngier@ufr-info-p7.ibp.fr> or
- <maz@gloups.fdn.fr>
-
- 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, or (at your option)
- any later version.
-
- You should have received a copy of the GNU General Public License
- (for example /usr/src/linux/COPYING); if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef _MD_H
-#define _MD_H
-
-#include <linux/blkdev.h>
-#include <asm/semaphore.h>
-#include <linux/major.h>
-#include <linux/ioctl.h>
-#include <linux/types.h>
-#include <linux/bitops.h>
-#include <linux/module.h>
-#include <linux/hdreg.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/smp_lock.h>
-#include <linux/delay.h>
-#include <net/checksum.h>
-#include <linux/random.h>
-#include <linux/kernel_stat.h>
-#include <asm/io.h>
-#include <linux/completion.h>
-#include <linux/mempool.h>
-#include <linux/list.h>
-#include <linux/reboot.h>
-#include <linux/vmalloc.h>
-#include <linux/blkpg.h>
-#include <linux/bio.h>
-
-/*
- * 'md_p.h' holds the 'physical' layout of RAID devices
- * 'md_u.h' holds the user <=> kernel API
- *
- * 'md_k.h' holds kernel internal definitions
- */
-
-#include <linux/raid/md_p.h>
-#include <linux/raid/md_u.h>
-#include <linux/raid/md_k.h>
-
-/*
- * Different major versions are not compatible.
- * Different minor versions are only downward compatible.
- * Different patchlevel versions are downward and upward compatible.
- */
-#define MD_MAJOR_VERSION 0
-#define MD_MINOR_VERSION 90
-/*
- * MD_PATCHLEVEL_VERSION indicates kernel functionality.
- * >=1 means different superblock formats are selectable using SET_ARRAY_INFO
- * and major_version/minor_version accordingly
- * >=2 means that Internal bitmaps are supported by setting MD_SB_BITMAP_PRESENT
- * in the super status byte
- * >=3 means that bitmap superblock version 4 is supported, which uses
- * little-ending representation rather than host-endian
- */
-#define MD_PATCHLEVEL_VERSION 3
-
-extern int register_md_personality (struct mdk_personality *p);
-extern int unregister_md_personality (struct mdk_personality *p);
-extern mdk_thread_t * md_register_thread (void (*run) (mddev_t *mddev),
- mddev_t *mddev, const char *name);
-extern void md_unregister_thread (mdk_thread_t *thread);
-extern void md_wakeup_thread(mdk_thread_t *thread);
-extern void md_check_recovery(mddev_t *mddev);
-extern void md_write_start(mddev_t *mddev, struct bio *bi);
-extern void md_write_end(mddev_t *mddev);
-extern void md_handle_safemode(mddev_t *mddev);
-extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
-extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev);
-extern void md_unplug_mddev(mddev_t *mddev);
-
-extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
- sector_t sector, int size, struct page *page);
-extern void md_super_wait(mddev_t *mddev);
-extern int sync_page_io(struct block_device *bdev, sector_t sector, int size,
- struct page *page, int rw);
-extern void md_do_sync(mddev_t *mddev);
-extern void md_new_event(mddev_t *mddev);
-
-extern void md_update_sb(mddev_t * mddev);
-
-#endif
-
diff --git a/original/linux/raid/md_k.h b/original/linux/raid/md_k.h
deleted file mode 100644
index d288902..0000000
--- a/original/linux/raid/md_k.h
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- md_k.h : kernel internal structure of the Linux MD driver
- Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
-
- 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, or (at your option)
- any later version.
-
- You should have received a copy of the GNU General Public License
- (for example /usr/src/linux/COPYING); if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef _MD_K_H
-#define _MD_K_H
-
-/* and dm-bio-list.h is not under include/linux because.... ??? */
-#include "../../../drivers/md/dm-bio-list.h"
-
-#define LEVEL_MULTIPATH (-4)
-#define LEVEL_LINEAR (-1)
-#define LEVEL_FAULTY (-5)
-
-/* we need a value for 'no level specified' and 0
- * means 'raid0', so we need something else. This is
- * for internal use only
- */
-#define LEVEL_NONE (-1000000)
-
-#define MaxSector (~(sector_t)0)
-#define MD_THREAD_NAME_MAX 14
-
-typedef struct mddev_s mddev_t;
-typedef struct mdk_rdev_s mdk_rdev_t;
-
-#define MAX_MD_DEVS 256 /* Max number of md dev */
-
-/*
- * options passed in raidrun:
- */
-
-/* Currently this must fix in an 'int' */
-#define MAX_CHUNK_SIZE (1<<30)
-
-/*
- * MD's 'extended' device
- */
-struct mdk_rdev_s
-{
- struct list_head same_set; /* RAID devices within the same set */
-
- sector_t size; /* Device size (in blocks) */
- mddev_t *mddev; /* RAID array if running */
- unsigned long last_events; /* IO event timestamp */
-
- struct block_device *bdev; /* block device handle */
-
- struct page *sb_page;
- int sb_loaded;
- __u64 sb_events;
- sector_t data_offset; /* start of data in array */
- sector_t sb_offset;
- int sb_size; /* bytes in the superblock */
- int preferred_minor; /* autorun support */
-
- struct kobject kobj;
-
- /* A device can be in one of three states based on two flags:
- * Not working: faulty==1 in_sync==0
- * Fully working: faulty==0 in_sync==1
- * Working, but not
- * in sync with array
- * faulty==0 in_sync==0
- *
- * It can never have faulty==1, in_sync==1
- * This reduces the burden of testing multiple flags in many cases
- */
-
- unsigned long flags;
-#define Faulty 1 /* device is known to have a fault */
-#define In_sync 2 /* device is in_sync with rest of array */
-#define WriteMostly 4 /* Avoid reading if at all possible */
-#define BarriersNotsupp 5 /* BIO_RW_BARRIER is not supported */
-
- int desc_nr; /* descriptor index in the superblock */
- int raid_disk; /* role of device in array */
- int saved_raid_disk; /* role that device used to have in the
- * array and could again if we did a partial
- * resync from the bitmap
- */
- sector_t recovery_offset;/* If this device has been partially
- * recovered, this is where we were
- * up to.
- */
-
- atomic_t nr_pending; /* number of pending requests.
- * only maintained for arrays that
- * support hot removal
- */
- atomic_t read_errors; /* number of consecutive read errors that
- * we have tried to ignore.
- */
- atomic_t corrected_errors; /* number of corrected read errors,
- * for reporting to userspace and storing
- * in superblock.
- */
-};
-
-struct mddev_s
-{
- void *private;
- struct mdk_personality *pers;
- dev_t unit;
- int md_minor;
- struct list_head disks;
- int sb_dirty;
- int ro;
-
- struct gendisk *gendisk;
-
- struct kobject kobj;
-
- /* Superblock information */
- int major_version,
- minor_version,
- patch_version;
- int persistent;
- int chunk_size;
- time_t ctime, utime;
- int level, layout;
- char clevel[16];
- int raid_disks;
- int max_disks;
- sector_t size; /* used size of component devices */
- sector_t array_size; /* exported array size */
- __u64 events;
-
- char uuid[16];
-
- /* If the array is being reshaped, we need to record the
- * new shape and an indication of where we are up to.
- * This is written to the superblock.
- * If reshape_position is MaxSector, then no reshape is happening (yet).
- */
- sector_t reshape_position;
- int delta_disks, new_level, new_layout, new_chunk;
-
- struct mdk_thread_s *thread; /* management thread */
- struct mdk_thread_s *sync_thread; /* doing resync or reconstruct */
- sector_t curr_resync; /* last block scheduled */
- unsigned long resync_mark; /* a recent timestamp */
- sector_t resync_mark_cnt;/* blocks written at resync_mark */
- sector_t curr_mark_cnt; /* blocks scheduled now */
-
- sector_t resync_max_sectors; /* may be set by personality */
-
- sector_t resync_mismatches; /* count of sectors where
- * parity/replica mismatch found
- */
-
- /* allow user-space to request suspension of IO to regions of the array */
- sector_t suspend_lo;
- sector_t suspend_hi;
- /* if zero, use the system-wide default */
- int sync_speed_min;
- int sync_speed_max;
-
- int ok_start_degraded;
- /* recovery/resync flags
- * NEEDED: we might need to start a resync/recover
- * RUNNING: a thread is running, or about to be started
- * SYNC: actually doing a resync, not a recovery
- * ERR: and IO error was detected - abort the resync/recovery
- * INTR: someone requested a (clean) early abort.
- * DONE: thread is done and is waiting to be reaped
- * REQUEST: user-space has requested a sync (used with SYNC)
- * CHECK: user-space request for for check-only, no repair
- * RESHAPE: A reshape is happening
- *
- * If neither SYNC or RESHAPE are set, then it is a recovery.
- */
-#define MD_RECOVERY_RUNNING 0
-#define MD_RECOVERY_SYNC 1
-#define MD_RECOVERY_ERR 2
-#define MD_RECOVERY_INTR 3
-#define MD_RECOVERY_DONE 4
-#define MD_RECOVERY_NEEDED 5
-#define MD_RECOVERY_REQUESTED 6
-#define MD_RECOVERY_CHECK 7
-#define MD_RECOVERY_RESHAPE 8
-#define MD_RECOVERY_FROZEN 9
-
- unsigned long recovery;
-
- int in_sync; /* know to not need resync */
- struct mutex reconfig_mutex;
- atomic_t active;
-
- int changed; /* true if we might need to reread partition info */
- int degraded; /* whether md should consider
- * adding a spare
- */
- int barriers_work; /* initialised to true, cleared as soon
- * as a barrier request to slave
- * fails. Only supported
- */
- struct bio *biolist; /* bios that need to be retried
- * because BIO_RW_BARRIER is not supported
- */
-
- atomic_t recovery_active; /* blocks scheduled, but not written */
- wait_queue_head_t recovery_wait;
- sector_t recovery_cp;
-
- spinlock_t write_lock;
- wait_queue_head_t sb_wait; /* for waiting on superblock updates */
- atomic_t pending_writes; /* number of active superblock writes */
-
- unsigned int safemode; /* if set, update "clean" superblock
- * when no writes pending.
- */
- unsigned int safemode_delay;
- struct timer_list safemode_timer;
- atomic_t writes_pending;
- request_queue_t *queue; /* for plugging ... */
-
- atomic_t write_behind; /* outstanding async IO */
- unsigned int max_write_behind; /* 0 = sync */
-
- struct bitmap *bitmap; /* the bitmap for the device */
- struct file *bitmap_file; /* the bitmap file */
- long bitmap_offset; /* offset from superblock of
- * start of bitmap. May be
- * negative, but not '0'
- */
- long default_bitmap_offset; /* this is the offset to use when
- * hot-adding a bitmap. It should
- * eventually be settable by sysfs.
- */
-
- struct list_head all_mddevs;
-};
-
-
-static inline void rdev_dec_pending(mdk_rdev_t *rdev, mddev_t *mddev)
-{
- int faulty = test_bit(Faulty, &rdev->flags);
- if (atomic_dec_and_test(&rdev->nr_pending) && faulty)
- set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
-}
-
-static inline void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors)
-{
- atomic_add(nr_sectors, &bdev->bd_contains->bd_disk->sync_io);
-}
-
-struct mdk_personality
-{
- char *name;
- int level;
- struct list_head list;
- struct module *owner;
- int (*make_request)(request_queue_t *q, struct bio *bio);
- int (*run)(mddev_t *mddev);
- int (*stop)(mddev_t *mddev);
- void (*status)(struct seq_file *seq, mddev_t *mddev);
- /* error_handler must set ->faulty and clear ->in_sync
- * if appropriate, and should abort recovery if needed
- */
- void (*error_handler)(mddev_t *mddev, mdk_rdev_t *rdev);
- int (*hot_add_disk) (mddev_t *mddev, mdk_rdev_t *rdev);
- int (*hot_remove_disk) (mddev_t *mddev, int number);
- int (*spare_active) (mddev_t *mddev);
- sector_t (*sync_request)(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster);
- int (*resize) (mddev_t *mddev, sector_t sectors);
- int (*check_reshape) (mddev_t *mddev);
- int (*start_reshape) (mddev_t *mddev);
- int (*reconfig) (mddev_t *mddev, int layout, int chunk_size);
- /* quiesce moves between quiescence states
- * 0 - fully active
- * 1 - no new requests allowed
- * others - reserved
- */
- void (*quiesce) (mddev_t *mddev, int state);
-};
-
-
-struct md_sysfs_entry {
- struct attribute attr;
- ssize_t (*show)(mddev_t *, char *);
- ssize_t (*store)(mddev_t *, const char *, size_t);
-};
-
-
-static inline char * mdname (mddev_t * mddev)
-{
- return mddev->gendisk ? mddev->gendisk->disk_name : "mdX";
-}
-
-/*
- * iterates through some rdev ringlist. It's safe to remove the
- * current 'rdev'. Dont touch 'tmp' though.
- */
-#define ITERATE_RDEV_GENERIC(head,rdev,tmp) \
- \
- for ((tmp) = (head).next; \
- (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \
- (tmp) = (tmp)->next, (tmp)->prev != &(head) \
- ; )
-/*
- * iterates through the 'same array disks' ringlist
- */
-#define ITERATE_RDEV(mddev,rdev,tmp) \
- ITERATE_RDEV_GENERIC((mddev)->disks,rdev,tmp)
-
-/*
- * Iterates through 'pending RAID disks'
- */
-#define ITERATE_RDEV_PENDING(rdev,tmp) \
- ITERATE_RDEV_GENERIC(pending_raid_disks,rdev,tmp)
-
-typedef struct mdk_thread_s {
- void (*run) (mddev_t *mddev);
- mddev_t *mddev;
- wait_queue_head_t wqueue;
- unsigned long flags;
- struct task_struct *tsk;
- unsigned long timeout;
-} mdk_thread_t;
-
-#define THREAD_WAKEUP 0
-
-#define __wait_event_lock_irq(wq, condition, lock, cmd) \
-do { \
- wait_queue_t __wait; \
- init_waitqueue_entry(&__wait, current); \
- \
- add_wait_queue(&wq, &__wait); \
- for (;;) { \
- set_current_state(TASK_UNINTERRUPTIBLE); \
- if (condition) \
- break; \
- spin_unlock_irq(&lock); \
- cmd; \
- schedule(); \
- spin_lock_irq(&lock); \
- } \
- current->state = TASK_RUNNING; \
- remove_wait_queue(&wq, &__wait); \
-} while (0)
-
-#define wait_event_lock_irq(wq, condition, lock, cmd) \
-do { \
- if (condition) \
- break; \
- __wait_event_lock_irq(wq, condition, lock, cmd); \
-} while (0)
-
-static inline void safe_put_page(struct page *p)
-{
- if (p) put_page(p);
-}
-
-#endif
-
diff --git a/original/linux/raid/md_p.h b/original/linux/raid/md_p.h
deleted file mode 100644
index b6ebc69..0000000
--- a/original/linux/raid/md_p.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- md_p.h : physical layout of Linux RAID devices
- Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman
-
- 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, or (at your option)
- any later version.
-
- You should have received a copy of the GNU General Public License
- (for example /usr/src/linux/COPYING); if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef _MD_P_H
-#define _MD_P_H
-
-/*
- * RAID superblock.
- *
- * The RAID superblock maintains some statistics on each RAID configuration.
- * Each real device in the RAID set contains it near the end of the device.
- * Some of the ideas are copied from the ext2fs implementation.
- *
- * We currently use 4096 bytes as follows:
- *
- * word offset function
- *
- * 0 - 31 Constant generic RAID device information.
- * 32 - 63 Generic state information.
- * 64 - 127 Personality specific information.
- * 128 - 511 12 32-words descriptors of the disks in the raid set.
- * 512 - 911 Reserved.
- * 912 - 1023 Disk specific descriptor.
- */
-
-/*
- * If x is the real device size in bytes, we return an apparent size of:
- *
- * y = (x & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES
- *
- * and place the 4kB superblock at offset y.
- */
-#define MD_RESERVED_BYTES (64 * 1024)
-#define MD_RESERVED_SECTORS (MD_RESERVED_BYTES / 512)
-#define MD_RESERVED_BLOCKS (MD_RESERVED_BYTES / BLOCK_SIZE)
-
-#define MD_NEW_SIZE_SECTORS(x) ((x & ~(MD_RESERVED_SECTORS - 1)) - MD_RESERVED_SECTORS)
-#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
-
-#define MD_SB_BYTES 4096
-#define MD_SB_WORDS (MD_SB_BYTES / 4)
-#define MD_SB_BLOCKS (MD_SB_BYTES / BLOCK_SIZE)
-#define MD_SB_SECTORS (MD_SB_BYTES / 512)
-
-/*
- * The following are counted in 32-bit words
- */
-#define MD_SB_GENERIC_OFFSET 0
-#define MD_SB_PERSONALITY_OFFSET 64
-#define MD_SB_DISKS_OFFSET 128
-#define MD_SB_DESCRIPTOR_OFFSET 992
-
-#define MD_SB_GENERIC_CONSTANT_WORDS 32
-#define MD_SB_GENERIC_STATE_WORDS 32
-#define MD_SB_GENERIC_WORDS (MD_SB_GENERIC_CONSTANT_WORDS + MD_SB_GENERIC_STATE_WORDS)
-#define MD_SB_PERSONALITY_WORDS 64
-#define MD_SB_DESCRIPTOR_WORDS 32
-#define MD_SB_DISKS 27
-#define MD_SB_DISKS_WORDS (MD_SB_DISKS*MD_SB_DESCRIPTOR_WORDS)
-#define MD_SB_RESERVED_WORDS (1024 - MD_SB_GENERIC_WORDS - MD_SB_PERSONALITY_WORDS - MD_SB_DISKS_WORDS - MD_SB_DESCRIPTOR_WORDS)
-#define MD_SB_EQUAL_WORDS (MD_SB_GENERIC_WORDS + MD_SB_PERSONALITY_WORDS + MD_SB_DISKS_WORDS)
-
-/*
- * Device "operational" state bits
- */
-#define MD_DISK_FAULTY 0 /* disk is faulty / operational */
-#define MD_DISK_ACTIVE 1 /* disk is running or spare disk */
-#define MD_DISK_SYNC 2 /* disk is in sync with the raid set */
-#define MD_DISK_REMOVED 3 /* disk is in sync with the raid set */
-
-#define MD_DISK_WRITEMOSTLY 9 /* disk is "write-mostly" is RAID1 config.
- * read requests will only be sent here in
- * dire need
- */
-
-typedef struct mdp_device_descriptor_s {
- __u32 number; /* 0 Device number in the entire set */
- __u32 major; /* 1 Device major number */
- __u32 minor; /* 2 Device minor number */
- __u32 raid_disk; /* 3 The role of the device in the raid set */
- __u32 state; /* 4 Operational state */
- __u32 reserved[MD_SB_DESCRIPTOR_WORDS - 5];
-} mdp_disk_t;
-
-#define MD_SB_MAGIC 0xa92b4efc
-
-/*
- * Superblock state bits
- */
-#define MD_SB_CLEAN 0
-#define MD_SB_ERRORS 1
-
-#define MD_SB_BITMAP_PRESENT 8 /* bitmap may be present nearby */
-
-/*
- * Notes:
- * - if an array is being reshaped (restriped) in order to change the
- * the number of active devices in the array, 'raid_disks' will be
- * the larger of the old and new numbers. 'delta_disks' will
- * be the "new - old". So if +ve, raid_disks is the new value, and
- * "raid_disks-delta_disks" is the old. If -ve, raid_disks is the
- * old value and "raid_disks+delta_disks" is the new (smaller) value.
- */
-
-
-typedef struct mdp_superblock_s {
- /*
- * Constant generic information
- */
- __u32 md_magic; /* 0 MD identifier */
- __u32 major_version; /* 1 major version to which the set conforms */
- __u32 minor_version; /* 2 minor version ... */
- __u32 patch_version; /* 3 patchlevel version ... */
- __u32 gvalid_words; /* 4 Number of used words in this section */
- __u32 set_uuid0; /* 5 Raid set identifier */
- __u32 ctime; /* 6 Creation time */
- __u32 level; /* 7 Raid personality */
- __u32 size; /* 8 Apparent size of each individual disk */
- __u32 nr_disks; /* 9 total disks in the raid set */
- __u32 raid_disks; /* 10 disks in a fully functional raid set */
- __u32 md_minor; /* 11 preferred MD minor device number */
- __u32 not_persistent; /* 12 does it have a persistent superblock */
- __u32 set_uuid1; /* 13 Raid set identifier #2 */
- __u32 set_uuid2; /* 14 Raid set identifier #3 */
- __u32 set_uuid3; /* 15 Raid set identifier #4 */
- __u32 gstate_creserved[MD_SB_GENERIC_CONSTANT_WORDS - 16];
-
- /*
- * Generic state information
- */
- __u32 utime; /* 0 Superblock update time */
- __u32 state; /* 1 State bits (clean, ...) */
- __u32 active_disks; /* 2 Number of currently active disks */
- __u32 working_disks; /* 3 Number of working disks */
- __u32 failed_disks; /* 4 Number of failed disks */
- __u32 spare_disks; /* 5 Number of spare disks */
- __u32 sb_csum; /* 6 checksum of the whole superblock */
-#ifdef __BIG_ENDIAN
- __u32 events_hi; /* 7 high-order of superblock update count */
- __u32 events_lo; /* 8 low-order of superblock update count */
- __u32 cp_events_hi; /* 9 high-order of checkpoint update count */
- __u32 cp_events_lo; /* 10 low-order of checkpoint update count */
-#else
- __u32 events_lo; /* 7 low-order of superblock update count */
- __u32 events_hi; /* 8 high-order of superblock update count */
- __u32 cp_events_lo; /* 9 low-order of checkpoint update count */
- __u32 cp_events_hi; /* 10 high-order of checkpoint update count */
-#endif
- __u32 recovery_cp; /* 11 recovery checkpoint sector count */
- /* There are only valid for minor_version > 90 */
- __u64 reshape_position; /* 12,13 next address in array-space for reshape */
- __u32 new_level; /* 14 new level we are reshaping to */
- __u32 delta_disks; /* 15 change in number of raid_disks */
- __u32 new_layout; /* 16 new layout */
- __u32 new_chunk; /* 17 new chunk size (bytes) */
- __u32 gstate_sreserved[MD_SB_GENERIC_STATE_WORDS - 18];
-
- /*
- * Personality information
- */
- __u32 layout; /* 0 the array's physical layout */
- __u32 chunk_size; /* 1 chunk size in bytes */
- __u32 root_pv; /* 2 LV root PV */
- __u32 root_block; /* 3 LV root block */
- __u32 pstate_reserved[MD_SB_PERSONALITY_WORDS - 4];
-
- /*
- * Disks information
- */
- mdp_disk_t disks[MD_SB_DISKS];
-
- /*
- * Reserved
- */
- __u32 reserved[MD_SB_RESERVED_WORDS];
-
- /*
- * Active descriptor
- */
- mdp_disk_t this_disk;
-
-} mdp_super_t;
-
-static inline __u64 md_event(mdp_super_t *sb) {
- __u64 ev = sb->events_hi;
- return (ev<<32)| sb->events_lo;
-}
-
-/*
- * The version-1 superblock :
- * All numeric fields are little-endian.
- *
- * total size: 256 bytes plus 2 per device.
- * 1K allows 384 devices.
- */
-struct mdp_superblock_1 {
- /* constant array information - 128 bytes */
- __u32 magic; /* MD_SB_MAGIC: 0xa92b4efc - little endian */
- __u32 major_version; /* 1 */
- __u32 feature_map; /* bit 0 set if 'bitmap_offset' is meaningful */
- __u32 pad0; /* always set to 0 when writing */
-
- __u8 set_uuid[16]; /* user-space generated. */
- char set_name[32]; /* set and interpreted by user-space */
-
- __u64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/
- __u32 level; /* -4 (multipath), -1 (linear), 0,1,4,5 */
- __u32 layout; /* only for raid5 and raid10 currently */
- __u64 size; /* used size of component devices, in 512byte sectors */
-
- __u32 chunksize; /* in 512byte sectors */
- __u32 raid_disks;
- __u32 bitmap_offset; /* sectors after start of superblock that bitmap starts
- * NOTE: signed, so bitmap can be before superblock
- * only meaningful of feature_map[0] is set.
- */
-
- /* These are only valid with feature bit '4' */
- __u32 new_level; /* new level we are reshaping to */
- __u64 reshape_position; /* next address in array-space for reshape */
- __u32 delta_disks; /* change in number of raid_disks */
- __u32 new_layout; /* new layout */
- __u32 new_chunk; /* new chunk size (bytes) */
- __u8 pad1[128-124]; /* set to 0 when written */
-
- /* constant this-device information - 64 bytes */
- __u64 data_offset; /* sector start of data, often 0 */
- __u64 data_size; /* sectors in this device that can be used for data */
- __u64 super_offset; /* sector start of this superblock */
- __u64 recovery_offset;/* sectors before this offset (from data_offset) have been recovered */
- __u32 dev_number; /* permanent identifier of this device - not role in raid */
- __u32 cnt_corrected_read; /* number of read errors that were corrected by re-writing */
- __u8 device_uuid[16]; /* user-space setable, ignored by kernel */
- __u8 devflags; /* per-device flags. Only one defined...*/
-#define WriteMostly1 1 /* mask for writemostly flag in above */
- __u8 pad2[64-57]; /* set to 0 when writing */
-
- /* array state information - 64 bytes */
- __u64 utime; /* 40 bits second, 24 btes microseconds */
- __u64 events; /* incremented when superblock updated */
- __u64 resync_offset; /* data before this offset (from data_offset) known to be in sync */
- __u32 sb_csum; /* checksum upto devs[max_dev] */
- __u32 max_dev; /* size of devs[] array to consider */
- __u8 pad3[64-32]; /* set to 0 when writing */
-
- /* device state information. Indexed by dev_number.
- * 2 bytes per device
- * Note there are no per-device state flags. State information is rolled
- * into the 'roles' value. If a device is spare or faulty, then it doesn't
- * have a meaningful role.
- */
- __u16 dev_roles[0]; /* role in array, or 0xffff for a spare, or 0xfffe for faulty */
-};
-
-/* feature_map bits */
-#define MD_FEATURE_BITMAP_OFFSET 1
-#define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and
- * must be honoured
- */
-#define MD_FEATURE_RESHAPE_ACTIVE 4
-
-#define MD_FEATURE_ALL (1|2|4)
-
-#endif
-
diff --git a/original/linux/raid/md_u.h b/original/linux/raid/md_u.h
deleted file mode 100644
index 81da20c..0000000
--- a/original/linux/raid/md_u.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- md_u.h : user <=> kernel API between Linux raidtools and RAID drivers
- Copyright (C) 1998 Ingo Molnar
-
- 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, or (at your option)
- any later version.
-
- You should have received a copy of the GNU General Public License
- (for example /usr/src/linux/COPYING); if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef _MD_U_H
-#define _MD_U_H
-
-/* ioctls */
-
-/* status */
-#define RAID_VERSION _IOR (MD_MAJOR, 0x10, mdu_version_t)
-#define GET_ARRAY_INFO _IOR (MD_MAJOR, 0x11, mdu_array_info_t)
-#define GET_DISK_INFO _IOR (MD_MAJOR, 0x12, mdu_disk_info_t)
-#define PRINT_RAID_DEBUG _IO (MD_MAJOR, 0x13)
-#define RAID_AUTORUN _IO (MD_MAJOR, 0x14)
-#define GET_BITMAP_FILE _IOR (MD_MAJOR, 0x15, mdu_bitmap_file_t)
-
-/* configuration */
-#define CLEAR_ARRAY _IO (MD_MAJOR, 0x20)
-#define ADD_NEW_DISK _IOW (MD_MAJOR, 0x21, mdu_disk_info_t)
-#define HOT_REMOVE_DISK _IO (MD_MAJOR, 0x22)
-#define SET_ARRAY_INFO _IOW (MD_MAJOR, 0x23, mdu_array_info_t)
-#define SET_DISK_INFO _IO (MD_MAJOR, 0x24)
-#define WRITE_RAID_INFO _IO (MD_MAJOR, 0x25)
-#define UNPROTECT_ARRAY _IO (MD_MAJOR, 0x26)
-#define PROTECT_ARRAY _IO (MD_MAJOR, 0x27)
-#define HOT_ADD_DISK _IO (MD_MAJOR, 0x28)
-#define SET_DISK_FAULTY _IO (MD_MAJOR, 0x29)
-#define HOT_GENERATE_ERROR _IO (MD_MAJOR, 0x2a)
-#define SET_BITMAP_FILE _IOW (MD_MAJOR, 0x2b, int)
-
-/* usage */
-#define RUN_ARRAY _IOW (MD_MAJOR, 0x30, mdu_param_t)
-#define START_ARRAY _IO (MD_MAJOR, 0x31)
-#define STOP_ARRAY _IO (MD_MAJOR, 0x32)
-#define STOP_ARRAY_RO _IO (MD_MAJOR, 0x33)
-#define RESTART_ARRAY_RW _IO (MD_MAJOR, 0x34)
-
-typedef struct mdu_version_s {
- int major;
- int minor;
- int patchlevel;
-} mdu_version_t;
-
-typedef struct mdu_array_info_s {
- /*
- * Generic constant information
- */
- int major_version;
- int minor_version;
- int patch_version;
- int ctime;
- int level;
- int size;
- int nr_disks;
- int raid_disks;
- int md_minor;
- int not_persistent;
-
- /*
- * Generic state information
- */
- int utime; /* 0 Superblock update time */
- int state; /* 1 State bits (clean, ...) */
- int active_disks; /* 2 Number of currently active disks */
- int working_disks; /* 3 Number of working disks */
- int failed_disks; /* 4 Number of failed disks */
- int spare_disks; /* 5 Number of spare disks */
-
- /*
- * Personality information
- */
- int layout; /* 0 the array's physical layout */
- int chunk_size; /* 1 chunk size in bytes */
-
-} mdu_array_info_t;
-
-typedef struct mdu_disk_info_s {
- /*
- * configuration/status of one particular disk
- */
- int number;
- int major;
- int minor;
- int raid_disk;
- int state;
-
-} mdu_disk_info_t;
-
-typedef struct mdu_start_info_s {
- /*
- * configuration/status of one particular disk
- */
- int major;
- int minor;
- int raid_disk;
- int state;
-
-} mdu_start_info_t;
-
-typedef struct mdu_bitmap_file_s
-{
- char pathname[4096];
-} mdu_bitmap_file_t;
-
-typedef struct mdu_param_s
-{
- int personality; /* 1,2,3,4 */
- int chunk_size; /* in bytes */
- int max_fault; /* unused for now */
-} mdu_param_t;
-
-#endif
-
diff --git a/original/linux/raid/xor.h b/original/linux/raid/xor.h
deleted file mode 100644
index f0d67cb..0000000
--- a/original/linux/raid/xor.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef _XOR_H
-#define _XOR_H
-
-#include <linux/raid/md.h>
-
-#define MAX_XOR_BLOCKS 5
-
-extern void xor_block(unsigned int count, unsigned int bytes, void **ptr);
-
-struct xor_block_template {
- struct xor_block_template *next;
- const char *name;
- int speed;
- void (*do_2)(unsigned long, unsigned long *, unsigned long *);
- void (*do_3)(unsigned long, unsigned long *, unsigned long *,
- unsigned long *);
- void (*do_4)(unsigned long, unsigned long *, unsigned long *,
- unsigned long *, unsigned long *);
- void (*do_5)(unsigned long, unsigned long *, unsigned long *,
- unsigned long *, unsigned long *, unsigned long *);
-};
-
-#endif
diff --git a/original/linux/random.h b/original/linux/random.h
deleted file mode 100644
index 5d6456b..0000000
--- a/original/linux/random.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * include/linux/random.h
- *
- * Include file for the random number generator.
- */
-
-#ifndef _LINUX_RANDOM_H
-#define _LINUX_RANDOM_H
-
-#include <linux/ioctl.h>
-
-/* ioctl()'s for the random number generator */
-
-/* Get the entropy count. */
-#define RNDGETENTCNT _IOR( 'R', 0x00, int )
-
-/* Add to (or subtract from) the entropy count. (Superuser only.) */
-#define RNDADDTOENTCNT _IOW( 'R', 0x01, int )
-
-/* Get the contents of the entropy pool. (Superuser only.) */
-#define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
-
-/*
- * Write bytes into the entropy pool and add to the entropy count.
- * (Superuser only.)
- */
-#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] )
-
-/* Clear entropy count to 0. (Superuser only.) */
-#define RNDZAPENTCNT _IO( 'R', 0x04 )
-
-/* Clear the entropy pool and associated counters. (Superuser only.) */
-#define RNDCLEARPOOL _IO( 'R', 0x06 )
-
-struct rand_pool_info {
- int entropy_count;
- int buf_size;
- __u32 buf[0];
-};
-
-/* Exported functions */
-
-#ifdef __KERNEL__
-
-extern void rand_initialize_irq(int irq);
-
-extern void add_input_randomness(unsigned int type, unsigned int code,
- unsigned int value);
-extern void add_interrupt_randomness(int irq);
-
-extern void get_random_bytes(void *buf, int nbytes);
-void generate_random_uuid(unsigned char uuid_out[16]);
-
-extern __u32 secure_ip_id(__u32 daddr);
-extern u32 secure_ipv4_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport);
-extern u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr,
- __u16 dport);
-extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
- __u16 sport, __u16 dport);
-extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr,
- __u16 sport, __u16 dport);
-extern u64 secure_dccp_sequence_number(__u32 saddr, __u32 daddr,
- __u16 sport, __u16 dport);
-
-#ifndef MODULE
-extern struct file_operations random_fops, urandom_fops;
-#endif
-
-unsigned int get_random_int(void);
-unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len);
-
-#endif /* __KERNEL___ */
-
-#endif /* _LINUX_RANDOM_H */
diff --git a/original/linux/rbtree.h b/original/linux/rbtree.h
deleted file mode 100644
index 8d5382e..0000000
--- a/original/linux/rbtree.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- Red Black Trees
- (C) 1999 Andrea Arcangeli <andrea@suse.de>
-
- 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.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- linux/include/linux/rbtree.h
-
- To use rbtrees you'll have to implement your own insert and search cores.
- This will avoid us to use callbacks and to drop drammatically performances.
- I know it's not the cleaner way, but in C (not in C++) to get
- performances and genericity...
-
- Some example of insert and search follows here. The search is a plain
- normal search over an ordered tree. The insert instead must be implemented
- int two steps: as first thing the code must insert the element in
- order as a red leaf in the tree, then the support library function
- rb_insert_color() must be called. Such function will do the
- not trivial work to rebalance the rbtree if necessary.
-
------------------------------------------------------------------------
-static inline struct page * rb_search_page_cache(struct inode * inode,
- unsigned long offset)
-{
- struct rb_node * n = inode->i_rb_page_cache.rb_node;
- struct page * page;
-
- while (n)
- {
- page = rb_entry(n, struct page, rb_page_cache);
-
- if (offset < page->offset)
- n = n->rb_left;
- else if (offset > page->offset)
- n = n->rb_right;
- else
- return page;
- }
- return NULL;
-}
-
-static inline struct page * __rb_insert_page_cache(struct inode * inode,
- unsigned long offset,
- struct rb_node * node)
-{
- struct rb_node ** p = &inode->i_rb_page_cache.rb_node;
- struct rb_node * parent = NULL;
- struct page * page;
-
- while (*p)
- {
- parent = *p;
- page = rb_entry(parent, struct page, rb_page_cache);
-
- if (offset < page->offset)
- p = &(*p)->rb_left;
- else if (offset > page->offset)
- p = &(*p)->rb_right;
- else
- return page;
- }
-
- rb_link_node(node, parent, p);
-
- return NULL;
-}
-
-static inline struct page * rb_insert_page_cache(struct inode * inode,
- unsigned long offset,
- struct rb_node * node)
-{
- struct page * ret;
- if ((ret = __rb_insert_page_cache(inode, offset, node)))
- goto out;
- rb_insert_color(node, &inode->i_rb_page_cache);
- out:
- return ret;
-}
------------------------------------------------------------------------
-*/
-
-#ifndef _LINUX_RBTREE_H
-#define _LINUX_RBTREE_H
-
-#include <linux/kernel.h>
-#include <linux/stddef.h>
-
-struct rb_node
-{
- unsigned long rb_parent_color;
-#define RB_RED 0
-#define RB_BLACK 1
- struct rb_node *rb_right;
- struct rb_node *rb_left;
-} __attribute__((aligned(sizeof(long))));
- /* The alignment might seem pointless, but allegedly CRIS needs it */
-
-struct rb_root
-{
- struct rb_node *rb_node;
-};
-
-
-#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
-#define rb_color(r) ((r)->rb_parent_color & 1)
-#define rb_is_red(r) (!rb_color(r))
-#define rb_is_black(r) rb_color(r)
-#define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
-#define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
-
-static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
-{
- rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
-}
-static inline void rb_set_color(struct rb_node *rb, int color)
-{
- rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
-}
-
-#define RB_ROOT (struct rb_root) { NULL, }
-#define rb_entry(ptr, type, member) container_of(ptr, type, member)
-
-#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
-#define RB_EMPTY_NODE(node) (rb_parent(node) != node)
-#define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
-
-extern void rb_insert_color(struct rb_node *, struct rb_root *);
-extern void rb_erase(struct rb_node *, struct rb_root *);
-
-/* Find logical next and previous nodes in a tree */
-extern struct rb_node *rb_next(struct rb_node *);
-extern struct rb_node *rb_prev(struct rb_node *);
-extern struct rb_node *rb_first(struct rb_root *);
-extern struct rb_node *rb_last(struct rb_root *);
-
-/* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
- struct rb_root *root);
-
-static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
- struct rb_node ** rb_link)
-{
- node->rb_parent_color = (unsigned long )parent;
- node->rb_left = node->rb_right = NULL;
-
- *rb_link = node;
-}
-
-#endif /* _LINUX_RBTREE_H */
diff --git a/original/linux/rcupdate.h b/original/linux/rcupdate.h
deleted file mode 100644
index b4ca73d..0000000
--- a/original/linux/rcupdate.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Read-Copy Update mechanism for mutual exclusion
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) IBM Corporation, 2001
- *
- * Author: Dipankar Sarma <dipankar@in.ibm.com>
- *
- * Based on the original work by Paul McKenney <paul.mckenney@us.ibm.com>
- * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
- * Papers:
- * http://www.rdrop.com/users/paulmck/paper/rclockpdcsproof.pdf
- * http://lse.sourceforge.net/locking/rclock_OLS.2001.05.01c.sc.pdf (OLS2001)
- *
- * For detailed explanation of Read-Copy Update mechanism see -
- * http://lse.sourceforge.net/locking/rcupdate.html
- *
- */
-
-#ifndef __LINUX_RCUPDATE_H
-#define __LINUX_RCUPDATE_H
-
-#ifdef __KERNEL__
-
-#include <linux/cache.h>
-#include <linux/spinlock.h>
-#include <linux/threads.h>
-#include <linux/percpu.h>
-#include <linux/cpumask.h>
-#include <linux/seqlock.h>
-
-/**
- * struct rcu_head - callback structure for use with RCU
- * @next: next update requests in a list
- * @func: actual update function to call after the grace period.
- */
-struct rcu_head {
- struct rcu_head *next;
- void (*func)(struct rcu_head *head);
-};
-
-#define RCU_HEAD_INIT { .next = NULL, .func = NULL }
-#define RCU_HEAD(head) struct rcu_head head = RCU_HEAD_INIT
-#define INIT_RCU_HEAD(ptr) do { \
- (ptr)->next = NULL; (ptr)->func = NULL; \
-} while (0)
-
-
-
-/* Global control variables for rcupdate callback mechanism. */
-struct rcu_ctrlblk {
- long cur; /* Current batch number. */
- long completed; /* Number of the last completed batch */
- int next_pending; /* Is the next batch already waiting? */
-
- spinlock_t lock ____cacheline_internodealigned_in_smp;
- cpumask_t cpumask; /* CPUs that need to switch in order */
- /* for current batch to proceed. */
-} ____cacheline_internodealigned_in_smp;
-
-/* Is batch a before batch b ? */
-static inline int rcu_batch_before(long a, long b)
-{
- return (a - b) < 0;
-}
-
-/* Is batch a after batch b ? */
-static inline int rcu_batch_after(long a, long b)
-{
- return (a - b) > 0;
-}
-
-/*
- * Per-CPU data for Read-Copy UPdate.
- * nxtlist - new callbacks are added here
- * curlist - current batch for which quiescent cycle started if any
- */
-struct rcu_data {
- /* 1) quiescent state handling : */
- long quiescbatch; /* Batch # for grace period */
- int passed_quiesc; /* User-mode/idle loop etc. */
- int qs_pending; /* core waits for quiesc state */
-
- /* 2) batch handling */
- long batch; /* Batch # for current RCU batch */
- struct rcu_head *nxtlist;
- struct rcu_head **nxttail;
- long qlen; /* # of queued callbacks */
- struct rcu_head *curlist;
- struct rcu_head **curtail;
- struct rcu_head *donelist;
- struct rcu_head **donetail;
- long blimit; /* Upper limit on a processed batch */
- int cpu;
- struct rcu_head barrier;
-#ifdef CONFIG_SMP
- long last_rs_qlen; /* qlen during the last resched */
-#endif
-};
-
-DECLARE_PER_CPU(struct rcu_data, rcu_data);
-DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
-
-/*
- * Increment the quiescent state counter.
- * The counter is a bit degenerated: We do not need to know
- * how many quiescent states passed, just if there was at least
- * one since the start of the grace period. Thus just a flag.
- */
-static inline void rcu_qsctr_inc(int cpu)
-{
- struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
- rdp->passed_quiesc = 1;
-}
-static inline void rcu_bh_qsctr_inc(int cpu)
-{
- struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu);
- rdp->passed_quiesc = 1;
-}
-
-extern int rcu_pending(int cpu);
-extern int rcu_needs_cpu(int cpu);
-
-/**
- * rcu_read_lock - mark the beginning of an RCU read-side critical section.
- *
- * When synchronize_rcu() is invoked on one CPU while other CPUs
- * are within RCU read-side critical sections, then the
- * synchronize_rcu() is guaranteed to block until after all the other
- * CPUs exit their critical sections. Similarly, if call_rcu() is invoked
- * on one CPU while other CPUs are within RCU read-side critical
- * sections, invocation of the corresponding RCU callback is deferred
- * until after the all the other CPUs exit their critical sections.
- *
- * Note, however, that RCU callbacks are permitted to run concurrently
- * with RCU read-side critical sections. One way that this can happen
- * is via the following sequence of events: (1) CPU 0 enters an RCU
- * read-side critical section, (2) CPU 1 invokes call_rcu() to register
- * an RCU callback, (3) CPU 0 exits the RCU read-side critical section,
- * (4) CPU 2 enters a RCU read-side critical section, (5) the RCU
- * callback is invoked. This is legal, because the RCU read-side critical
- * section that was running concurrently with the call_rcu() (and which
- * therefore might be referencing something that the corresponding RCU
- * callback would free up) has completed before the corresponding
- * RCU callback is invoked.
- *
- * RCU read-side critical sections may be nested. Any deferred actions
- * will be deferred until the outermost RCU read-side critical section
- * completes.
- *
- * It is illegal to block while in an RCU read-side critical section.
- */
-#define rcu_read_lock() \
- do { \
- preempt_disable(); \
- __acquire(RCU); \
- } while(0)
-
-/**
- * rcu_read_unlock - marks the end of an RCU read-side critical section.
- *
- * See rcu_read_lock() for more information.
- */
-#define rcu_read_unlock() \
- do { \
- __release(RCU); \
- preempt_enable(); \
- } while(0)
-
-/*
- * So where is rcu_write_lock()? It does not exist, as there is no
- * way for writers to lock out RCU readers. This is a feature, not
- * a bug -- this property is what provides RCU's performance benefits.
- * Of course, writers must coordinate with each other. The normal
- * spinlock primitives work well for this, but any other technique may be
- * used as well. RCU does not care how the writers keep out of each
- * others' way, as long as they do so.
- */
-
-/**
- * rcu_read_lock_bh - mark the beginning of a softirq-only RCU critical section
- *
- * This is equivalent of rcu_read_lock(), but to be used when updates
- * are being done using call_rcu_bh(). Since call_rcu_bh() callbacks
- * consider completion of a softirq handler to be a quiescent state,
- * a process in RCU read-side critical section must be protected by
- * disabling softirqs. Read-side critical sections in interrupt context
- * can use just rcu_read_lock().
- *
- */
-#define rcu_read_lock_bh() \
- do { \
- local_bh_disable(); \
- __acquire(RCU_BH); \
- } while(0)
-
-/*
- * rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section
- *
- * See rcu_read_lock_bh() for more information.
- */
-#define rcu_read_unlock_bh() \
- do { \
- __release(RCU_BH); \
- local_bh_enable(); \
- } while(0)
-
-/**
- * rcu_dereference - fetch an RCU-protected pointer in an
- * RCU read-side critical section. This pointer may later
- * be safely dereferenced.
- *
- * Inserts memory barriers on architectures that require them
- * (currently only the Alpha), and, more importantly, documents
- * exactly which pointers are protected by RCU.
- */
-
-#define rcu_dereference(p) ({ \
- typeof(p) _________p1 = p; \
- smp_read_barrier_depends(); \
- (_________p1); \
- })
-
-/**
- * rcu_assign_pointer - assign (publicize) a pointer to a newly
- * initialized structure that will be dereferenced by RCU read-side
- * critical sections. Returns the value assigned.
- *
- * Inserts memory barriers on architectures that require them
- * (pretty much all of them other than x86), and also prevents
- * the compiler from reordering the code that initializes the
- * structure after the pointer assignment. More importantly, this
- * call documents which pointers will be dereferenced by RCU read-side
- * code.
- */
-
-#define rcu_assign_pointer(p, v) ({ \
- smp_wmb(); \
- (p) = (v); \
- })
-
-/**
- * synchronize_sched - block until all CPUs have exited any non-preemptive
- * kernel code sequences.
- *
- * This means that all preempt_disable code sequences, including NMI and
- * hardware-interrupt handlers, in progress on entry will have completed
- * before this primitive returns. However, this does not guarantee that
- * softirq handlers will have completed, since in some kernels, these
- * handlers can run in process context, and can block.
- *
- * This primitive provides the guarantees made by the (now removed)
- * synchronize_kernel() API. In contrast, synchronize_rcu() only
- * guarantees that rcu_read_lock() sections will have completed.
- * In "classic RCU", these two guarantees happen to be one and
- * the same, but can differ in realtime RCU implementations.
- */
-#define synchronize_sched() synchronize_rcu()
-
-extern void rcu_init(void);
-extern void rcu_check_callbacks(int cpu, int user);
-extern void rcu_restart_cpu(int cpu);
-extern long rcu_batches_completed(void);
-extern long rcu_batches_completed_bh(void);
-
-/* Exported interfaces */
-extern void FASTCALL(call_rcu(struct rcu_head *head,
- void (*func)(struct rcu_head *head)));
-extern void FASTCALL(call_rcu_bh(struct rcu_head *head,
- void (*func)(struct rcu_head *head)));
-extern void synchronize_rcu(void);
-void synchronize_idle(void);
-extern void rcu_barrier(void);
-
-#endif /* __KERNEL__ */
-#endif /* __LINUX_RCUPDATE_H */
diff --git a/original/linux/reboot.h b/original/linux/reboot.h
deleted file mode 100644
index 1dd1c70..0000000
--- a/original/linux/reboot.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef _LINUX_REBOOT_H
-#define _LINUX_REBOOT_H
-
-/*
- * Magic values required to use _reboot() system call.
- */
-
-#define LINUX_REBOOT_MAGIC1 0xfee1dead
-#define LINUX_REBOOT_MAGIC2 672274793
-#define LINUX_REBOOT_MAGIC2A 85072278
-#define LINUX_REBOOT_MAGIC2B 369367448
-#define LINUX_REBOOT_MAGIC2C 537993216
-
-
-/*
- * Commands accepted by the _reboot() system call.
- *
- * RESTART Restart system using default command and mode.
- * HALT Stop OS and give system control to ROM monitor, if any.
- * CAD_ON Ctrl-Alt-Del sequence causes RESTART command.
- * CAD_OFF Ctrl-Alt-Del sequence sends SIGINT to init task.
- * POWER_OFF Stop OS and remove all power from system, if possible.
- * RESTART2 Restart system using given command string.
- * SW_SUSPEND Suspend system using software suspend if compiled in.
- * KEXEC Restart system using a previously loaded Linux kernel
- */
-
-#define LINUX_REBOOT_CMD_RESTART 0x01234567
-#define LINUX_REBOOT_CMD_HALT 0xCDEF0123
-#define LINUX_REBOOT_CMD_CAD_ON 0x89ABCDEF
-#define LINUX_REBOOT_CMD_CAD_OFF 0x00000000
-#define LINUX_REBOOT_CMD_POWER_OFF 0x4321FEDC
-#define LINUX_REBOOT_CMD_RESTART2 0xA1B2C3D4
-#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2
-#define LINUX_REBOOT_CMD_KEXEC 0x45584543
-
-
-#ifdef __KERNEL__
-
-#include <linux/notifier.h>
-
-extern int register_reboot_notifier(struct notifier_block *);
-extern int unregister_reboot_notifier(struct notifier_block *);
-
-
-/*
- * Architecture-specific implementations of sys_reboot commands.
- */
-
-extern void machine_restart(char *cmd);
-extern void machine_halt(void);
-extern void machine_power_off(void);
-
-extern void machine_shutdown(void);
-struct pt_regs;
-extern void machine_crash_shutdown(struct pt_regs *);
-
-/*
- * Architecture independent implemenations of sys_reboot commands.
- */
-
-extern void kernel_shutdown_prepare(enum system_states state);
-
-extern void kernel_restart(char *cmd);
-extern void kernel_halt(void);
-extern void kernel_power_off(void);
-
-void ctrl_alt_del(void);
-
-/*
- * Emergency restart, callable from an interrupt handler.
- */
-
-extern void emergency_restart(void);
-#include <asm/emergency-restart.h>
-
-#endif
-
-#endif /* _LINUX_REBOOT_H */
diff --git a/original/linux/relay.h b/original/linux/relay.h
deleted file mode 100644
index 24accb4..0000000
--- a/original/linux/relay.h
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * linux/include/linux/relay.h
- *
- * Copyright (C) 2002, 2003 - Tom Zanussi (zanussi@us.ibm.com), IBM Corp
- * Copyright (C) 1999, 2000, 2001, 2002 - Karim Yaghmour (karim@opersys.com)
- *
- * CONFIG_RELAY definitions and declarations
- */
-
-#ifndef _LINUX_RELAY_H
-#define _LINUX_RELAY_H
-
-#include <linux/types.h>
-#include <linux/sched.h>
-#include <linux/wait.h>
-#include <linux/list.h>
-#include <linux/fs.h>
-#include <linux/poll.h>
-#include <linux/kref.h>
-
-/* Needs a _much_ better name... */
-#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE)
-
-/*
- * Tracks changes to rchan/rchan_buf structs
- */
-#define RELAYFS_CHANNEL_VERSION 6
-
-/*
- * Per-cpu relay channel buffer
- */
-struct rchan_buf
-{
- void *start; /* start of channel buffer */
- void *data; /* start of current sub-buffer */
- size_t offset; /* current offset into sub-buffer */
- size_t subbufs_produced; /* count of sub-buffers produced */
- size_t subbufs_consumed; /* count of sub-buffers consumed */
- struct rchan *chan; /* associated channel */
- wait_queue_head_t read_wait; /* reader wait queue */
- struct work_struct wake_readers; /* reader wake-up work struct */
- struct dentry *dentry; /* channel file dentry */
- struct kref kref; /* channel buffer refcount */
- struct page **page_array; /* array of current buffer pages */
- unsigned int page_count; /* number of current buffer pages */
- unsigned int finalized; /* buffer has been finalized */
- size_t *padding; /* padding counts per sub-buffer */
- size_t prev_padding; /* temporary variable */
- size_t bytes_consumed; /* bytes consumed in cur read subbuf */
- unsigned int cpu; /* this buf's cpu */
-} ____cacheline_aligned;
-
-/*
- * Relay channel data structure
- */
-struct rchan
-{
- u32 version; /* the version of this struct */
- size_t subbuf_size; /* sub-buffer size */
- size_t n_subbufs; /* number of sub-buffers per buffer */
- size_t alloc_size; /* total buffer size allocated */
- struct rchan_callbacks *cb; /* client callbacks */
- struct kref kref; /* channel refcount */
- void *private_data; /* for user-defined data */
- size_t last_toobig; /* tried to log event > subbuf size */
- struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
-};
-
-/*
- * Relay channel client callbacks
- */
-struct rchan_callbacks
-{
- /*
- * subbuf_start - called on buffer-switch to a new sub-buffer
- * @buf: the channel buffer containing the new sub-buffer
- * @subbuf: the start of the new sub-buffer
- * @prev_subbuf: the start of the previous sub-buffer
- * @prev_padding: unused space at the end of previous sub-buffer
- *
- * The client should return 1 to continue logging, 0 to stop
- * logging.
- *
- * NOTE: subbuf_start will also be invoked when the buffer is
- * created, so that the first sub-buffer can be initialized
- * if necessary. In this case, prev_subbuf will be NULL.
- *
- * NOTE: the client can reserve bytes at the beginning of the new
- * sub-buffer by calling subbuf_start_reserve() in this callback.
- */
- int (*subbuf_start) (struct rchan_buf *buf,
- void *subbuf,
- void *prev_subbuf,
- size_t prev_padding);
-
- /*
- * buf_mapped - relay buffer mmap notification
- * @buf: the channel buffer
- * @filp: relay file pointer
- *
- * Called when a relay file is successfully mmapped
- */
- void (*buf_mapped)(struct rchan_buf *buf,
- struct file *filp);
-
- /*
- * buf_unmapped - relay buffer unmap notification
- * @buf: the channel buffer
- * @filp: relay file pointer
- *
- * Called when a relay file is successfully unmapped
- */
- void (*buf_unmapped)(struct rchan_buf *buf,
- struct file *filp);
- /*
- * create_buf_file - create file to represent a relay channel buffer
- * @filename: the name of the file to create
- * @parent: the parent of the file to create
- * @mode: the mode of the file to create
- * @buf: the channel buffer
- * @is_global: outparam - set non-zero if the buffer should be global
- *
- * Called during relay_open(), once for each per-cpu buffer,
- * to allow the client to create a file to be used to
- * represent the corresponding channel buffer. If the file is
- * created outside of relay, the parent must also exist in
- * that filesystem.
- *
- * The callback should return the dentry of the file created
- * to represent the relay buffer.
- *
- * Setting the is_global outparam to a non-zero value will
- * cause relay_open() to create a single global buffer rather
- * than the default set of per-cpu buffers.
- *
- * See Documentation/filesystems/relayfs.txt for more info.
- */
- struct dentry *(*create_buf_file)(const char *filename,
- struct dentry *parent,
- int mode,
- struct rchan_buf *buf,
- int *is_global);
-
- /*
- * remove_buf_file - remove file representing a relay channel buffer
- * @dentry: the dentry of the file to remove
- *
- * Called during relay_close(), once for each per-cpu buffer,
- * to allow the client to remove a file used to represent a
- * channel buffer.
- *
- * The callback should return 0 if successful, negative if not.
- */
- int (*remove_buf_file)(struct dentry *dentry);
-};
-
-/*
- * CONFIG_RELAY kernel API, kernel/relay.c
- */
-
-struct rchan *relay_open(const char *base_filename,
- struct dentry *parent,
- size_t subbuf_size,
- size_t n_subbufs,
- struct rchan_callbacks *cb);
-extern void relay_close(struct rchan *chan);
-extern void relay_flush(struct rchan *chan);
-extern void relay_subbufs_consumed(struct rchan *chan,
- unsigned int cpu,
- size_t consumed);
-extern void relay_reset(struct rchan *chan);
-extern int relay_buf_full(struct rchan_buf *buf);
-
-extern size_t relay_switch_subbuf(struct rchan_buf *buf,
- size_t length);
-
-/**
- * relay_write - write data into the channel
- * @chan: relay channel
- * @data: data to be written
- * @length: number of bytes to write
- *
- * Writes data into the current cpu's channel buffer.
- *
- * Protects the buffer by disabling interrupts. Use this
- * if you might be logging from interrupt context. Try
- * __relay_write() if you know you won't be logging from
- * interrupt context.
- */
-static inline void relay_write(struct rchan *chan,
- const void *data,
- size_t length)
-{
- unsigned long flags;
- struct rchan_buf *buf;
-
- local_irq_save(flags);
- buf = chan->buf[smp_processor_id()];
- if (unlikely(buf->offset + length > chan->subbuf_size))
- length = relay_switch_subbuf(buf, length);
- memcpy(buf->data + buf->offset, data, length);
- buf->offset += length;
- local_irq_restore(flags);
-}
-
-/**
- * __relay_write - write data into the channel
- * @chan: relay channel
- * @data: data to be written
- * @length: number of bytes to write
- *
- * Writes data into the current cpu's channel buffer.
- *
- * Protects the buffer by disabling preemption. Use
- * relay_write() if you might be logging from interrupt
- * context.
- */
-static inline void __relay_write(struct rchan *chan,
- const void *data,
- size_t length)
-{
- struct rchan_buf *buf;
-
- buf = chan->buf[get_cpu()];
- if (unlikely(buf->offset + length > buf->chan->subbuf_size))
- length = relay_switch_subbuf(buf, length);
- memcpy(buf->data + buf->offset, data, length);
- buf->offset += length;
- put_cpu();
-}
-
-/**
- * relay_reserve - reserve slot in channel buffer
- * @chan: relay channel
- * @length: number of bytes to reserve
- *
- * Returns pointer to reserved slot, NULL if full.
- *
- * Reserves a slot in the current cpu's channel buffer.
- * Does not protect the buffer at all - caller must provide
- * appropriate synchronization.
- */
-static inline void *relay_reserve(struct rchan *chan, size_t length)
-{
- void *reserved;
- struct rchan_buf *buf = chan->buf[smp_processor_id()];
-
- if (unlikely(buf->offset + length > buf->chan->subbuf_size)) {
- length = relay_switch_subbuf(buf, length);
- if (!length)
- return NULL;
- }
- reserved = buf->data + buf->offset;
- buf->offset += length;
-
- return reserved;
-}
-
-/**
- * subbuf_start_reserve - reserve bytes at the start of a sub-buffer
- * @buf: relay channel buffer
- * @length: number of bytes to reserve
- *
- * Helper function used to reserve bytes at the beginning of
- * a sub-buffer in the subbuf_start() callback.
- */
-static inline void subbuf_start_reserve(struct rchan_buf *buf,
- size_t length)
-{
- BUG_ON(length >= buf->chan->subbuf_size - 1);
- buf->offset = length;
-}
-
-/*
- * exported relay file operations, kernel/relay.c
- */
-extern struct file_operations relay_file_operations;
-
-#endif /* _LINUX_RELAY_H */
-
diff --git a/original/linux/resource.h b/original/linux/resource.h
deleted file mode 100644
index ae13db7..0000000
--- a/original/linux/resource.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef _LINUX_RESOURCE_H
-#define _LINUX_RESOURCE_H
-
-#include <linux/time.h>
-
-struct task_struct;
-
-/*
- * Resource control/accounting header file for linux
- */
-
-/*
- * Definition of struct rusage taken from BSD 4.3 Reno
- *
- * We don't support all of these yet, but we might as well have them....
- * Otherwise, each time we add new items, programs which depend on this
- * structure will lose. This reduces the chances of that happening.
- */
-#define RUSAGE_SELF 0
-#define RUSAGE_CHILDREN (-1)
-#define RUSAGE_BOTH (-2) /* sys_wait4() uses this */
-
-struct rusage {
- struct timeval ru_utime; /* user time used */
- struct timeval ru_stime; /* system time used */
- long ru_maxrss; /* maximum resident set size */
- long ru_ixrss; /* integral shared memory size */
- long ru_idrss; /* integral unshared data size */
- long ru_isrss; /* integral unshared stack size */
- long ru_minflt; /* page reclaims */
- long ru_majflt; /* page faults */
- long ru_nswap; /* swaps */
- long ru_inblock; /* block input operations */
- long ru_oublock; /* block output operations */
- long ru_msgsnd; /* messages sent */
- long ru_msgrcv; /* messages received */
- long ru_nsignals; /* signals received */
- long ru_nvcsw; /* voluntary context switches */
- long ru_nivcsw; /* involuntary " */
-};
-
-struct rlimit {
- unsigned long rlim_cur;
- unsigned long rlim_max;
-};
-
-#define PRIO_MIN (-20)
-#define PRIO_MAX 20
-
-#define PRIO_PROCESS 0
-#define PRIO_PGRP 1
-#define PRIO_USER 2
-
-/*
- * Limit the stack by to some sane default: root can always
- * increase this limit if needed.. 8MB seems reasonable.
- */
-#define _STK_LIM (8*1024*1024)
-
-/*
- * GPG wants 32kB of mlocked memory, to make sure pass phrases
- * and other sensitive information are never written to disk.
- */
-#define MLOCK_LIMIT (8 * PAGE_SIZE)
-
-/*
- * Due to binary compatibility, the actual resource numbers
- * may be different for different linux versions..
- */
-#include <asm/resource.h>
-
-int getrusage(struct task_struct *p, int who, struct rusage __user *ru);
-
-#endif
diff --git a/original/linux/route.h b/original/linux/route.h
deleted file mode 100644
index f7ed35d..0000000
--- a/original/linux/route.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Global definitions for the IP router interface.
- *
- * Version: @(#)route.h 1.0.3 05/27/93
- *
- * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988
- * for the purposes of compatibility only.
- *
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * Changes:
- * Mike McLagan : Routing by source
- *
- * 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.
- */
-#ifndef _LINUX_ROUTE_H
-#define _LINUX_ROUTE_H
-
-#include <linux/if.h>
-#include <linux/compiler.h>
-
-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
-struct rtentry
-{
- unsigned long rt_pad1;
- struct sockaddr rt_dst; /* target address */
- struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */
- struct sockaddr rt_genmask; /* target network mask (IP) */
- unsigned short rt_flags;
- short rt_pad2;
- unsigned long rt_pad3;
- void *rt_pad4;
- short rt_metric; /* +1 for binary compatibility! */
- char __user *rt_dev; /* forcing the device at add */
- unsigned long rt_mtu; /* per route MTU/Window */
-#ifndef __KERNEL__
-#define rt_mss rt_mtu /* Compatibility :-( */
-#endif
- unsigned long rt_window; /* Window clamping */
- unsigned short rt_irtt; /* Initial RTT */
-};
-
-
-#define RTF_UP 0x0001 /* route usable */
-#define RTF_GATEWAY 0x0002 /* destination is a gateway */
-#define RTF_HOST 0x0004 /* host entry (net otherwise) */
-#define RTF_REINSTATE 0x0008 /* reinstate route after tmout */
-#define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */
-#define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */
-#define RTF_MTU 0x0040 /* specific MTU for this route */
-#define RTF_MSS RTF_MTU /* Compatibility :-( */
-#define RTF_WINDOW 0x0080 /* per route window clamping */
-#define RTF_IRTT 0x0100 /* Initial round trip time */
-#define RTF_REJECT 0x0200 /* Reject route */
-
-/*
- * <linux/ipv6_route.h> uses RTF values >= 64k
- */
-
-
-
-#endif /* _LINUX_ROUTE_H */
-
diff --git a/original/linux/rpmsg_omx.h b/original/linux/rpmsg_omx.h
deleted file mode 100644
index 15503d5..0000000
--- a/original/linux/rpmsg_omx.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * OMX offloading remote processor driver
- *
- * Copyright(c) 2011 Texas Instruments. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name Texas Instruments nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef RPMSG_OMX_H
-#define RPMSG_OMX_H
-
-#include <linux/ioctl.h>
-
-#define OMX_IOC_MAGIC 'X'
-
-#define OMX_IOCCONNECT _IOW(OMX_IOC_MAGIC, 1, char *)
-#define OMX_IOCIONREGISTER _IOWR(OMX_IOC_MAGIC, 2, struct ion_fd_data)
-#define OMX_IOCIONUNREGISTER _IOWR(OMX_IOC_MAGIC, 3, struct ion_fd_data)
-
-#define OMX_IOC_MAXNR (3)
-
-#ifdef __KERNEL__
-
-/**
- * enum omx_msg_types - various message types currently supported
- *
- * @OMX_CONN_REQ: a connection request message type. the message should carry
- * the name of the OMX service which we try to connect to. An instance of
- * that service will be created remotely, and its address will be sent as
- * a reply.
- *
- * @OMX_CONN_RSP: a response to a connection request. the message will carry
- * an error code (success/failure), and if connection established successfully,
- * the addr field will carry the address of the newly created OMX instance.
- *
- * @OMX_DISCONNECT: disconnect remote OMX instance. this message tells
- * remote processor to release the resources coupled with this connection
- *
- * @OMX_RAW_MSG: a message that should be propagated as-is to the user.
- * this would immediately enable user space development to start.
- * as we progress, most likely this message won't be needed anymore.
- */
-enum omx_msg_types {
- OMX_CONN_REQ = 0,
- OMX_CONN_RSP = 1,
- OMX_DISCONNECT = 4,
- OMX_RAW_MSG = 5,
- /* todo: do we need a disconnect response ? ION refcounts should allow
- * asynchronous release of relevant buffers */
-};
-
-/**
- * enum omx_error_codes - various error codes that will be used
- *
- * @OMX_SUCCESS: success
- *
- * @OMX_NOTSUPP: not supported
- *
- * @OMX_NOMEM: remote processor is out of memory
- */
-enum omx_error_codes {
- OMX_SUCCESS = 0,
- OMX_NOTSUPP = 1,
- OMX_NOMEM = 2,
-};
-
-/* keep documenting... */
-enum omx_state {
- OMX_UNCONNECTED,
- OMX_CONNECTED,
- OMX_FAIL,
-};
-
-/**
- * struct omx_msg_hdr - common header for all OMX messages
- * @type: type of message, see enum omx_msg_types
- * @flags: currently unused, should be zero
- * @len: length of msg payload (in bytes)
- * @data: the msg payload (depends on the message type)
- *
- * All OMX messages will start with this common header (which will begin
- * right after the standard rpmsg header ends).
- */
-struct omx_msg_hdr {
- u32 type;
- u32 flags;
- u32 len;
- char data[0];
-} __packed;
-
-struct omx_conn_rsp {
- u32 status;
- u32 addr;
-} __packed;
-
-struct omx_disc_req {
- u32 addr;
-} __packed;
-
-
-#endif /* __KERNEL__ */
-
-/* temporarily exposed to user space too */
-struct omx_conn_req {
- char name[48];
-} __packed;
-
-/* the packet structure (actual message sent to omx service) */
-struct omx_packet {
- uint16_t desc; /* descriptor, and omx service status */
- uint16_t msg_id; /* message id */
- uint32_t flags; /* Set to a fixed value for now. */
- uint32_t fxn_idx; /* Index into OMX service's function table.*/
- int32_t result; /* The OMX function status. */
- uint32_t data_size;/* Size of in/out data to/from the function. */
- uint32_t data[0]; /* Payload of data_size char's passed to
- function. */
-};
-
-#endif /* RPMSG_OMX_H */
diff --git a/original/linux/rtc.h b/original/linux/rtc.h
deleted file mode 100644
index 5371e4e..0000000
--- a/original/linux/rtc.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Generic RTC interface.
- * This version contains the part of the user interface to the Real Time Clock
- * service. It is used with both the legacy mc146818 and also EFI
- * Struct rtc_time and first 12 ioctl by Paul Gortmaker, 1996 - separated out
- * from <linux/mc146818rtc.h> to this file for 2.4 kernels.
- *
- * Copyright (C) 1999 Hewlett-Packard Co.
- * Copyright (C) 1999 Stephane Eranian <eranian@hpl.hp.com>
- */
-#ifndef _LINUX_RTC_H_
-#define _LINUX_RTC_H_
-
-/*
- * The struct used to pass data via the following ioctl. Similar to the
- * struct tm in <time.h>, but it needs to be here so that the kernel
- * source is self contained, allowing cross-compiles, etc. etc.
- */
-
-struct rtc_time {
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
-};
-
-/*
- * This data structure is inspired by the EFI (v0.92) wakeup
- * alarm API.
- */
-struct rtc_wkalrm {
- unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
- unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */
- struct rtc_time time; /* time the alarm is set to */
-};
-
-/*
- * Data structure to control PLL correction some better RTC feature
- * pll_value is used to get or set current value of correction,
- * the rest of the struct is used to query HW capabilities.
- * This is modeled after the RTC used in Q40/Q60 computers but
- * should be sufficiently flexible for other devices
- *
- * +ve pll_value means clock will run faster by
- * pll_value*pll_posmult/pll_clock
- * -ve pll_value means clock will run slower by
- * pll_value*pll_negmult/pll_clock
- */
-
-struct rtc_pll_info {
- int pll_ctrl; /* placeholder for fancier control */
- int pll_value; /* get/set correction value */
- int pll_max; /* max +ve (faster) adjustment value */
- int pll_min; /* max -ve (slower) adjustment value */
- int pll_posmult; /* factor for +ve correction */
- int pll_negmult; /* factor for -ve correction */
- long pll_clock; /* base PLL frequency */
-};
-
-/*
- * ioctl calls that are permitted to the /dev/rtc interface, if
- * any of the RTC drivers are enabled.
- */
-
-#define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */
-#define RTC_AIE_OFF _IO('p', 0x02) /* ... off */
-#define RTC_UIE_ON _IO('p', 0x03) /* Update int. enable on */
-#define RTC_UIE_OFF _IO('p', 0x04) /* ... off */
-#define RTC_PIE_ON _IO('p', 0x05) /* Periodic int. enable on */
-#define RTC_PIE_OFF _IO('p', 0x06) /* ... off */
-#define RTC_WIE_ON _IO('p', 0x0f) /* Watchdog int. enable on */
-#define RTC_WIE_OFF _IO('p', 0x10) /* ... off */
-
-#define RTC_ALM_SET _IOW('p', 0x07, struct rtc_time) /* Set alarm time */
-#define RTC_ALM_READ _IOR('p', 0x08, struct rtc_time) /* Read alarm time */
-#define RTC_RD_TIME _IOR('p', 0x09, struct rtc_time) /* Read RTC time */
-#define RTC_SET_TIME _IOW('p', 0x0a, struct rtc_time) /* Set RTC time */
-#define RTC_IRQP_READ _IOR('p', 0x0b, unsigned long) /* Read IRQ rate */
-#define RTC_IRQP_SET _IOW('p', 0x0c, unsigned long) /* Set IRQ rate */
-#define RTC_EPOCH_READ _IOR('p', 0x0d, unsigned long) /* Read epoch */
-#define RTC_EPOCH_SET _IOW('p', 0x0e, unsigned long) /* Set epoch */
-
-#define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/
-#define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/
-
-#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */
-#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */
-
-/* interrupt flags */
-#define RTC_IRQF 0x80 /* any of the following is active */
-#define RTC_PF 0x40
-#define RTC_AF 0x20
-#define RTC_UF 0x10
-
-#ifdef __KERNEL__
-
-#include <linux/interrupt.h>
-
-extern int rtc_month_days(unsigned int month, unsigned int year);
-extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year);
-extern int rtc_valid_tm(struct rtc_time *tm);
-extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time);
-extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm);
-
-#include <linux/device.h>
-#include <linux/seq_file.h>
-#include <linux/cdev.h>
-#include <linux/poll.h>
-#include <linux/mutex.h>
-
-extern struct class *rtc_class;
-
-struct rtc_class_ops {
- int (*open)(struct device *);
- void (*release)(struct device *);
- int (*ioctl)(struct device *, unsigned int, unsigned long);
- int (*read_time)(struct device *, struct rtc_time *);
- int (*set_time)(struct device *, struct rtc_time *);
- int (*read_alarm)(struct device *, struct rtc_wkalrm *);
- int (*set_alarm)(struct device *, struct rtc_wkalrm *);
- int (*proc)(struct device *, struct seq_file *);
- int (*set_mmss)(struct device *, unsigned long secs);
- int (*irq_set_state)(struct device *, int enabled);
- int (*irq_set_freq)(struct device *, int freq);
- int (*read_callback)(struct device *, int data);
-};
-
-#define RTC_DEVICE_NAME_SIZE 20
-struct rtc_task;
-
-struct rtc_device
-{
- struct class_device class_dev;
- struct module *owner;
-
- int id;
- char name[RTC_DEVICE_NAME_SIZE];
-
- struct rtc_class_ops *ops;
- struct mutex ops_lock;
-
- struct class_device *rtc_dev;
- struct cdev char_dev;
- struct mutex char_lock;
-
- unsigned long irq_data;
- spinlock_t irq_lock;
- wait_queue_head_t irq_queue;
- struct fasync_struct *async_queue;
-
- struct rtc_task *irq_task;
- spinlock_t irq_task_lock;
- int irq_freq;
- int max_user_freq;
-#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
- struct work_struct uie_task;
- struct timer_list uie_timer;
- /* Those fields are protected by rtc->irq_lock */
- unsigned int oldsecs;
- unsigned int irq_active:1;
- unsigned int stop_uie_polling:1;
- unsigned int uie_task_active:1;
- unsigned int uie_timer_active:1;
-#endif
-};
-#define to_rtc_device(d) container_of(d, struct rtc_device, class_dev)
-
-extern struct rtc_device *rtc_device_register(const char *name,
- struct device *dev,
- struct rtc_class_ops *ops,
- struct module *owner);
-extern void rtc_device_unregister(struct rtc_device *rdev);
-extern int rtc_interface_register(struct class_interface *intf);
-
-extern int rtc_read_time(struct class_device *class_dev, struct rtc_time *tm);
-extern int rtc_set_time(struct class_device *class_dev, struct rtc_time *tm);
-extern int rtc_set_mmss(struct class_device *class_dev, unsigned long secs);
-extern int rtc_read_alarm(struct class_device *class_dev,
- struct rtc_wkalrm *alrm);
-extern int rtc_set_alarm(struct class_device *class_dev,
- struct rtc_wkalrm *alrm);
-extern void rtc_update_irq(struct class_device *class_dev,
- unsigned long num, unsigned long events);
-
-extern struct class_device *rtc_class_open(char *name);
-extern void rtc_class_close(struct class_device *class_dev);
-
-extern int rtc_irq_register(struct class_device *class_dev,
- struct rtc_task *task);
-extern void rtc_irq_unregister(struct class_device *class_dev,
- struct rtc_task *task);
-extern int rtc_irq_set_state(struct class_device *class_dev,
- struct rtc_task *task, int enabled);
-extern int rtc_irq_set_freq(struct class_device *class_dev,
- struct rtc_task *task, int freq);
-
-typedef struct rtc_task {
- void (*func)(void *private_data);
- void *private_data;
-} rtc_task_t;
-
-int rtc_register(rtc_task_t *task);
-int rtc_unregister(rtc_task_t *task);
-int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
-void rtc_get_rtc_time(struct rtc_time *rtc_tm);
-irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_RTC_H_ */
diff --git a/original/linux/rtnetlink.h b/original/linux/rtnetlink.h
deleted file mode 100644
index 58d4449..0000000
--- a/original/linux/rtnetlink.h
+++ /dev/null
@@ -1,773 +0,0 @@
-#ifndef __LINUX_RTNETLINK_H
-#define __LINUX_RTNETLINK_H
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-#include <linux/if_link.h>
-#include <linux/if_addr.h>
-#include <linux/neighbour.h>
-
-/* rtnetlink families. Values up to 127 are reserved for real address
- * families, values above 128 may be used arbitrarily.
- */
-#define RTNL_FAMILY_IPMR 128
-#define RTNL_FAMILY_IP6MR 129
-#define RTNL_FAMILY_MAX 129
-
-/****
- * Routing/neighbour discovery messages.
- ****/
-
-/* Types of messages */
-
-enum {
- RTM_BASE = 16,
-#define RTM_BASE RTM_BASE
-
- RTM_NEWLINK = 16,
-#define RTM_NEWLINK RTM_NEWLINK
- RTM_DELLINK,
-#define RTM_DELLINK RTM_DELLINK
- RTM_GETLINK,
-#define RTM_GETLINK RTM_GETLINK
- RTM_SETLINK,
-#define RTM_SETLINK RTM_SETLINK
-
- RTM_NEWADDR = 20,
-#define RTM_NEWADDR RTM_NEWADDR
- RTM_DELADDR,
-#define RTM_DELADDR RTM_DELADDR
- RTM_GETADDR,
-#define RTM_GETADDR RTM_GETADDR
-
- RTM_NEWROUTE = 24,
-#define RTM_NEWROUTE RTM_NEWROUTE
- RTM_DELROUTE,
-#define RTM_DELROUTE RTM_DELROUTE
- RTM_GETROUTE,
-#define RTM_GETROUTE RTM_GETROUTE
-
- RTM_NEWNEIGH = 28,
-#define RTM_NEWNEIGH RTM_NEWNEIGH
- RTM_DELNEIGH,
-#define RTM_DELNEIGH RTM_DELNEIGH
- RTM_GETNEIGH,
-#define RTM_GETNEIGH RTM_GETNEIGH
-
- RTM_NEWRULE = 32,
-#define RTM_NEWRULE RTM_NEWRULE
- RTM_DELRULE,
-#define RTM_DELRULE RTM_DELRULE
- RTM_GETRULE,
-#define RTM_GETRULE RTM_GETRULE
-
- RTM_NEWQDISC = 36,
-#define RTM_NEWQDISC RTM_NEWQDISC
- RTM_DELQDISC,
-#define RTM_DELQDISC RTM_DELQDISC
- RTM_GETQDISC,
-#define RTM_GETQDISC RTM_GETQDISC
-
- RTM_NEWTCLASS = 40,
-#define RTM_NEWTCLASS RTM_NEWTCLASS
- RTM_DELTCLASS,
-#define RTM_DELTCLASS RTM_DELTCLASS
- RTM_GETTCLASS,
-#define RTM_GETTCLASS RTM_GETTCLASS
-
- RTM_NEWTFILTER = 44,
-#define RTM_NEWTFILTER RTM_NEWTFILTER
- RTM_DELTFILTER,
-#define RTM_DELTFILTER RTM_DELTFILTER
- RTM_GETTFILTER,
-#define RTM_GETTFILTER RTM_GETTFILTER
-
- RTM_NEWACTION = 48,
-#define RTM_NEWACTION RTM_NEWACTION
- RTM_DELACTION,
-#define RTM_DELACTION RTM_DELACTION
- RTM_GETACTION,
-#define RTM_GETACTION RTM_GETACTION
-
- RTM_NEWPREFIX = 52,
-#define RTM_NEWPREFIX RTM_NEWPREFIX
-
- RTM_GETMULTICAST = 58,
-#define RTM_GETMULTICAST RTM_GETMULTICAST
-
- RTM_GETANYCAST = 62,
-#define RTM_GETANYCAST RTM_GETANYCAST
-
- RTM_NEWNEIGHTBL = 64,
-#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
- RTM_GETNEIGHTBL = 66,
-#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
- RTM_SETNEIGHTBL,
-#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
-
- RTM_NEWNDUSEROPT = 68,
-#define RTM_NEWNDUSEROPT RTM_NEWNDUSEROPT
-
- RTM_NEWADDRLABEL = 72,
-#define RTM_NEWADDRLABEL RTM_NEWADDRLABEL
- RTM_DELADDRLABEL,
-#define RTM_DELADDRLABEL RTM_DELADDRLABEL
- RTM_GETADDRLABEL,
-#define RTM_GETADDRLABEL RTM_GETADDRLABEL
-
- RTM_GETDCB = 78,
-#define RTM_GETDCB RTM_GETDCB
- RTM_SETDCB,
-#define RTM_SETDCB RTM_SETDCB
-
- __RTM_MAX,
-#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
-};
-
-#define RTM_NR_MSGTYPES (RTM_MAX + 1 - RTM_BASE)
-#define RTM_NR_FAMILIES (RTM_NR_MSGTYPES >> 2)
-#define RTM_FAM(cmd) (((cmd) - RTM_BASE) >> 2)
-
-/*
- Generic structure for encapsulation of optional route information.
- It is reminiscent of sockaddr, but with sa_family replaced
- with attribute type.
- */
-
-struct rtattr {
- unsigned short rta_len;
- unsigned short rta_type;
-};
-
-/* Macros to handle rtattributes */
-
-#define RTA_ALIGNTO 4
-#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
-#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \
- (rta)->rta_len >= sizeof(struct rtattr) && \
- (rta)->rta_len <= (len))
-#define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \
- (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len)))
-#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
-#define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len))
-#define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0)))
-#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
-
-
-
-
-/******************************************************************************
- * Definitions used in routing table administration.
- ****/
-
-struct rtmsg {
- unsigned char rtm_family;
- unsigned char rtm_dst_len;
- unsigned char rtm_src_len;
- unsigned char rtm_tos;
-
- unsigned char rtm_table; /* Routing table id */
- unsigned char rtm_protocol; /* Routing protocol; see below */
- unsigned char rtm_scope; /* See below */
- unsigned char rtm_type; /* See below */
-
- unsigned rtm_flags;
-};
-
-/* rtm_type */
-
-enum {
- RTN_UNSPEC,
- RTN_UNICAST, /* Gateway or direct route */
- RTN_LOCAL, /* Accept locally */
- RTN_BROADCAST, /* Accept locally as broadcast,
- send as broadcast */
- RTN_ANYCAST, /* Accept locally as broadcast,
- but send as unicast */
- RTN_MULTICAST, /* Multicast route */
- RTN_BLACKHOLE, /* Drop */
- RTN_UNREACHABLE, /* Destination is unreachable */
- RTN_PROHIBIT, /* Administratively prohibited */
- RTN_THROW, /* Not in this table */
- RTN_NAT, /* Translate this address */
- RTN_XRESOLVE, /* Use external resolver */
- __RTN_MAX
-};
-
-#define RTN_MAX (__RTN_MAX - 1)
-
-
-/* rtm_protocol */
-
-#define RTPROT_UNSPEC 0
-#define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects;
- not used by current IPv4 */
-#define RTPROT_KERNEL 2 /* Route installed by kernel */
-#define RTPROT_BOOT 3 /* Route installed during boot */
-#define RTPROT_STATIC 4 /* Route installed by administrator */
-
-/* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;
- they are just passed from user and back as is.
- It will be used by hypothetical multiple routing daemons.
- Note that protocol values should be standardized in order to
- avoid conflicts.
- */
-
-#define RTPROT_GATED 8 /* Apparently, GateD */
-#define RTPROT_RA 9 /* RDISC/ND router advertisements */
-#define RTPROT_MRT 10 /* Merit MRT */
-#define RTPROT_ZEBRA 11 /* Zebra */
-#define RTPROT_BIRD 12 /* BIRD */
-#define RTPROT_DNROUTED 13 /* DECnet routing daemon */
-#define RTPROT_XORP 14 /* XORP */
-#define RTPROT_NTK 15 /* Netsukuku */
-#define RTPROT_DHCP 16 /* DHCP client */
-
-/* rtm_scope
-
- Really it is not scope, but sort of distance to the destination.
- NOWHERE are reserved for not existing destinations, HOST is our
- local addresses, LINK are destinations, located on directly attached
- link and UNIVERSE is everywhere in the Universe.
-
- Intermediate values are also possible f.e. interior routes
- could be assigned a value between UNIVERSE and LINK.
-*/
-
-enum rt_scope_t {
- RT_SCOPE_UNIVERSE=0,
-/* User defined values */
- RT_SCOPE_SITE=200,
- RT_SCOPE_LINK=253,
- RT_SCOPE_HOST=254,
- RT_SCOPE_NOWHERE=255
-};
-
-/* rtm_flags */
-
-#define RTM_F_NOTIFY 0x100 /* Notify user of route change */
-#define RTM_F_CLONED 0x200 /* This route is cloned */
-#define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */
-#define RTM_F_PREFIX 0x800 /* Prefix addresses */
-
-/* Reserved table identifiers */
-
-enum rt_class_t {
- RT_TABLE_UNSPEC=0,
-/* User defined values */
- RT_TABLE_COMPAT=252,
- RT_TABLE_DEFAULT=253,
- RT_TABLE_MAIN=254,
- RT_TABLE_LOCAL=255,
- RT_TABLE_MAX=0xFFFFFFFF
-};
-
-
-/* Routing message attributes */
-
-enum rtattr_type_t {
- RTA_UNSPEC,
- RTA_DST,
- RTA_SRC,
- RTA_IIF,
- RTA_OIF,
- RTA_GATEWAY,
- RTA_PRIORITY,
- RTA_PREFSRC,
- RTA_METRICS,
- RTA_MULTIPATH,
- RTA_PROTOINFO, /* no longer used */
- RTA_FLOW,
- RTA_CACHEINFO,
- RTA_SESSION, /* no longer used */
- RTA_MP_ALGO, /* no longer used */
- RTA_TABLE,
- RTA_MARK,
- __RTA_MAX
-};
-
-#define RTA_MAX (__RTA_MAX - 1)
-
-#define RTM_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
-#define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
-
-/* RTM_MULTIPATH --- array of struct rtnexthop.
- *
- * "struct rtnexthop" describes all necessary nexthop information,
- * i.e. parameters of path to a destination via this nexthop.
- *
- * At the moment it is impossible to set different prefsrc, mtu, window
- * and rtt for different paths from multipath.
- */
-
-struct rtnexthop {
- unsigned short rtnh_len;
- unsigned char rtnh_flags;
- unsigned char rtnh_hops;
- int rtnh_ifindex;
-};
-
-/* rtnh_flags */
-
-#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
-#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
-#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
-
-/* Macros to handle hexthops */
-
-#define RTNH_ALIGNTO 4
-#define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) )
-#define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \
- ((int)(rtnh)->rtnh_len) <= (len))
-#define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len)))
-#define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len))
-#define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len))
-#define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
-
-/* RTM_CACHEINFO */
-
-struct rta_cacheinfo {
- __u32 rta_clntref;
- __u32 rta_lastuse;
- __s32 rta_expires;
- __u32 rta_error;
- __u32 rta_used;
-
-#define RTNETLINK_HAVE_PEERINFO 1
- __u32 rta_id;
- __u32 rta_ts;
- __u32 rta_tsage;
-};
-
-/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */
-
-enum {
- RTAX_UNSPEC,
-#define RTAX_UNSPEC RTAX_UNSPEC
- RTAX_LOCK,
-#define RTAX_LOCK RTAX_LOCK
- RTAX_MTU,
-#define RTAX_MTU RTAX_MTU
- RTAX_WINDOW,
-#define RTAX_WINDOW RTAX_WINDOW
- RTAX_RTT,
-#define RTAX_RTT RTAX_RTT
- RTAX_RTTVAR,
-#define RTAX_RTTVAR RTAX_RTTVAR
- RTAX_SSTHRESH,
-#define RTAX_SSTHRESH RTAX_SSTHRESH
- RTAX_CWND,
-#define RTAX_CWND RTAX_CWND
- RTAX_ADVMSS,
-#define RTAX_ADVMSS RTAX_ADVMSS
- RTAX_REORDERING,
-#define RTAX_REORDERING RTAX_REORDERING
- RTAX_HOPLIMIT,
-#define RTAX_HOPLIMIT RTAX_HOPLIMIT
- RTAX_INITCWND,
-#define RTAX_INITCWND RTAX_INITCWND
- RTAX_FEATURES,
-#define RTAX_FEATURES RTAX_FEATURES
- RTAX_RTO_MIN,
-#define RTAX_RTO_MIN RTAX_RTO_MIN
- RTAX_INITRWND,
-#define RTAX_INITRWND RTAX_INITRWND
- __RTAX_MAX
-};
-
-#define RTAX_MAX (__RTAX_MAX - 1)
-
-#define RTAX_FEATURE_ECN 0x00000001
-#define RTAX_FEATURE_SACK 0x00000002
-#define RTAX_FEATURE_TIMESTAMP 0x00000004
-#define RTAX_FEATURE_ALLFRAG 0x00000008
-
-struct rta_session {
- __u8 proto;
- __u8 pad1;
- __u16 pad2;
-
- union {
- struct {
- __u16 sport;
- __u16 dport;
- } ports;
-
- struct {
- __u8 type;
- __u8 code;
- __u16 ident;
- } icmpt;
-
- __u32 spi;
- } u;
-};
-
-/****
- * General form of address family dependent message.
- ****/
-
-struct rtgenmsg {
- unsigned char rtgen_family;
-};
-
-/*****************************************************************
- * Link layer specific messages.
- ****/
-
-/* struct ifinfomsg
- * passes link level specific information, not dependent
- * on network protocol.
- */
-
-struct ifinfomsg {
- unsigned char ifi_family;
- unsigned char __ifi_pad;
- unsigned short ifi_type; /* ARPHRD_* */
- int ifi_index; /* Link index */
- unsigned ifi_flags; /* IFF_* flags */
- unsigned ifi_change; /* IFF_* change mask */
-};
-
-/********************************************************************
- * prefix information
- ****/
-
-struct prefixmsg {
- unsigned char prefix_family;
- unsigned char prefix_pad1;
- unsigned short prefix_pad2;
- int prefix_ifindex;
- unsigned char prefix_type;
- unsigned char prefix_len;
- unsigned char prefix_flags;
- unsigned char prefix_pad3;
-};
-
-enum
-{
- PREFIX_UNSPEC,
- PREFIX_ADDRESS,
- PREFIX_CACHEINFO,
- __PREFIX_MAX
-};
-
-#define PREFIX_MAX (__PREFIX_MAX - 1)
-
-struct prefix_cacheinfo {
- __u32 preferred_time;
- __u32 valid_time;
-};
-
-
-/*****************************************************************
- * Traffic control messages.
- ****/
-
-struct tcmsg {
- unsigned char tcm_family;
- unsigned char tcm__pad1;
- unsigned short tcm__pad2;
- int tcm_ifindex;
- __u32 tcm_handle;
- __u32 tcm_parent;
- __u32 tcm_info;
-};
-
-enum {
- TCA_UNSPEC,
- TCA_KIND,
- TCA_OPTIONS,
- TCA_STATS,
- TCA_XSTATS,
- TCA_RATE,
- TCA_FCNT,
- TCA_STATS2,
- TCA_STAB,
- __TCA_MAX
-};
-
-#define TCA_MAX (__TCA_MAX - 1)
-
-#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
-#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
-
-/********************************************************************
- * Neighbor Discovery userland options
- ****/
-
-struct nduseroptmsg {
- unsigned char nduseropt_family;
- unsigned char nduseropt_pad1;
- unsigned short nduseropt_opts_len; /* Total length of options */
- int nduseropt_ifindex;
- __u8 nduseropt_icmp_type;
- __u8 nduseropt_icmp_code;
- unsigned short nduseropt_pad2;
- unsigned int nduseropt_pad3;
- /* Followed by one or more ND options */
-};
-
-enum {
- NDUSEROPT_UNSPEC,
- NDUSEROPT_SRCADDR,
- __NDUSEROPT_MAX
-};
-
-#define NDUSEROPT_MAX (__NDUSEROPT_MAX - 1)
-
-#ifndef __KERNEL__
-/* RTnetlink multicast groups - backwards compatibility for userspace */
-#define RTMGRP_LINK 1
-#define RTMGRP_NOTIFY 2
-#define RTMGRP_NEIGH 4
-#define RTMGRP_TC 8
-
-#define RTMGRP_IPV4_IFADDR 0x10
-#define RTMGRP_IPV4_MROUTE 0x20
-#define RTMGRP_IPV4_ROUTE 0x40
-#define RTMGRP_IPV4_RULE 0x80
-
-#define RTMGRP_IPV6_IFADDR 0x100
-#define RTMGRP_IPV6_MROUTE 0x200
-#define RTMGRP_IPV6_ROUTE 0x400
-#define RTMGRP_IPV6_IFINFO 0x800
-
-#define RTMGRP_DECnet_IFADDR 0x1000
-#define RTMGRP_DECnet_ROUTE 0x4000
-
-#define RTMGRP_IPV6_PREFIX 0x20000
-#endif
-
-/* RTnetlink multicast groups */
-enum rtnetlink_groups {
- RTNLGRP_NONE,
-#define RTNLGRP_NONE RTNLGRP_NONE
- RTNLGRP_LINK,
-#define RTNLGRP_LINK RTNLGRP_LINK
- RTNLGRP_NOTIFY,
-#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY
- RTNLGRP_NEIGH,
-#define RTNLGRP_NEIGH RTNLGRP_NEIGH
- RTNLGRP_TC,
-#define RTNLGRP_TC RTNLGRP_TC
- RTNLGRP_IPV4_IFADDR,
-#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR
- RTNLGRP_IPV4_MROUTE,
-#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE
- RTNLGRP_IPV4_ROUTE,
-#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE
- RTNLGRP_IPV4_RULE,
-#define RTNLGRP_IPV4_RULE RTNLGRP_IPV4_RULE
- RTNLGRP_IPV6_IFADDR,
-#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR
- RTNLGRP_IPV6_MROUTE,
-#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE
- RTNLGRP_IPV6_ROUTE,
-#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE
- RTNLGRP_IPV6_IFINFO,
-#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO
- RTNLGRP_DECnet_IFADDR,
-#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR
- RTNLGRP_NOP2,
- RTNLGRP_DECnet_ROUTE,
-#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE
- RTNLGRP_DECnet_RULE,
-#define RTNLGRP_DECnet_RULE RTNLGRP_DECnet_RULE
- RTNLGRP_NOP4,
- RTNLGRP_IPV6_PREFIX,
-#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX
- RTNLGRP_IPV6_RULE,
-#define RTNLGRP_IPV6_RULE RTNLGRP_IPV6_RULE
- RTNLGRP_ND_USEROPT,
-#define RTNLGRP_ND_USEROPT RTNLGRP_ND_USEROPT
- RTNLGRP_PHONET_IFADDR,
-#define RTNLGRP_PHONET_IFADDR RTNLGRP_PHONET_IFADDR
- RTNLGRP_PHONET_ROUTE,
-#define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE
- __RTNLGRP_MAX
-};
-#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
-
-/* TC action piece */
-struct tcamsg {
- unsigned char tca_family;
- unsigned char tca__pad1;
- unsigned short tca__pad2;
-};
-#define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg))))
-#define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
-#define TCA_ACT_TAB 1 /* attr type must be >=1 */
-#define TCAA_MAX 1
-
-/* End of information exported to user level */
-
-#ifdef __KERNEL__
-
-#include <linux/mutex.h>
-
-static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str)
-{
- int len = strlen(str) + 1;
- return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len);
-}
-
-extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo);
-extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid);
-extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid,
- u32 group, struct nlmsghdr *nlh, gfp_t flags);
-extern void rtnl_set_sk_err(struct net *net, u32 group, int error);
-extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics);
-extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst,
- u32 id, u32 ts, u32 tsage, long expires,
- u32 error);
-
-extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
-
-#define RTA_PUT(skb, attrtype, attrlen, data) \
-({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
- goto rtattr_failure; \
- __rta_fill(skb, attrtype, attrlen, data); })
-
-#define RTA_APPEND(skb, attrlen, data) \
-({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \
- goto rtattr_failure; \
- memcpy(skb_put(skb, attrlen), data, attrlen); })
-
-#define RTA_PUT_NOHDR(skb, attrlen, data) \
-({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \
- memset(skb_tail_pointer(skb) - (RTA_ALIGN(attrlen) - attrlen), 0, \
- RTA_ALIGN(attrlen) - attrlen); })
-
-#define RTA_PUT_U8(skb, attrtype, value) \
-({ u8 _tmp = (value); \
- RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); })
-
-#define RTA_PUT_U16(skb, attrtype, value) \
-({ u16 _tmp = (value); \
- RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); })
-
-#define RTA_PUT_U32(skb, attrtype, value) \
-({ u32 _tmp = (value); \
- RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); })
-
-#define RTA_PUT_U64(skb, attrtype, value) \
-({ u64 _tmp = (value); \
- RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); })
-
-#define RTA_PUT_SECS(skb, attrtype, value) \
- RTA_PUT_U64(skb, attrtype, (value) / HZ)
-
-#define RTA_PUT_MSECS(skb, attrtype, value) \
- RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value))
-
-#define RTA_PUT_STRING(skb, attrtype, value) \
- RTA_PUT(skb, attrtype, strlen(value) + 1, value)
-
-#define RTA_PUT_FLAG(skb, attrtype) \
- RTA_PUT(skb, attrtype, 0, NULL);
-
-#define RTA_NEST(skb, type) \
-({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \
- RTA_PUT(skb, type, 0, NULL); \
- __start; })
-
-#define RTA_NEST_END(skb, start) \
-({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
- (skb)->len; })
-
-#define RTA_NEST_COMPAT(skb, type, attrlen, data) \
-({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \
- RTA_PUT(skb, type, attrlen, data); \
- RTA_NEST(skb, type); \
- __start; })
-
-#define RTA_NEST_COMPAT_END(skb, start) \
-({ struct rtattr *__nest = (void *)(start) + NLMSG_ALIGN((start)->rta_len); \
- (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \
- RTA_NEST_END(skb, __nest); \
- (skb)->len; })
-
-#define RTA_NEST_CANCEL(skb, start) \
-({ if (start) \
- skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
- -1; })
-
-#define RTA_GET_U8(rta) \
-({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) \
- goto rtattr_failure; \
- *(u8 *) RTA_DATA(rta); })
-
-#define RTA_GET_U16(rta) \
-({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) \
- goto rtattr_failure; \
- *(u16 *) RTA_DATA(rta); })
-
-#define RTA_GET_U32(rta) \
-({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) \
- goto rtattr_failure; \
- *(u32 *) RTA_DATA(rta); })
-
-#define RTA_GET_U64(rta) \
-({ u64 _tmp; \
- if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) \
- goto rtattr_failure; \
- memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); \
- _tmp; })
-
-#define RTA_GET_FLAG(rta) (!!(rta))
-
-#define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ)
-#define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta)))
-
-static inline struct rtattr *
-__rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
-{
- struct rtattr *rta;
- int size = RTA_LENGTH(attrlen);
-
- rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size));
- rta->rta_type = attrtype;
- rta->rta_len = size;
- memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size);
- return rta;
-}
-
-#define __RTA_PUT(skb, attrtype, attrlen) \
-({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \
- goto rtattr_failure; \
- __rta_reserve(skb, attrtype, attrlen); })
-
-extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change);
-
-/* RTNL is used as a global lock for all changes to network configuration */
-extern void rtnl_lock(void);
-extern void rtnl_unlock(void);
-extern int rtnl_trylock(void);
-extern int rtnl_is_locked(void);
-#ifdef CONFIG_PROVE_LOCKING
-extern int lockdep_rtnl_is_held(void);
-#endif /* #ifdef CONFIG_PROVE_LOCKING */
-
-extern void rtnetlink_init(void);
-extern void __rtnl_unlock(void);
-
-#define ASSERT_RTNL() do { \
- if (unlikely(!rtnl_is_locked())) { \
- printk(KERN_ERR "RTNL: assertion failed at %s (%d)\n", \
- __FILE__, __LINE__); \
- dump_stack(); \
- } \
-} while(0)
-
-static inline u32 rtm_get_table(struct rtattr **rta, u8 table)
-{
- return RTA_GET_U32(rta[RTA_TABLE-1]);
-rtattr_failure:
- return table;
-}
-
-#endif /* __KERNEL__ */
-
-
-#endif /* __LINUX_RTNETLINK_H */
diff --git a/original/linux/rwsem.h b/original/linux/rwsem.h
deleted file mode 100644
index 7b524b4..0000000
--- a/original/linux/rwsem.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* rwsem.h: R/W semaphores, public interface
- *
- * Written by David Howells (dhowells@redhat.com).
- * Derived from asm-i386/semaphore.h
- */
-
-#ifndef _LINUX_RWSEM_H
-#define _LINUX_RWSEM_H
-
-#include <linux/linkage.h>
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <asm/system.h>
-#include <asm/atomic.h>
-
-struct rw_semaphore;
-
-#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
-#include <linux/rwsem-spinlock.h> /* use a generic implementation */
-#else
-#include <asm/rwsem.h> /* use an arch-specific implementation */
-#endif
-
-/*
- * lock for reading
- */
-extern void down_read(struct rw_semaphore *sem);
-
-/*
- * trylock for reading -- returns 1 if successful, 0 if contention
- */
-extern int down_read_trylock(struct rw_semaphore *sem);
-
-/*
- * lock for writing
- */
-extern void down_write(struct rw_semaphore *sem);
-
-/*
- * trylock for writing -- returns 1 if successful, 0 if contention
- */
-extern int down_write_trylock(struct rw_semaphore *sem);
-
-/*
- * release a read lock
- */
-extern void up_read(struct rw_semaphore *sem);
-
-/*
- * release a write lock
- */
-extern void up_write(struct rw_semaphore *sem);
-
-/*
- * downgrade write lock to read lock
- */
-extern void downgrade_write(struct rw_semaphore *sem);
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-/*
- * nested locking. NOTE: rwsems are not allowed to recurse
- * (which occurs if the same task tries to acquire the same
- * lock instance multiple times), but multiple locks of the
- * same lock class might be taken, if the order of the locks
- * is always the same. This ordering rule can be expressed
- * to lockdep via the _nested() APIs, but enumerating the
- * subclasses that are used. (If the nesting relationship is
- * static then another method for expressing nested locking is
- * the explicit definition of lock class keys and the use of
- * lockdep_set_class() at lock initialization time.
- * See Documentation/lockdep-design.txt for more details.)
- */
-extern void down_read_nested(struct rw_semaphore *sem, int subclass);
-extern void down_write_nested(struct rw_semaphore *sem, int subclass);
-/*
- * Take/release a lock when not the owner will release it.
- *
- * [ This API should be avoided as much as possible - the
- * proper abstraction for this case is completions. ]
- */
-extern void down_read_non_owner(struct rw_semaphore *sem);
-extern void up_read_non_owner(struct rw_semaphore *sem);
-#else
-# define down_read_nested(sem, subclass) down_read(sem)
-# define down_write_nested(sem, subclass) down_write(sem)
-# define down_read_non_owner(sem) down_read(sem)
-# define up_read_non_owner(sem) up_read(sem)
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_RWSEM_H */
diff --git a/original/linux/sched.h b/original/linux/sched.h
deleted file mode 100644
index 34ed0d9..0000000
--- a/original/linux/sched.h
+++ /dev/null
@@ -1,1616 +0,0 @@
-#ifndef _LINUX_SCHED_H
-#define _LINUX_SCHED_H
-
-#include <linux/auxvec.h> /* For AT_VECTOR_SIZE */
-
-/*
- * cloning flags:
- */
-#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */
-#define CLONE_VM 0x00000100 /* set if VM shared between processes */
-#define CLONE_FS 0x00000200 /* set if fs info shared between processes */
-#define CLONE_FILES 0x00000400 /* set if open files shared between processes */
-#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
-#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
-#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
-#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
-#define CLONE_THREAD 0x00010000 /* Same thread group? */
-#define CLONE_NEWNS 0x00020000 /* New namespace group? */
-#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
-#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
-#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */
-#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */
-#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
-#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
-#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
-#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
-
-/*
- * Scheduling policies
- */
-#define SCHED_NORMAL 0
-#define SCHED_FIFO 1
-#define SCHED_RR 2
-#define SCHED_BATCH 3
-
-#ifdef __KERNEL__
-
-struct sched_param {
- int sched_priority;
-};
-
-#include <asm/param.h> /* for HZ */
-
-#include <linux/capability.h>
-#include <linux/threads.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/timex.h>
-#include <linux/jiffies.h>
-#include <linux/rbtree.h>
-#include <linux/thread_info.h>
-#include <linux/cpumask.h>
-#include <linux/errno.h>
-#include <linux/nodemask.h>
-
-#include <asm/system.h>
-#include <asm/semaphore.h>
-#include <asm/page.h>
-#include <asm/ptrace.h>
-#include <asm/mmu.h>
-#include <asm/cputime.h>
-
-#include <linux/smp.h>
-#include <linux/sem.h>
-#include <linux/signal.h>
-#include <linux/securebits.h>
-#include <linux/fs_struct.h>
-#include <linux/compiler.h>
-#include <linux/completion.h>
-#include <linux/pid.h>
-#include <linux/percpu.h>
-#include <linux/topology.h>
-#include <linux/seccomp.h>
-#include <linux/rcupdate.h>
-#include <linux/futex.h>
-#include <linux/rtmutex.h>
-
-#include <linux/time.h>
-#include <linux/param.h>
-#include <linux/resource.h>
-#include <linux/timer.h>
-#include <linux/hrtimer.h>
-
-#include <asm/processor.h>
-
-struct exec_domain;
-struct futex_pi_state;
-
-/*
- * List of flags we want to share for kernel threads,
- * if only because they are not used by them anyway.
- */
-#define CLONE_KERNEL (CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
-
-/*
- * These are the constant used to fake the fixed-point load-average
- * counting. Some notes:
- * - 11 bit fractions expand to 22 bits by the multiplies: this gives
- * a load-average precision of 10 bits integer + 11 bits fractional
- * - if you want to count load-averages more often, you need more
- * precision, or rounding will get you. With 2-second counting freq,
- * the EXP_n values would be 1981, 2034 and 2043 if still using only
- * 11 bit fractions.
- */
-extern unsigned long avenrun[]; /* Load averages */
-
-#define FSHIFT 11 /* nr of bits of precision */
-#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */
-#define LOAD_FREQ (5*HZ) /* 5 sec intervals */
-#define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */
-#define EXP_5 2014 /* 1/exp(5sec/5min) */
-#define EXP_15 2037 /* 1/exp(5sec/15min) */
-
-#define CALC_LOAD(load,exp,n) \
- load *= exp; \
- load += n*(FIXED_1-exp); \
- load >>= FSHIFT;
-
-extern unsigned long total_forks;
-extern int nr_threads;
-extern int last_pid;
-DECLARE_PER_CPU(unsigned long, process_counts);
-extern int nr_processes(void);
-extern unsigned long nr_running(void);
-extern unsigned long nr_uninterruptible(void);
-extern unsigned long nr_active(void);
-extern unsigned long nr_iowait(void);
-extern unsigned long weighted_cpuload(const int cpu);
-
-
-/*
- * Task state bitmask. NOTE! These bits are also
- * encoded in fs/proc/array.c: get_task_state().
- *
- * We have two separate sets of flags: task->state
- * is about runnability, while task->exit_state are
- * about the task exiting. Confusing, but this way
- * modifying one set can't modify the other one by
- * mistake.
- */
-#define TASK_RUNNING 0
-#define TASK_INTERRUPTIBLE 1
-#define TASK_UNINTERRUPTIBLE 2
-#define TASK_STOPPED 4
-#define TASK_TRACED 8
-/* in tsk->exit_state */
-#define EXIT_ZOMBIE 16
-#define EXIT_DEAD 32
-/* in tsk->state again */
-#define TASK_NONINTERACTIVE 64
-
-#define __set_task_state(tsk, state_value) \
- do { (tsk)->state = (state_value); } while (0)
-#define set_task_state(tsk, state_value) \
- set_mb((tsk)->state, (state_value))
-
-/*
- * set_current_state() includes a barrier so that the write of current->state
- * is correctly serialised wrt the caller's subsequent test of whether to
- * actually sleep:
- *
- * set_current_state(TASK_UNINTERRUPTIBLE);
- * if (do_i_need_to_sleep())
- * schedule();
- *
- * If the caller does not need such serialisation then use __set_current_state()
- */
-#define __set_current_state(state_value) \
- do { current->state = (state_value); } while (0)
-#define set_current_state(state_value) \
- set_mb(current->state, (state_value))
-
-/* Task command name length */
-#define TASK_COMM_LEN 16
-
-#include <linux/spinlock.h>
-
-/*
- * This serializes "schedule()" and also protects
- * the run-queue from deletions/modifications (but
- * _adding_ to the beginning of the run-queue has
- * a separate lock).
- */
-extern rwlock_t tasklist_lock;
-extern spinlock_t mmlist_lock;
-
-struct task_struct;
-
-extern void sched_init(void);
-extern void sched_init_smp(void);
-extern void init_idle(struct task_struct *idle, int cpu);
-
-extern cpumask_t nohz_cpu_mask;
-
-extern void show_state(void);
-extern void show_regs(struct pt_regs *);
-
-/*
- * TASK is a pointer to the task whose backtrace we want to see (or NULL for current
- * task), SP is the stack pointer of the first frame that should be shown in the back
- * trace (or NULL if the entire call-chain of the task should be shown).
- */
-extern void show_stack(struct task_struct *task, unsigned long *sp);
-
-void io_schedule(void);
-long io_schedule_timeout(long timeout);
-
-extern void cpu_init (void);
-extern void trap_init(void);
-extern void update_process_times(int user);
-extern void scheduler_tick(void);
-
-#ifdef CONFIG_DETECT_SOFTLOCKUP
-extern void softlockup_tick(void);
-extern void spawn_softlockup_task(void);
-extern void touch_softlockup_watchdog(void);
-#else
-static inline void softlockup_tick(void)
-{
-}
-static inline void spawn_softlockup_task(void)
-{
-}
-static inline void touch_softlockup_watchdog(void)
-{
-}
-#endif
-
-
-/* Attach to any functions which should be ignored in wchan output. */
-#define __sched __attribute__((__section__(".sched.text")))
-/* Is this address in the __sched functions? */
-extern int in_sched_functions(unsigned long addr);
-
-#define MAX_SCHEDULE_TIMEOUT LONG_MAX
-extern signed long FASTCALL(schedule_timeout(signed long timeout));
-extern signed long schedule_timeout_interruptible(signed long timeout);
-extern signed long schedule_timeout_uninterruptible(signed long timeout);
-asmlinkage void schedule(void);
-
-struct namespace;
-
-/* Maximum number of active map areas.. This is a random (large) number */
-#define DEFAULT_MAX_MAP_COUNT 65536
-
-extern int sysctl_max_map_count;
-
-#include <linux/aio.h>
-
-extern unsigned long
-arch_get_unmapped_area(struct file *, unsigned long, unsigned long,
- unsigned long, unsigned long);
-extern unsigned long
-arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr,
- unsigned long len, unsigned long pgoff,
- unsigned long flags);
-extern void arch_unmap_area(struct mm_struct *, unsigned long);
-extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
-
-#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
-/*
- * The mm counters are not protected by its page_table_lock,
- * so must be incremented atomically.
- */
-#define set_mm_counter(mm, member, value) atomic_long_set(&(mm)->_##member, value)
-#define get_mm_counter(mm, member) ((unsigned long)atomic_long_read(&(mm)->_##member))
-#define add_mm_counter(mm, member, value) atomic_long_add(value, &(mm)->_##member)
-#define inc_mm_counter(mm, member) atomic_long_inc(&(mm)->_##member)
-#define dec_mm_counter(mm, member) atomic_long_dec(&(mm)->_##member)
-typedef atomic_long_t mm_counter_t;
-
-#else /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
-/*
- * The mm counters are protected by its page_table_lock,
- * so can be incremented directly.
- */
-#define set_mm_counter(mm, member, value) (mm)->_##member = (value)
-#define get_mm_counter(mm, member) ((mm)->_##member)
-#define add_mm_counter(mm, member, value) (mm)->_##member += (value)
-#define inc_mm_counter(mm, member) (mm)->_##member++
-#define dec_mm_counter(mm, member) (mm)->_##member--
-typedef unsigned long mm_counter_t;
-
-#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
-
-#define get_mm_rss(mm) \
- (get_mm_counter(mm, file_rss) + get_mm_counter(mm, anon_rss))
-#define update_hiwater_rss(mm) do { \
- unsigned long _rss = get_mm_rss(mm); \
- if ((mm)->hiwater_rss < _rss) \
- (mm)->hiwater_rss = _rss; \
-} while (0)
-#define update_hiwater_vm(mm) do { \
- if ((mm)->hiwater_vm < (mm)->total_vm) \
- (mm)->hiwater_vm = (mm)->total_vm; \
-} while (0)
-
-struct mm_struct {
- struct vm_area_struct * mmap; /* list of VMAs */
- struct rb_root mm_rb;
- struct vm_area_struct * mmap_cache; /* last find_vma result */
- unsigned long (*get_unmapped_area) (struct file *filp,
- unsigned long addr, unsigned long len,
- unsigned long pgoff, unsigned long flags);
- void (*unmap_area) (struct mm_struct *mm, unsigned long addr);
- unsigned long mmap_base; /* base of mmap area */
- unsigned long task_size; /* size of task vm space */
- unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */
- unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */
- pgd_t * pgd;
- atomic_t mm_users; /* How many users with user space? */
- atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
- int map_count; /* number of VMAs */
- struct rw_semaphore mmap_sem;
- spinlock_t page_table_lock; /* Protects page tables and some counters */
-
- struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung
- * together off init_mm.mmlist, and are protected
- * by mmlist_lock
- */
-
- /* Special counters, in some configurations protected by the
- * page_table_lock, in other configurations by being atomic.
- */
- mm_counter_t _file_rss;
- mm_counter_t _anon_rss;
-
- unsigned long hiwater_rss; /* High-watermark of RSS usage */
- unsigned long hiwater_vm; /* High-water virtual memory usage */
-
- unsigned long total_vm, locked_vm, shared_vm, exec_vm;
- unsigned long stack_vm, reserved_vm, def_flags, nr_ptes;
- unsigned long start_code, end_code, start_data, end_data;
- unsigned long start_brk, brk, start_stack;
- unsigned long arg_start, arg_end, env_start, env_end;
-
- unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */
-
- unsigned dumpable:2;
- cpumask_t cpu_vm_mask;
-
- /* Architecture-specific MM context */
- mm_context_t context;
-
- /* Token based thrashing protection. */
- unsigned long swap_token_time;
- char recent_pagein;
-
- /* coredumping support */
- int core_waiters;
- struct completion *core_startup_done, core_done;
-
- /* aio bits */
- rwlock_t ioctx_list_lock;
- struct kioctx *ioctx_list;
-};
-
-struct sighand_struct {
- atomic_t count;
- struct k_sigaction action[_NSIG];
- spinlock_t siglock;
-};
-
-struct pacct_struct {
- int ac_flag;
- long ac_exitcode;
- unsigned long ac_mem;
- cputime_t ac_utime, ac_stime;
- unsigned long ac_minflt, ac_majflt;
-};
-
-/*
- * NOTE! "signal_struct" does not have it's own
- * locking, because a shared signal_struct always
- * implies a shared sighand_struct, so locking
- * sighand_struct is always a proper superset of
- * the locking of signal_struct.
- */
-struct signal_struct {
- atomic_t count;
- atomic_t live;
-
- wait_queue_head_t wait_chldexit; /* for wait4() */
-
- /* current thread group signal load-balancing target: */
- struct task_struct *curr_target;
-
- /* shared signal handling: */
- struct sigpending shared_pending;
-
- /* thread group exit support */
- int group_exit_code;
- /* overloaded:
- * - notify group_exit_task when ->count is equal to notify_count
- * - everyone except group_exit_task is stopped during signal delivery
- * of fatal signals, group_exit_task processes the signal.
- */
- struct task_struct *group_exit_task;
- int notify_count;
-
- /* thread group stop support, overloads group_exit_code too */
- int group_stop_count;
- unsigned int flags; /* see SIGNAL_* flags below */
-
- /* POSIX.1b Interval Timers */
- struct list_head posix_timers;
-
- /* ITIMER_REAL timer for the process */
- struct hrtimer real_timer;
- struct task_struct *tsk;
- ktime_t it_real_incr;
-
- /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */
- cputime_t it_prof_expires, it_virt_expires;
- cputime_t it_prof_incr, it_virt_incr;
-
- /* job control IDs */
- pid_t pgrp;
- pid_t tty_old_pgrp;
- pid_t session;
- /* boolean value for session group leader */
- int leader;
-
- struct tty_struct *tty; /* NULL if no tty */
-
- /*
- * Cumulative resource counters for dead threads in the group,
- * and for reaped dead child processes forked by this group.
- * Live threads maintain their own counters and add to these
- * in __exit_signal, except for the group leader.
- */
- cputime_t utime, stime, cutime, cstime;
- unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
- unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
-
- /*
- * Cumulative ns of scheduled CPU time for dead threads in the
- * group, not including a zombie group leader. (This only differs
- * from jiffies_to_ns(utime + stime) if sched_clock uses something
- * other than jiffies.)
- */
- unsigned long long sched_time;
-
- /*
- * We don't bother to synchronize most readers of this at all,
- * because there is no reader checking a limit that actually needs
- * to get both rlim_cur and rlim_max atomically, and either one
- * alone is a single word that can safely be read normally.
- * getrlimit/setrlimit use task_lock(current->group_leader) to
- * protect this instead of the siglock, because they really
- * have no need to disable irqs.
- */
- struct rlimit rlim[RLIM_NLIMITS];
-
- struct list_head cpu_timers[3];
-
- /* keep the process-shared keyrings here so that they do the right
- * thing in threads created with CLONE_THREAD */
-#ifdef CONFIG_KEYS
- struct key *session_keyring; /* keyring inherited over fork */
- struct key *process_keyring; /* keyring private to this process */
-#endif
-#ifdef CONFIG_BSD_PROCESS_ACCT
- struct pacct_struct pacct; /* per-process accounting information */
-#endif
-#ifdef CONFIG_TASKSTATS
- spinlock_t stats_lock;
- struct taskstats *stats;
-#endif
-};
-
-/* Context switch must be unlocked if interrupts are to be enabled */
-#ifdef __ARCH_WANT_INTERRUPTS_ON_CTXSW
-# define __ARCH_WANT_UNLOCKED_CTXSW
-#endif
-
-/*
- * Bits in flags field of signal_struct.
- */
-#define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */
-#define SIGNAL_STOP_DEQUEUED 0x00000002 /* stop signal dequeued */
-#define SIGNAL_STOP_CONTINUED 0x00000004 /* SIGCONT since WCONTINUED reap */
-#define SIGNAL_GROUP_EXIT 0x00000008 /* group exit in progress */
-
-
-/*
- * Priority of a process goes from 0..MAX_PRIO-1, valid RT
- * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH
- * tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority
- * values are inverted: lower p->prio value means higher priority.
- *
- * The MAX_USER_RT_PRIO value allows the actual maximum
- * RT priority to be separate from the value exported to
- * user-space. This allows kernel threads to set their
- * priority to a value higher than any user task. Note:
- * MAX_RT_PRIO must not be smaller than MAX_USER_RT_PRIO.
- */
-
-#define MAX_USER_RT_PRIO 100
-#define MAX_RT_PRIO MAX_USER_RT_PRIO
-
-#define MAX_PRIO (MAX_RT_PRIO + 40)
-
-#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO)
-#define rt_task(p) rt_prio((p)->prio)
-#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH))
-#define has_rt_policy(p) \
- unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH)
-
-/*
- * Some day this will be a full-fledged user tracking system..
- */
-struct user_struct {
- atomic_t __count; /* reference count */
- atomic_t processes; /* How many processes does this user have? */
- atomic_t files; /* How many open files does this user have? */
- atomic_t sigpending; /* How many pending signals does this user have? */
-#ifdef CONFIG_INOTIFY_USER
- atomic_t inotify_watches; /* How many inotify watches does this user have? */
- atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
-#endif
- /* protected by mq_lock */
- unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
- unsigned long locked_shm; /* How many pages of mlocked shm ? */
-
-#ifdef CONFIG_KEYS
- struct key *uid_keyring; /* UID specific keyring */
- struct key *session_keyring; /* UID's default session keyring */
-#endif
-
- /* Hash table maintenance information */
- struct list_head uidhash_list;
- uid_t uid;
-};
-
-extern struct user_struct *find_user(uid_t);
-
-extern struct user_struct root_user;
-#define INIT_USER (&root_user)
-
-struct backing_dev_info;
-struct reclaim_state;
-
-#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
-struct sched_info {
- /* cumulative counters */
- unsigned long cpu_time, /* time spent on the cpu */
- run_delay, /* time spent waiting on a runqueue */
- pcnt; /* # of timeslices run on this cpu */
-
- /* timestamps */
- unsigned long last_arrival, /* when we last ran on a cpu */
- last_queued; /* when we were last queued to run */
-};
-#endif /* defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) */
-
-#ifdef CONFIG_SCHEDSTATS
-extern struct file_operations proc_schedstat_operations;
-#endif /* CONFIG_SCHEDSTATS */
-
-#ifdef CONFIG_TASK_DELAY_ACCT
-struct task_delay_info {
- spinlock_t lock;
- unsigned int flags; /* Private per-task flags */
-
- /* For each stat XXX, add following, aligned appropriately
- *
- * struct timespec XXX_start, XXX_end;
- * u64 XXX_delay;
- * u32 XXX_count;
- *
- * Atomicity of updates to XXX_delay, XXX_count protected by
- * single lock above (split into XXX_lock if contention is an issue).
- */
-
- /*
- * XXX_count is incremented on every XXX operation, the delay
- * associated with the operation is added to XXX_delay.
- * XXX_delay contains the accumulated delay time in nanoseconds.
- */
- struct timespec blkio_start, blkio_end; /* Shared by blkio, swapin */
- u64 blkio_delay; /* wait for sync block io completion */
- u64 swapin_delay; /* wait for swapin block io completion */
- u32 blkio_count; /* total count of the number of sync block */
- /* io operations performed */
- u32 swapin_count; /* total count of the number of swapin block */
- /* io operations performed */
-};
-#endif /* CONFIG_TASK_DELAY_ACCT */
-
-static inline int sched_info_on(void)
-{
-#ifdef CONFIG_SCHEDSTATS
- return 1;
-#elif defined(CONFIG_TASK_DELAY_ACCT)
- extern int delayacct_on;
- return delayacct_on;
-#else
- return 0;
-#endif
-}
-
-enum idle_type
-{
- SCHED_IDLE,
- NOT_IDLE,
- NEWLY_IDLE,
- MAX_IDLE_TYPES
-};
-
-/*
- * sched-domains (multiprocessor balancing) declarations:
- */
-#define SCHED_LOAD_SCALE 128UL /* increase resolution of load */
-
-#ifdef CONFIG_SMP
-#define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */
-#define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */
-#define SD_BALANCE_EXEC 4 /* Balance on exec */
-#define SD_BALANCE_FORK 8 /* Balance on fork, clone */
-#define SD_WAKE_IDLE 16 /* Wake to idle CPU on task wakeup */
-#define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */
-#define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */
-#define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */
-#define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */
-
-#define BALANCE_FOR_POWER ((sched_mc_power_savings || sched_smt_power_savings) \
- ? SD_POWERSAVINGS_BALANCE : 0)
-
-
-struct sched_group {
- struct sched_group *next; /* Must be a circular list */
- cpumask_t cpumask;
-
- /*
- * CPU power of this group, SCHED_LOAD_SCALE being max power for a
- * single CPU. This is read only (except for setup, hotplug CPU).
- */
- unsigned long cpu_power;
-};
-
-struct sched_domain {
- /* These fields must be setup */
- struct sched_domain *parent; /* top domain must be null terminated */
- struct sched_group *groups; /* the balancing groups of the domain */
- cpumask_t span; /* span of all CPUs in this domain */
- unsigned long min_interval; /* Minimum balance interval ms */
- unsigned long max_interval; /* Maximum balance interval ms */
- unsigned int busy_factor; /* less balancing by factor if busy */
- unsigned int imbalance_pct; /* No balance until over watermark */
- unsigned long long cache_hot_time; /* Task considered cache hot (ns) */
- unsigned int cache_nice_tries; /* Leave cache hot tasks for # tries */
- unsigned int per_cpu_gain; /* CPU % gained by adding domain cpus */
- unsigned int busy_idx;
- unsigned int idle_idx;
- unsigned int newidle_idx;
- unsigned int wake_idx;
- unsigned int forkexec_idx;
- int flags; /* See SD_* */
-
- /* Runtime fields. */
- unsigned long last_balance; /* init to jiffies. units in jiffies */
- unsigned int balance_interval; /* initialise to 1. units in ms. */
- unsigned int nr_balance_failed; /* initialise to 0 */
-
-#ifdef CONFIG_SCHEDSTATS
- /* load_balance() stats */
- unsigned long lb_cnt[MAX_IDLE_TYPES];
- unsigned long lb_failed[MAX_IDLE_TYPES];
- unsigned long lb_balanced[MAX_IDLE_TYPES];
- unsigned long lb_imbalance[MAX_IDLE_TYPES];
- unsigned long lb_gained[MAX_IDLE_TYPES];
- unsigned long lb_hot_gained[MAX_IDLE_TYPES];
- unsigned long lb_nobusyg[MAX_IDLE_TYPES];
- unsigned long lb_nobusyq[MAX_IDLE_TYPES];
-
- /* Active load balancing */
- unsigned long alb_cnt;
- unsigned long alb_failed;
- unsigned long alb_pushed;
-
- /* SD_BALANCE_EXEC stats */
- unsigned long sbe_cnt;
- unsigned long sbe_balanced;
- unsigned long sbe_pushed;
-
- /* SD_BALANCE_FORK stats */
- unsigned long sbf_cnt;
- unsigned long sbf_balanced;
- unsigned long sbf_pushed;
-
- /* try_to_wake_up() stats */
- unsigned long ttwu_wake_remote;
- unsigned long ttwu_move_affine;
- unsigned long ttwu_move_balance;
-#endif
-};
-
-extern int partition_sched_domains(cpumask_t *partition1,
- cpumask_t *partition2);
-
-/*
- * Maximum cache size the migration-costs auto-tuning code will
- * search from:
- */
-extern unsigned int max_cache_size;
-
-#endif /* CONFIG_SMP */
-
-
-struct io_context; /* See blkdev.h */
-void exit_io_context(void);
-struct cpuset;
-
-#define NGROUPS_SMALL 32
-#define NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t)))
-struct group_info {
- int ngroups;
- atomic_t usage;
- gid_t small_block[NGROUPS_SMALL];
- int nblocks;
- gid_t *blocks[0];
-};
-
-/*
- * get_group_info() must be called with the owning task locked (via task_lock())
- * when task != current. The reason being that the vast majority of callers are
- * looking at current->group_info, which can not be changed except by the
- * current task. Changing current->group_info requires the task lock, too.
- */
-#define get_group_info(group_info) do { \
- atomic_inc(&(group_info)->usage); \
-} while (0)
-
-#define put_group_info(group_info) do { \
- if (atomic_dec_and_test(&(group_info)->usage)) \
- groups_free(group_info); \
-} while (0)
-
-extern struct group_info *groups_alloc(int gidsetsize);
-extern void groups_free(struct group_info *group_info);
-extern int set_current_groups(struct group_info *group_info);
-extern int groups_search(struct group_info *group_info, gid_t grp);
-/* access the groups "array" with this macro */
-#define GROUP_AT(gi, i) \
- ((gi)->blocks[(i)/NGROUPS_PER_BLOCK][(i)%NGROUPS_PER_BLOCK])
-
-#ifdef ARCH_HAS_PREFETCH_SWITCH_STACK
-extern void prefetch_stack(struct task_struct *t);
-#else
-static inline void prefetch_stack(struct task_struct *t) { }
-#endif
-
-struct audit_context; /* See audit.c */
-struct mempolicy;
-struct pipe_inode_info;
-
-enum sleep_type {
- SLEEP_NORMAL,
- SLEEP_NONINTERACTIVE,
- SLEEP_INTERACTIVE,
- SLEEP_INTERRUPTED,
-};
-
-struct prio_array;
-
-struct task_struct {
- volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
- struct thread_info *thread_info;
- atomic_t usage;
- unsigned long flags; /* per process flags, defined below */
- unsigned long ptrace;
-
- int lock_depth; /* BKL lock depth */
-
-#ifdef CONFIG_SMP
-#ifdef __ARCH_WANT_UNLOCKED_CTXSW
- int oncpu;
-#endif
-#endif
- int load_weight; /* for niceness load balancing purposes */
- int prio, static_prio, normal_prio;
- struct list_head run_list;
- struct prio_array *array;
-
- unsigned short ioprio;
- unsigned int btrace_seq;
-
- unsigned long sleep_avg;
- unsigned long long timestamp, last_ran;
- unsigned long long sched_time; /* sched_clock time spent running */
- enum sleep_type sleep_type;
-
- unsigned long policy;
- cpumask_t cpus_allowed;
- unsigned int time_slice, first_time_slice;
-
-#if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT)
- struct sched_info sched_info;
-#endif
-
- struct list_head tasks;
- /*
- * ptrace_list/ptrace_children forms the list of my children
- * that were stolen by a ptracer.
- */
- struct list_head ptrace_children;
- struct list_head ptrace_list;
-
- struct mm_struct *mm, *active_mm;
-
-/* task state */
- struct linux_binfmt *binfmt;
- long exit_state;
- int exit_code, exit_signal;
- int pdeath_signal; /* The signal sent when the parent dies */
- /* ??? */
- unsigned long personality;
- unsigned did_exec:1;
- pid_t pid;
- pid_t tgid;
- /*
- * pointers to (original) parent process, youngest child, younger sibling,
- * older sibling, respectively. (p->father can be replaced with
- * p->parent->pid)
- */
- struct task_struct *real_parent; /* real parent process (when being debugged) */
- struct task_struct *parent; /* parent process */
- /*
- * children/sibling forms the list of my children plus the
- * tasks I'm ptracing.
- */
- struct list_head children; /* list of my children */
- struct list_head sibling; /* linkage in my parent's children list */
- struct task_struct *group_leader; /* threadgroup leader */
-
- /* PID/PID hash table linkage. */
- struct pid_link pids[PIDTYPE_MAX];
- struct list_head thread_group;
-
- struct completion *vfork_done; /* for vfork() */
- int __user *set_child_tid; /* CLONE_CHILD_SETTID */
- int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */
-
- unsigned long rt_priority;
- cputime_t utime, stime;
- unsigned long nvcsw, nivcsw; /* context switch counts */
- struct timespec start_time;
-/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
- unsigned long min_flt, maj_flt;
-
- cputime_t it_prof_expires, it_virt_expires;
- unsigned long long it_sched_expires;
- struct list_head cpu_timers[3];
-
-/* process credentials */
- uid_t uid,euid,suid,fsuid;
- gid_t gid,egid,sgid,fsgid;
- struct group_info *group_info;
- kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
- unsigned keep_capabilities:1;
- struct user_struct *user;
-#ifdef CONFIG_KEYS
- struct key *request_key_auth; /* assumed request_key authority */
- struct key *thread_keyring; /* keyring private to this thread */
- unsigned char jit_keyring; /* default keyring to attach requested keys to */
-#endif
- int oomkilladj; /* OOM kill score adjustment (bit shift). */
- char comm[TASK_COMM_LEN]; /* executable name excluding path
- - access with [gs]et_task_comm (which lock
- it with task_lock())
- - initialized normally by flush_old_exec */
-/* file system info */
- int link_count, total_link_count;
-/* ipc stuff */
- struct sysv_sem sysvsem;
-/* CPU-specific state of this task */
- struct thread_struct thread;
-/* filesystem information */
- struct fs_struct *fs;
-/* open file information */
- struct files_struct *files;
-/* namespace */
- struct namespace *namespace;
-/* signal handlers */
- struct signal_struct *signal;
- struct sighand_struct *sighand;
-
- sigset_t blocked, real_blocked;
- sigset_t saved_sigmask; /* To be restored with TIF_RESTORE_SIGMASK */
- struct sigpending pending;
-
- unsigned long sas_ss_sp;
- size_t sas_ss_size;
- int (*notifier)(void *priv);
- void *notifier_data;
- sigset_t *notifier_mask;
-
- void *security;
- struct audit_context *audit_context;
- seccomp_t seccomp;
-
-/* Thread group tracking */
- u32 parent_exec_id;
- u32 self_exec_id;
-/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
- spinlock_t alloc_lock;
-
- /* Protection of the PI data structures: */
- spinlock_t pi_lock;
-
-#ifdef CONFIG_RT_MUTEXES
- /* PI waiters blocked on a rt_mutex held by this task */
- struct plist_head pi_waiters;
- /* Deadlock detection and priority inheritance handling */
- struct rt_mutex_waiter *pi_blocked_on;
-#endif
-
-#ifdef CONFIG_DEBUG_MUTEXES
- /* mutex deadlock detection */
- struct mutex_waiter *blocked_on;
-#endif
-#ifdef CONFIG_TRACE_IRQFLAGS
- unsigned int irq_events;
- int hardirqs_enabled;
- unsigned long hardirq_enable_ip;
- unsigned int hardirq_enable_event;
- unsigned long hardirq_disable_ip;
- unsigned int hardirq_disable_event;
- int softirqs_enabled;
- unsigned long softirq_disable_ip;
- unsigned int softirq_disable_event;
- unsigned long softirq_enable_ip;
- unsigned int softirq_enable_event;
- int hardirq_context;
- int softirq_context;
-#endif
-#ifdef CONFIG_LOCKDEP
-# define MAX_LOCK_DEPTH 30UL
- u64 curr_chain_key;
- int lockdep_depth;
- struct held_lock held_locks[MAX_LOCK_DEPTH];
- unsigned int lockdep_recursion;
-#endif
-
-/* journalling filesystem info */
- void *journal_info;
-
-/* VM state */
- struct reclaim_state *reclaim_state;
-
- struct backing_dev_info *backing_dev_info;
-
- struct io_context *io_context;
-
- unsigned long ptrace_message;
- siginfo_t *last_siginfo; /* For ptrace use. */
-/*
- * current io wait handle: wait queue entry to use for io waits
- * If this thread is processing aio, this points at the waitqueue
- * inside the currently handled kiocb. It may be NULL (i.e. default
- * to a stack based synchronous wait) if its doing sync IO.
- */
- wait_queue_t *io_wait;
-/* i/o counters(bytes read/written, #syscalls */
- u64 rchar, wchar, syscr, syscw;
-#if defined(CONFIG_BSD_PROCESS_ACCT)
- u64 acct_rss_mem1; /* accumulated rss usage */
- u64 acct_vm_mem1; /* accumulated virtual memory usage */
- clock_t acct_stimexpd; /* clock_t-converted stime since last update */
-#endif
-#ifdef CONFIG_NUMA
- struct mempolicy *mempolicy;
- short il_next;
-#endif
-#ifdef CONFIG_CPUSETS
- struct cpuset *cpuset;
- nodemask_t mems_allowed;
- int cpuset_mems_generation;
- int cpuset_mem_spread_rotor;
-#endif
- struct robust_list_head __user *robust_list;
-#ifdef CONFIG_COMPAT
- struct compat_robust_list_head __user *compat_robust_list;
-#endif
- struct list_head pi_state_list;
- struct futex_pi_state *pi_state_cache;
-
- atomic_t fs_excl; /* holding fs exclusive resources */
- struct rcu_head rcu;
-
- /*
- * cache last used pipe for splice
- */
- struct pipe_inode_info *splice_pipe;
-#ifdef CONFIG_TASK_DELAY_ACCT
- struct task_delay_info *delays;
-#endif
-};
-
-static inline pid_t process_group(struct task_struct *tsk)
-{
- return tsk->signal->pgrp;
-}
-
-/**
- * pid_alive - check that a task structure is not stale
- * @p: Task structure to be checked.
- *
- * Test if a process is not yet dead (at most zombie state)
- * If pid_alive fails, then pointers within the task structure
- * can be stale and must not be dereferenced.
- */
-static inline int pid_alive(struct task_struct *p)
-{
- return p->pids[PIDTYPE_PID].pid != NULL;
-}
-
-extern void free_task(struct task_struct *tsk);
-#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
-
-extern void __put_task_struct(struct task_struct *t);
-
-static inline void put_task_struct(struct task_struct *t)
-{
- if (atomic_dec_and_test(&t->usage))
- __put_task_struct(t);
-}
-
-/*
- * Per process flags
- */
-#define PF_ALIGNWARN 0x00000001 /* Print alignment warning msgs */
- /* Not implemented yet, only for 486*/
-#define PF_STARTING 0x00000002 /* being created */
-#define PF_EXITING 0x00000004 /* getting shut down */
-#define PF_DEAD 0x00000008 /* Dead */
-#define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */
-#define PF_SUPERPRIV 0x00000100 /* used super-user privileges */
-#define PF_DUMPCORE 0x00000200 /* dumped core */
-#define PF_SIGNALED 0x00000400 /* killed by a signal */
-#define PF_MEMALLOC 0x00000800 /* Allocating memory */
-#define PF_FLUSHER 0x00001000 /* responsible for disk writeback */
-#define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */
-#define PF_FREEZE 0x00004000 /* this task is being frozen for suspend now */
-#define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */
-#define PF_FROZEN 0x00010000 /* frozen for system suspend */
-#define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */
-#define PF_KSWAPD 0x00040000 /* I am kswapd */
-#define PF_SWAPOFF 0x00080000 /* I am in swapoff */
-#define PF_LESS_THROTTLE 0x00100000 /* Throttle me less: I clean memory */
-#define PF_BORROWED_MM 0x00200000 /* I am a kthread doing use_mm */
-#define PF_RANDOMIZE 0x00400000 /* randomize virtual address space */
-#define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */
-#define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */
-#define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */
-#define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */
-#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
-
-/*
- * Only the _current_ task can read/write to tsk->flags, but other
- * tasks can access tsk->flags in readonly mode for example
- * with tsk_used_math (like during threaded core dumping).
- * There is however an exception to this rule during ptrace
- * or during fork: the ptracer task is allowed to write to the
- * child->flags of its traced child (same goes for fork, the parent
- * can write to the child->flags), because we're guaranteed the
- * child is not running and in turn not changing child->flags
- * at the same time the parent does it.
- */
-#define clear_stopped_child_used_math(child) do { (child)->flags &= ~PF_USED_MATH; } while (0)
-#define set_stopped_child_used_math(child) do { (child)->flags |= PF_USED_MATH; } while (0)
-#define clear_used_math() clear_stopped_child_used_math(current)
-#define set_used_math() set_stopped_child_used_math(current)
-#define conditional_stopped_child_used_math(condition, child) \
- do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= (condition) ? PF_USED_MATH : 0; } while (0)
-#define conditional_used_math(condition) \
- conditional_stopped_child_used_math(condition, current)
-#define copy_to_stopped_child_used_math(child) \
- do { (child)->flags &= ~PF_USED_MATH, (child)->flags |= current->flags & PF_USED_MATH; } while (0)
-/* NOTE: this will return 0 or PF_USED_MATH, it will never return 1 */
-#define tsk_used_math(p) ((p)->flags & PF_USED_MATH)
-#define used_math() tsk_used_math(current)
-
-#ifdef CONFIG_SMP
-extern int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask);
-#else
-static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
-{
- if (!cpu_isset(0, new_mask))
- return -EINVAL;
- return 0;
-}
-#endif
-
-extern unsigned long long sched_clock(void);
-extern unsigned long long
-current_sched_time(const struct task_struct *current_task);
-
-/* sched_exec is called by processes performing an exec */
-#ifdef CONFIG_SMP
-extern void sched_exec(void);
-#else
-#define sched_exec() {}
-#endif
-
-#ifdef CONFIG_HOTPLUG_CPU
-extern void idle_task_exit(void);
-#else
-static inline void idle_task_exit(void) {}
-#endif
-
-extern void sched_idle_next(void);
-
-#ifdef CONFIG_RT_MUTEXES
-extern int rt_mutex_getprio(struct task_struct *p);
-extern void rt_mutex_setprio(struct task_struct *p, int prio);
-extern void rt_mutex_adjust_pi(struct task_struct *p);
-#else
-static inline int rt_mutex_getprio(struct task_struct *p)
-{
- return p->normal_prio;
-}
-# define rt_mutex_adjust_pi(p) do { } while (0)
-#endif
-
-extern void set_user_nice(struct task_struct *p, long nice);
-extern int task_prio(const struct task_struct *p);
-extern int task_nice(const struct task_struct *p);
-extern int can_nice(const struct task_struct *p, const int nice);
-extern int task_curr(const struct task_struct *p);
-extern int idle_cpu(int cpu);
-extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
-extern struct task_struct *idle_task(int cpu);
-extern struct task_struct *curr_task(int cpu);
-extern void set_curr_task(int cpu, struct task_struct *p);
-
-void yield(void);
-
-/*
- * The default (Linux) execution domain.
- */
-extern struct exec_domain default_exec_domain;
-
-union thread_union {
- struct thread_info thread_info;
- unsigned long stack[THREAD_SIZE/sizeof(long)];
-};
-
-#ifndef __HAVE_ARCH_KSTACK_END
-static inline int kstack_end(void *addr)
-{
- /* Reliable end of stack detection:
- * Some APM bios versions misalign the stack
- */
- return !(((unsigned long)addr+sizeof(void*)-1) & (THREAD_SIZE-sizeof(void*)));
-}
-#endif
-
-extern union thread_union init_thread_union;
-extern struct task_struct init_task;
-
-extern struct mm_struct init_mm;
-
-#define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr)
-extern struct task_struct *find_task_by_pid_type(int type, int pid);
-extern void set_special_pids(pid_t session, pid_t pgrp);
-extern void __set_special_pids(pid_t session, pid_t pgrp);
-
-/* per-UID process charging. */
-extern struct user_struct * alloc_uid(uid_t);
-static inline struct user_struct *get_uid(struct user_struct *u)
-{
- atomic_inc(&u->__count);
- return u;
-}
-extern void free_uid(struct user_struct *);
-extern void switch_uid(struct user_struct *);
-
-#include <asm/current.h>
-
-extern void do_timer(struct pt_regs *);
-
-extern int FASTCALL(wake_up_state(struct task_struct * tsk, unsigned int state));
-extern int FASTCALL(wake_up_process(struct task_struct * tsk));
-extern void FASTCALL(wake_up_new_task(struct task_struct * tsk,
- unsigned long clone_flags));
-#ifdef CONFIG_SMP
- extern void kick_process(struct task_struct *tsk);
-#else
- static inline void kick_process(struct task_struct *tsk) { }
-#endif
-extern void FASTCALL(sched_fork(struct task_struct * p, int clone_flags));
-extern void FASTCALL(sched_exit(struct task_struct * p));
-
-extern int in_group_p(gid_t);
-extern int in_egroup_p(gid_t);
-
-extern void proc_caches_init(void);
-extern void flush_signals(struct task_struct *);
-extern void flush_signal_handlers(struct task_struct *, int force_default);
-extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
-
-static inline int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
-{
- unsigned long flags;
- int ret;
-
- spin_lock_irqsave(&tsk->sighand->siglock, flags);
- ret = dequeue_signal(tsk, mask, info);
- spin_unlock_irqrestore(&tsk->sighand->siglock, flags);
-
- return ret;
-}
-
-extern void block_all_signals(int (*notifier)(void *priv), void *priv,
- sigset_t *mask);
-extern void unblock_all_signals(void);
-extern void release_task(struct task_struct * p);
-extern int send_sig_info(int, struct siginfo *, struct task_struct *);
-extern int send_group_sig_info(int, struct siginfo *, struct task_struct *);
-extern int force_sigsegv(int, struct task_struct *);
-extern int force_sig_info(int, struct siginfo *, struct task_struct *);
-extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
-extern int kill_pg_info(int, struct siginfo *, pid_t);
-extern int kill_proc_info(int, struct siginfo *, pid_t);
-extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32);
-extern void do_notify_parent(struct task_struct *, int);
-extern void force_sig(int, struct task_struct *);
-extern void force_sig_specific(int, struct task_struct *);
-extern int send_sig(int, struct task_struct *, int);
-extern void zap_other_threads(struct task_struct *p);
-extern int kill_pg(pid_t, int, int);
-extern int kill_proc(pid_t, int, int);
-extern struct sigqueue *sigqueue_alloc(void);
-extern void sigqueue_free(struct sigqueue *);
-extern int send_sigqueue(int, struct sigqueue *, struct task_struct *);
-extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *);
-extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
-extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long);
-
-/* These can be the second arg to send_sig_info/send_group_sig_info. */
-#define SEND_SIG_NOINFO ((struct siginfo *) 0)
-#define SEND_SIG_PRIV ((struct siginfo *) 1)
-#define SEND_SIG_FORCED ((struct siginfo *) 2)
-
-static inline int is_si_special(const struct siginfo *info)
-{
- return info <= SEND_SIG_FORCED;
-}
-
-/* True if we are on the alternate signal stack. */
-
-static inline int on_sig_stack(unsigned long sp)
-{
- return (sp - current->sas_ss_sp < current->sas_ss_size);
-}
-
-static inline int sas_ss_flags(unsigned long sp)
-{
- return (current->sas_ss_size == 0 ? SS_DISABLE
- : on_sig_stack(sp) ? SS_ONSTACK : 0);
-}
-
-/*
- * Routines for handling mm_structs
- */
-extern struct mm_struct * mm_alloc(void);
-
-/* mmdrop drops the mm and the page tables */
-extern void FASTCALL(__mmdrop(struct mm_struct *));
-static inline void mmdrop(struct mm_struct * mm)
-{
- if (atomic_dec_and_test(&mm->mm_count))
- __mmdrop(mm);
-}
-
-/* mmput gets rid of the mappings and all user-space */
-extern void mmput(struct mm_struct *);
-/* Grab a reference to a task's mm, if it is not already going away */
-extern struct mm_struct *get_task_mm(struct task_struct *task);
-/* Remove the current tasks stale references to the old mm_struct */
-extern void mm_release(struct task_struct *, struct mm_struct *);
-
-extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct task_struct *, struct pt_regs *);
-extern void flush_thread(void);
-extern void exit_thread(void);
-
-extern void exit_files(struct task_struct *);
-extern void __cleanup_signal(struct signal_struct *);
-extern void __cleanup_sighand(struct sighand_struct *);
-extern void exit_itimers(struct signal_struct *);
-
-extern NORET_TYPE void do_group_exit(int);
-
-extern void daemonize(const char *, ...);
-extern int allow_signal(int);
-extern int disallow_signal(int);
-extern struct task_struct *child_reaper;
-
-extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *);
-extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *);
-struct task_struct *fork_idle(int);
-
-extern void set_task_comm(struct task_struct *tsk, char *from);
-extern void get_task_comm(char *to, struct task_struct *tsk);
-
-#ifdef CONFIG_SMP
-extern void wait_task_inactive(struct task_struct * p);
-#else
-#define wait_task_inactive(p) do { } while (0)
-#endif
-
-#define remove_parent(p) list_del_init(&(p)->sibling)
-#define add_parent(p) list_add_tail(&(p)->sibling,&(p)->parent->children)
-
-#define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks)
-
-#define for_each_process(p) \
- for (p = &init_task ; (p = next_task(p)) != &init_task ; )
-
-/*
- * Careful: do_each_thread/while_each_thread is a double loop so
- * 'break' will not work as expected - use goto instead.
- */
-#define do_each_thread(g, t) \
- for (g = t = &init_task ; (g = t = next_task(g)) != &init_task ; ) do
-
-#define while_each_thread(g, t) \
- while ((t = next_thread(t)) != g)
-
-/* de_thread depends on thread_group_leader not being a pid based check */
-#define thread_group_leader(p) (p == p->group_leader)
-
-static inline struct task_struct *next_thread(const struct task_struct *p)
-{
- return list_entry(rcu_dereference(p->thread_group.next),
- struct task_struct, thread_group);
-}
-
-static inline int thread_group_empty(struct task_struct *p)
-{
- return list_empty(&p->thread_group);
-}
-
-#define delay_group_leader(p) \
- (thread_group_leader(p) && !thread_group_empty(p))
-
-/*
- * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
- * subscriptions and synchronises with wait4(). Also used in procfs. Also
- * pins the final release of task.io_context. Also protects ->cpuset.
- *
- * Nests both inside and outside of read_lock(&tasklist_lock).
- * It must not be nested with write_lock_irq(&tasklist_lock),
- * neither inside nor outside.
- */
-static inline void task_lock(struct task_struct *p)
-{
- spin_lock(&p->alloc_lock);
-}
-
-static inline void task_unlock(struct task_struct *p)
-{
- spin_unlock(&p->alloc_lock);
-}
-
-extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk,
- unsigned long *flags);
-
-static inline void unlock_task_sighand(struct task_struct *tsk,
- unsigned long *flags)
-{
- spin_unlock_irqrestore(&tsk->sighand->siglock, *flags);
-}
-
-#ifndef __HAVE_THREAD_FUNCTIONS
-
-#define task_thread_info(task) (task)->thread_info
-#define task_stack_page(task) ((void*)((task)->thread_info))
-
-static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
-{
- *task_thread_info(p) = *task_thread_info(org);
- task_thread_info(p)->task = p;
-}
-
-static inline unsigned long *end_of_stack(struct task_struct *p)
-{
- return (unsigned long *)(p->thread_info + 1);
-}
-
-#endif
-
-/* set thread flags in other task's structures
- * - see asm/thread_info.h for TIF_xxxx flags available
- */
-static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
-{
- set_ti_thread_flag(task_thread_info(tsk), flag);
-}
-
-static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
-{
- clear_ti_thread_flag(task_thread_info(tsk), flag);
-}
-
-static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
-{
- return test_and_set_ti_thread_flag(task_thread_info(tsk), flag);
-}
-
-static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
-{
- return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag);
-}
-
-static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
-{
- return test_ti_thread_flag(task_thread_info(tsk), flag);
-}
-
-static inline void set_tsk_need_resched(struct task_struct *tsk)
-{
- set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
-}
-
-static inline void clear_tsk_need_resched(struct task_struct *tsk)
-{
- clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
-}
-
-static inline int signal_pending(struct task_struct *p)
-{
- return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING));
-}
-
-static inline int need_resched(void)
-{
- return unlikely(test_thread_flag(TIF_NEED_RESCHED));
-}
-
-/*
- * cond_resched() and cond_resched_lock(): latency reduction via
- * explicit rescheduling in places that are safe. The return
- * value indicates whether a reschedule was done in fact.
- * cond_resched_lock() will drop the spinlock before scheduling,
- * cond_resched_softirq() will enable bhs before scheduling.
- */
-extern int cond_resched(void);
-extern int cond_resched_lock(spinlock_t * lock);
-extern int cond_resched_softirq(void);
-
-/*
- * Does a critical section need to be broken due to another
- * task waiting?:
- */
-#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
-# define need_lockbreak(lock) ((lock)->break_lock)
-#else
-# define need_lockbreak(lock) 0
-#endif
-
-/*
- * Does a critical section need to be broken due to another
- * task waiting or preemption being signalled:
- */
-static inline int lock_need_resched(spinlock_t *lock)
-{
- if (need_lockbreak(lock) || need_resched())
- return 1;
- return 0;
-}
-
-/* Reevaluate whether the task has signals pending delivery.
- This is required every time the blocked sigset_t changes.
- callers must hold sighand->siglock. */
-
-extern FASTCALL(void recalc_sigpending_tsk(struct task_struct *t));
-extern void recalc_sigpending(void);
-
-extern void signal_wake_up(struct task_struct *t, int resume_stopped);
-
-/*
- * Wrappers for p->thread_info->cpu access. No-op on UP.
- */
-#ifdef CONFIG_SMP
-
-static inline unsigned int task_cpu(const struct task_struct *p)
-{
- return task_thread_info(p)->cpu;
-}
-
-static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
-{
- task_thread_info(p)->cpu = cpu;
-}
-
-#else
-
-static inline unsigned int task_cpu(const struct task_struct *p)
-{
- return 0;
-}
-
-static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
-{
-}
-
-#endif /* CONFIG_SMP */
-
-#ifdef HAVE_ARCH_PICK_MMAP_LAYOUT
-extern void arch_pick_mmap_layout(struct mm_struct *mm);
-#else
-static inline void arch_pick_mmap_layout(struct mm_struct *mm)
-{
- mm->mmap_base = TASK_UNMAPPED_BASE;
- mm->get_unmapped_area = arch_get_unmapped_area;
- mm->unmap_area = arch_unmap_area;
-}
-#endif
-
-extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
-extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
-
-#include <linux/sysdev.h>
-extern int sched_mc_power_savings, sched_smt_power_savings;
-extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings;
-extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
-
-extern void normalize_rt_tasks(void);
-
-#ifdef CONFIG_PM
-/*
- * Check if a process has been frozen
- */
-static inline int frozen(struct task_struct *p)
-{
- return p->flags & PF_FROZEN;
-}
-
-/*
- * Check if there is a request to freeze a process
- */
-static inline int freezing(struct task_struct *p)
-{
- return p->flags & PF_FREEZE;
-}
-
-/*
- * Request that a process be frozen
- * FIXME: SMP problem. We may not modify other process' flags!
- */
-static inline void freeze(struct task_struct *p)
-{
- p->flags |= PF_FREEZE;
-}
-
-/*
- * Sometimes we may need to cancel the previous 'freeze' request
- */
-static inline void do_not_freeze(struct task_struct *p)
-{
- p->flags &= ~PF_FREEZE;
-}
-
-/*
- * Wake up a frozen process
- */
-static inline int thaw_process(struct task_struct *p)
-{
- if (frozen(p)) {
- p->flags &= ~PF_FROZEN;
- wake_up_process(p);
- return 1;
- }
- return 0;
-}
-
-/*
- * freezing is complete, mark process as frozen
- */
-static inline void frozen_process(struct task_struct *p)
-{
- p->flags = (p->flags & ~PF_FREEZE) | PF_FROZEN;
-}
-
-extern void refrigerator(void);
-extern int freeze_processes(void);
-extern void thaw_processes(void);
-
-static inline int try_to_freeze(void)
-{
- if (freezing(current)) {
- refrigerator();
- return 1;
- } else
- return 0;
-}
-#else
-static inline int frozen(struct task_struct *p) { return 0; }
-static inline int freezing(struct task_struct *p) { return 0; }
-static inline void freeze(struct task_struct *p) { BUG(); }
-static inline int thaw_process(struct task_struct *p) { return 1; }
-static inline void frozen_process(struct task_struct *p) { BUG(); }
-
-static inline void refrigerator(void) {}
-static inline int freeze_processes(void) { BUG(); return 0; }
-static inline void thaw_processes(void) {}
-
-static inline int try_to_freeze(void) { return 0; }
-
-#endif /* CONFIG_PM */
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/seccomp.h b/original/linux/seccomp.h
deleted file mode 100644
index 84f6320..0000000
--- a/original/linux/seccomp.h
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifndef _LINUX_SECCOMP_H
-#define _LINUX_SECCOMP_H
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-
-
-/* Valid values for seccomp.mode and prctl(PR_SET_SECCOMP, <mode>) */
-#define SECCOMP_MODE_DISABLED 0 /* seccomp is not in use. */
-#define SECCOMP_MODE_STRICT 1 /* uses hard-coded filter. */
-#define SECCOMP_MODE_FILTER 2 /* uses user-supplied filter. */
-
-/*
- * All BPF programs must return a 32-bit value.
- * The bottom 16-bits are for optional return data.
- * The upper 16-bits are ordered from least permissive values to most.
- *
- * The ordering ensures that a min_t() over composed return values always
- * selects the least permissive choice.
- */
-#define SECCOMP_RET_KILL 0x00000000U /* kill the task immediately */
-#define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */
-#define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */
-#define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */
-#define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */
-
-/* Masks for the return value sections. */
-#define SECCOMP_RET_ACTION 0x7fff0000U
-#define SECCOMP_RET_DATA 0x0000ffffU
-
-/**
- * struct seccomp_data - the format the BPF program executes over.
- * @nr: the system call number
- * @arch: indicates system call convention as an AUDIT_ARCH_* value
- * as defined in <linux/audit.h>.
- * @instruction_pointer: at the time of the system call.
- * @args: up to 6 system call arguments always stored as 64-bit values
- * regardless of the architecture.
- */
-struct seccomp_data {
- int nr;
- __u32 arch;
- __u64 instruction_pointer;
- __u64 args[6];
-};
-
-#ifdef __KERNEL__
-#ifdef CONFIG_SECCOMP
-
-#include <linux/thread_info.h>
-#include <asm/seccomp.h>
-
-struct seccomp_filter;
-/**
- * struct seccomp - the state of a seccomp'ed process
- *
- * @mode: indicates one of the valid values above for controlled
- * system calls available to a process.
- * @filter: The metadata and ruleset for determining what system calls
- * are allowed for a task.
- *
- * @filter must only be accessed from the context of current as there
- * is no locking.
- */
-struct seccomp {
- int mode;
- struct seccomp_filter *filter;
-};
-
-extern int __secure_computing(int);
-static inline int secure_computing(int this_syscall)
-{
- if (unlikely(test_thread_flag(TIF_SECCOMP)))
- return __secure_computing(this_syscall);
- return 0;
-}
-
-/* A wrapper for architectures supporting only SECCOMP_MODE_STRICT. */
-static inline void secure_computing_strict(int this_syscall)
-{
- BUG_ON(secure_computing(this_syscall) != 0);
-}
-
-extern long prctl_get_seccomp(void);
-extern long prctl_set_seccomp(unsigned long, char __user *);
-
-static inline int seccomp_mode(struct seccomp *s)
-{
- return s->mode;
-}
-
-#else /* CONFIG_SECCOMP */
-
-#include <linux/errno.h>
-
-struct seccomp { };
-struct seccomp_filter { };
-
-static inline int secure_computing(int this_syscall) { return 0; }
-static inline void secure_computing_strict(int this_syscall) { return; }
-
-static inline long prctl_get_seccomp(void)
-{
- return -EINVAL;
-}
-
-static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3)
-{
- return -EINVAL;
-}
-
-static inline int seccomp_mode(struct seccomp *s)
-{
- return 0;
-}
-#endif /* CONFIG_SECCOMP */
-
-#ifdef CONFIG_SECCOMP_FILTER
-extern void put_seccomp_filter(struct task_struct *tsk);
-extern void get_seccomp_filter(struct task_struct *tsk);
-extern u32 seccomp_bpf_load(int off);
-#else /* CONFIG_SECCOMP_FILTER */
-static inline void put_seccomp_filter(struct task_struct *tsk)
-{
- return;
-}
-static inline void get_seccomp_filter(struct task_struct *tsk)
-{
- return;
-}
-#endif /* CONFIG_SECCOMP_FILTER */
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SECCOMP_H */
diff --git a/original/linux/securebits.h b/original/linux/securebits.h
deleted file mode 100644
index 2035c62..0000000
--- a/original/linux/securebits.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef _LINUX_SECUREBITS_H
-#define _LINUX_SECUREBITS_H 1
-
-/* Each securesetting is implemented using two bits. One bit specifies
- whether the setting is on or off. The other bit specify whether the
- setting is locked or not. A setting which is locked cannot be
- changed from user-level. */
-#define issecure_mask(X) (1 << (X))
-
-#define SECUREBITS_DEFAULT 0x00000000
-
-/* When set UID 0 has no special privileges. When unset, we support
- inheritance of root-permissions and suid-root executable under
- compatibility mode. We raise the effective and inheritable bitmasks
- *of the executable file* if the effective uid of the new process is
- 0. If the real uid is 0, we raise the effective (legacy) bit of the
- executable file. */
-#define SECURE_NOROOT 0
-#define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */
-
-#define SECBIT_NOROOT (issecure_mask(SECURE_NOROOT))
-#define SECBIT_NOROOT_LOCKED (issecure_mask(SECURE_NOROOT_LOCKED))
-
-/* When set, setuid to/from uid 0 does not trigger capability-"fixup".
- When unset, to provide compatiblility with old programs relying on
- set*uid to gain/lose privilege, transitions to/from uid 0 cause
- capabilities to be gained/lost. */
-#define SECURE_NO_SETUID_FIXUP 2
-#define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */
-
-#define SECBIT_NO_SETUID_FIXUP (issecure_mask(SECURE_NO_SETUID_FIXUP))
-#define SECBIT_NO_SETUID_FIXUP_LOCKED \
- (issecure_mask(SECURE_NO_SETUID_FIXUP_LOCKED))
-
-/* When set, a process can retain its capabilities even after
- transitioning to a non-root user (the set-uid fixup suppressed by
- bit 2). Bit-4 is cleared when a process calls exec(); setting both
- bit 4 and 5 will create a barrier through exec that no exec()'d
- child can use this feature again. */
-#define SECURE_KEEP_CAPS 4
-#define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */
-
-#define SECBIT_KEEP_CAPS (issecure_mask(SECURE_KEEP_CAPS))
-#define SECBIT_KEEP_CAPS_LOCKED (issecure_mask(SECURE_KEEP_CAPS_LOCKED))
-
-#define SECURE_ALL_BITS (issecure_mask(SECURE_NOROOT) | \
- issecure_mask(SECURE_NO_SETUID_FIXUP) | \
- issecure_mask(SECURE_KEEP_CAPS))
-#define SECURE_ALL_LOCKS (SECURE_ALL_BITS << 1)
-
-#endif /* !_LINUX_SECUREBITS_H */
diff --git a/original/linux/sem.h b/original/linux/sem.h
deleted file mode 100644
index 9aaffb0..0000000
--- a/original/linux/sem.h
+++ /dev/null
@@ -1,160 +0,0 @@
-#ifndef _LINUX_SEM_H
-#define _LINUX_SEM_H
-
-#include <linux/ipc.h>
-
-/* semop flags */
-#define SEM_UNDO 0x1000 /* undo the operation on exit */
-
-/* semctl Command Definitions. */
-#define GETPID 11 /* get sempid */
-#define GETVAL 12 /* get semval */
-#define GETALL 13 /* get all semval's */
-#define GETNCNT 14 /* get semncnt */
-#define GETZCNT 15 /* get semzcnt */
-#define SETVAL 16 /* set semval */
-#define SETALL 17 /* set all semval's */
-
-/* ipcs ctl cmds */
-#define SEM_STAT 18
-#define SEM_INFO 19
-
-/* Obsolete, used only for backwards compatibility and libc5 compiles */
-struct semid_ds {
- struct ipc_perm sem_perm; /* permissions .. see ipc.h */
- __kernel_time_t sem_otime; /* last semop time */
- __kernel_time_t sem_ctime; /* last change time */
- struct sem *sem_base; /* ptr to first semaphore in array */
- struct sem_queue *sem_pending; /* pending operations to be processed */
- struct sem_queue **sem_pending_last; /* last pending operation */
- struct sem_undo *undo; /* undo requests on this array */
- unsigned short sem_nsems; /* no. of semaphores in array */
-};
-
-/* Include the definition of semid64_ds */
-#include <asm/sembuf.h>
-
-/* semop system calls takes an array of these. */
-struct sembuf {
- unsigned short sem_num; /* semaphore index in array */
- short sem_op; /* semaphore operation */
- short sem_flg; /* operation flags */
-};
-
-/* arg for semctl system calls. */
-union semun {
- int val; /* value for SETVAL */
- struct semid_ds __user *buf; /* buffer for IPC_STAT & IPC_SET */
- unsigned short __user *array; /* array for GETALL & SETALL */
- struct seminfo __user *__buf; /* buffer for IPC_INFO */
- void __user *__pad;
-};
-
-struct seminfo {
- int semmap;
- int semmni;
- int semmns;
- int semmnu;
- int semmsl;
- int semopm;
- int semume;
- int semusz;
- int semvmx;
- int semaem;
-};
-
-#define SEMMNI 128 /* <= IPCMNI max # of semaphore identifiers */
-#define SEMMSL 250 /* <= 8 000 max num of semaphores per id */
-#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
-#define SEMOPM 32 /* <= 1 000 max num of ops per semop call */
-#define SEMVMX 32767 /* <= 32767 semaphore maximum value */
-#define SEMAEM SEMVMX /* adjust on exit max value */
-
-/* unused */
-#define SEMUME SEMOPM /* max num of undo entries per process */
-#define SEMMNU SEMMNS /* num of undo structures system wide */
-#define SEMMAP SEMMNS /* # of entries in semaphore map */
-#define SEMUSZ 20 /* sizeof struct sem_undo */
-
-#ifdef __KERNEL__
-#include <asm/atomic.h>
-
-struct task_struct;
-
-/* One semaphore structure for each semaphore in the system. */
-struct sem {
- int semval; /* current value */
- int sempid; /* pid of last operation */
-};
-
-/* One sem_array data structure for each set of semaphores in the system. */
-struct sem_array {
- struct kern_ipc_perm sem_perm; /* permissions .. see ipc.h */
- int sem_id;
- time_t sem_otime; /* last semop time */
- time_t sem_ctime; /* last change time */
- struct sem *sem_base; /* ptr to first semaphore in array */
- struct sem_queue *sem_pending; /* pending operations to be processed */
- struct sem_queue **sem_pending_last; /* last pending operation */
- struct sem_undo *undo; /* undo requests on this array */
- unsigned long sem_nsems; /* no. of semaphores in array */
-};
-
-/* One queue for each sleeping process in the system. */
-struct sem_queue {
- struct sem_queue * next; /* next entry in the queue */
- struct sem_queue ** prev; /* previous entry in the queue, *(q->prev) == q */
- struct task_struct* sleeper; /* this process */
- struct sem_undo * undo; /* undo structure */
- int pid; /* process id of requesting process */
- int status; /* completion status of operation */
- struct sem_array * sma; /* semaphore array for operations */
- int id; /* internal sem id */
- struct sembuf * sops; /* array of pending operations */
- int nsops; /* number of operations */
- int alter; /* does the operation alter the array? */
-};
-
-/* Each task has a list of undo requests. They are executed automatically
- * when the process exits.
- */
-struct sem_undo {
- struct sem_undo * proc_next; /* next entry on this process */
- struct sem_undo * id_next; /* next entry on this semaphore set */
- int semid; /* semaphore set identifier */
- short * semadj; /* array of adjustments, one per semaphore */
-};
-
-/* sem_undo_list controls shared access to the list of sem_undo structures
- * that may be shared among all a CLONE_SYSVSEM task group.
- */
-struct sem_undo_list {
- atomic_t refcnt;
- spinlock_t lock;
- struct sem_undo *proc_list;
-};
-
-struct sysv_sem {
- struct sem_undo_list *undo_list;
-};
-
-#ifdef CONFIG_SYSVIPC
-
-extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
-extern void exit_sem(struct task_struct *tsk);
-
-#else
-static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
-{
- return 0;
-}
-
-static inline void exit_sem(struct task_struct *tsk)
-{
- return;
-}
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SEM_H */
diff --git a/original/linux/seq_file.h b/original/linux/seq_file.h
deleted file mode 100644
index b95f6eb..0000000
--- a/original/linux/seq_file.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef _LINUX_SEQ_FILE_H
-#define _LINUX_SEQ_FILE_H
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/string.h>
-#include <linux/mutex.h>
-
-struct seq_operations;
-struct file;
-struct vfsmount;
-struct dentry;
-struct inode;
-
-struct seq_file {
- char *buf;
- size_t size;
- size_t from;
- size_t count;
- loff_t index;
- loff_t version;
- struct mutex lock;
- struct seq_operations *op;
- void *private;
-};
-
-struct seq_operations {
- void * (*start) (struct seq_file *m, loff_t *pos);
- void (*stop) (struct seq_file *m, void *v);
- void * (*next) (struct seq_file *m, void *v, loff_t *pos);
- int (*show) (struct seq_file *m, void *v);
-};
-
-int seq_open(struct file *, struct seq_operations *);
-ssize_t seq_read(struct file *, char __user *, size_t, loff_t *);
-loff_t seq_lseek(struct file *, loff_t, int);
-int seq_release(struct inode *, struct file *);
-int seq_escape(struct seq_file *, const char *, const char *);
-int seq_putc(struct seq_file *m, char c);
-int seq_puts(struct seq_file *m, const char *s);
-
-int seq_printf(struct seq_file *, const char *, ...)
- __attribute__ ((format (printf,2,3)));
-
-int seq_path(struct seq_file *, struct vfsmount *, struct dentry *, char *);
-
-int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
-int single_release(struct inode *, struct file *);
-int seq_release_private(struct inode *, struct file *);
-
-#define SEQ_START_TOKEN ((void *)1)
-
-#endif
-#endif
diff --git a/original/linux/seqlock.h b/original/linux/seqlock.h
deleted file mode 100644
index 4600093..0000000
--- a/original/linux/seqlock.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef __LINUX_SEQLOCK_H
-#define __LINUX_SEQLOCK_H
-/*
- * Reader/writer consistent mechanism without starving writers. This type of
- * lock for data where the reader wants a consitent set of information
- * and is willing to retry if the information changes. Readers never
- * block but they may have to retry if a writer is in
- * progress. Writers do not wait for readers.
- *
- * This is not as cache friendly as brlock. Also, this will not work
- * for data that contains pointers, because any writer could
- * invalidate a pointer that a reader was following.
- *
- * Expected reader usage:
- * do {
- * seq = read_seqbegin(&foo);
- * ...
- * } while (read_seqretry(&foo, seq));
- *
- *
- * On non-SMP the spin locks disappear but the writer still needs
- * to increment the sequence variables because an interrupt routine could
- * change the state of the data.
- *
- * Based on x86_64 vsyscall gettimeofday
- * by Keith Owens and Andrea Arcangeli
- */
-
-#include <linux/spinlock.h>
-#include <linux/preempt.h>
-
-typedef struct {
- unsigned sequence;
- spinlock_t lock;
-} seqlock_t;
-
-/*
- * These macros triggered gcc-3.x compile-time problems. We think these are
- * OK now. Be cautious.
- */
-#define __SEQLOCK_UNLOCKED(lockname) \
- { 0, __SPIN_LOCK_UNLOCKED(lockname) }
-
-#define SEQLOCK_UNLOCKED \
- __SEQLOCK_UNLOCKED(old_style_seqlock_init)
-
-#define seqlock_init(x) \
- do { *(x) = (seqlock_t) __SEQLOCK_UNLOCKED(x); } while (0)
-
-#define DEFINE_SEQLOCK(x) \
- seqlock_t x = __SEQLOCK_UNLOCKED(x)
-
-/* Lock out other writers and update the count.
- * Acts like a normal spin_lock/unlock.
- * Don't need preempt_disable() because that is in the spin_lock already.
- */
-static inline void write_seqlock(seqlock_t *sl)
-{
- spin_lock(&sl->lock);
- ++sl->sequence;
- smp_wmb();
-}
-
-static inline void write_sequnlock(seqlock_t *sl)
-{
- smp_wmb();
- sl->sequence++;
- spin_unlock(&sl->lock);
-}
-
-static inline int write_tryseqlock(seqlock_t *sl)
-{
- int ret = spin_trylock(&sl->lock);
-
- if (ret) {
- ++sl->sequence;
- smp_wmb();
- }
- return ret;
-}
-
-/* Start of read calculation -- fetch last complete writer token */
-static __always_inline unsigned read_seqbegin(const seqlock_t *sl)
-{
- unsigned ret = sl->sequence;
- smp_rmb();
- return ret;
-}
-
-/* Test if reader processed invalid data.
- * If initial values is odd,
- * then writer had already started when section was entered
- * If sequence value changed
- * then writer changed data while in section
- *
- * Using xor saves one conditional branch.
- */
-static __always_inline int read_seqretry(const seqlock_t *sl, unsigned iv)
-{
- smp_rmb();
- return (iv & 1) | (sl->sequence ^ iv);
-}
-
-
-/*
- * Version using sequence counter only.
- * This can be used when code has its own mutex protecting the
- * updating starting before the write_seqcountbeqin() and ending
- * after the write_seqcount_end().
- */
-
-typedef struct seqcount {
- unsigned sequence;
-} seqcount_t;
-
-#define SEQCNT_ZERO { 0 }
-#define seqcount_init(x) do { *(x) = (seqcount_t) SEQCNT_ZERO; } while (0)
-
-/* Start of read using pointer to a sequence counter only. */
-static inline unsigned read_seqcount_begin(const seqcount_t *s)
-{
- unsigned ret = s->sequence;
- smp_rmb();
- return ret;
-}
-
-/* Test if reader processed invalid data.
- * Equivalent to: iv is odd or sequence number has changed.
- * (iv & 1) || (*s != iv)
- * Using xor saves one conditional branch.
- */
-static inline int read_seqcount_retry(const seqcount_t *s, unsigned iv)
-{
- smp_rmb();
- return (iv & 1) | (s->sequence ^ iv);
-}
-
-
-/*
- * Sequence counter only version assumes that callers are using their
- * own mutexing.
- */
-static inline void write_seqcount_begin(seqcount_t *s)
-{
- s->sequence++;
- smp_wmb();
-}
-
-static inline void write_seqcount_end(seqcount_t *s)
-{
- smp_wmb();
- s->sequence++;
-}
-
-/*
- * Possible sw/hw IRQ protected versions of the interfaces.
- */
-#define write_seqlock_irqsave(lock, flags) \
- do { local_irq_save(flags); write_seqlock(lock); } while (0)
-#define write_seqlock_irq(lock) \
- do { local_irq_disable(); write_seqlock(lock); } while (0)
-#define write_seqlock_bh(lock) \
- do { local_bh_disable(); write_seqlock(lock); } while (0)
-
-#define write_sequnlock_irqrestore(lock, flags) \
- do { write_sequnlock(lock); local_irq_restore(flags); } while(0)
-#define write_sequnlock_irq(lock) \
- do { write_sequnlock(lock); local_irq_enable(); } while(0)
-#define write_sequnlock_bh(lock) \
- do { write_sequnlock(lock); local_bh_enable(); } while(0)
-
-#define read_seqbegin_irqsave(lock, flags) \
- ({ local_irq_save(flags); read_seqbegin(lock); })
-
-#define read_seqretry_irqrestore(lock, iv, flags) \
- ({ \
- int ret = read_seqretry(lock, iv); \
- local_irq_restore(flags); \
- ret; \
- })
-
-#endif /* __LINUX_SEQLOCK_H */
diff --git a/original/linux/serial_core.h b/original/linux/serial_core.h
deleted file mode 100644
index 86501a3..0000000
--- a/original/linux/serial_core.h
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- * linux/drivers/char/serial_core.h
- *
- * Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef LINUX_SERIAL_CORE_H
-#define LINUX_SERIAL_CORE_H
-
-/*
- * The type definitions. These are from Ted Ts'o's serial.h
- */
-#define PORT_UNKNOWN 0
-#define PORT_8250 1
-#define PORT_16450 2
-#define PORT_16550 3
-#define PORT_16550A 4
-#define PORT_CIRRUS 5
-#define PORT_16650 6
-#define PORT_16650V2 7
-#define PORT_16750 8
-#define PORT_STARTECH 9
-#define PORT_16C950 10
-#define PORT_16654 11
-#define PORT_16850 12
-#define PORT_RSA 13
-#define PORT_NS16550A 14
-#define PORT_XSCALE 15
-#define PORT_MAX_8250 15 /* max port ID */
-
-/*
- * ARM specific type numbers. These are not currently guaranteed
- * to be implemented, and will change in the future. These are
- * separate so any additions to the old serial.c that occur before
- * we are merged can be easily merged here.
- */
-#define PORT_PXA 31
-#define PORT_AMBA 32
-#define PORT_CLPS711X 33
-#define PORT_SA1100 34
-#define PORT_UART00 35
-#define PORT_21285 37
-
-/* Sparc type numbers. */
-#define PORT_SUNZILOG 38
-#define PORT_SUNSAB 39
-
-/* NEC v850. */
-#define PORT_V850E_UART 40
-
-/* DZ */
-#define PORT_DZ 47
-
-/* Parisc type numbers. */
-#define PORT_MUX 48
-
-/* Atmel AT91xxx SoC */
-#define PORT_AT91 49
-
-/* Macintosh Zilog type numbers */
-#define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */
-#define PORT_PMAC_ZILOG 51
-
-/* SH-SCI */
-#define PORT_SCI 52
-#define PORT_SCIF 53
-#define PORT_IRDA 54
-
-/* Samsung S3C2410 SoC and derivatives thereof */
-#define PORT_S3C2410 55
-
-/* SGI IP22 aka Indy / Challenge S / Indigo 2 */
-#define PORT_IP22ZILOG 56
-
-/* Sharp LH7a40x -- an ARM9 SoC series */
-#define PORT_LH7A40X 57
-
-/* PPC CPM type number */
-#define PORT_CPM 58
-
-/* MPC52xx type numbers */
-#define PORT_MPC52xx 59
-
-/* IBM icom */
-#define PORT_ICOM 60
-
-/* Samsung S3C2440 SoC */
-#define PORT_S3C2440 61
-
-/* Motorola i.MX SoC */
-#define PORT_IMX 62
-
-/* Marvell MPSC */
-#define PORT_MPSC 63
-
-/* TXX9 type number */
-#define PORT_TXX9 64
-
-/* NEC VR4100 series SIU/DSIU */
-#define PORT_VR41XX_SIU 65
-#define PORT_VR41XX_DSIU 66
-
-/* Samsung S3C2400 SoC */
-#define PORT_S3C2400 67
-
-/* M32R SIO */
-#define PORT_M32R_SIO 68
-
-/*Digi jsm */
-#define PORT_JSM 69
-
-#define PORT_IP3106 70
-
-/* Hilscher netx */
-#define PORT_NETX 71
-
-/* SUN4V Hypervisor Console */
-#define PORT_SUNHV 72
-
-#define PORT_S3C2412 73
-
-
-#ifdef __KERNEL__
-
-#include <linux/compiler.h>
-#include <linux/interrupt.h>
-#include <linux/circ_buf.h>
-#include <linux/spinlock.h>
-#include <linux/sched.h>
-#include <linux/tty.h>
-#include <linux/mutex.h>
-
-struct uart_port;
-struct uart_info;
-struct serial_struct;
-struct device;
-
-/*
- * This structure describes all the operations that can be
- * done on the physical hardware.
- */
-struct uart_ops {
- unsigned int (*tx_empty)(struct uart_port *);
- void (*set_mctrl)(struct uart_port *, unsigned int mctrl);
- unsigned int (*get_mctrl)(struct uart_port *);
- void (*stop_tx)(struct uart_port *);
- void (*start_tx)(struct uart_port *);
- void (*send_xchar)(struct uart_port *, char ch);
- void (*stop_rx)(struct uart_port *);
- void (*enable_ms)(struct uart_port *);
- void (*break_ctl)(struct uart_port *, int ctl);
- int (*startup)(struct uart_port *);
- void (*shutdown)(struct uart_port *);
- void (*set_termios)(struct uart_port *, struct termios *new,
- struct termios *old);
- void (*pm)(struct uart_port *, unsigned int state,
- unsigned int oldstate);
- int (*set_wake)(struct uart_port *, unsigned int state);
-
- /*
- * Return a string describing the type of the port
- */
- const char *(*type)(struct uart_port *);
-
- /*
- * Release IO and memory resources used by the port.
- * This includes iounmap if necessary.
- */
- void (*release_port)(struct uart_port *);
-
- /*
- * Request IO and memory resources used by the port.
- * This includes iomapping the port if necessary.
- */
- int (*request_port)(struct uart_port *);
- void (*config_port)(struct uart_port *, int);
- int (*verify_port)(struct uart_port *, struct serial_struct *);
- int (*ioctl)(struct uart_port *, unsigned int, unsigned long);
-};
-
-#define UART_CONFIG_TYPE (1 << 0)
-#define UART_CONFIG_IRQ (1 << 1)
-
-struct uart_icount {
- __u32 cts;
- __u32 dsr;
- __u32 rng;
- __u32 dcd;
- __u32 rx;
- __u32 tx;
- __u32 frame;
- __u32 overrun;
- __u32 parity;
- __u32 brk;
- __u32 buf_overrun;
-};
-
-typedef unsigned int __bitwise__ upf_t;
-
-struct uart_port {
- spinlock_t lock; /* port lock */
- unsigned int iobase; /* in/out[bwl] */
- unsigned char __iomem *membase; /* read/write[bwl] */
- unsigned int irq; /* irq number */
- unsigned int uartclk; /* base uart clock */
- unsigned int fifosize; /* tx fifo size */
- unsigned char x_char; /* xon/xoff char */
- unsigned char regshift; /* reg offset shift */
- unsigned char iotype; /* io access style */
- unsigned char unused1;
-
-#define UPIO_PORT (0)
-#define UPIO_HUB6 (1)
-#define UPIO_MEM (2)
-#define UPIO_MEM32 (3)
-#define UPIO_AU (4) /* Au1x00 type IO */
-#define UPIO_TSI (5) /* Tsi108/109 type IO */
-
- unsigned int read_status_mask; /* driver specific */
- unsigned int ignore_status_mask; /* driver specific */
- struct uart_info *info; /* pointer to parent info */
- struct uart_icount icount; /* statistics */
-
- struct console *cons; /* struct console, if any */
-#ifdef CONFIG_SERIAL_CORE_CONSOLE
- unsigned long sysrq; /* sysrq timeout */
-#endif
-
- upf_t flags;
-
-#define UPF_FOURPORT ((__force upf_t) (1 << 1))
-#define UPF_SAK ((__force upf_t) (1 << 2))
-#define UPF_SPD_MASK ((__force upf_t) (0x1030))
-#define UPF_SPD_HI ((__force upf_t) (0x0010))
-#define UPF_SPD_VHI ((__force upf_t) (0x0020))
-#define UPF_SPD_CUST ((__force upf_t) (0x0030))
-#define UPF_SPD_SHI ((__force upf_t) (0x1000))
-#define UPF_SPD_WARP ((__force upf_t) (0x1010))
-#define UPF_SKIP_TEST ((__force upf_t) (1 << 6))
-#define UPF_AUTO_IRQ ((__force upf_t) (1 << 7))
-#define UPF_HARDPPS_CD ((__force upf_t) (1 << 11))
-#define UPF_LOW_LATENCY ((__force upf_t) (1 << 13))
-#define UPF_BUGGY_UART ((__force upf_t) (1 << 14))
-#define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16))
-#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))
-#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24))
-#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28))
-#define UPF_DEAD ((__force upf_t) (1 << 30))
-#define UPF_IOREMAP ((__force upf_t) (1 << 31))
-
-#define UPF_CHANGE_MASK ((__force upf_t) (0x17fff))
-#define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY))
-
- unsigned int mctrl; /* current modem ctrl settings */
- unsigned int timeout; /* character-based timeout */
- unsigned int type; /* port type */
- const struct uart_ops *ops;
- unsigned int custom_divisor;
- unsigned int line; /* port index */
- unsigned long mapbase; /* for ioremap */
- struct device *dev; /* parent device */
- unsigned char hub6; /* this should be in the 8250 driver */
- unsigned char unused[3];
-};
-
-/*
- * This is the state information which is persistent across opens.
- * The low level driver must not to touch any elements contained
- * within.
- */
-struct uart_state {
- unsigned int close_delay; /* msec */
- unsigned int closing_wait; /* msec */
-
-#define USF_CLOSING_WAIT_INF (0)
-#define USF_CLOSING_WAIT_NONE (~0U)
-
- int count;
- int pm_state;
- struct uart_info *info;
- struct uart_port *port;
-
- struct mutex mutex;
-};
-
-#define UART_XMIT_SIZE PAGE_SIZE
-
-typedef unsigned int __bitwise__ uif_t;
-
-/*
- * This is the state information which is only valid when the port
- * is open; it may be freed by the core driver once the device has
- * been closed. Either the low level driver or the core can modify
- * stuff here.
- */
-struct uart_info {
- struct tty_struct *tty;
- struct circ_buf xmit;
- uif_t flags;
-
-/*
- * Definitions for info->flags. These are _private_ to serial_core, and
- * are specific to this structure. They may be queried by low level drivers.
- */
-#define UIF_CHECK_CD ((__force uif_t) (1 << 25))
-#define UIF_CTS_FLOW ((__force uif_t) (1 << 26))
-#define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29))
-#define UIF_INITIALIZED ((__force uif_t) (1 << 31))
-
- int blocked_open;
-
- struct tasklet_struct tlet;
-
- wait_queue_head_t open_wait;
- wait_queue_head_t delta_msr_wait;
-};
-
-/* number of characters left in xmit buffer before we ask for more */
-#define WAKEUP_CHARS 256
-
-struct module;
-struct tty_driver;
-
-struct uart_driver {
- struct module *owner;
- const char *driver_name;
- const char *dev_name;
- int major;
- int minor;
- int nr;
- struct console *cons;
-
- /*
- * these are private; the low level driver should not
- * touch these; they should be initialised to NULL
- */
- struct uart_state *state;
- struct tty_driver *tty_driver;
-};
-
-void uart_write_wakeup(struct uart_port *port);
-
-/*
- * Baud rate helpers.
- */
-void uart_update_timeout(struct uart_port *port, unsigned int cflag,
- unsigned int baud);
-unsigned int uart_get_baud_rate(struct uart_port *port, struct termios *termios,
- struct termios *old, unsigned int min,
- unsigned int max);
-unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud);
-
-/*
- * Console helpers.
- */
-struct uart_port *uart_get_console(struct uart_port *ports, int nr,
- struct console *c);
-void uart_parse_options(char *options, int *baud, int *parity, int *bits,
- int *flow);
-int uart_set_options(struct uart_port *port, struct console *co, int baud,
- int parity, int bits, int flow);
-struct tty_driver *uart_console_device(struct console *co, int *index);
-void uart_console_write(struct uart_port *port, const char *s,
- unsigned int count,
- void (*putchar)(struct uart_port *, int));
-
-/*
- * Port/driver registration/removal
- */
-int uart_register_driver(struct uart_driver *uart);
-void uart_unregister_driver(struct uart_driver *uart);
-int uart_add_one_port(struct uart_driver *reg, struct uart_port *port);
-int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port);
-int uart_match_port(struct uart_port *port1, struct uart_port *port2);
-
-/*
- * Power Management
- */
-int uart_suspend_port(struct uart_driver *reg, struct uart_port *port);
-int uart_resume_port(struct uart_driver *reg, struct uart_port *port);
-
-#define uart_circ_empty(circ) ((circ)->head == (circ)->tail)
-#define uart_circ_clear(circ) ((circ)->head = (circ)->tail = 0)
-
-#define uart_circ_chars_pending(circ) \
- (CIRC_CNT((circ)->head, (circ)->tail, UART_XMIT_SIZE))
-
-#define uart_circ_chars_free(circ) \
- (CIRC_SPACE((circ)->head, (circ)->tail, UART_XMIT_SIZE))
-
-#define uart_tx_stopped(port) \
- ((port)->info->tty->stopped || (port)->info->tty->hw_stopped)
-
-/*
- * The following are helper functions for the low level drivers.
- */
-static inline int
-uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
- struct pt_regs *regs)
-{
-#ifdef SUPPORT_SYSRQ
- if (port->sysrq) {
- if (ch && time_before(jiffies, port->sysrq)) {
- handle_sysrq(ch, regs, NULL);
- port->sysrq = 0;
- return 1;
- }
- port->sysrq = 0;
- }
-#endif
- return 0;
-}
-#ifndef SUPPORT_SYSRQ
-#define uart_handle_sysrq_char(port,ch,regs) uart_handle_sysrq_char(port, 0, NULL)
-#endif
-
-/*
- * We do the SysRQ and SAK checking like this...
- */
-static inline int uart_handle_break(struct uart_port *port)
-{
- struct uart_info *info = port->info;
-#ifdef SUPPORT_SYSRQ
- if (port->cons && port->cons->index == port->line) {
- if (!port->sysrq) {
- port->sysrq = jiffies + HZ*5;
- return 1;
- }
- port->sysrq = 0;
- }
-#endif
- if (port->flags & UPF_SAK)
- do_SAK(info->tty);
- return 0;
-}
-
-/**
- * uart_handle_dcd_change - handle a change of carrier detect state
- * @port: uart_port structure for the open port
- * @status: new carrier detect status, nonzero if active
- */
-static inline void
-uart_handle_dcd_change(struct uart_port *port, unsigned int status)
-{
- struct uart_info *info = port->info;
-
- port->icount.dcd++;
-
-#ifdef CONFIG_HARD_PPS
- if ((port->flags & UPF_HARDPPS_CD) && status)
- hardpps();
-#endif
-
- if (info->flags & UIF_CHECK_CD) {
- if (status)
- wake_up_interruptible(&info->open_wait);
- else if (info->tty)
- tty_hangup(info->tty);
- }
-}
-
-/**
- * uart_handle_cts_change - handle a change of clear-to-send state
- * @port: uart_port structure for the open port
- * @status: new clear to send status, nonzero if active
- */
-static inline void
-uart_handle_cts_change(struct uart_port *port, unsigned int status)
-{
- struct uart_info *info = port->info;
- struct tty_struct *tty = info->tty;
-
- port->icount.cts++;
-
- if (info->flags & UIF_CTS_FLOW) {
- if (tty->hw_stopped) {
- if (status) {
- tty->hw_stopped = 0;
- port->ops->start_tx(port);
- uart_write_wakeup(port);
- }
- } else {
- if (!status) {
- tty->hw_stopped = 1;
- port->ops->stop_tx(port);
- }
- }
- }
-}
-
-#include <linux/tty_flip.h>
-
-static inline void
-uart_insert_char(struct uart_port *port, unsigned int status,
- unsigned int overrun, unsigned int ch, unsigned int flag)
-{
- struct tty_struct *tty = port->info->tty;
-
- if ((status & port->ignore_status_mask & ~overrun) == 0)
- tty_insert_flip_char(tty, ch, flag);
-
- /*
- * Overrun is special. Since it's reported immediately,
- * it doesn't affect the current character.
- */
- if (status & ~port->ignore_status_mask & overrun)
- tty_insert_flip_char(tty, 0, TTY_OVERRUN);
-}
-
-/*
- * UART_ENABLE_MS - determine if port should enable modem status irqs
- */
-#define UART_ENABLE_MS(port,cflag) ((port)->flags & UPF_HARDPPS_CD || \
- (cflag) & CRTSCTS || \
- !((cflag) & CLOCAL))
-
-#endif
-
-#endif /* LINUX_SERIAL_CORE_H */
diff --git a/original/linux/serial_reg.h b/original/linux/serial_reg.h
deleted file mode 100644
index 3c8a6aa..0000000
--- a/original/linux/serial_reg.h
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * include/linux/serial_reg.h
- *
- * Copyright (C) 1992, 1994 by Theodore Ts'o.
- *
- * Redistribution of this file is permitted under the terms of the GNU
- * Public License (GPL)
- *
- * These are the UART port assignments, expressed as offsets from the base
- * register. These assignments should hold for any serial port based on
- * a 8250, 16450, or 16550(A).
- */
-
-#ifndef _LINUX_SERIAL_REG_H
-#define _LINUX_SERIAL_REG_H
-
-/*
- * DLAB=0
- */
-#define UART_RX 0 /* In: Receive buffer */
-#define UART_TX 0 /* Out: Transmit buffer */
-
-#define UART_IER 1 /* Out: Interrupt Enable Register */
-#define UART_IER_MSI 0x08 /* Enable Modem status interrupt */
-#define UART_IER_RLSI 0x04 /* Enable receiver line status interrupt */
-#define UART_IER_THRI 0x02 /* Enable Transmitter holding register int. */
-#define UART_IER_RDI 0x01 /* Enable receiver data interrupt */
-/*
- * Sleep mode for ST16650 and TI16750. For the ST16650, EFR[4]=1
- */
-#define UART_IERX_SLEEP 0x10 /* Enable sleep mode */
-
-#define UART_IIR 2 /* In: Interrupt ID Register */
-#define UART_IIR_NO_INT 0x01 /* No interrupts pending */
-#define UART_IIR_ID 0x06 /* Mask for the interrupt ID */
-#define UART_IIR_MSI 0x00 /* Modem status interrupt */
-#define UART_IIR_THRI 0x02 /* Transmitter holding register empty */
-#define UART_IIR_RDI 0x04 /* Receiver data interrupt */
-#define UART_IIR_RLSI 0x06 /* Receiver line status interrupt */
-
-#define UART_FCR 2 /* Out: FIFO Control Register */
-#define UART_FCR_ENABLE_FIFO 0x01 /* Enable the FIFO */
-#define UART_FCR_CLEAR_RCVR 0x02 /* Clear the RCVR FIFO */
-#define UART_FCR_CLEAR_XMIT 0x04 /* Clear the XMIT FIFO */
-#define UART_FCR_DMA_SELECT 0x08 /* For DMA applications */
-/*
- * Note: The FIFO trigger levels are chip specific:
- * RX:76 = 00 01 10 11 TX:54 = 00 01 10 11
- * PC16550D: 1 4 8 14 xx xx xx xx
- * TI16C550A: 1 4 8 14 xx xx xx xx
- * TI16C550C: 1 4 8 14 xx xx xx xx
- * ST16C550: 1 4 8 14 xx xx xx xx
- * ST16C650: 8 16 24 28 16 8 24 30 PORT_16650V2
- * NS16C552: 1 4 8 14 xx xx xx xx
- * ST16C654: 8 16 56 60 8 16 32 56 PORT_16654
- * TI16C750: 1 16 32 56 xx xx xx xx PORT_16750
- * TI16C752: 8 16 56 60 8 16 32 56
- */
-#define UART_FCR_R_TRIG_00 0x00
-#define UART_FCR_R_TRIG_01 0x40
-#define UART_FCR_R_TRIG_10 0x80
-#define UART_FCR_R_TRIG_11 0xc0
-#define UART_FCR_T_TRIG_00 0x00
-#define UART_FCR_T_TRIG_01 0x10
-#define UART_FCR_T_TRIG_10 0x20
-#define UART_FCR_T_TRIG_11 0x30
-
-#define UART_FCR_TRIGGER_MASK 0xC0 /* Mask for the FIFO trigger range */
-#define UART_FCR_TRIGGER_1 0x00 /* Mask for trigger set at 1 */
-#define UART_FCR_TRIGGER_4 0x40 /* Mask for trigger set at 4 */
-#define UART_FCR_TRIGGER_8 0x80 /* Mask for trigger set at 8 */
-#define UART_FCR_TRIGGER_14 0xC0 /* Mask for trigger set at 14 */
-/* 16650 definitions */
-#define UART_FCR6_R_TRIGGER_8 0x00 /* Mask for receive trigger set at 1 */
-#define UART_FCR6_R_TRIGGER_16 0x40 /* Mask for receive trigger set at 4 */
-#define UART_FCR6_R_TRIGGER_24 0x80 /* Mask for receive trigger set at 8 */
-#define UART_FCR6_R_TRIGGER_28 0xC0 /* Mask for receive trigger set at 14 */
-#define UART_FCR6_T_TRIGGER_16 0x00 /* Mask for transmit trigger set at 16 */
-#define UART_FCR6_T_TRIGGER_8 0x10 /* Mask for transmit trigger set at 8 */
-#define UART_FCR6_T_TRIGGER_24 0x20 /* Mask for transmit trigger set at 24 */
-#define UART_FCR6_T_TRIGGER_30 0x30 /* Mask for transmit trigger set at 30 */
-#define UART_FCR7_64BYTE 0x20 /* Go into 64 byte mode (TI16C750) */
-
-#define UART_LCR 3 /* Out: Line Control Register */
-/*
- * Note: if the word length is 5 bits (UART_LCR_WLEN5), then setting
- * UART_LCR_STOP will select 1.5 stop bits, not 2 stop bits.
- */
-#define UART_LCR_DLAB 0x80 /* Divisor latch access bit */
-#define UART_LCR_SBC 0x40 /* Set break control */
-#define UART_LCR_SPAR 0x20 /* Stick parity (?) */
-#define UART_LCR_EPAR 0x10 /* Even parity select */
-#define UART_LCR_PARITY 0x08 /* Parity Enable */
-#define UART_LCR_STOP 0x04 /* Stop bits: 0=1 bit, 1=2 bits */
-#define UART_LCR_WLEN5 0x00 /* Wordlength: 5 bits */
-#define UART_LCR_WLEN6 0x01 /* Wordlength: 6 bits */
-#define UART_LCR_WLEN7 0x02 /* Wordlength: 7 bits */
-#define UART_LCR_WLEN8 0x03 /* Wordlength: 8 bits */
-
-#define UART_MCR 4 /* Out: Modem Control Register */
-#define UART_MCR_CLKSEL 0x80 /* Divide clock by 4 (TI16C752, EFR[4]=1) */
-#define UART_MCR_TCRTLR 0x40 /* Access TCR/TLR (TI16C752, EFR[4]=1) */
-#define UART_MCR_XONANY 0x20 /* Enable Xon Any (TI16C752, EFR[4]=1) */
-#define UART_MCR_AFE 0x20 /* Enable auto-RTS/CTS (TI16C550C/TI16C750) */
-#define UART_MCR_LOOP 0x10 /* Enable loopback test mode */
-#define UART_MCR_OUT2 0x08 /* Out2 complement */
-#define UART_MCR_OUT1 0x04 /* Out1 complement */
-#define UART_MCR_RTS 0x02 /* RTS complement */
-#define UART_MCR_DTR 0x01 /* DTR complement */
-
-#define UART_LSR 5 /* In: Line Status Register */
-#define UART_LSR_TEMT 0x40 /* Transmitter empty */
-#define UART_LSR_THRE 0x20 /* Transmit-hold-register empty */
-#define UART_LSR_BI 0x10 /* Break interrupt indicator */
-#define UART_LSR_FE 0x08 /* Frame error indicator */
-#define UART_LSR_PE 0x04 /* Parity error indicator */
-#define UART_LSR_OE 0x02 /* Overrun error indicator */
-#define UART_LSR_DR 0x01 /* Receiver data ready */
-
-#define UART_MSR 6 /* In: Modem Status Register */
-#define UART_MSR_DCD 0x80 /* Data Carrier Detect */
-#define UART_MSR_RI 0x40 /* Ring Indicator */
-#define UART_MSR_DSR 0x20 /* Data Set Ready */
-#define UART_MSR_CTS 0x10 /* Clear to Send */
-#define UART_MSR_DDCD 0x08 /* Delta DCD */
-#define UART_MSR_TERI 0x04 /* Trailing edge ring indicator */
-#define UART_MSR_DDSR 0x02 /* Delta DSR */
-#define UART_MSR_DCTS 0x01 /* Delta CTS */
-#define UART_MSR_ANY_DELTA 0x0F /* Any of the delta bits! */
-
-#define UART_SCR 7 /* I/O: Scratch Register */
-
-/*
- * DLAB=1
- */
-#define UART_DLL 0 /* Out: Divisor Latch Low */
-#define UART_DLM 1 /* Out: Divisor Latch High */
-
-/*
- * LCR=0xBF (or DLAB=1 for 16C660)
- */
-#define UART_EFR 2 /* I/O: Extended Features Register */
-#define UART_EFR_CTS 0x80 /* CTS flow control */
-#define UART_EFR_RTS 0x40 /* RTS flow control */
-#define UART_EFR_SCD 0x20 /* Special character detect */
-#define UART_EFR_ECB 0x10 /* Enhanced control bit */
-/*
- * the low four bits control software flow control
- */
-
-/*
- * LCR=0xBF, TI16C752, ST16650, ST16650A, ST16654
- */
-#define UART_XON1 4 /* I/O: Xon character 1 */
-#define UART_XON2 5 /* I/O: Xon character 2 */
-#define UART_XOFF1 6 /* I/O: Xoff character 1 */
-#define UART_XOFF2 7 /* I/O: Xoff character 2 */
-
-/*
- * EFR[4]=1 MCR[6]=1, TI16C752
- */
-#define UART_TI752_TCR 6 /* I/O: transmission control register */
-#define UART_TI752_TLR 7 /* I/O: trigger level register */
-
-/*
- * LCR=0xBF, XR16C85x
- */
-#define UART_TRG 0 /* FCTR bit 7 selects Rx or Tx
- * In: Fifo count
- * Out: Fifo custom trigger levels */
-/*
- * These are the definitions for the Programmable Trigger Register
- */
-#define UART_TRG_1 0x01
-#define UART_TRG_4 0x04
-#define UART_TRG_8 0x08
-#define UART_TRG_16 0x10
-#define UART_TRG_32 0x20
-#define UART_TRG_64 0x40
-#define UART_TRG_96 0x60
-#define UART_TRG_120 0x78
-#define UART_TRG_128 0x80
-
-#define UART_FCTR 1 /* Feature Control Register */
-#define UART_FCTR_RTS_NODELAY 0x00 /* RTS flow control delay */
-#define UART_FCTR_RTS_4DELAY 0x01
-#define UART_FCTR_RTS_6DELAY 0x02
-#define UART_FCTR_RTS_8DELAY 0x03
-#define UART_FCTR_IRDA 0x04 /* IrDa data encode select */
-#define UART_FCTR_TX_INT 0x08 /* Tx interrupt type select */
-#define UART_FCTR_TRGA 0x00 /* Tx/Rx 550 trigger table select */
-#define UART_FCTR_TRGB 0x10 /* Tx/Rx 650 trigger table select */
-#define UART_FCTR_TRGC 0x20 /* Tx/Rx 654 trigger table select */
-#define UART_FCTR_TRGD 0x30 /* Tx/Rx 850 programmable trigger select */
-#define UART_FCTR_SCR_SWAP 0x40 /* Scratch pad register swap */
-#define UART_FCTR_RX 0x00 /* Programmable trigger mode select */
-#define UART_FCTR_TX 0x80 /* Programmable trigger mode select */
-
-/*
- * LCR=0xBF, FCTR[6]=1
- */
-#define UART_EMSR 7 /* Extended Mode Select Register */
-#define UART_EMSR_FIFO_COUNT 0x01 /* Rx/Tx select */
-#define UART_EMSR_ALT_COUNT 0x02 /* Alternating count select */
-
-/*
- * The Intel XScale on-chip UARTs define these bits
- */
-#define UART_IER_DMAE 0x80 /* DMA Requests Enable */
-#define UART_IER_UUE 0x40 /* UART Unit Enable */
-#define UART_IER_NRZE 0x20 /* NRZ coding Enable */
-#define UART_IER_RTOIE 0x10 /* Receiver Time Out Interrupt Enable */
-
-#define UART_IIR_TOD 0x08 /* Character Timeout Indication Detected */
-
-#define UART_FCR_PXAR1 0x00 /* receive FIFO treshold = 1 */
-#define UART_FCR_PXAR8 0x40 /* receive FIFO treshold = 8 */
-#define UART_FCR_PXAR16 0x80 /* receive FIFO treshold = 16 */
-#define UART_FCR_PXAR32 0xc0 /* receive FIFO treshold = 32 */
-
-
-
-
-/*
- * These register definitions are for the 16C950
- */
-#define UART_ASR 0x01 /* Additional Status Register */
-#define UART_RFL 0x03 /* Receiver FIFO level */
-#define UART_TFL 0x04 /* Transmitter FIFO level */
-#define UART_ICR 0x05 /* Index Control Register */
-
-/* The 16950 ICR registers */
-#define UART_ACR 0x00 /* Additional Control Register */
-#define UART_CPR 0x01 /* Clock Prescalar Register */
-#define UART_TCR 0x02 /* Times Clock Register */
-#define UART_CKS 0x03 /* Clock Select Register */
-#define UART_TTL 0x04 /* Transmitter Interrupt Trigger Level */
-#define UART_RTL 0x05 /* Receiver Interrupt Trigger Level */
-#define UART_FCL 0x06 /* Flow Control Level Lower */
-#define UART_FCH 0x07 /* Flow Control Level Higher */
-#define UART_ID1 0x08 /* ID #1 */
-#define UART_ID2 0x09 /* ID #2 */
-#define UART_ID3 0x0A /* ID #3 */
-#define UART_REV 0x0B /* Revision */
-#define UART_CSR 0x0C /* Channel Software Reset */
-#define UART_NMR 0x0D /* Nine-bit Mode Register */
-#define UART_CTR 0xFF
-
-/*
- * The 16C950 Additional Control Register
- */
-#define UART_ACR_RXDIS 0x01 /* Receiver disable */
-#define UART_ACR_TXDIS 0x02 /* Transmitter disable */
-#define UART_ACR_DSRFC 0x04 /* DSR Flow Control */
-#define UART_ACR_TLENB 0x20 /* 950 trigger levels enable */
-#define UART_ACR_ICRRD 0x40 /* ICR Read enable */
-#define UART_ACR_ASREN 0x80 /* Additional status enable */
-
-
-
-/*
- * These definitions are for the RSA-DV II/S card, from
- *
- * Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
- */
-
-#define UART_RSA_BASE (-8)
-
-#define UART_RSA_MSR ((UART_RSA_BASE) + 0) /* I/O: Mode Select Register */
-
-#define UART_RSA_MSR_SWAP (1 << 0) /* Swap low/high 8 bytes in I/O port addr */
-#define UART_RSA_MSR_FIFO (1 << 2) /* Enable the external FIFO */
-#define UART_RSA_MSR_FLOW (1 << 3) /* Enable the auto RTS/CTS flow control */
-#define UART_RSA_MSR_ITYP (1 << 4) /* Level (1) / Edge triger (0) */
-
-#define UART_RSA_IER ((UART_RSA_BASE) + 1) /* I/O: Interrupt Enable Register */
-
-#define UART_RSA_IER_Rx_FIFO_H (1 << 0) /* Enable Rx FIFO half full int. */
-#define UART_RSA_IER_Tx_FIFO_H (1 << 1) /* Enable Tx FIFO half full int. */
-#define UART_RSA_IER_Tx_FIFO_E (1 << 2) /* Enable Tx FIFO empty int. */
-#define UART_RSA_IER_Rx_TOUT (1 << 3) /* Enable char receive timeout int */
-#define UART_RSA_IER_TIMER (1 << 4) /* Enable timer interrupt */
-
-#define UART_RSA_SRR ((UART_RSA_BASE) + 2) /* IN: Status Read Register */
-
-#define UART_RSA_SRR_Tx_FIFO_NEMP (1 << 0) /* Tx FIFO is not empty (1) */
-#define UART_RSA_SRR_Tx_FIFO_NHFL (1 << 1) /* Tx FIFO is not half full (1) */
-#define UART_RSA_SRR_Tx_FIFO_NFUL (1 << 2) /* Tx FIFO is not full (1) */
-#define UART_RSA_SRR_Rx_FIFO_NEMP (1 << 3) /* Rx FIFO is not empty (1) */
-#define UART_RSA_SRR_Rx_FIFO_NHFL (1 << 4) /* Rx FIFO is not half full (1) */
-#define UART_RSA_SRR_Rx_FIFO_NFUL (1 << 5) /* Rx FIFO is not full (1) */
-#define UART_RSA_SRR_Rx_TOUT (1 << 6) /* Character reception timeout occurred (1) */
-#define UART_RSA_SRR_TIMER (1 << 7) /* Timer interrupt occurred */
-
-#define UART_RSA_FRR ((UART_RSA_BASE) + 2) /* OUT: FIFO Reset Register */
-
-#define UART_RSA_TIVSR ((UART_RSA_BASE) + 3) /* I/O: Timer Interval Value Set Register */
-
-#define UART_RSA_TCR ((UART_RSA_BASE) + 4) /* OUT: Timer Control Register */
-
-#define UART_RSA_TCR_SWITCH (1 << 0) /* Timer on */
-
-/*
- * The RSA DSV/II board has two fixed clock frequencies. One is the
- * standard rate, and the other is 8 times faster.
- */
-#define SERIAL_RSA_BAUD_BASE (921600)
-#define SERIAL_RSA_BAUD_BASE_LO (SERIAL_RSA_BAUD_BASE / 8)
-
-/*
- * Extra serial register definitions for the internal UARTs
- * in TI OMAP processors.
- */
-#define UART_OMAP_MDR1 0x08 /* Mode definition register */
-#define UART_OMAP_MDR2 0x09 /* Mode definition register 2 */
-#define UART_OMAP_SCR 0x10 /* Supplementary control register */
-#define UART_OMAP_SSR 0x11 /* Supplementary status register */
-#define UART_OMAP_EBLR 0x12 /* BOF length register */
-#define UART_OMAP_OSC_12M_SEL 0x13 /* OMAP1510 12MHz osc select */
-#define UART_OMAP_MVER 0x14 /* Module version register */
-#define UART_OMAP_SYSC 0x15 /* System configuration register */
-#define UART_OMAP_SYSS 0x16 /* System status register */
-
-#endif /* _LINUX_SERIAL_REG_H */
-
diff --git a/original/linux/serio.h b/original/linux/serio.h
deleted file mode 100644
index 6348e83..0000000
--- a/original/linux/serio.h
+++ /dev/null
@@ -1,221 +0,0 @@
-#ifndef _SERIO_H
-#define _SERIO_H
-
-/*
- * Copyright (C) 1999-2002 Vojtech Pavlik
-*
- * 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/ioctl.h>
-
-#define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
-
-#ifdef __KERNEL__
-
-#include <linux/interrupt.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <linux/mutex.h>
-#include <linux/device.h>
-#include <linux/mod_devicetable.h>
-
-struct serio {
- void *port_data;
-
- char name[32];
- char phys[32];
-
- unsigned int manual_bind;
-
- struct serio_device_id id;
-
- spinlock_t lock; /* protects critical sections from port's interrupt handler */
-
- int (*write)(struct serio *, unsigned char);
- int (*open)(struct serio *);
- void (*close)(struct serio *);
- int (*start)(struct serio *);
- void (*stop)(struct serio *);
-
- struct serio *parent, *child;
-
- struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */
- struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
-
- struct device dev;
- unsigned int registered; /* port has been fully registered with driver core */
-
- struct list_head node;
-};
-#define to_serio_port(d) container_of(d, struct serio, dev)
-
-struct serio_driver {
- void *private;
- char *description;
-
- struct serio_device_id *id_table;
- unsigned int manual_bind;
-
- void (*write_wakeup)(struct serio *);
- irqreturn_t (*interrupt)(struct serio *, unsigned char,
- unsigned int, struct pt_regs *);
- int (*connect)(struct serio *, struct serio_driver *drv);
- int (*reconnect)(struct serio *);
- void (*disconnect)(struct serio *);
- void (*cleanup)(struct serio *);
-
- struct device_driver driver;
-};
-#define to_serio_driver(d) container_of(d, struct serio_driver, driver)
-
-int serio_open(struct serio *serio, struct serio_driver *drv);
-void serio_close(struct serio *serio);
-void serio_rescan(struct serio *serio);
-void serio_reconnect(struct serio *serio);
-irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs);
-
-void __serio_register_port(struct serio *serio, struct module *owner);
-static inline void serio_register_port(struct serio *serio)
-{
- __serio_register_port(serio, THIS_MODULE);
-}
-
-void serio_unregister_port(struct serio *serio);
-void serio_unregister_child_port(struct serio *serio);
-void __serio_unregister_port_delayed(struct serio *serio, struct module *owner);
-static inline void serio_unregister_port_delayed(struct serio *serio)
-{
- __serio_unregister_port_delayed(serio, THIS_MODULE);
-}
-
-void __serio_register_driver(struct serio_driver *drv, struct module *owner);
-static inline void serio_register_driver(struct serio_driver *drv)
-{
- __serio_register_driver(drv, THIS_MODULE);
-}
-
-void serio_unregister_driver(struct serio_driver *drv);
-
-static inline int serio_write(struct serio *serio, unsigned char data)
-{
- if (serio->write)
- return serio->write(serio, data);
- else
- return -1;
-}
-
-static inline void serio_drv_write_wakeup(struct serio *serio)
-{
- if (serio->drv && serio->drv->write_wakeup)
- serio->drv->write_wakeup(serio);
-}
-
-static inline void serio_cleanup(struct serio *serio)
-{
- if (serio->drv && serio->drv->cleanup)
- serio->drv->cleanup(serio);
-}
-
-/*
- * Use the following functions to manipulate serio's per-port
- * driver-specific data.
- */
-static inline void *serio_get_drvdata(struct serio *serio)
-{
- return dev_get_drvdata(&serio->dev);
-}
-
-static inline void serio_set_drvdata(struct serio *serio, void *data)
-{
- dev_set_drvdata(&serio->dev, data);
-}
-
-/*
- * Use the following functions to protect critical sections in
- * driver code from port's interrupt handler
- */
-static inline void serio_pause_rx(struct serio *serio)
-{
- spin_lock_irq(&serio->lock);
-}
-
-static inline void serio_continue_rx(struct serio *serio)
-{
- spin_unlock_irq(&serio->lock);
-}
-
-/*
- * Use the following functions to pin serio's driver in process context
- */
-static inline int serio_pin_driver(struct serio *serio)
-{
- return mutex_lock_interruptible(&serio->drv_mutex);
-}
-
-static inline void serio_pin_driver_uninterruptible(struct serio *serio)
-{
- mutex_lock(&serio->drv_mutex);
-}
-
-static inline void serio_unpin_driver(struct serio *serio)
-{
- mutex_unlock(&serio->drv_mutex);
-}
-
-
-#endif
-
-/*
- * bit masks for use in "interrupt" flags (3rd argument)
- */
-#define SERIO_TIMEOUT 1
-#define SERIO_PARITY 2
-#define SERIO_FRAME 4
-
-/*
- * Serio types
- */
-#define SERIO_XT 0x00
-#define SERIO_8042 0x01
-#define SERIO_RS232 0x02
-#define SERIO_HIL_MLC 0x03
-#define SERIO_PS_PSTHRU 0x05
-#define SERIO_8042_XL 0x06
-
-/*
- * Serio types
- */
-#define SERIO_UNKNOWN 0x00
-#define SERIO_MSC 0x01
-#define SERIO_SUN 0x02
-#define SERIO_MS 0x03
-#define SERIO_MP 0x04
-#define SERIO_MZ 0x05
-#define SERIO_MZP 0x06
-#define SERIO_MZPP 0x07
-#define SERIO_VSXXXAA 0x08
-#define SERIO_SUNKBD 0x10
-#define SERIO_WARRIOR 0x18
-#define SERIO_SPACEORB 0x19
-#define SERIO_MAGELLAN 0x1a
-#define SERIO_SPACEBALL 0x1b
-#define SERIO_GUNZE 0x1c
-#define SERIO_IFORCE 0x1d
-#define SERIO_STINGER 0x1e
-#define SERIO_NEWTON 0x1f
-#define SERIO_STOWAWAY 0x20
-#define SERIO_H3600 0x21
-#define SERIO_PS2SER 0x22
-#define SERIO_TWIDKBD 0x23
-#define SERIO_TWIDJOY 0x24
-#define SERIO_HIL 0x25
-#define SERIO_SNES232 0x26
-#define SERIO_SEMTECH 0x27
-#define SERIO_LKKBD 0x28
-#define SERIO_ELO 0x29
-#define SERIO_MICROTOUCH 0x30
-
-#endif
diff --git a/original/linux/sfh7743.h b/original/linux/sfh7743.h
deleted file mode 100755
index 5df34df..0000000
--- a/original/linux/sfh7743.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2009 Motorola, Inc.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-#ifndef _LINUX_SFH7743_H_
-#define _LINUX_SFH7743_H_
-
-#include <linux/ioctl.h>
-
-#ifdef __KERNEL__
-
-struct sfh7743_platform_data {
- int (*init)(void);
- void (*exit)(void);
- int (*power_on)(void);
- int (*power_off)(void);
-
- int gpio;
-} __attribute__ ((packed));
-
-#endif /* __KERNEL__ */
-
-#define SFH7743_IO 0xA2
-
-#define SFH7743_IOCTL_GET_ENABLE _IOR(SFH7743_IO, 0x00, char)
-#define SFH7743_IOCTL_SET_ENABLE _IOW(SFH7743_IO, 0x01, char)
-
-#endif /* _LINUX_SFH7743_H__ */
diff --git a/original/linux/shm.h b/original/linux/shm.h
deleted file mode 100644
index a2c896a..0000000
--- a/original/linux/shm.h
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef _LINUX_SHM_H_
-#define _LINUX_SHM_H_
-
-#include <linux/ipc.h>
-#include <linux/errno.h>
-#include <asm/page.h>
-
-/*
- * SHMMAX, SHMMNI and SHMALL are upper limits are defaults which can
- * be increased by sysctl
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-#define SHMMIN 1 /* min shared seg size (bytes) */
-#define SHMMNI 4096 /* max num of segs system wide */
-#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */
-#define SHMSEG SHMMNI /* max shared segs per process */
-
-#include <asm/shmparam.h>
-
-/* Obsolete, used only for backwards compatibility and libc5 compiles */
-struct shmid_ds {
- struct ipc_perm shm_perm; /* operation perms */
- int shm_segsz; /* size of segment (bytes) */
- __kernel_time_t shm_atime; /* last attach time */
- __kernel_time_t shm_dtime; /* last detach time */
- __kernel_time_t shm_ctime; /* last change time */
- __kernel_ipc_pid_t shm_cpid; /* pid of creator */
- __kernel_ipc_pid_t shm_lpid; /* pid of last operator */
- unsigned short shm_nattch; /* no. of current attaches */
- unsigned short shm_unused; /* compatibility */
- void *shm_unused2; /* ditto - used by DIPC */
- void *shm_unused3; /* unused */
-};
-
-/* Include the definition of shmid64_ds and shminfo64 */
-#include <asm/shmbuf.h>
-
-/* permission flag for shmget */
-#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
-#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */
-
-/* mode for attach */
-#define SHM_RDONLY 010000 /* read-only access */
-#define SHM_RND 020000 /* round attach address to SHMLBA boundary */
-#define SHM_REMAP 040000 /* take-over region on attach */
-#define SHM_EXEC 0100000 /* execution access */
-
-/* super user shmctl commands */
-#define SHM_LOCK 11
-#define SHM_UNLOCK 12
-
-/* ipcs ctl commands */
-#define SHM_STAT 13
-#define SHM_INFO 14
-
-/* Obsolete, used only for backwards compatibility */
-struct shminfo {
- int shmmax;
- int shmmin;
- int shmmni;
- int shmseg;
- int shmall;
-};
-
-struct shm_info {
- int used_ids;
- unsigned long shm_tot; /* total allocated shm */
- unsigned long shm_rss; /* total resident shm */
- unsigned long shm_swp; /* total swapped shm */
- unsigned long swap_attempts;
- unsigned long swap_successes;
-};
-
-#ifdef __KERNEL__
-struct shmid_kernel /* private to the kernel */
-{
- struct kern_ipc_perm shm_perm;
- struct file * shm_file;
- int id;
- unsigned long shm_nattch;
- unsigned long shm_segsz;
- time_t shm_atim;
- time_t shm_dtim;
- time_t shm_ctim;
- pid_t shm_cprid;
- pid_t shm_lprid;
- struct user_struct *mlock_user;
-};
-
-/* shm_mode upper byte flags */
-#define SHM_DEST 01000 /* segment will be destroyed on last detach */
-#define SHM_LOCKED 02000 /* segment will not be swapped */
-#define SHM_HUGETLB 04000 /* segment will use huge TLB pages */
-#define SHM_NORESERVE 010000 /* don't check for reservations */
-
-#ifdef CONFIG_SYSVIPC
-long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr);
-#else
-static inline long do_shmat(int shmid, char __user *shmaddr,
- int shmflg, unsigned long *addr)
-{
- return -ENOSYS;
-}
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SHM_H_ */
diff --git a/original/linux/signal.h b/original/linux/signal.h
deleted file mode 100644
index 117135e..0000000
--- a/original/linux/signal.h
+++ /dev/null
@@ -1,246 +0,0 @@
-#ifndef _LINUX_SIGNAL_H
-#define _LINUX_SIGNAL_H
-
-#include <asm/signal.h>
-#include <asm/siginfo.h>
-
-#ifdef __KERNEL__
-#include <linux/list.h>
-#include <linux/spinlock.h>
-
-/*
- * Real Time signals may be queued.
- */
-
-struct sigqueue {
- struct list_head list;
- int flags;
- siginfo_t info;
- struct user_struct *user;
-};
-
-/* flags values. */
-#define SIGQUEUE_PREALLOC 1
-
-struct sigpending {
- struct list_head list;
- sigset_t signal;
-};
-
-/*
- * Define some primitives to manipulate sigset_t.
- */
-
-#ifndef __HAVE_ARCH_SIG_BITOPS
-#include <linux/bitops.h>
-
-/* We don't use <linux/bitops.h> for these because there is no need to
- be atomic. */
-static inline void sigaddset(sigset_t *set, int _sig)
-{
- unsigned long sig = _sig - 1;
- if (_NSIG_WORDS == 1)
- set->sig[0] |= 1UL << sig;
- else
- set->sig[sig / _NSIG_BPW] |= 1UL << (sig % _NSIG_BPW);
-}
-
-static inline void sigdelset(sigset_t *set, int _sig)
-{
- unsigned long sig = _sig - 1;
- if (_NSIG_WORDS == 1)
- set->sig[0] &= ~(1UL << sig);
- else
- set->sig[sig / _NSIG_BPW] &= ~(1UL << (sig % _NSIG_BPW));
-}
-
-static inline int sigismember(sigset_t *set, int _sig)
-{
- unsigned long sig = _sig - 1;
- if (_NSIG_WORDS == 1)
- return 1 & (set->sig[0] >> sig);
- else
- return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
-}
-
-static inline int sigfindinword(unsigned long word)
-{
- return ffz(~word);
-}
-
-#endif /* __HAVE_ARCH_SIG_BITOPS */
-
-static inline int sigisemptyset(sigset_t *set)
-{
- extern void _NSIG_WORDS_is_unsupported_size(void);
- switch (_NSIG_WORDS) {
- case 4:
- return (set->sig[3] | set->sig[2] |
- set->sig[1] | set->sig[0]) == 0;
- case 2:
- return (set->sig[1] | set->sig[0]) == 0;
- case 1:
- return set->sig[0] == 0;
- default:
- _NSIG_WORDS_is_unsupported_size();
- return 0;
- }
-}
-
-#define sigmask(sig) (1UL << ((sig) - 1))
-
-#ifndef __HAVE_ARCH_SIG_SETOPS
-#include <linux/string.h>
-
-#define _SIG_SET_BINOP(name, op) \
-static inline void name(sigset_t *r, const sigset_t *a, const sigset_t *b) \
-{ \
- extern void _NSIG_WORDS_is_unsupported_size(void); \
- unsigned long a0, a1, a2, a3, b0, b1, b2, b3; \
- \
- switch (_NSIG_WORDS) { \
- case 4: \
- a3 = a->sig[3]; a2 = a->sig[2]; \
- b3 = b->sig[3]; b2 = b->sig[2]; \
- r->sig[3] = op(a3, b3); \
- r->sig[2] = op(a2, b2); \
- case 2: \
- a1 = a->sig[1]; b1 = b->sig[1]; \
- r->sig[1] = op(a1, b1); \
- case 1: \
- a0 = a->sig[0]; b0 = b->sig[0]; \
- r->sig[0] = op(a0, b0); \
- break; \
- default: \
- _NSIG_WORDS_is_unsupported_size(); \
- } \
-}
-
-#define _sig_or(x,y) ((x) | (y))
-_SIG_SET_BINOP(sigorsets, _sig_or)
-
-#define _sig_and(x,y) ((x) & (y))
-_SIG_SET_BINOP(sigandsets, _sig_and)
-
-#define _sig_nand(x,y) ((x) & ~(y))
-_SIG_SET_BINOP(signandsets, _sig_nand)
-
-#undef _SIG_SET_BINOP
-#undef _sig_or
-#undef _sig_and
-#undef _sig_nand
-
-#define _SIG_SET_OP(name, op) \
-static inline void name(sigset_t *set) \
-{ \
- extern void _NSIG_WORDS_is_unsupported_size(void); \
- \
- switch (_NSIG_WORDS) { \
- case 4: set->sig[3] = op(set->sig[3]); \
- set->sig[2] = op(set->sig[2]); \
- case 2: set->sig[1] = op(set->sig[1]); \
- case 1: set->sig[0] = op(set->sig[0]); \
- break; \
- default: \
- _NSIG_WORDS_is_unsupported_size(); \
- } \
-}
-
-#define _sig_not(x) (~(x))
-_SIG_SET_OP(signotset, _sig_not)
-
-#undef _SIG_SET_OP
-#undef _sig_not
-
-static inline void sigemptyset(sigset_t *set)
-{
- switch (_NSIG_WORDS) {
- default:
- memset(set, 0, sizeof(sigset_t));
- break;
- case 2: set->sig[1] = 0;
- case 1: set->sig[0] = 0;
- break;
- }
-}
-
-static inline void sigfillset(sigset_t *set)
-{
- switch (_NSIG_WORDS) {
- default:
- memset(set, -1, sizeof(sigset_t));
- break;
- case 2: set->sig[1] = -1;
- case 1: set->sig[0] = -1;
- break;
- }
-}
-
-/* Some extensions for manipulating the low 32 signals in particular. */
-
-static inline void sigaddsetmask(sigset_t *set, unsigned long mask)
-{
- set->sig[0] |= mask;
-}
-
-static inline void sigdelsetmask(sigset_t *set, unsigned long mask)
-{
- set->sig[0] &= ~mask;
-}
-
-static inline int sigtestsetmask(sigset_t *set, unsigned long mask)
-{
- return (set->sig[0] & mask) != 0;
-}
-
-static inline void siginitset(sigset_t *set, unsigned long mask)
-{
- set->sig[0] = mask;
- switch (_NSIG_WORDS) {
- default:
- memset(&set->sig[1], 0, sizeof(long)*(_NSIG_WORDS-1));
- break;
- case 2: set->sig[1] = 0;
- case 1: ;
- }
-}
-
-static inline void siginitsetinv(sigset_t *set, unsigned long mask)
-{
- set->sig[0] = ~mask;
- switch (_NSIG_WORDS) {
- default:
- memset(&set->sig[1], -1, sizeof(long)*(_NSIG_WORDS-1));
- break;
- case 2: set->sig[1] = -1;
- case 1: ;
- }
-}
-
-#endif /* __HAVE_ARCH_SIG_SETOPS */
-
-static inline void init_sigpending(struct sigpending *sig)
-{
- sigemptyset(&sig->signal);
- INIT_LIST_HEAD(&sig->list);
-}
-
-extern void flush_sigqueue(struct sigpending *queue);
-
-/* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
-static inline int valid_signal(unsigned long sig)
-{
- return sig <= _NSIG ? 1 : 0;
-}
-
-extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
-extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
-extern long do_sigpending(void __user *, unsigned long);
-extern int sigprocmask(int, sigset_t *, sigset_t *);
-
-struct pt_regs;
-extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie);
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SIGNAL_H */
diff --git a/original/linux/signalfd.h b/original/linux/signalfd.h
deleted file mode 100644
index 247399b..0000000
--- a/original/linux/signalfd.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * include/linux/signalfd.h
- *
- * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
- *
- */
-
-#ifndef _LINUX_SIGNALFD_H
-#define _LINUX_SIGNALFD_H
-
-#include <linux/types.h>
-/* For O_CLOEXEC and O_NONBLOCK */
-#include <linux/fcntl.h>
-
-/* Flags for signalfd4. */
-#define SFD_CLOEXEC O_CLOEXEC
-#define SFD_NONBLOCK O_NONBLOCK
-
-struct signalfd_siginfo {
- __u32 ssi_signo;
- __s32 ssi_errno;
- __s32 ssi_code;
- __u32 ssi_pid;
- __u32 ssi_uid;
- __s32 ssi_fd;
- __u32 ssi_tid;
- __u32 ssi_band;
- __u32 ssi_overrun;
- __u32 ssi_trapno;
- __s32 ssi_status;
- __s32 ssi_int;
- __u64 ssi_ptr;
- __u64 ssi_utime;
- __u64 ssi_stime;
- __u64 ssi_addr;
- __u16 ssi_addr_lsb;
-
- /*
- * Pad strcture to 128 bytes. Remember to update the
- * pad size when you add new members. We use a fixed
- * size structure to avoid compatibility problems with
- * future versions, and we leave extra space for additional
- * members. We use fixed size members because this strcture
- * comes out of a read(2) and we really don't want to have
- * a compat on read(2).
- */
- __u8 __pad[46];
-};
-
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_SIGNALFD
-
-/*
- * Deliver the signal to listening signalfd.
- */
-static inline void signalfd_notify(struct task_struct *tsk, int sig)
-{
- if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
- wake_up(&tsk->sighand->signalfd_wqh);
-}
-
-extern void signalfd_cleanup(struct sighand_struct *sighand);
-
-#else /* CONFIG_SIGNALFD */
-
-static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
-
-static inline void signalfd_cleanup(struct sighand_struct *sighand) { }
-
-#endif /* CONFIG_SIGNALFD */
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SIGNALFD_H */
diff --git a/original/linux/skbuff.h b/original/linux/skbuff.h
deleted file mode 100644
index 755e9cd..0000000
--- a/original/linux/skbuff.h
+++ /dev/null
@@ -1,1502 +0,0 @@
-/*
- * Definitions for the 'struct sk_buff' memory handlers.
- *
- * Authors:
- * Alan Cox, <gw4pts@gw4pts.ampr.org>
- * Florian La Roche, <rzsfl@rz.uni-sb.de>
- *
- * 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.
- */
-
-#ifndef _LINUX_SKBUFF_H
-#define _LINUX_SKBUFF_H
-
-#include <linux/kernel.h>
-#include <linux/compiler.h>
-#include <linux/time.h>
-#include <linux/cache.h>
-
-#include <asm/atomic.h>
-#include <asm/types.h>
-#include <linux/spinlock.h>
-#include <linux/mm.h>
-#include <linux/highmem.h>
-#include <linux/poll.h>
-#include <linux/net.h>
-#include <linux/textsearch.h>
-#include <net/checksum.h>
-#include <linux/dmaengine.h>
-
-#define HAVE_ALLOC_SKB /* For the drivers to know */
-#define HAVE_ALIGNABLE_SKB /* Ditto 8) */
-
-#define CHECKSUM_NONE 0
-#define CHECKSUM_HW 1
-#define CHECKSUM_UNNECESSARY 2
-
-#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \
- ~(SMP_CACHE_BYTES - 1))
-#define SKB_MAX_ORDER(X, ORDER) (((PAGE_SIZE << (ORDER)) - (X) - \
- sizeof(struct skb_shared_info)) & \
- ~(SMP_CACHE_BYTES - 1))
-#define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0))
-#define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2))
-
-/* A. Checksumming of received packets by device.
- *
- * NONE: device failed to checksum this packet.
- * skb->csum is undefined.
- *
- * UNNECESSARY: device parsed packet and wouldbe verified checksum.
- * skb->csum is undefined.
- * It is bad option, but, unfortunately, many of vendors do this.
- * Apparently with secret goal to sell you new device, when you
- * will add new protocol to your host. F.e. IPv6. 8)
- *
- * HW: the most generic way. Device supplied checksum of _all_
- * the packet as seen by netif_rx in skb->csum.
- * NOTE: Even if device supports only some protocols, but
- * is able to produce some skb->csum, it MUST use HW,
- * not UNNECESSARY.
- *
- * B. Checksumming on output.
- *
- * NONE: skb is checksummed by protocol or csum is not required.
- *
- * HW: device is required to csum packet as seen by hard_start_xmit
- * from skb->h.raw to the end and to record the checksum
- * at skb->h.raw+skb->csum.
- *
- * Device must show its capabilities in dev->features, set
- * at device setup time.
- * NETIF_F_HW_CSUM - it is clever device, it is able to checksum
- * everything.
- * NETIF_F_NO_CSUM - loopback or reliable single hop media.
- * NETIF_F_IP_CSUM - device is dumb. It is able to csum only
- * TCP/UDP over IPv4. Sigh. Vendors like this
- * way by an unknown reason. Though, see comment above
- * about CHECKSUM_UNNECESSARY. 8)
- *
- * Any questions? No questions, good. --ANK
- */
-
-struct net_device;
-
-#ifdef CONFIG_NETFILTER
-struct nf_conntrack {
- atomic_t use;
- void (*destroy)(struct nf_conntrack *);
-};
-
-#ifdef CONFIG_BRIDGE_NETFILTER
-struct nf_bridge_info {
- atomic_t use;
- struct net_device *physindev;
- struct net_device *physoutdev;
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
- struct net_device *netoutdev;
-#endif
- unsigned int mask;
- unsigned long data[32 / sizeof(unsigned long)];
-};
-#endif
-
-#endif
-
-struct sk_buff_head {
- /* These two members must be first. */
- struct sk_buff *next;
- struct sk_buff *prev;
-
- __u32 qlen;
- spinlock_t lock;
-};
-
-struct sk_buff;
-
-/* To allow 64K frame to be packed as single skb without frag_list */
-#define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2)
-
-typedef struct skb_frag_struct skb_frag_t;
-
-struct skb_frag_struct {
- struct page *page;
- __u16 page_offset;
- __u16 size;
-};
-
-/* This data is invariant across clones and lives at
- * the end of the header data, ie. at skb->end.
- */
-struct skb_shared_info {
- atomic_t dataref;
- unsigned short nr_frags;
- unsigned short gso_size;
- /* Warning: this field is not always filled in (UFO)! */
- unsigned short gso_segs;
- unsigned short gso_type;
- unsigned int ip6_frag_id;
- struct sk_buff *frag_list;
- skb_frag_t frags[MAX_SKB_FRAGS];
-};
-
-/* We divide dataref into two halves. The higher 16 bits hold references
- * to the payload part of skb->data. The lower 16 bits hold references to
- * the entire skb->data. It is up to the users of the skb to agree on
- * where the payload starts.
- *
- * All users must obey the rule that the skb->data reference count must be
- * greater than or equal to the payload reference count.
- *
- * Holding a reference to the payload part means that the user does not
- * care about modifications to the header part of skb->data.
- */
-#define SKB_DATAREF_SHIFT 16
-#define SKB_DATAREF_MASK ((1 << SKB_DATAREF_SHIFT) - 1)
-
-struct skb_timeval {
- u32 off_sec;
- u32 off_usec;
-};
-
-
-enum {
- SKB_FCLONE_UNAVAILABLE,
- SKB_FCLONE_ORIG,
- SKB_FCLONE_CLONE,
-};
-
-enum {
- SKB_GSO_TCPV4 = 1 << 0,
- SKB_GSO_UDP = 1 << 1,
-
- /* This indicates the skb is from an untrusted source. */
- SKB_GSO_DODGY = 1 << 2,
-
- /* This indicates the tcp segment has CWR set. */
- SKB_GSO_TCP_ECN = 1 << 3,
-
- SKB_GSO_TCPV6 = 1 << 4,
-};
-
-/**
- * struct sk_buff - socket buffer
- * @next: Next buffer in list
- * @prev: Previous buffer in list
- * @sk: Socket we are owned by
- * @tstamp: Time we arrived
- * @dev: Device we arrived on/are leaving by
- * @input_dev: Device we arrived on
- * @h: Transport layer header
- * @nh: Network layer header
- * @mac: Link layer header
- * @dst: destination entry
- * @sp: the security path, used for xfrm
- * @cb: Control buffer. Free for use by every layer. Put private vars here
- * @len: Length of actual data
- * @data_len: Data length
- * @mac_len: Length of link layer header
- * @csum: Checksum
- * @local_df: allow local fragmentation
- * @cloned: Head may be cloned (check refcnt to be sure)
- * @nohdr: Payload reference only, must not modify header
- * @pkt_type: Packet class
- * @fclone: skbuff clone status
- * @ip_summed: Driver fed us an IP checksum
- * @priority: Packet queueing priority
- * @users: User count - see {datagram,tcp}.c
- * @protocol: Packet protocol from driver
- * @truesize: Buffer size
- * @head: Head of buffer
- * @data: Data head pointer
- * @tail: Tail pointer
- * @end: End pointer
- * @destructor: Destruct function
- * @nfmark: Can be used for communication between hooks
- * @nfct: Associated connection, if any
- * @ipvs_property: skbuff is owned by ipvs
- * @nfctinfo: Relationship of this skb to the connection
- * @nfct_reasm: netfilter conntrack re-assembly pointer
- * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
- * @tc_index: Traffic control index
- * @tc_verd: traffic control verdict
- * @dma_cookie: a cookie to one of several possible DMA operations
- * done by skb DMA functions
- * @secmark: security marking
- */
-
-struct sk_buff {
- /* These two members must be first. */
- struct sk_buff *next;
- struct sk_buff *prev;
-
- struct sock *sk;
- struct skb_timeval tstamp;
- struct net_device *dev;
- struct net_device *input_dev;
-
- union {
- struct tcphdr *th;
- struct udphdr *uh;
- struct icmphdr *icmph;
- struct igmphdr *igmph;
- struct iphdr *ipiph;
- struct ipv6hdr *ipv6h;
- unsigned char *raw;
- } h;
-
- union {
- struct iphdr *iph;
- struct ipv6hdr *ipv6h;
- struct arphdr *arph;
- unsigned char *raw;
- } nh;
-
- union {
- unsigned char *raw;
- } mac;
-
- struct dst_entry *dst;
- struct sec_path *sp;
-
- /*
- * This is the control buffer. It is free to use for every
- * layer. Please put your private variables there. If you
- * want to keep them across layers you have to do a skb_clone()
- * first. This is owned by whoever has the skb queued ATM.
- */
- char cb[48];
-
- unsigned int len,
- data_len,
- mac_len,
- csum;
- __u32 priority;
- __u8 local_df:1,
- cloned:1,
- ip_summed:2,
- nohdr:1,
- nfctinfo:3;
- __u8 pkt_type:3,
- fclone:2,
- ipvs_property:1;
- __be16 protocol;
-
- void (*destructor)(struct sk_buff *skb);
-#ifdef CONFIG_NETFILTER
- struct nf_conntrack *nfct;
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
- struct sk_buff *nfct_reasm;
-#endif
-#ifdef CONFIG_BRIDGE_NETFILTER
- struct nf_bridge_info *nf_bridge;
-#endif
- __u32 nfmark;
-#endif /* CONFIG_NETFILTER */
-#ifdef CONFIG_NET_SCHED
- __u16 tc_index; /* traffic control index */
-#ifdef CONFIG_NET_CLS_ACT
- __u16 tc_verd; /* traffic control verdict */
-#endif
-#endif
-#ifdef CONFIG_NET_DMA
- dma_cookie_t dma_cookie;
-#endif
-#ifdef CONFIG_NETWORK_SECMARK
- __u32 secmark;
-#endif
-
-
- /* These elements must be at the end, see alloc_skb() for details. */
- unsigned int truesize;
- atomic_t users;
- unsigned char *head,
- *data,
- *tail,
- *end;
-};
-
-#ifdef __KERNEL__
-/*
- * Handling routines are only of interest to the kernel
- */
-#include <linux/slab.h>
-
-#include <asm/system.h>
-
-extern void kfree_skb(struct sk_buff *skb);
-extern void __kfree_skb(struct sk_buff *skb);
-extern struct sk_buff *__alloc_skb(unsigned int size,
- gfp_t priority, int fclone);
-static inline struct sk_buff *alloc_skb(unsigned int size,
- gfp_t priority)
-{
- return __alloc_skb(size, priority, 0);
-}
-
-static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
- gfp_t priority)
-{
- return __alloc_skb(size, priority, 1);
-}
-
-extern struct sk_buff *alloc_skb_from_cache(kmem_cache_t *cp,
- unsigned int size,
- gfp_t priority);
-extern void kfree_skbmem(struct sk_buff *skb);
-extern struct sk_buff *skb_clone(struct sk_buff *skb,
- gfp_t priority);
-extern struct sk_buff *skb_copy(const struct sk_buff *skb,
- gfp_t priority);
-extern struct sk_buff *pskb_copy(struct sk_buff *skb,
- gfp_t gfp_mask);
-extern int pskb_expand_head(struct sk_buff *skb,
- int nhead, int ntail,
- gfp_t gfp_mask);
-extern struct sk_buff *skb_realloc_headroom(struct sk_buff *skb,
- unsigned int headroom);
-extern struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
- int newheadroom, int newtailroom,
- gfp_t priority);
-extern int skb_pad(struct sk_buff *skb, int pad);
-#define dev_kfree_skb(a) kfree_skb(a)
-extern void skb_over_panic(struct sk_buff *skb, int len,
- void *here);
-extern void skb_under_panic(struct sk_buff *skb, int len,
- void *here);
-extern void skb_truesize_bug(struct sk_buff *skb);
-
-static inline void skb_truesize_check(struct sk_buff *skb)
-{
- if (unlikely((int)skb->truesize < sizeof(struct sk_buff) + skb->len))
- skb_truesize_bug(skb);
-}
-
-extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
- int getfrag(void *from, char *to, int offset,
- int len,int odd, struct sk_buff *skb),
- void *from, int length);
-
-struct skb_seq_state
-{
- __u32 lower_offset;
- __u32 upper_offset;
- __u32 frag_idx;
- __u32 stepped_offset;
- struct sk_buff *root_skb;
- struct sk_buff *cur_skb;
- __u8 *frag_data;
-};
-
-extern void skb_prepare_seq_read(struct sk_buff *skb,
- unsigned int from, unsigned int to,
- struct skb_seq_state *st);
-extern unsigned int skb_seq_read(unsigned int consumed, const u8 **data,
- struct skb_seq_state *st);
-extern void skb_abort_seq_read(struct skb_seq_state *st);
-
-extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
- unsigned int to, struct ts_config *config,
- struct ts_state *state);
-
-/* Internal */
-#define skb_shinfo(SKB) ((struct skb_shared_info *)((SKB)->end))
-
-/**
- * skb_queue_empty - check if a queue is empty
- * @list: queue head
- *
- * Returns true if the queue is empty, false otherwise.
- */
-static inline int skb_queue_empty(const struct sk_buff_head *list)
-{
- return list->next == (struct sk_buff *)list;
-}
-
-/**
- * skb_get - reference buffer
- * @skb: buffer to reference
- *
- * Makes another reference to a socket buffer and returns a pointer
- * to the buffer.
- */
-static inline struct sk_buff *skb_get(struct sk_buff *skb)
-{
- atomic_inc(&skb->users);
- return skb;
-}
-
-/*
- * If users == 1, we are the only owner and are can avoid redundant
- * atomic change.
- */
-
-/**
- * skb_cloned - is the buffer a clone
- * @skb: buffer to check
- *
- * Returns true if the buffer was generated with skb_clone() and is
- * one of multiple shared copies of the buffer. Cloned buffers are
- * shared data so must not be written to under normal circumstances.
- */
-static inline int skb_cloned(const struct sk_buff *skb)
-{
- return skb->cloned &&
- (atomic_read(&skb_shinfo(skb)->dataref) & SKB_DATAREF_MASK) != 1;
-}
-
-/**
- * skb_header_cloned - is the header a clone
- * @skb: buffer to check
- *
- * Returns true if modifying the header part of the buffer requires
- * the data to be copied.
- */
-static inline int skb_header_cloned(const struct sk_buff *skb)
-{
- int dataref;
-
- if (!skb->cloned)
- return 0;
-
- dataref = atomic_read(&skb_shinfo(skb)->dataref);
- dataref = (dataref & SKB_DATAREF_MASK) - (dataref >> SKB_DATAREF_SHIFT);
- return dataref != 1;
-}
-
-/**
- * skb_header_release - release reference to header
- * @skb: buffer to operate on
- *
- * Drop a reference to the header part of the buffer. This is done
- * by acquiring a payload reference. You must not read from the header
- * part of skb->data after this.
- */
-static inline void skb_header_release(struct sk_buff *skb)
-{
- BUG_ON(skb->nohdr);
- skb->nohdr = 1;
- atomic_add(1 << SKB_DATAREF_SHIFT, &skb_shinfo(skb)->dataref);
-}
-
-/**
- * skb_shared - is the buffer shared
- * @skb: buffer to check
- *
- * Returns true if more than one person has a reference to this
- * buffer.
- */
-static inline int skb_shared(const struct sk_buff *skb)
-{
- return atomic_read(&skb->users) != 1;
-}
-
-/**
- * skb_share_check - check if buffer is shared and if so clone it
- * @skb: buffer to check
- * @pri: priority for memory allocation
- *
- * If the buffer is shared the buffer is cloned and the old copy
- * drops a reference. A new clone with a single reference is returned.
- * If the buffer is not shared the original buffer is returned. When
- * being called from interrupt status or with spinlocks held pri must
- * be GFP_ATOMIC.
- *
- * NULL is returned on a memory allocation failure.
- */
-static inline struct sk_buff *skb_share_check(struct sk_buff *skb,
- gfp_t pri)
-{
- might_sleep_if(pri & __GFP_WAIT);
- if (skb_shared(skb)) {
- struct sk_buff *nskb = skb_clone(skb, pri);
- kfree_skb(skb);
- skb = nskb;
- }
- return skb;
-}
-
-/*
- * Copy shared buffers into a new sk_buff. We effectively do COW on
- * packets to handle cases where we have a local reader and forward
- * and a couple of other messy ones. The normal one is tcpdumping
- * a packet thats being forwarded.
- */
-
-/**
- * skb_unshare - make a copy of a shared buffer
- * @skb: buffer to check
- * @pri: priority for memory allocation
- *
- * If the socket buffer is a clone then this function creates a new
- * copy of the data, drops a reference count on the old copy and returns
- * the new copy with the reference count at 1. If the buffer is not a clone
- * the original buffer is returned. When called with a spinlock held or
- * from interrupt state @pri must be %GFP_ATOMIC
- *
- * %NULL is returned on a memory allocation failure.
- */
-static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
- gfp_t pri)
-{
- might_sleep_if(pri & __GFP_WAIT);
- if (skb_cloned(skb)) {
- struct sk_buff *nskb = skb_copy(skb, pri);
- kfree_skb(skb); /* Free our shared copy */
- skb = nskb;
- }
- return skb;
-}
-
-/**
- * skb_peek
- * @list_: list to peek at
- *
- * Peek an &sk_buff. Unlike most other operations you _MUST_
- * be careful with this one. A peek leaves the buffer on the
- * list and someone else may run off with it. You must hold
- * the appropriate locks or have a private queue to do this.
- *
- * Returns %NULL for an empty list or a pointer to the head element.
- * The reference count is not incremented and the reference is therefore
- * volatile. Use with caution.
- */
-static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
-{
- struct sk_buff *list = ((struct sk_buff *)list_)->next;
- if (list == (struct sk_buff *)list_)
- list = NULL;
- return list;
-}
-
-/**
- * skb_peek_tail
- * @list_: list to peek at
- *
- * Peek an &sk_buff. Unlike most other operations you _MUST_
- * be careful with this one. A peek leaves the buffer on the
- * list and someone else may run off with it. You must hold
- * the appropriate locks or have a private queue to do this.
- *
- * Returns %NULL for an empty list or a pointer to the tail element.
- * The reference count is not incremented and the reference is therefore
- * volatile. Use with caution.
- */
-static inline struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
-{
- struct sk_buff *list = ((struct sk_buff *)list_)->prev;
- if (list == (struct sk_buff *)list_)
- list = NULL;
- return list;
-}
-
-/**
- * skb_queue_len - get queue length
- * @list_: list to measure
- *
- * Return the length of an &sk_buff queue.
- */
-static inline __u32 skb_queue_len(const struct sk_buff_head *list_)
-{
- return list_->qlen;
-}
-
-/*
- * This function creates a split out lock class for each invocation;
- * this is needed for now since a whole lot of users of the skb-queue
- * infrastructure in drivers have different locking usage (in hardirq)
- * than the networking core (in softirq only). In the long run either the
- * network layer or drivers should need annotation to consolidate the
- * main types of usage into 3 classes.
- */
-static inline void skb_queue_head_init(struct sk_buff_head *list)
-{
- spin_lock_init(&list->lock);
- list->prev = list->next = (struct sk_buff *)list;
- list->qlen = 0;
-}
-
-/*
- * Insert an sk_buff at the start of a list.
- *
- * The "__skb_xxxx()" functions are the non-atomic ones that
- * can only be called with interrupts disabled.
- */
-
-/**
- * __skb_queue_after - queue a buffer at the list head
- * @list: list to use
- * @prev: place after this buffer
- * @newsk: buffer to queue
- *
- * Queue a buffer int the middle of a list. This function takes no locks
- * and you must therefore hold required locks before calling it.
- *
- * A buffer cannot be placed on two lists at the same time.
- */
-static inline void __skb_queue_after(struct sk_buff_head *list,
- struct sk_buff *prev,
- struct sk_buff *newsk)
-{
- struct sk_buff *next;
- list->qlen++;
-
- next = prev->next;
- newsk->next = next;
- newsk->prev = prev;
- next->prev = prev->next = newsk;
-}
-
-/**
- * __skb_queue_head - queue a buffer at the list head
- * @list: list to use
- * @newsk: buffer to queue
- *
- * Queue a buffer at the start of a list. This function takes no locks
- * and you must therefore hold required locks before calling it.
- *
- * A buffer cannot be placed on two lists at the same time.
- */
-extern void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk);
-static inline void __skb_queue_head(struct sk_buff_head *list,
- struct sk_buff *newsk)
-{
- __skb_queue_after(list, (struct sk_buff *)list, newsk);
-}
-
-/**
- * __skb_queue_tail - queue a buffer at the list tail
- * @list: list to use
- * @newsk: buffer to queue
- *
- * Queue a buffer at the end of a list. This function takes no locks
- * and you must therefore hold required locks before calling it.
- *
- * A buffer cannot be placed on two lists at the same time.
- */
-extern void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk);
-static inline void __skb_queue_tail(struct sk_buff_head *list,
- struct sk_buff *newsk)
-{
- struct sk_buff *prev, *next;
-
- list->qlen++;
- next = (struct sk_buff *)list;
- prev = next->prev;
- newsk->next = next;
- newsk->prev = prev;
- next->prev = prev->next = newsk;
-}
-
-
-/**
- * __skb_dequeue - remove from the head of the queue
- * @list: list to dequeue from
- *
- * Remove the head of the list. This function does not take any locks
- * so must be used with appropriate locks held only. The head item is
- * returned or %NULL if the list is empty.
- */
-extern struct sk_buff *skb_dequeue(struct sk_buff_head *list);
-static inline struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
-{
- struct sk_buff *next, *prev, *result;
-
- prev = (struct sk_buff *) list;
- next = prev->next;
- result = NULL;
- if (next != prev) {
- result = next;
- next = next->next;
- list->qlen--;
- next->prev = prev;
- prev->next = next;
- result->next = result->prev = NULL;
- }
- return result;
-}
-
-
-/*
- * Insert a packet on a list.
- */
-extern void skb_insert(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
-static inline void __skb_insert(struct sk_buff *newsk,
- struct sk_buff *prev, struct sk_buff *next,
- struct sk_buff_head *list)
-{
- newsk->next = next;
- newsk->prev = prev;
- next->prev = prev->next = newsk;
- list->qlen++;
-}
-
-/*
- * Place a packet after a given packet in a list.
- */
-extern void skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list);
-static inline void __skb_append(struct sk_buff *old, struct sk_buff *newsk, struct sk_buff_head *list)
-{
- __skb_insert(newsk, old, old->next, list);
-}
-
-/*
- * remove sk_buff from list. _Must_ be called atomically, and with
- * the list known..
- */
-extern void skb_unlink(struct sk_buff *skb, struct sk_buff_head *list);
-static inline void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
-{
- struct sk_buff *next, *prev;
-
- list->qlen--;
- next = skb->next;
- prev = skb->prev;
- skb->next = skb->prev = NULL;
- next->prev = prev;
- prev->next = next;
-}
-
-
-/* XXX: more streamlined implementation */
-
-/**
- * __skb_dequeue_tail - remove from the tail of the queue
- * @list: list to dequeue from
- *
- * Remove the tail of the list. This function does not take any locks
- * so must be used with appropriate locks held only. The tail item is
- * returned or %NULL if the list is empty.
- */
-extern struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list);
-static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
-{
- struct sk_buff *skb = skb_peek_tail(list);
- if (skb)
- __skb_unlink(skb, list);
- return skb;
-}
-
-
-static inline int skb_is_nonlinear(const struct sk_buff *skb)
-{
- return skb->data_len;
-}
-
-static inline unsigned int skb_headlen(const struct sk_buff *skb)
-{
- return skb->len - skb->data_len;
-}
-
-static inline int skb_pagelen(const struct sk_buff *skb)
-{
- int i, len = 0;
-
- for (i = (int)skb_shinfo(skb)->nr_frags - 1; i >= 0; i--)
- len += skb_shinfo(skb)->frags[i].size;
- return len + skb_headlen(skb);
-}
-
-static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
- struct page *page, int off, int size)
-{
- skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
-
- frag->page = page;
- frag->page_offset = off;
- frag->size = size;
- skb_shinfo(skb)->nr_frags = i + 1;
-}
-
-#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
-#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list)
-#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))
-
-/*
- * Add data to an sk_buff
- */
-static inline unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
-{
- unsigned char *tmp = skb->tail;
- SKB_LINEAR_ASSERT(skb);
- skb->tail += len;
- skb->len += len;
- return tmp;
-}
-
-/**
- * skb_put - add data to a buffer
- * @skb: buffer to use
- * @len: amount of data to add
- *
- * This function extends the used data area of the buffer. If this would
- * exceed the total buffer size the kernel will panic. A pointer to the
- * first byte of the extra data is returned.
- */
-static inline unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
-{
- unsigned char *tmp = skb->tail;
- SKB_LINEAR_ASSERT(skb);
- skb->tail += len;
- skb->len += len;
- if (unlikely(skb->tail>skb->end))
- skb_over_panic(skb, len, current_text_addr());
- return tmp;
-}
-
-static inline unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
-{
- skb->data -= len;
- skb->len += len;
- return skb->data;
-}
-
-/**
- * skb_push - add data to the start of a buffer
- * @skb: buffer to use
- * @len: amount of data to add
- *
- * This function extends the used data area of the buffer at the buffer
- * start. If this would exceed the total buffer headroom the kernel will
- * panic. A pointer to the first byte of the extra data is returned.
- */
-static inline unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
-{
- skb->data -= len;
- skb->len += len;
- if (unlikely(skb->data<skb->head))
- skb_under_panic(skb, len, current_text_addr());
- return skb->data;
-}
-
-static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len)
-{
- skb->len -= len;
- BUG_ON(skb->len < skb->data_len);
- return skb->data += len;
-}
-
-/**
- * skb_pull - remove data from the start of a buffer
- * @skb: buffer to use
- * @len: amount of data to remove
- *
- * This function removes data from the start of a buffer, returning
- * the memory to the headroom. A pointer to the next data in the buffer
- * is returned. Once the data has been pulled future pushes will overwrite
- * the old data.
- */
-static inline unsigned char *skb_pull(struct sk_buff *skb, unsigned int len)
-{
- return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len);
-}
-
-extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta);
-
-static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len)
-{
- if (len > skb_headlen(skb) &&
- !__pskb_pull_tail(skb, len-skb_headlen(skb)))
- return NULL;
- skb->len -= len;
- return skb->data += len;
-}
-
-static inline unsigned char *pskb_pull(struct sk_buff *skb, unsigned int len)
-{
- return unlikely(len > skb->len) ? NULL : __pskb_pull(skb, len);
-}
-
-static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
-{
- if (likely(len <= skb_headlen(skb)))
- return 1;
- if (unlikely(len > skb->len))
- return 0;
- return __pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL;
-}
-
-/**
- * skb_headroom - bytes at buffer head
- * @skb: buffer to check
- *
- * Return the number of bytes of free space at the head of an &sk_buff.
- */
-static inline int skb_headroom(const struct sk_buff *skb)
-{
- return skb->data - skb->head;
-}
-
-/**
- * skb_tailroom - bytes at buffer end
- * @skb: buffer to check
- *
- * Return the number of bytes of free space at the tail of an sk_buff
- */
-static inline int skb_tailroom(const struct sk_buff *skb)
-{
- return skb_is_nonlinear(skb) ? 0 : skb->end - skb->tail;
-}
-
-/**
- * skb_reserve - adjust headroom
- * @skb: buffer to alter
- * @len: bytes to move
- *
- * Increase the headroom of an empty &sk_buff by reducing the tail
- * room. This is only allowed for an empty buffer.
- */
-static inline void skb_reserve(struct sk_buff *skb, int len)
-{
- skb->data += len;
- skb->tail += len;
-}
-
-/*
- * CPUs often take a performance hit when accessing unaligned memory
- * locations. The actual performance hit varies, it can be small if the
- * hardware handles it or large if we have to take an exception and fix it
- * in software.
- *
- * Since an ethernet header is 14 bytes network drivers often end up with
- * the IP header at an unaligned offset. The IP header can be aligned by
- * shifting the start of the packet by 2 bytes. Drivers should do this
- * with:
- *
- * skb_reserve(NET_IP_ALIGN);
- *
- * The downside to this alignment of the IP header is that the DMA is now
- * unaligned. On some architectures the cost of an unaligned DMA is high
- * and this cost outweighs the gains made by aligning the IP header.
- *
- * Since this trade off varies between architectures, we allow NET_IP_ALIGN
- * to be overridden.
- */
-#ifndef NET_IP_ALIGN
-#define NET_IP_ALIGN 2
-#endif
-
-/*
- * The networking layer reserves some headroom in skb data (via
- * dev_alloc_skb). This is used to avoid having to reallocate skb data when
- * the header has to grow. In the default case, if the header has to grow
- * 16 bytes or less we avoid the reallocation.
- *
- * Unfortunately this headroom changes the DMA alignment of the resulting
- * network packet. As for NET_IP_ALIGN, this unaligned DMA is expensive
- * on some architectures. An architecture can override this value,
- * perhaps setting it to a cacheline in size (since that will maintain
- * cacheline alignment of the DMA). It must be a power of 2.
- *
- * Various parts of the networking layer expect at least 16 bytes of
- * headroom, you should not reduce this.
- */
-#ifndef NET_SKB_PAD
-#define NET_SKB_PAD 16
-#endif
-
-extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
-
-static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
-{
- if (unlikely(skb->data_len)) {
- WARN_ON(1);
- return;
- }
- skb->len = len;
- skb->tail = skb->data + len;
-}
-
-/**
- * skb_trim - remove end from a buffer
- * @skb: buffer to alter
- * @len: new length
- *
- * Cut the length of a buffer down by removing data from the tail. If
- * the buffer is already under the length specified it is not modified.
- * The skb must be linear.
- */
-static inline void skb_trim(struct sk_buff *skb, unsigned int len)
-{
- if (skb->len > len)
- __skb_trim(skb, len);
-}
-
-
-static inline int __pskb_trim(struct sk_buff *skb, unsigned int len)
-{
- if (skb->data_len)
- return ___pskb_trim(skb, len);
- __skb_trim(skb, len);
- return 0;
-}
-
-static inline int pskb_trim(struct sk_buff *skb, unsigned int len)
-{
- return (len < skb->len) ? __pskb_trim(skb, len) : 0;
-}
-
-/**
- * pskb_trim_unique - remove end from a paged unique (not cloned) buffer
- * @skb: buffer to alter
- * @len: new length
- *
- * This is identical to pskb_trim except that the caller knows that
- * the skb is not cloned so we should never get an error due to out-
- * of-memory.
- */
-static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
-{
- int err = pskb_trim(skb, len);
- BUG_ON(err);
-}
-
-/**
- * skb_orphan - orphan a buffer
- * @skb: buffer to orphan
- *
- * If a buffer currently has an owner then we call the owner's
- * destructor function and make the @skb unowned. The buffer continues
- * to exist but is no longer charged to its former owner.
- */
-static inline void skb_orphan(struct sk_buff *skb)
-{
- if (skb->destructor)
- skb->destructor(skb);
- skb->destructor = NULL;
- skb->sk = NULL;
-}
-
-/**
- * __skb_queue_purge - empty a list
- * @list: list to empty
- *
- * Delete all buffers on an &sk_buff list. Each buffer is removed from
- * the list and one reference dropped. This function does not take the
- * list lock and the caller must hold the relevant locks to use it.
- */
-extern void skb_queue_purge(struct sk_buff_head *list);
-static inline void __skb_queue_purge(struct sk_buff_head *list)
-{
- struct sk_buff *skb;
- while ((skb = __skb_dequeue(list)) != NULL)
- kfree_skb(skb);
-}
-
-/**
- * __dev_alloc_skb - allocate an skbuff for receiving
- * @length: length to allocate
- * @gfp_mask: get_free_pages mask, passed to alloc_skb
- *
- * Allocate a new &sk_buff and assign it a usage count of one. The
- * buffer has unspecified headroom built in. Users should allocate
- * the headroom they think they need without accounting for the
- * built in space. The built in space is used for optimisations.
- *
- * %NULL is returned if there is no free memory.
- */
-static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
- gfp_t gfp_mask)
-{
- struct sk_buff *skb = alloc_skb(length + NET_SKB_PAD, gfp_mask);
- if (likely(skb))
- skb_reserve(skb, NET_SKB_PAD);
- return skb;
-}
-
-/**
- * dev_alloc_skb - allocate an skbuff for receiving
- * @length: length to allocate
- *
- * Allocate a new &sk_buff and assign it a usage count of one. The
- * buffer has unspecified headroom built in. Users should allocate
- * the headroom they think they need without accounting for the
- * built in space. The built in space is used for optimisations.
- *
- * %NULL is returned if there is no free memory. Although this function
- * allocates memory it can be called from an interrupt.
- */
-static inline struct sk_buff *dev_alloc_skb(unsigned int length)
-{
- return __dev_alloc_skb(length, GFP_ATOMIC);
-}
-
-extern struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
- unsigned int length, gfp_t gfp_mask);
-
-/**
- * netdev_alloc_skb - allocate an skbuff for rx on a specific device
- * @dev: network device to receive on
- * @length: length to allocate
- *
- * Allocate a new &sk_buff and assign it a usage count of one. The
- * buffer has unspecified headroom built in. Users should allocate
- * the headroom they think they need without accounting for the
- * built in space. The built in space is used for optimisations.
- *
- * %NULL is returned if there is no free memory. Although this function
- * allocates memory it can be called from an interrupt.
- */
-static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
- unsigned int length)
-{
- return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
-}
-
-/**
- * skb_cow - copy header of skb when it is required
- * @skb: buffer to cow
- * @headroom: needed headroom
- *
- * If the skb passed lacks sufficient headroom or its data part
- * is shared, data is reallocated. If reallocation fails, an error
- * is returned and original skb is not changed.
- *
- * The result is skb with writable area skb->head...skb->tail
- * and at least @headroom of space at head.
- */
-static inline int skb_cow(struct sk_buff *skb, unsigned int headroom)
-{
- int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) -
- skb_headroom(skb);
-
- if (delta < 0)
- delta = 0;
-
- if (delta || skb_cloned(skb))
- return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) &
- ~(NET_SKB_PAD-1), 0, GFP_ATOMIC);
- return 0;
-}
-
-/**
- * skb_padto - pad an skbuff up to a minimal size
- * @skb: buffer to pad
- * @len: minimal length
- *
- * Pads up a buffer to ensure the trailing bytes exist and are
- * blanked. If the buffer already contains sufficient data it
- * is untouched. Otherwise it is extended. Returns zero on
- * success. The skb is freed on error.
- */
-
-static inline int skb_padto(struct sk_buff *skb, unsigned int len)
-{
- unsigned int size = skb->len;
- if (likely(size >= len))
- return 0;
- return skb_pad(skb, len-size);
-}
-
-static inline int skb_add_data(struct sk_buff *skb,
- char __user *from, int copy)
-{
- const int off = skb->len;
-
- if (skb->ip_summed == CHECKSUM_NONE) {
- int err = 0;
- unsigned int csum = csum_and_copy_from_user(from,
- skb_put(skb, copy),
- copy, 0, &err);
- if (!err) {
- skb->csum = csum_block_add(skb->csum, csum, off);
- return 0;
- }
- } else if (!copy_from_user(skb_put(skb, copy), from, copy))
- return 0;
-
- __skb_trim(skb, off);
- return -EFAULT;
-}
-
-static inline int skb_can_coalesce(struct sk_buff *skb, int i,
- struct page *page, int off)
-{
- if (i) {
- struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1];
-
- return page == frag->page &&
- off == frag->page_offset + frag->size;
- }
- return 0;
-}
-
-static inline int __skb_linearize(struct sk_buff *skb)
-{
- return __pskb_pull_tail(skb, skb->data_len) ? 0 : -ENOMEM;
-}
-
-/**
- * skb_linearize - convert paged skb to linear one
- * @skb: buffer to linarize
- *
- * If there is no free memory -ENOMEM is returned, otherwise zero
- * is returned and the old skb data released.
- */
-static inline int skb_linearize(struct sk_buff *skb)
-{
- return skb_is_nonlinear(skb) ? __skb_linearize(skb) : 0;
-}
-
-/**
- * skb_linearize_cow - make sure skb is linear and writable
- * @skb: buffer to process
- *
- * If there is no free memory -ENOMEM is returned, otherwise zero
- * is returned and the old skb data released.
- */
-static inline int skb_linearize_cow(struct sk_buff *skb)
-{
- return skb_is_nonlinear(skb) || skb_cloned(skb) ?
- __skb_linearize(skb) : 0;
-}
-
-/**
- * skb_postpull_rcsum - update checksum for received skb after pull
- * @skb: buffer to update
- * @start: start of data before pull
- * @len: length of data pulled
- *
- * After doing a pull on a received packet, you need to call this to
- * update the CHECKSUM_HW checksum, or set ip_summed to CHECKSUM_NONE
- * so that it can be recomputed from scratch.
- */
-
-static inline void skb_postpull_rcsum(struct sk_buff *skb,
- const void *start, unsigned int len)
-{
- if (skb->ip_summed == CHECKSUM_HW)
- skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
-}
-
-unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
-
-/**
- * pskb_trim_rcsum - trim received skb and update checksum
- * @skb: buffer to trim
- * @len: new length
- *
- * This is exactly the same as pskb_trim except that it ensures the
- * checksum of received packets are still valid after the operation.
- */
-
-static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
-{
- if (likely(len >= skb->len))
- return 0;
- if (skb->ip_summed == CHECKSUM_HW)
- skb->ip_summed = CHECKSUM_NONE;
- return __pskb_trim(skb, len);
-}
-
-static inline void *kmap_skb_frag(const skb_frag_t *frag)
-{
-#ifdef CONFIG_HIGHMEM
- BUG_ON(in_irq());
-
- local_bh_disable();
-#endif
- return kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ);
-}
-
-static inline void kunmap_skb_frag(void *vaddr)
-{
- kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
-#ifdef CONFIG_HIGHMEM
- local_bh_enable();
-#endif
-}
-
-#define skb_queue_walk(queue, skb) \
- for (skb = (queue)->next; \
- prefetch(skb->next), (skb != (struct sk_buff *)(queue)); \
- skb = skb->next)
-
-#define skb_queue_reverse_walk(queue, skb) \
- for (skb = (queue)->prev; \
- prefetch(skb->prev), (skb != (struct sk_buff *)(queue)); \
- skb = skb->prev)
-
-
-extern struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags,
- int noblock, int *err);
-extern unsigned int datagram_poll(struct file *file, struct socket *sock,
- struct poll_table_struct *wait);
-extern int skb_copy_datagram_iovec(const struct sk_buff *from,
- int offset, struct iovec *to,
- int size);
-extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
- int hlen,
- struct iovec *iov);
-extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
-extern void skb_kill_datagram(struct sock *sk, struct sk_buff *skb,
- unsigned int flags);
-extern unsigned int skb_checksum(const struct sk_buff *skb, int offset,
- int len, unsigned int csum);
-extern int skb_copy_bits(const struct sk_buff *skb, int offset,
- void *to, int len);
-extern int skb_store_bits(const struct sk_buff *skb, int offset,
- void *from, int len);
-extern unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb,
- int offset, u8 *to, int len,
- unsigned int csum);
-extern void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to);
-extern void skb_split(struct sk_buff *skb,
- struct sk_buff *skb1, const u32 len);
-
-extern struct sk_buff *skb_segment(struct sk_buff *skb, int features);
-
-static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
- int len, void *buffer)
-{
- int hlen = skb_headlen(skb);
-
- if (hlen - offset >= len)
- return skb->data + offset;
-
- if (skb_copy_bits(skb, offset, buffer, len) < 0)
- return NULL;
-
- return buffer;
-}
-
-extern void skb_init(void);
-extern void skb_add_mtu(int mtu);
-
-/**
- * skb_get_timestamp - get timestamp from a skb
- * @skb: skb to get stamp from
- * @stamp: pointer to struct timeval to store stamp in
- *
- * Timestamps are stored in the skb as offsets to a base timestamp.
- * This function converts the offset back to a struct timeval and stores
- * it in stamp.
- */
-static inline void skb_get_timestamp(const struct sk_buff *skb, struct timeval *stamp)
-{
- stamp->tv_sec = skb->tstamp.off_sec;
- stamp->tv_usec = skb->tstamp.off_usec;
-}
-
-/**
- * skb_set_timestamp - set timestamp of a skb
- * @skb: skb to set stamp of
- * @stamp: pointer to struct timeval to get stamp from
- *
- * Timestamps are stored in the skb as offsets to a base timestamp.
- * This function converts a struct timeval to an offset and stores
- * it in the skb.
- */
-static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval *stamp)
-{
- skb->tstamp.off_sec = stamp->tv_sec;
- skb->tstamp.off_usec = stamp->tv_usec;
-}
-
-extern void __net_timestamp(struct sk_buff *skb);
-
-extern unsigned int __skb_checksum_complete(struct sk_buff *skb);
-
-/**
- * skb_checksum_complete - Calculate checksum of an entire packet
- * @skb: packet to process
- *
- * This function calculates the checksum over the entire packet plus
- * the value of skb->csum. The latter can be used to supply the
- * checksum of a pseudo header as used by TCP/UDP. It returns the
- * checksum.
- *
- * For protocols that contain complete checksums such as ICMP/TCP/UDP,
- * this function can be used to verify that checksum on received
- * packets. In that case the function should return zero if the
- * checksum is correct. In particular, this function will return zero
- * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the
- * hardware has already verified the correctness of the checksum.
- */
-static inline unsigned int skb_checksum_complete(struct sk_buff *skb)
-{
- return skb->ip_summed != CHECKSUM_UNNECESSARY &&
- __skb_checksum_complete(skb);
-}
-
-#ifdef CONFIG_NETFILTER
-static inline void nf_conntrack_put(struct nf_conntrack *nfct)
-{
- if (nfct && atomic_dec_and_test(&nfct->use))
- nfct->destroy(nfct);
-}
-static inline void nf_conntrack_get(struct nf_conntrack *nfct)
-{
- if (nfct)
- atomic_inc(&nfct->use);
-}
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
-static inline void nf_conntrack_get_reasm(struct sk_buff *skb)
-{
- if (skb)
- atomic_inc(&skb->users);
-}
-static inline void nf_conntrack_put_reasm(struct sk_buff *skb)
-{
- if (skb)
- kfree_skb(skb);
-}
-#endif
-#ifdef CONFIG_BRIDGE_NETFILTER
-static inline void nf_bridge_put(struct nf_bridge_info *nf_bridge)
-{
- if (nf_bridge && atomic_dec_and_test(&nf_bridge->use))
- kfree(nf_bridge);
-}
-static inline void nf_bridge_get(struct nf_bridge_info *nf_bridge)
-{
- if (nf_bridge)
- atomic_inc(&nf_bridge->use);
-}
-#endif /* CONFIG_BRIDGE_NETFILTER */
-static inline void nf_reset(struct sk_buff *skb)
-{
- nf_conntrack_put(skb->nfct);
- skb->nfct = NULL;
-#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
- nf_conntrack_put_reasm(skb->nfct_reasm);
- skb->nfct_reasm = NULL;
-#endif
-#ifdef CONFIG_BRIDGE_NETFILTER
- nf_bridge_put(skb->nf_bridge);
- skb->nf_bridge = NULL;
-#endif
-}
-
-#else /* CONFIG_NETFILTER */
-static inline void nf_reset(struct sk_buff *skb) {}
-#endif /* CONFIG_NETFILTER */
-
-#ifdef CONFIG_NETWORK_SECMARK
-static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from)
-{
- to->secmark = from->secmark;
-}
-
-static inline void skb_init_secmark(struct sk_buff *skb)
-{
- skb->secmark = 0;
-}
-#else
-static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from)
-{ }
-
-static inline void skb_init_secmark(struct sk_buff *skb)
-{ }
-#endif
-
-static inline int skb_is_gso(const struct sk_buff *skb)
-{
- return skb_shinfo(skb)->gso_size;
-}
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SKBUFF_H */
diff --git a/original/linux/slab.h b/original/linux/slab.h
deleted file mode 100644
index 45ad55b..0000000
--- a/original/linux/slab.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * linux/mm/slab.h
- * Written by Mark Hemment, 1996.
- * (markhe@nextd.demon.co.uk)
- */
-
-#ifndef _LINUX_SLAB_H
-#define _LINUX_SLAB_H
-
-#if defined(__KERNEL__)
-
-typedef struct kmem_cache kmem_cache_t;
-
-#include <linux/gfp.h>
-#include <linux/init.h>
-#include <linux/types.h>
-#include <asm/page.h> /* kmalloc_sizes.h needs PAGE_SIZE */
-#include <asm/cache.h> /* kmalloc_sizes.h needs L1_CACHE_BYTES */
-
-/* flags for kmem_cache_alloc() */
-#define SLAB_NOFS GFP_NOFS
-#define SLAB_NOIO GFP_NOIO
-#define SLAB_ATOMIC GFP_ATOMIC
-#define SLAB_USER GFP_USER
-#define SLAB_KERNEL GFP_KERNEL
-#define SLAB_DMA GFP_DMA
-
-#define SLAB_LEVEL_MASK GFP_LEVEL_MASK
-
-#define SLAB_NO_GROW __GFP_NO_GROW /* don't grow a cache */
-
-/* flags to pass to kmem_cache_create().
- * The first 3 are only valid when the allocator as been build
- * SLAB_DEBUG_SUPPORT.
- */
-#define SLAB_DEBUG_FREE 0x00000100UL /* Peform (expensive) checks on free */
-#define SLAB_DEBUG_INITIAL 0x00000200UL /* Call constructor (as verifier) */
-#define SLAB_RED_ZONE 0x00000400UL /* Red zone objs in a cache */
-#define SLAB_POISON 0x00000800UL /* Poison objects */
-#define SLAB_HWCACHE_ALIGN 0x00002000UL /* align objs on a h/w cache lines */
-#define SLAB_CACHE_DMA 0x00004000UL /* use GFP_DMA memory */
-#define SLAB_MUST_HWCACHE_ALIGN 0x00008000UL /* force alignment */
-#define SLAB_STORE_USER 0x00010000UL /* store the last owner for bug hunting */
-#define SLAB_RECLAIM_ACCOUNT 0x00020000UL /* track pages allocated to indicate
- what is reclaimable later*/
-#define SLAB_PANIC 0x00040000UL /* panic if kmem_cache_create() fails */
-#define SLAB_DESTROY_BY_RCU 0x00080000UL /* defer freeing pages to RCU */
-#define SLAB_MEM_SPREAD 0x00100000UL /* Spread some memory over cpuset */
-
-/* flags passed to a constructor func */
-#define SLAB_CTOR_CONSTRUCTOR 0x001UL /* if not set, then deconstructor */
-#define SLAB_CTOR_ATOMIC 0x002UL /* tell constructor it can't sleep */
-#define SLAB_CTOR_VERIFY 0x004UL /* tell constructor it's a verify call */
-
-#ifndef CONFIG_SLOB
-
-/* prototypes */
-extern void __init kmem_cache_init(void);
-
-extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
- void (*)(void *, kmem_cache_t *, unsigned long),
- void (*)(void *, kmem_cache_t *, unsigned long));
-extern int kmem_cache_destroy(kmem_cache_t *);
-extern int kmem_cache_shrink(kmem_cache_t *);
-extern void *kmem_cache_alloc(kmem_cache_t *, gfp_t);
-extern void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
-extern void kmem_cache_free(kmem_cache_t *, void *);
-extern unsigned int kmem_cache_size(kmem_cache_t *);
-extern const char *kmem_cache_name(kmem_cache_t *);
-extern kmem_cache_t *kmem_find_general_cachep(size_t size, gfp_t gfpflags);
-
-/* Size description struct for general caches. */
-struct cache_sizes {
- size_t cs_size;
- kmem_cache_t *cs_cachep;
- kmem_cache_t *cs_dmacachep;
-};
-extern struct cache_sizes malloc_sizes[];
-
-extern void *__kmalloc(size_t, gfp_t);
-#ifndef CONFIG_DEBUG_SLAB
-#define ____kmalloc(size, flags) __kmalloc(size, flags)
-#else
-extern void *__kmalloc_track_caller(size_t, gfp_t, void*);
-#define ____kmalloc(size, flags) \
- __kmalloc_track_caller(size, flags, __builtin_return_address(0))
-#endif
-
-/**
- * kmalloc - allocate memory
- * @size: how many bytes of memory are required.
- * @flags: the type of memory to allocate.
- *
- * kmalloc is the normal method of allocating memory
- * in the kernel.
- *
- * The @flags argument may be one of:
- *
- * %GFP_USER - Allocate memory on behalf of user. May sleep.
- *
- * %GFP_KERNEL - Allocate normal kernel ram. May sleep.
- *
- * %GFP_ATOMIC - Allocation will not sleep.
- * For example, use this inside interrupt handlers.
- *
- * %GFP_HIGHUSER - Allocate pages from high memory.
- *
- * %GFP_NOIO - Do not do any I/O at all while trying to get memory.
- *
- * %GFP_NOFS - Do not make any fs calls while trying to get memory.
- *
- * Also it is possible to set different flags by OR'ing
- * in one or more of the following additional @flags:
- *
- * %__GFP_COLD - Request cache-cold pages instead of
- * trying to return cache-warm pages.
- *
- * %__GFP_DMA - Request memory from the DMA-capable zone.
- *
- * %__GFP_HIGH - This allocation has high priority and may use emergency pools.
- *
- * %__GFP_HIGHMEM - Allocated memory may be from highmem.
- *
- * %__GFP_NOFAIL - Indicate that this allocation is in no way allowed to fail
- * (think twice before using).
- *
- * %__GFP_NORETRY - If memory is not immediately available,
- * then give up at once.
- *
- * %__GFP_NOWARN - If allocation fails, don't issue any warnings.
- *
- * %__GFP_REPEAT - If allocation fails initially, try once more before failing.
- */
-static inline void *kmalloc(size_t size, gfp_t flags)
-{
- if (__builtin_constant_p(size)) {
- int i = 0;
-#define CACHE(x) \
- if (size <= x) \
- goto found; \
- else \
- i++;
-#include "kmalloc_sizes.h"
-#undef CACHE
- {
- extern void __you_cannot_kmalloc_that_much(void);
- __you_cannot_kmalloc_that_much();
- }
-found:
- return kmem_cache_alloc((flags & GFP_DMA) ?
- malloc_sizes[i].cs_dmacachep :
- malloc_sizes[i].cs_cachep, flags);
- }
- return __kmalloc(size, flags);
-}
-
-extern void *__kzalloc(size_t, gfp_t);
-
-/**
- * kzalloc - allocate memory. The memory is set to zero.
- * @size: how many bytes of memory are required.
- * @flags: the type of memory to allocate (see kmalloc).
- */
-static inline void *kzalloc(size_t size, gfp_t flags)
-{
- if (__builtin_constant_p(size)) {
- int i = 0;
-#define CACHE(x) \
- if (size <= x) \
- goto found; \
- else \
- i++;
-#include "kmalloc_sizes.h"
-#undef CACHE
- {
- extern void __you_cannot_kzalloc_that_much(void);
- __you_cannot_kzalloc_that_much();
- }
-found:
- return kmem_cache_zalloc((flags & GFP_DMA) ?
- malloc_sizes[i].cs_dmacachep :
- malloc_sizes[i].cs_cachep, flags);
- }
- return __kzalloc(size, flags);
-}
-
-/**
- * kcalloc - allocate memory for an array. The memory is set to zero.
- * @n: number of elements.
- * @size: element size.
- * @flags: the type of memory to allocate.
- */
-static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
-{
- if (n != 0 && size > ULONG_MAX / n)
- return NULL;
- return kzalloc(n * size, flags);
-}
-
-extern void kfree(const void *);
-extern unsigned int ksize(const void *);
-extern int slab_is_available(void);
-
-#ifdef CONFIG_NUMA
-extern void *kmem_cache_alloc_node(kmem_cache_t *, gfp_t flags, int node);
-extern void *kmalloc_node(size_t size, gfp_t flags, int node);
-#else
-static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, gfp_t flags, int node)
-{
- return kmem_cache_alloc(cachep, flags);
-}
-static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
-{
- return kmalloc(size, flags);
-}
-#endif
-
-extern int FASTCALL(kmem_cache_reap(int));
-extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
-
-#else /* CONFIG_SLOB */
-
-/* SLOB allocator routines */
-
-void kmem_cache_init(void);
-struct kmem_cache *kmem_find_general_cachep(size_t, gfp_t gfpflags);
-struct kmem_cache *kmem_cache_create(const char *c, size_t, size_t,
- unsigned long,
- void (*)(void *, struct kmem_cache *, unsigned long),
- void (*)(void *, struct kmem_cache *, unsigned long));
-int kmem_cache_destroy(struct kmem_cache *c);
-void *kmem_cache_alloc(struct kmem_cache *c, gfp_t flags);
-void *kmem_cache_zalloc(struct kmem_cache *, gfp_t);
-void kmem_cache_free(struct kmem_cache *c, void *b);
-const char *kmem_cache_name(struct kmem_cache *);
-void *kmalloc(size_t size, gfp_t flags);
-void *__kzalloc(size_t size, gfp_t flags);
-void kfree(const void *m);
-unsigned int ksize(const void *m);
-unsigned int kmem_cache_size(struct kmem_cache *c);
-
-static inline void *kcalloc(size_t n, size_t size, gfp_t flags)
-{
- return __kzalloc(n * size, flags);
-}
-
-#define kmem_cache_shrink(d) (0)
-#define kmem_cache_reap(a)
-#define kmem_ptr_validate(a, b) (0)
-#define kmem_cache_alloc_node(c, f, n) kmem_cache_alloc(c, f)
-#define kmalloc_node(s, f, n) kmalloc(s, f)
-#define kzalloc(s, f) __kzalloc(s, f)
-#define ____kmalloc kmalloc
-
-#endif /* CONFIG_SLOB */
-
-/* System wide caches */
-extern kmem_cache_t *vm_area_cachep;
-extern kmem_cache_t *names_cachep;
-extern kmem_cache_t *files_cachep;
-extern kmem_cache_t *filp_cachep;
-extern kmem_cache_t *fs_cachep;
-extern kmem_cache_t *sighand_cachep;
-extern kmem_cache_t *bio_cachep;
-
-extern atomic_t slab_reclaim_pages;
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SLAB_H */
diff --git a/original/linux/smb.h b/original/linux/smb.h
deleted file mode 100644
index b016220..0000000
--- a/original/linux/smb.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * smb.h
- *
- * Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke
- * Copyright (C) 1997 by Volker Lendecke
- *
- */
-
-#ifndef _LINUX_SMB_H
-#define _LINUX_SMB_H
-
-#include <linux/types.h>
-
-enum smb_protocol {
- SMB_PROTOCOL_NONE,
- SMB_PROTOCOL_CORE,
- SMB_PROTOCOL_COREPLUS,
- SMB_PROTOCOL_LANMAN1,
- SMB_PROTOCOL_LANMAN2,
- SMB_PROTOCOL_NT1
-};
-
-enum smb_case_hndl {
- SMB_CASE_DEFAULT,
- SMB_CASE_LOWER,
- SMB_CASE_UPPER
-};
-
-struct smb_dskattr {
- __u16 total;
- __u16 allocblocks;
- __u16 blocksize;
- __u16 free;
-};
-
-struct smb_conn_opt {
-
- /* The socket */
- unsigned int fd;
-
- enum smb_protocol protocol;
- enum smb_case_hndl case_handling;
-
- /* Connection-Options */
-
- __u32 max_xmit;
- __u16 server_uid;
- __u16 tid;
-
- /* The following are LANMAN 1.0 options */
- __u16 secmode;
- __u16 maxmux;
- __u16 maxvcs;
- __u16 rawmode;
- __u32 sesskey;
-
- /* The following are NT LM 0.12 options */
- __u32 maxraw;
- __u32 capabilities;
- __s16 serverzone;
-};
-
-#ifdef __KERNEL__
-
-#define SMB_NLS_MAXNAMELEN 20
-struct smb_nls_codepage {
- char local_name[SMB_NLS_MAXNAMELEN];
- char remote_name[SMB_NLS_MAXNAMELEN];
-};
-
-
-#define SMB_MAXNAMELEN 255
-#define SMB_MAXPATHLEN 1024
-
-/*
- * Contains all relevant data on a SMB networked file.
- */
-struct smb_fattr {
- __u16 attr;
-
- unsigned long f_ino;
- umode_t f_mode;
- nlink_t f_nlink;
- uid_t f_uid;
- gid_t f_gid;
- dev_t f_rdev;
- loff_t f_size;
- struct timespec f_atime;
- struct timespec f_mtime;
- struct timespec f_ctime;
- unsigned long f_blksize;
- unsigned long f_blocks;
- int f_unix;
-};
-
-enum smb_conn_state {
- CONN_VALID, /* everything's fine */
- CONN_INVALID, /* Something went wrong, but did not
- try to reconnect yet. */
- CONN_RETRIED, /* Tried a reconnection, but was refused */
- CONN_RETRYING /* Currently trying to reconnect */
-};
-
-#define SMB_SUPER_MAGIC 0x517B
-
-#define SMB_HEADER_LEN 37 /* includes everything up to, but not
- * including smb_bcc */
-
-#define SMB_INITIAL_PACKET_SIZE 4000
-#define SMB_MAX_PACKET_SIZE 32768
-
-/* reserve this much space for trans2 parameters. Shouldn't have to be more
- than 10 or so, but OS/2 seems happier like this. */
-#define SMB_TRANS2_MAX_PARAM 64
-
-#endif
-#endif
diff --git a/original/linux/smp.h b/original/linux/smp.h
deleted file mode 100644
index 837e8bc..0000000
--- a/original/linux/smp.h
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef __LINUX_SMP_H
-#define __LINUX_SMP_H
-
-/*
- * Generic SMP support
- * Alan Cox. <alan@redhat.com>
- */
-
-
-extern void cpu_idle(void);
-
-#ifdef CONFIG_SMP
-
-#include <linux/preempt.h>
-#include <linux/kernel.h>
-#include <linux/compiler.h>
-#include <linux/thread_info.h>
-#include <asm/smp.h>
-
-/*
- * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
- * (defined in asm header):
- */
-
-/*
- * stops all CPUs but the current one:
- */
-extern void smp_send_stop(void);
-
-/*
- * sends a 'reschedule' event to another CPU:
- */
-extern void smp_send_reschedule(int cpu);
-
-
-/*
- * Prepare machine for booting other CPUs.
- */
-extern void smp_prepare_cpus(unsigned int max_cpus);
-
-/*
- * Bring a CPU up
- */
-extern int __cpu_up(unsigned int cpunum);
-
-/*
- * Final polishing of CPUs
- */
-extern void smp_cpus_done(unsigned int max_cpus);
-
-/*
- * Call a function on all other processors
- */
-int smp_call_function(void(*func)(void *info), void *info, int retry, int wait);
-
-/*
- * Call a function on all processors
- */
-int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait);
-
-#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */
-#define MSG_ALL 0x8001
-
-#define MSG_INVALIDATE_TLB 0x0001 /* Remote processor TLB invalidate */
-#define MSG_STOP_CPU 0x0002 /* Sent to shut down slave CPU's
- * when rebooting
- */
-#define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU*/
-#define MSG_CALL_FUNCTION 0x0004 /* Call function on all other CPUs */
-
-/*
- * Mark the boot cpu "online" so that it can call console drivers in
- * printk() and can access its per-cpu storage.
- */
-void smp_prepare_boot_cpu(void);
-
-#else /* !SMP */
-
-/*
- * These macros fold the SMP functionality into a single CPU system
- */
-#define raw_smp_processor_id() 0
-#define hard_smp_processor_id() 0
-static inline int up_smp_call_function(void)
-{
- return 0;
-}
-#define smp_call_function(func,info,retry,wait) (up_smp_call_function())
-#define on_each_cpu(func,info,retry,wait) \
- ({ \
- local_irq_disable(); \
- func(info); \
- local_irq_enable(); \
- 0; \
- })
-static inline void smp_send_reschedule(int cpu) { }
-#define num_booting_cpus() 1
-#define smp_prepare_boot_cpu() do {} while (0)
-
-#endif /* !SMP */
-
-/*
- * smp_processor_id(): get the current CPU ID.
- *
- * if DEBUG_PREEMPT is enabled the we check whether it is
- * used in a preemption-safe way. (smp_processor_id() is safe
- * if it's used in a preemption-off critical section, or in
- * a thread that is bound to the current CPU.)
- *
- * NOTE: raw_smp_processor_id() is for internal use only
- * (smp_processor_id() is the preferred variant), but in rare
- * instances it might also be used to turn off false positives
- * (i.e. smp_processor_id() use that the debugging code reports but
- * which use for some reason is legal). Don't use this to hack around
- * the warning message, as your code might not work under PREEMPT.
- */
-#ifdef CONFIG_DEBUG_PREEMPT
- extern unsigned int debug_smp_processor_id(void);
-# define smp_processor_id() debug_smp_processor_id()
-#else
-# define smp_processor_id() raw_smp_processor_id()
-#endif
-
-#define get_cpu() ({ preempt_disable(); smp_processor_id(); })
-#define put_cpu() preempt_enable()
-#define put_cpu_no_resched() preempt_enable_no_resched()
-
-void smp_setup_processor_id(void);
-
-#endif /* __LINUX_SMP_H */
diff --git a/original/linux/smp_lock.h b/original/linux/smp_lock.h
deleted file mode 100644
index cf715a4..0000000
--- a/original/linux/smp_lock.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef __LINUX_SMPLOCK_H
-#define __LINUX_SMPLOCK_H
-
-#ifdef CONFIG_LOCK_KERNEL
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-
-#define kernel_locked() (current->lock_depth >= 0)
-
-extern int __lockfunc __reacquire_kernel_lock(void);
-extern void __lockfunc __release_kernel_lock(void);
-
-/*
- * Release/re-acquire global kernel lock for the scheduler
- */
-#define release_kernel_lock(tsk) do { \
- if (unlikely((tsk)->lock_depth >= 0)) \
- __release_kernel_lock(); \
-} while (0)
-
-/*
- * Non-SMP kernels will never block on the kernel lock,
- * so we are better off returning a constant zero from
- * reacquire_kernel_lock() so that the compiler can see
- * it at compile-time.
- */
-#if defined(CONFIG_SMP) && !defined(CONFIG_PREEMPT_BKL)
-# define return_value_on_smp return
-#else
-# define return_value_on_smp
-#endif
-
-static inline int reacquire_kernel_lock(struct task_struct *task)
-{
- if (unlikely(task->lock_depth >= 0))
- return_value_on_smp __reacquire_kernel_lock();
- return 0;
-}
-
-extern void __lockfunc lock_kernel(void) __acquires(kernel_lock);
-extern void __lockfunc unlock_kernel(void) __releases(kernel_lock);
-
-#else
-
-#define lock_kernel() do { } while(0)
-#define unlock_kernel() do { } while(0)
-#define release_kernel_lock(task) do { } while(0)
-#define reacquire_kernel_lock(task) 0
-#define kernel_locked() 1
-
-#endif /* CONFIG_LOCK_KERNEL */
-#endif /* __LINUX_SMPLOCK_H */
diff --git a/original/linux/sock_diag.h b/original/linux/sock_diag.h
deleted file mode 100644
index b00e29e..0000000
--- a/original/linux/sock_diag.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _UAPI__SOCK_DIAG_H__
-#define _UAPI__SOCK_DIAG_H__
-
-#include <linux/types.h>
-
-#define SOCK_DIAG_BY_FAMILY 20
-
-struct sock_diag_req {
- __u8 sdiag_family;
- __u8 sdiag_protocol;
-};
-
-enum {
- SK_MEMINFO_RMEM_ALLOC,
- SK_MEMINFO_RCVBUF,
- SK_MEMINFO_WMEM_ALLOC,
- SK_MEMINFO_SNDBUF,
- SK_MEMINFO_FWD_ALLOC,
- SK_MEMINFO_WMEM_QUEUED,
- SK_MEMINFO_OPTMEM,
- SK_MEMINFO_BACKLOG,
-
- SK_MEMINFO_VARS,
-};
-
-#endif /* _UAPI__SOCK_DIAG_H__ */
diff --git a/original/linux/socket.h b/original/linux/socket.h
deleted file mode 100644
index d0e77f6..0000000
--- a/original/linux/socket.h
+++ /dev/null
@@ -1,343 +0,0 @@
-#ifndef _LINUX_SOCKET_H
-#define _LINUX_SOCKET_H
-
-/*
- * Desired design of maximum size and alignment (see RFC2553)
- */
-#define _K_SS_MAXSIZE 128 /* Implementation specific max size */
-#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))
- /* Implementation specific desired alignment */
-
-typedef unsigned short __kernel_sa_family_t;
-
-struct __kernel_sockaddr_storage {
- __kernel_sa_family_t ss_family; /* address family */
- /* Following field(s) are implementation specific */
- char __data[_K_SS_MAXSIZE - sizeof(unsigned short)];
- /* space to achieve desired size, */
- /* _SS_MAXSIZE value minus size of ss_family */
-} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
-
-#ifdef __KERNEL__
-
-#include <asm/socket.h> /* arch-dependent defines */
-#include <linux/sockios.h> /* the SIOCxxx I/O controls */
-#include <linux/uio.h> /* iovec support */
-#include <linux/types.h> /* pid_t */
-#include <linux/compiler.h> /* __user */
-
-struct pid;
-struct cred;
-
-#define __sockaddr_check_size(size) \
- BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
-
-#ifdef CONFIG_PROC_FS
-struct seq_file;
-extern void socket_seq_show(struct seq_file *seq);
-#endif
-
-typedef __kernel_sa_family_t sa_family_t;
-
-/*
- * 1003.1g requires sa_family_t and that sa_data is char.
- */
-
-struct sockaddr {
- sa_family_t sa_family; /* address family, AF_xxx */
- char sa_data[14]; /* 14 bytes of protocol address */
-};
-
-struct linger {
- int l_onoff; /* Linger active */
- int l_linger; /* How long to linger for */
-};
-
-#define sockaddr_storage __kernel_sockaddr_storage
-
-/*
- * As we do 4.4BSD message passing we use a 4.4BSD message passing
- * system, not 4.3. Thus msg_accrights(len) are now missing. They
- * belong in an obscure libc emulation or the bin.
- */
-
-struct msghdr {
- void * msg_name; /* Socket name */
- int msg_namelen; /* Length of name */
- struct iovec * msg_iov; /* Data blocks */
- __kernel_size_t msg_iovlen; /* Number of blocks */
- void * msg_control; /* Per protocol magic (eg BSD file descriptor passing) */
- __kernel_size_t msg_controllen; /* Length of cmsg list */
- unsigned msg_flags;
-};
-
-/* For recvmmsg/sendmmsg */
-struct mmsghdr {
- struct msghdr msg_hdr;
- unsigned msg_len;
-};
-
-/*
- * POSIX 1003.1g - ancillary data object information
- * Ancillary data consits of a sequence of pairs of
- * (cmsghdr, cmsg_data[])
- */
-
-struct cmsghdr {
- __kernel_size_t cmsg_len; /* data byte count, including hdr */
- int cmsg_level; /* originating protocol */
- int cmsg_type; /* protocol-specific type */
-};
-
-/*
- * Ancillary data object information MACROS
- * Table 5-14 of POSIX 1003.1g
- */
-
-#define __CMSG_NXTHDR(ctl, len, cmsg) __cmsg_nxthdr((ctl),(len),(cmsg))
-#define CMSG_NXTHDR(mhdr, cmsg) cmsg_nxthdr((mhdr), (cmsg))
-
-#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
-
-#define CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr))))
-#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
-#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
-
-#define __CMSG_FIRSTHDR(ctl,len) ((len) >= sizeof(struct cmsghdr) ? \
- (struct cmsghdr *)(ctl) : \
- (struct cmsghdr *)NULL)
-#define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
-#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \
- (cmsg)->cmsg_len <= (unsigned long) \
- ((mhdr)->msg_controllen - \
- ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
-
-/*
- * Get the next cmsg header
- *
- * PLEASE, do not touch this function. If you think, that it is
- * incorrect, grep kernel sources and think about consequences
- * before trying to improve it.
- *
- * Now it always returns valid, not truncated ancillary object
- * HEADER. But caller still MUST check, that cmsg->cmsg_len is
- * inside range, given by msg->msg_controllen before using
- * ancillary object DATA. --ANK (980731)
- */
-
-static inline struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
- struct cmsghdr *__cmsg)
-{
- struct cmsghdr * __ptr;
-
- __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
- if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size)
- return (struct cmsghdr *)0;
-
- return __ptr;
-}
-
-static inline struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg)
-{
- return __cmsg_nxthdr(__msg->msg_control, __msg->msg_controllen, __cmsg);
-}
-
-/* "Socket"-level control message types: */
-
-#define SCM_RIGHTS 0x01 /* rw: access rights (array of int) */
-#define SCM_CREDENTIALS 0x02 /* rw: struct ucred */
-#define SCM_SECURITY 0x03 /* rw: security label */
-
-struct ucred {
- __u32 pid;
- __u32 uid;
- __u32 gid;
-};
-
-/* Supported address families. */
-#define AF_UNSPEC 0
-#define AF_UNIX 1 /* Unix domain sockets */
-#define AF_LOCAL 1 /* POSIX name for AF_UNIX */
-#define AF_INET 2 /* Internet IP Protocol */
-#define AF_AX25 3 /* Amateur Radio AX.25 */
-#define AF_IPX 4 /* Novell IPX */
-#define AF_APPLETALK 5 /* AppleTalk DDP */
-#define AF_NETROM 6 /* Amateur Radio NET/ROM */
-#define AF_BRIDGE 7 /* Multiprotocol bridge */
-#define AF_ATMPVC 8 /* ATM PVCs */
-#define AF_X25 9 /* Reserved for X.25 project */
-#define AF_INET6 10 /* IP version 6 */
-#define AF_ROSE 11 /* Amateur Radio X.25 PLP */
-#define AF_DECnet 12 /* Reserved for DECnet project */
-#define AF_NETBEUI 13 /* Reserved for 802.2LLC project*/
-#define AF_SECURITY 14 /* Security callback pseudo AF */
-#define AF_KEY 15 /* PF_KEY key management API */
-#define AF_NETLINK 16
-#define AF_ROUTE AF_NETLINK /* Alias to emulate 4.4BSD */
-#define AF_PACKET 17 /* Packet family */
-#define AF_ASH 18 /* Ash */
-#define AF_ECONET 19 /* Acorn Econet */
-#define AF_ATMSVC 20 /* ATM SVCs */
-#define AF_RDS 21 /* RDS sockets */
-#define AF_SNA 22 /* Linux SNA Project (nutters!) */
-#define AF_IRDA 23 /* IRDA sockets */
-#define AF_PPPOX 24 /* PPPoX sockets */
-#define AF_WANPIPE 25 /* Wanpipe API Sockets */
-#define AF_LLC 26 /* Linux LLC */
-#define AF_CAN 29 /* Controller Area Network */
-#define AF_TIPC 30 /* TIPC sockets */
-#define AF_BLUETOOTH 31 /* Bluetooth sockets */
-#define AF_IUCV 32 /* IUCV sockets */
-#define AF_RXRPC 33 /* RxRPC sockets */
-#define AF_ISDN 34 /* mISDN sockets */
-#define AF_PHONET 35 /* Phonet sockets */
-#define AF_IEEE802154 36 /* IEEE802154 sockets */
-#define AF_CAIF 37 /* CAIF sockets */
-#define AF_ALG 38 /* Algorithm sockets */
-#define AF_NFC 39 /* NFC sockets */
-#define AF_MAX 40 /* For now.. */
-
-/* Protocol families, same as address families. */
-#define PF_UNSPEC AF_UNSPEC
-#define PF_UNIX AF_UNIX
-#define PF_LOCAL AF_LOCAL
-#define PF_INET AF_INET
-#define PF_AX25 AF_AX25
-#define PF_IPX AF_IPX
-#define PF_APPLETALK AF_APPLETALK
-#define PF_NETROM AF_NETROM
-#define PF_BRIDGE AF_BRIDGE
-#define PF_ATMPVC AF_ATMPVC
-#define PF_X25 AF_X25
-#define PF_INET6 AF_INET6
-#define PF_ROSE AF_ROSE
-#define PF_DECnet AF_DECnet
-#define PF_NETBEUI AF_NETBEUI
-#define PF_SECURITY AF_SECURITY
-#define PF_KEY AF_KEY
-#define PF_NETLINK AF_NETLINK
-#define PF_ROUTE AF_ROUTE
-#define PF_PACKET AF_PACKET
-#define PF_ASH AF_ASH
-#define PF_ECONET AF_ECONET
-#define PF_ATMSVC AF_ATMSVC
-#define PF_RDS AF_RDS
-#define PF_SNA AF_SNA
-#define PF_IRDA AF_IRDA
-#define PF_PPPOX AF_PPPOX
-#define PF_WANPIPE AF_WANPIPE
-#define PF_LLC AF_LLC
-#define PF_CAN AF_CAN
-#define PF_TIPC AF_TIPC
-#define PF_BLUETOOTH AF_BLUETOOTH
-#define PF_IUCV AF_IUCV
-#define PF_RXRPC AF_RXRPC
-#define PF_ISDN AF_ISDN
-#define PF_PHONET AF_PHONET
-#define PF_IEEE802154 AF_IEEE802154
-#define PF_CAIF AF_CAIF
-#define PF_ALG AF_ALG
-#define PF_NFC AF_NFC
-#define PF_MAX AF_MAX
-
-/* Maximum queue length specifiable by listen. */
-#define SOMAXCONN 128
-
-/* Flags we can use with send/ and recv.
- Added those for 1003.1g not all are supported yet
- */
-
-#define MSG_OOB 1
-#define MSG_PEEK 2
-#define MSG_DONTROUTE 4
-#define MSG_TRYHARD 4 /* Synonym for MSG_DONTROUTE for DECnet */
-#define MSG_CTRUNC 8
-#define MSG_PROBE 0x10 /* Do not send. Only probe path f.e. for MTU */
-#define MSG_TRUNC 0x20
-#define MSG_DONTWAIT 0x40 /* Nonblocking io */
-#define MSG_EOR 0x80 /* End of record */
-#define MSG_WAITALL 0x100 /* Wait for a full request */
-#define MSG_FIN 0x200
-#define MSG_SYN 0x400
-#define MSG_CONFIRM 0x800 /* Confirm path validity */
-#define MSG_RST 0x1000
-#define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */
-#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */
-#define MSG_MORE 0x8000 /* Sender will send more */
-#define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */
-
-#define MSG_EOF MSG_FIN
-
-#define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file
- descriptor received through
- SCM_RIGHTS */
-#if defined(CONFIG_COMPAT)
-#define MSG_CMSG_COMPAT 0x80000000 /* This message needs 32 bit fixups */
-#else
-#define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */
-#endif
-
-
-/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */
-#define SOL_IP 0
-/* #define SOL_ICMP 1 No-no-no! Due to Linux :-) we cannot use SOL_ICMP=1 */
-#define SOL_TCP 6
-#define SOL_UDP 17
-#define SOL_IPV6 41
-#define SOL_ICMPV6 58
-#define SOL_SCTP 132
-#define SOL_UDPLITE 136 /* UDP-Lite (RFC 3828) */
-#define SOL_RAW 255
-#define SOL_IPX 256
-#define SOL_AX25 257
-#define SOL_ATALK 258
-#define SOL_NETROM 259
-#define SOL_ROSE 260
-#define SOL_DECNET 261
-#define SOL_X25 262
-#define SOL_PACKET 263
-#define SOL_ATM 264 /* ATM layer (cell level) */
-#define SOL_AAL 265 /* ATM Adaption Layer (packet level) */
-#define SOL_IRDA 266
-#define SOL_NETBEUI 267
-#define SOL_LLC 268
-#define SOL_DCCP 269
-#define SOL_NETLINK 270
-#define SOL_TIPC 271
-#define SOL_RXRPC 272
-#define SOL_PPPOL2TP 273
-#define SOL_BLUETOOTH 274
-#define SOL_PNPIPE 275
-#define SOL_RDS 276
-#define SOL_IUCV 277
-#define SOL_CAIF 278
-#define SOL_ALG 279
-
-/* IPX options */
-#define IPX_TYPE 1
-
-extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred);
-
-extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
-extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
- int offset, int len);
-extern int csum_partial_copy_fromiovecend(unsigned char *kdata,
- struct iovec *iov,
- int offset,
- unsigned int len, __wsum *csump);
-
-extern int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr *address, int mode);
-extern int memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len);
-extern int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata,
- int offset, int len);
-extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr);
-extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
-
-struct timespec;
-
-extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
- unsigned int flags, struct timespec *timeout);
-extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg,
- unsigned int vlen, unsigned int flags);
-#endif /* not kernel and not glibc */
-#endif /* _LINUX_SOCKET_H */
diff --git a/original/linux/sockios.h b/original/linux/sockios.h
deleted file mode 100644
index 16f6533..0000000
--- a/original/linux/sockios.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions of the socket-level I/O control calls.
- *
- * Version: @(#)sockios.h 1.0.2 03/09/93
- *
- * Authors: Ross Biro
- * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_SOCKIOS_H
-#define _LINUX_SOCKIOS_H
-
-#include <asm/sockios.h>
-
-/* Linux-specific socket ioctls */
-#define SIOCINQ FIONREAD
-#define SIOCOUTQ TIOCOUTQ
-
-/* Routing table calls. */
-#define SIOCADDRT 0x890B /* add routing table entry */
-#define SIOCDELRT 0x890C /* delete routing table entry */
-#define SIOCRTMSG 0x890D /* call to routing system */
-
-/* Socket configuration controls. */
-#define SIOCGIFNAME 0x8910 /* get iface name */
-#define SIOCSIFLINK 0x8911 /* set iface channel */
-#define SIOCGIFCONF 0x8912 /* get iface list */
-#define SIOCGIFFLAGS 0x8913 /* get flags */
-#define SIOCSIFFLAGS 0x8914 /* set flags */
-#define SIOCGIFADDR 0x8915 /* get PA address */
-#define SIOCSIFADDR 0x8916 /* set PA address */
-#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */
-#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */
-#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */
-#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */
-#define SIOCGIFNETMASK 0x891b /* get network PA mask */
-#define SIOCSIFNETMASK 0x891c /* set network PA mask */
-#define SIOCGIFMETRIC 0x891d /* get metric */
-#define SIOCSIFMETRIC 0x891e /* set metric */
-#define SIOCGIFMEM 0x891f /* get memory address (BSD) */
-#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */
-#define SIOCGIFMTU 0x8921 /* get MTU size */
-#define SIOCSIFMTU 0x8922 /* set MTU size */
-#define SIOCSIFNAME 0x8923 /* set interface name */
-#define SIOCSIFHWADDR 0x8924 /* set hardware address */
-#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */
-#define SIOCSIFENCAP 0x8926
-#define SIOCGIFHWADDR 0x8927 /* Get hardware address */
-#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */
-#define SIOCSIFSLAVE 0x8930
-#define SIOCADDMULTI 0x8931 /* Multicast address lists */
-#define SIOCDELMULTI 0x8932
-#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */
-#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */
-#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */
-#define SIOCGIFPFLAGS 0x8935
-#define SIOCDIFADDR 0x8936 /* delete PA address */
-#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */
-#define SIOCGIFCOUNT 0x8938 /* get number of devices */
-#define SIOCKILLADDR 0x8939 /* kill sockets with this local addr */
-
-#define SIOCGIFBR 0x8940 /* Bridging support */
-#define SIOCSIFBR 0x8941 /* Set bridging options */
-
-#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */
-#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */
-
-/* SIOCGIFDIVERT was: 0x8944 Frame diversion support */
-/* SIOCSIFDIVERT was: 0x8945 Set frame diversion options */
-
-#define SIOCETHTOOL 0x8946 /* Ethtool interface */
-
-#define SIOCGMIIPHY 0x8947 /* Get address of MII PHY in use. */
-#define SIOCGMIIREG 0x8948 /* Read MII PHY register. */
-#define SIOCSMIIREG 0x8949 /* Write MII PHY register. */
-
-#define SIOCWANDEV 0x894A /* get/set netdev parameters */
-
-/* ARP cache control calls. */
- /* 0x8950 - 0x8952 * obsolete calls, don't re-use */
-#define SIOCDARP 0x8953 /* delete ARP table entry */
-#define SIOCGARP 0x8954 /* get ARP table entry */
-#define SIOCSARP 0x8955 /* set ARP table entry */
-
-/* RARP cache control calls. */
-#define SIOCDRARP 0x8960 /* delete RARP table entry */
-#define SIOCGRARP 0x8961 /* get RARP table entry */
-#define SIOCSRARP 0x8962 /* set RARP table entry */
-
-/* Driver configuration calls */
-
-#define SIOCGIFMAP 0x8970 /* Get device parameters */
-#define SIOCSIFMAP 0x8971 /* Set device parameters */
-
-/* DLCI configuration calls */
-
-#define SIOCADDDLCI 0x8980 /* Create new DLCI device */
-#define SIOCDELDLCI 0x8981 /* Delete DLCI device */
-
-#define SIOCGIFVLAN 0x8982 /* 802.1Q VLAN support */
-#define SIOCSIFVLAN 0x8983 /* Set 802.1Q VLAN options */
-
-/* bonding calls */
-
-#define SIOCBONDENSLAVE 0x8990 /* enslave a device to the bond */
-#define SIOCBONDRELEASE 0x8991 /* release a slave from the bond*/
-#define SIOCBONDSETHWADDR 0x8992 /* set the hw addr of the bond */
-#define SIOCBONDSLAVEINFOQUERY 0x8993 /* rtn info about slave state */
-#define SIOCBONDINFOQUERY 0x8994 /* rtn info about bond state */
-#define SIOCBONDCHANGEACTIVE 0x8995 /* update to a new active slave */
-
-/* bridge calls */
-#define SIOCBRADDBR 0x89a0 /* create new bridge device */
-#define SIOCBRDELBR 0x89a1 /* remove bridge device */
-#define SIOCBRADDIF 0x89a2 /* add interface to bridge */
-#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */
-
-/* Device private ioctl calls */
-
-/*
- * These 16 ioctls are available to devices via the do_ioctl() device
- * vector. Each device should include this file and redefine these names
- * as their own. Because these are device dependent it is a good idea
- * _NOT_ to issue them to random objects and hope.
- *
- * THESE IOCTLS ARE _DEPRECATED_ AND WILL DISAPPEAR IN 2.5.X -DaveM
- */
-
-#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */
-
-/*
- * These 16 ioctl calls are protocol private
- */
-
-#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */
-#endif /* _LINUX_SOCKIOS_H */
diff --git a/original/linux/soundcard.h b/original/linux/soundcard.h
deleted file mode 100644
index 523d069..0000000
--- a/original/linux/soundcard.h
+++ /dev/null
@@ -1,1318 +0,0 @@
-#ifndef SOUNDCARD_H
-#define SOUNDCARD_H
-/*
- * Copyright by Hannu Savolainen 1993-1997
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer. 2.
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-
-/*
- * OSS interface version. With versions earlier than 3.6 this value is
- * an integer with value less than 361. In versions 3.6 and later
- * it's a six digit hexadecimal value. For example value
- * of 0x030600 represents OSS version 3.6.0.
- * Use ioctl(fd, OSS_GETVERSION, &int) to get the version number of
- * the currently active driver.
- */
-#define SOUND_VERSION 0x030802
-#define OPEN_SOUND_SYSTEM
-
-/* In Linux we need to be prepared for cross compiling */
-#include <linux/ioctl.h>
-
-/* Endian macros. */
-#ifdef __KERNEL__
-# include <asm/byteorder.h>
-#else
-# include <endian.h>
-#endif
-
-/*
- * Supported card ID numbers (Should be somewhere else?)
- */
-
-#define SNDCARD_ADLIB 1
-#define SNDCARD_SB 2
-#define SNDCARD_PAS 3
-#define SNDCARD_GUS 4
-#define SNDCARD_MPU401 5
-#define SNDCARD_SB16 6
-#define SNDCARD_SB16MIDI 7
-#define SNDCARD_UART6850 8
-#define SNDCARD_GUS16 9
-#define SNDCARD_MSS 10
-#define SNDCARD_PSS 11
-#define SNDCARD_SSCAPE 12
-#define SNDCARD_PSS_MPU 13
-#define SNDCARD_PSS_MSS 14
-#define SNDCARD_SSCAPE_MSS 15
-#define SNDCARD_TRXPRO 16
-#define SNDCARD_TRXPRO_SB 17
-#define SNDCARD_TRXPRO_MPU 18
-#define SNDCARD_MAD16 19
-#define SNDCARD_MAD16_MPU 20
-#define SNDCARD_CS4232 21
-#define SNDCARD_CS4232_MPU 22
-#define SNDCARD_MAUI 23
-#define SNDCARD_PSEUDO_MSS 24
-#define SNDCARD_GUSPNP 25
-#define SNDCARD_UART401 26
-/* Sound card numbers 27 to N are reserved. Don't add more numbers here. */
-
-/***********************************
- * IOCTL Commands for /dev/sequencer
- */
-
-#ifndef _SIOWR
-#if defined(_IOWR) && (defined(_AIX) || (!defined(sun) && !defined(sparc) && !defined(__sparc__) && !defined(__INCioctlh) && !defined(__Lynx__)))
-/* Use already defined ioctl defines if they exist (except with Sun or Sparc) */
-#define SIOCPARM_MASK IOCPARM_MASK
-#define SIOC_VOID IOC_VOID
-#define SIOC_OUT IOC_OUT
-#define SIOC_IN IOC_IN
-#define SIOC_INOUT IOC_INOUT
-#define _SIOC_SIZE _IOC_SIZE
-#define _SIOC_DIR _IOC_DIR
-#define _SIOC_NONE _IOC_NONE
-#define _SIOC_READ _IOC_READ
-#define _SIOC_WRITE _IOC_WRITE
-#define _SIO _IO
-#define _SIOR _IOR
-#define _SIOW _IOW
-#define _SIOWR _IOWR
-#else
-
-/* Ioctl's have the command encoded in the lower word,
- * and the size of any in or out parameters in the upper
- * word. The high 2 bits of the upper word are used
- * to encode the in/out status of the parameter; for now
- * we restrict parameters to at most 8191 bytes.
- */
-/* #define SIOCTYPE (0xff<<8) */
-#define SIOCPARM_MASK 0x1fff /* parameters must be < 8192 bytes */
-#define SIOC_VOID 0x00000000 /* no parameters */
-#define SIOC_OUT 0x20000000 /* copy out parameters */
-#define SIOC_IN 0x40000000 /* copy in parameters */
-#define SIOC_INOUT (SIOC_IN|SIOC_OUT)
-/* the 0x20000000 is so we can distinguish new ioctl's from old */
-#define _SIO(x,y) ((int)(SIOC_VOID|(x<<8)|y))
-#define _SIOR(x,y,t) ((int)(SIOC_OUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-#define _SIOW(x,y,t) ((int)(SIOC_IN|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-/* this should be _SIORW, but stdio got there first */
-#define _SIOWR(x,y,t) ((int)(SIOC_INOUT|((sizeof(t)&SIOCPARM_MASK)<<16)|(x<<8)|y))
-#define _SIOC_SIZE(x) ((x>>16)&SIOCPARM_MASK)
-#define _SIOC_DIR(x) (x & 0xf0000000)
-#define _SIOC_NONE SIOC_VOID
-#define _SIOC_READ SIOC_OUT
-#define _SIOC_WRITE SIOC_IN
-# endif /* _IOWR */
-#endif /* !_SIOWR */
-
-#define SNDCTL_SEQ_RESET _SIO ('Q', 0)
-#define SNDCTL_SEQ_SYNC _SIO ('Q', 1)
-#define SNDCTL_SYNTH_INFO _SIOWR('Q', 2, struct synth_info)
-#define SNDCTL_SEQ_CTRLRATE _SIOWR('Q', 3, int) /* Set/get timer resolution (HZ) */
-#define SNDCTL_SEQ_GETOUTCOUNT _SIOR ('Q', 4, int)
-#define SNDCTL_SEQ_GETINCOUNT _SIOR ('Q', 5, int)
-#define SNDCTL_SEQ_PERCMODE _SIOW ('Q', 6, int)
-#define SNDCTL_FM_LOAD_INSTR _SIOW ('Q', 7, struct sbi_instrument) /* Obsolete. Don't use!!!!!! */
-#define SNDCTL_SEQ_TESTMIDI _SIOW ('Q', 8, int)
-#define SNDCTL_SEQ_RESETSAMPLES _SIOW ('Q', 9, int)
-#define SNDCTL_SEQ_NRSYNTHS _SIOR ('Q',10, int)
-#define SNDCTL_SEQ_NRMIDIS _SIOR ('Q',11, int)
-#define SNDCTL_MIDI_INFO _SIOWR('Q',12, struct midi_info)
-#define SNDCTL_SEQ_THRESHOLD _SIOW ('Q',13, int)
-#define SNDCTL_SYNTH_MEMAVL _SIOWR('Q',14, int) /* in=dev#, out=memsize */
-#define SNDCTL_FM_4OP_ENABLE _SIOW ('Q',15, int) /* in=dev# */
-#define SNDCTL_SEQ_PANIC _SIO ('Q',17)
-#define SNDCTL_SEQ_OUTOFBAND _SIOW ('Q',18, struct seq_event_rec)
-#define SNDCTL_SEQ_GETTIME _SIOR ('Q',19, int)
-#define SNDCTL_SYNTH_ID _SIOWR('Q',20, struct synth_info)
-#define SNDCTL_SYNTH_CONTROL _SIOWR('Q',21, struct synth_control)
-#define SNDCTL_SYNTH_REMOVESAMPLE _SIOWR('Q',22, struct remove_sample)
-
-typedef struct synth_control
-{
- int devno; /* Synthesizer # */
- char data[4000]; /* Device spesific command/data record */
-}synth_control;
-
-typedef struct remove_sample
-{
- int devno; /* Synthesizer # */
- int bankno; /* MIDI bank # (0=General MIDI) */
- int instrno; /* MIDI instrument number */
-} remove_sample;
-
-typedef struct seq_event_rec {
- unsigned char arr[8];
-} seq_event_rec;
-
-#define SNDCTL_TMR_TIMEBASE _SIOWR('T', 1, int)
-#define SNDCTL_TMR_START _SIO ('T', 2)
-#define SNDCTL_TMR_STOP _SIO ('T', 3)
-#define SNDCTL_TMR_CONTINUE _SIO ('T', 4)
-#define SNDCTL_TMR_TEMPO _SIOWR('T', 5, int)
-#define SNDCTL_TMR_SOURCE _SIOWR('T', 6, int)
-# define TMR_INTERNAL 0x00000001
-# define TMR_EXTERNAL 0x00000002
-# define TMR_MODE_MIDI 0x00000010
-# define TMR_MODE_FSK 0x00000020
-# define TMR_MODE_CLS 0x00000040
-# define TMR_MODE_SMPTE 0x00000080
-#define SNDCTL_TMR_METRONOME _SIOW ('T', 7, int)
-#define SNDCTL_TMR_SELECT _SIOW ('T', 8, int)
-
-/*
- * Some big endian/little endian handling macros
- */
-
-#define _LINUX_PATCHKEY_H_INDIRECT
-#include <linux/patchkey.h>
-#undef _LINUX_PATCHKEY_H_INDIRECT
-
-#if defined(__KERNEL__)
-# if defined(__BIG_ENDIAN)
-# define AFMT_S16_NE AFMT_S16_BE
-# elif defined(__LITTLE_ENDIAN)
-# define AFMT_S16_NE AFMT_S16_LE
-# else
-# error "could not determine byte order"
-# endif
-#elif defined(__BYTE_ORDER)
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define AFMT_S16_NE AFMT_S16_BE
-# elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define AFMT_S16_NE AFMT_S16_LE
-# else
-# error "could not determine byte order"
-# endif
-#endif
-
-/*
- * Sample loading mechanism for internal synthesizers (/dev/sequencer)
- * The following patch_info structure has been designed to support
- * Gravis UltraSound. It tries to be universal format for uploading
- * sample based patches but is probably too limited.
- *
- * (PBD) As Hannu guessed, the GUS structure is too limited for
- * the WaveFront, but this is the right place for a constant definition.
- */
-
-struct patch_info {
- unsigned short key; /* Use WAVE_PATCH here */
-#define WAVE_PATCH _PATCHKEY(0x04)
-#define GUS_PATCH WAVE_PATCH
-#define WAVEFRONT_PATCH _PATCHKEY(0x06)
-
- short device_no; /* Synthesizer number */
- short instr_no; /* Midi pgm# */
-
- unsigned int mode;
-/*
- * The least significant byte has the same format than the GUS .PAT
- * files
- */
-#define WAVE_16_BITS 0x01 /* bit 0 = 8 or 16 bit wave data. */
-#define WAVE_UNSIGNED 0x02 /* bit 1 = Signed - Unsigned data. */
-#define WAVE_LOOPING 0x04 /* bit 2 = looping enabled-1. */
-#define WAVE_BIDIR_LOOP 0x08 /* bit 3 = Set is bidirectional looping. */
-#define WAVE_LOOP_BACK 0x10 /* bit 4 = Set is looping backward. */
-#define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/
-#define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */
-#define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */
- /* (use the env_rate/env_offs fields). */
-/* Linux specific bits */
-#define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */
-#define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */
-#define WAVE_SCALE 0x00040000 /* The scaling info is valid */
-#define WAVE_FRACTIONS 0x00080000 /* Fraction information is valid */
-/* Reserved bits */
-#define WAVE_ROM 0x40000000 /* For future use */
-#define WAVE_MULAW 0x20000000 /* For future use */
-/* Other bits must be zeroed */
-
- int len; /* Size of the wave data in bytes */
- int loop_start, loop_end; /* Byte offsets from the beginning */
-
-/*
- * The base_freq and base_note fields are used when computing the
- * playback speed for a note. The base_note defines the tone frequency
- * which is heard if the sample is played using the base_freq as the
- * playback speed.
- *
- * The low_note and high_note fields define the minimum and maximum note
- * frequencies for which this sample is valid. It is possible to define
- * more than one samples for an instrument number at the same time. The
- * low_note and high_note fields are used to select the most suitable one.
- *
- * The fields base_note, high_note and low_note should contain
- * the note frequency multiplied by 1000. For example value for the
- * middle A is 440*1000.
- */
-
- unsigned int base_freq;
- unsigned int base_note;
- unsigned int high_note;
- unsigned int low_note;
- int panning; /* -128=left, 127=right */
- int detuning;
-
-/* New fields introduced in version 1.99.5 */
-
- /* Envelope. Enabled by mode bit WAVE_ENVELOPES */
- unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */
- unsigned char env_offset[ 6 ]; /* 255 == 100% */
-
- /*
- * The tremolo, vibrato and scale info are not supported yet.
- * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or
- * WAVE_SCALE
- */
-
- unsigned char tremolo_sweep;
- unsigned char tremolo_rate;
- unsigned char tremolo_depth;
-
- unsigned char vibrato_sweep;
- unsigned char vibrato_rate;
- unsigned char vibrato_depth;
-
- int scale_frequency;
- unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */
-
- int volume;
- int fractions;
- int reserved1;
- int spare[2];
- char data[1]; /* The waveform data starts here */
- };
-
-struct sysex_info {
- short key; /* Use SYSEX_PATCH or MAUI_PATCH here */
-#define SYSEX_PATCH _PATCHKEY(0x05)
-#define MAUI_PATCH _PATCHKEY(0x06)
- short device_no; /* Synthesizer number */
- int len; /* Size of the sysex data in bytes */
- unsigned char data[1]; /* Sysex data starts here */
- };
-
-/*
- * /dev/sequencer input events.
- *
- * The data written to the /dev/sequencer is a stream of events. Events
- * are records of 4 or 8 bytes. The first byte defines the size.
- * Any number of events can be written with a write call. There
- * is a set of macros for sending these events. Use these macros if you
- * want to maximize portability of your program.
- *
- * Events SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO. Are also input events.
- * (All input events are currently 4 bytes long. Be prepared to support
- * 8 byte events also. If you receive any event having first byte >= 128,
- * it's a 8 byte event.
- *
- * The events are documented at the end of this file.
- *
- * Normal events (4 bytes)
- * There is also a 8 byte version of most of the 4 byte events. The
- * 8 byte one is recommended.
- */
-#define SEQ_NOTEOFF 0
-#define SEQ_FMNOTEOFF SEQ_NOTEOFF /* Just old name */
-#define SEQ_NOTEON 1
-#define SEQ_FMNOTEON SEQ_NOTEON
-#define SEQ_WAIT TMR_WAIT_ABS
-#define SEQ_PGMCHANGE 3
-#define SEQ_FMPGMCHANGE SEQ_PGMCHANGE
-#define SEQ_SYNCTIMER TMR_START
-#define SEQ_MIDIPUTC 5
-#define SEQ_DRUMON 6 /*** OBSOLETE ***/
-#define SEQ_DRUMOFF 7 /*** OBSOLETE ***/
-#define SEQ_ECHO TMR_ECHO /* For synching programs with output */
-#define SEQ_AFTERTOUCH 9
-#define SEQ_CONTROLLER 10
-
-/*******************************************
- * Midi controller numbers
- *******************************************
- * Controllers 0 to 31 (0x00 to 0x1f) and
- * 32 to 63 (0x20 to 0x3f) are continuous
- * controllers.
- * In the MIDI 1.0 these controllers are sent using
- * two messages. Controller numbers 0 to 31 are used
- * to send the MSB and the controller numbers 32 to 63
- * are for the LSB. Note that just 7 bits are used in MIDI bytes.
- */
-
-#define CTL_BANK_SELECT 0x00
-#define CTL_MODWHEEL 0x01
-#define CTL_BREATH 0x02
-/* undefined 0x03 */
-#define CTL_FOOT 0x04
-#define CTL_PORTAMENTO_TIME 0x05
-#define CTL_DATA_ENTRY 0x06
-#define CTL_MAIN_VOLUME 0x07
-#define CTL_BALANCE 0x08
-/* undefined 0x09 */
-#define CTL_PAN 0x0a
-#define CTL_EXPRESSION 0x0b
-/* undefined 0x0c */
-/* undefined 0x0d */
-/* undefined 0x0e */
-/* undefined 0x0f */
-#define CTL_GENERAL_PURPOSE1 0x10
-#define CTL_GENERAL_PURPOSE2 0x11
-#define CTL_GENERAL_PURPOSE3 0x12
-#define CTL_GENERAL_PURPOSE4 0x13
-/* undefined 0x14 - 0x1f */
-
-/* undefined 0x20 */
-/* The controller numbers 0x21 to 0x3f are reserved for the */
-/* least significant bytes of the controllers 0x00 to 0x1f. */
-/* These controllers are not recognised by the driver. */
-
-/* Controllers 64 to 69 (0x40 to 0x45) are on/off switches. */
-/* 0=OFF and 127=ON (intermediate values are possible) */
-#define CTL_DAMPER_PEDAL 0x40
-#define CTL_SUSTAIN 0x40 /* Alias */
-#define CTL_HOLD 0x40 /* Alias */
-#define CTL_PORTAMENTO 0x41
-#define CTL_SOSTENUTO 0x42
-#define CTL_SOFT_PEDAL 0x43
-/* undefined 0x44 */
-#define CTL_HOLD2 0x45
-/* undefined 0x46 - 0x4f */
-
-#define CTL_GENERAL_PURPOSE5 0x50
-#define CTL_GENERAL_PURPOSE6 0x51
-#define CTL_GENERAL_PURPOSE7 0x52
-#define CTL_GENERAL_PURPOSE8 0x53
-/* undefined 0x54 - 0x5a */
-#define CTL_EXT_EFF_DEPTH 0x5b
-#define CTL_TREMOLO_DEPTH 0x5c
-#define CTL_CHORUS_DEPTH 0x5d
-#define CTL_DETUNE_DEPTH 0x5e
-#define CTL_CELESTE_DEPTH 0x5e /* Alias for the above one */
-#define CTL_PHASER_DEPTH 0x5f
-#define CTL_DATA_INCREMENT 0x60
-#define CTL_DATA_DECREMENT 0x61
-#define CTL_NONREG_PARM_NUM_LSB 0x62
-#define CTL_NONREG_PARM_NUM_MSB 0x63
-#define CTL_REGIST_PARM_NUM_LSB 0x64
-#define CTL_REGIST_PARM_NUM_MSB 0x65
-/* undefined 0x66 - 0x78 */
-/* reserved 0x79 - 0x7f */
-
-/* Pseudo controllers (not midi compatible) */
-#define CTRL_PITCH_BENDER 255
-#define CTRL_PITCH_BENDER_RANGE 254
-#define CTRL_EXPRESSION 253 /* Obsolete */
-#define CTRL_MAIN_VOLUME 252 /* Obsolete */
-#define SEQ_BALANCE 11
-#define SEQ_VOLMODE 12
-
-/*
- * Volume mode decides how volumes are used
- */
-
-#define VOL_METHOD_ADAGIO 1
-#define VOL_METHOD_LINEAR 2
-
-/*
- * Note! SEQ_WAIT, SEQ_MIDIPUTC and SEQ_ECHO are used also as
- * input events.
- */
-
-/*
- * Event codes 0xf0 to 0xfc are reserved for future extensions.
- */
-
-#define SEQ_FULLSIZE 0xfd /* Long events */
-/*
- * SEQ_FULLSIZE events are used for loading patches/samples to the
- * synthesizer devices. These events are passed directly to the driver
- * of the associated synthesizer device. There is no limit to the size
- * of the extended events. These events are not queued but executed
- * immediately when the write() is called (execution can take several
- * seconds of time).
- *
- * When a SEQ_FULLSIZE message is written to the device, it must
- * be written using exactly one write() call. Other events cannot
- * be mixed to the same write.
- *
- * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the
- * /dev/sequencer. Don't write other data together with the instrument structure
- * Set the key field of the structure to FM_PATCH. The device field is used to
- * route the patch to the corresponding device.
- *
- * For wave table use struct patch_info. Initialize the key field
- * to WAVE_PATCH.
- */
-#define SEQ_PRIVATE 0xfe /* Low level HW dependent events (8 bytes) */
-#define SEQ_EXTENDED 0xff /* Extended events (8 bytes) OBSOLETE */
-
-/*
- * Record for FM patches
- */
-
-typedef unsigned char sbi_instr_data[32];
-
-struct sbi_instrument {
- unsigned short key; /* FM_PATCH or OPL3_PATCH */
-#define FM_PATCH _PATCHKEY(0x01)
-#define OPL3_PATCH _PATCHKEY(0x03)
- short device; /* Synth# (0-4) */
- int channel; /* Program# to be initialized */
- sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */
- };
-
-struct synth_info { /* Read only */
- char name[30];
- int device; /* 0-N. INITIALIZE BEFORE CALLING */
- int synth_type;
-#define SYNTH_TYPE_FM 0
-#define SYNTH_TYPE_SAMPLE 1
-#define SYNTH_TYPE_MIDI 2 /* Midi interface */
-
- int synth_subtype;
-#define FM_TYPE_ADLIB 0x00
-#define FM_TYPE_OPL3 0x01
-#define MIDI_TYPE_MPU401 0x401
-
-#define SAMPLE_TYPE_BASIC 0x10
-#define SAMPLE_TYPE_GUS SAMPLE_TYPE_BASIC
-#define SAMPLE_TYPE_WAVEFRONT 0x11
-
- int perc_mode; /* No longer supported */
- int nr_voices;
- int nr_drums; /* Obsolete field */
- int instr_bank_size;
- unsigned int capabilities;
-#define SYNTH_CAP_PERCMODE 0x00000001 /* No longer used */
-#define SYNTH_CAP_OPL3 0x00000002 /* Set if OPL3 supported */
-#define SYNTH_CAP_INPUT 0x00000004 /* Input (MIDI) device */
- int dummies[19]; /* Reserve space */
- };
-
-struct sound_timer_info {
- char name[32];
- int caps;
- };
-
-#define MIDI_CAP_MPU401 1 /* MPU-401 intelligent mode */
-
-struct midi_info {
- char name[30];
- int device; /* 0-N. INITIALIZE BEFORE CALLING */
- unsigned int capabilities; /* To be defined later */
- int dev_type;
- int dummies[18]; /* Reserve space */
- };
-
-/********************************************
- * ioctl commands for the /dev/midi##
- */
-typedef struct {
- unsigned char cmd;
- char nr_args, nr_returns;
- unsigned char data[30];
- } mpu_command_rec;
-
-#define SNDCTL_MIDI_PRETIME _SIOWR('m', 0, int)
-#define SNDCTL_MIDI_MPUMODE _SIOWR('m', 1, int)
-#define SNDCTL_MIDI_MPUCMD _SIOWR('m', 2, mpu_command_rec)
-
-/********************************************
- * IOCTL commands for /dev/dsp and /dev/audio
- */
-
-#define SNDCTL_DSP_RESET _SIO ('P', 0)
-#define SNDCTL_DSP_SYNC _SIO ('P', 1)
-#define SNDCTL_DSP_SPEED _SIOWR('P', 2, int)
-#define SNDCTL_DSP_STEREO _SIOWR('P', 3, int)
-#define SNDCTL_DSP_GETBLKSIZE _SIOWR('P', 4, int)
-#define SNDCTL_DSP_SAMPLESIZE SNDCTL_DSP_SETFMT
-#define SNDCTL_DSP_CHANNELS _SIOWR('P', 6, int)
-#define SOUND_PCM_WRITE_CHANNELS SNDCTL_DSP_CHANNELS
-#define SOUND_PCM_WRITE_FILTER _SIOWR('P', 7, int)
-#define SNDCTL_DSP_POST _SIO ('P', 8)
-#define SNDCTL_DSP_SUBDIVIDE _SIOWR('P', 9, int)
-#define SNDCTL_DSP_SETFRAGMENT _SIOWR('P',10, int)
-
-/* Audio data formats (Note! U8=8 and S16_LE=16 for compatibility) */
-#define SNDCTL_DSP_GETFMTS _SIOR ('P',11, int) /* Returns a mask */
-#define SNDCTL_DSP_SETFMT _SIOWR('P',5, int) /* Selects ONE fmt*/
-# define AFMT_QUERY 0x00000000 /* Return current fmt */
-# define AFMT_MU_LAW 0x00000001
-# define AFMT_A_LAW 0x00000002
-# define AFMT_IMA_ADPCM 0x00000004
-# define AFMT_U8 0x00000008
-# define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/
-# define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */
-# define AFMT_S8 0x00000040
-# define AFMT_U16_LE 0x00000080 /* Little endian U16 */
-# define AFMT_U16_BE 0x00000100 /* Big endian U16 */
-# define AFMT_MPEG 0x00000200 /* MPEG (2) audio */
-# define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */
-
-/*
- * Buffer status queries.
- */
-typedef struct audio_buf_info {
- int fragments; /* # of available fragments (partially usend ones not counted) */
- int fragstotal; /* Total # of fragments allocated */
- int fragsize; /* Size of a fragment in bytes */
-
- int bytes; /* Available space in bytes (includes partially used fragments) */
- /* Note! 'bytes' could be more than fragments*fragsize */
- } audio_buf_info;
-
-#define SNDCTL_DSP_GETOSPACE _SIOR ('P',12, audio_buf_info)
-#define SNDCTL_DSP_GETISPACE _SIOR ('P',13, audio_buf_info)
-#define SNDCTL_DSP_NONBLOCK _SIO ('P',14)
-#define SNDCTL_DSP_GETCAPS _SIOR ('P',15, int)
-# define DSP_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */
-# define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */
-# define DSP_CAP_REALTIME 0x00000200 /* Real time capability */
-# define DSP_CAP_BATCH 0x00000400 /* Device has some kind of */
- /* internal buffers which may */
- /* cause some delays and */
- /* decrease precision of timing */
-# define DSP_CAP_COPROC 0x00000800 /* Has a coprocessor */
- /* Sometimes it's a DSP */
- /* but usually not */
-# define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */
-# define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */
-# define DSP_CAP_MULTI 0x00004000 /* support multiple open */
-# define DSP_CAP_BIND 0x00008000 /* channel binding to front/rear/cneter/lfe */
-
-
-#define SNDCTL_DSP_GETTRIGGER _SIOR ('P',16, int)
-#define SNDCTL_DSP_SETTRIGGER _SIOW ('P',16, int)
-# define PCM_ENABLE_INPUT 0x00000001
-# define PCM_ENABLE_OUTPUT 0x00000002
-
-typedef struct count_info {
- int bytes; /* Total # of bytes processed */
- int blocks; /* # of fragment transitions since last time */
- int ptr; /* Current DMA pointer value */
- } count_info;
-
-#define SNDCTL_DSP_GETIPTR _SIOR ('P',17, count_info)
-#define SNDCTL_DSP_GETOPTR _SIOR ('P',18, count_info)
-
-typedef struct buffmem_desc {
- unsigned *buffer;
- int size;
- } buffmem_desc;
-#define SNDCTL_DSP_MAPINBUF _SIOR ('P', 19, buffmem_desc)
-#define SNDCTL_DSP_MAPOUTBUF _SIOR ('P', 20, buffmem_desc)
-#define SNDCTL_DSP_SETSYNCRO _SIO ('P', 21)
-#define SNDCTL_DSP_SETDUPLEX _SIO ('P', 22)
-#define SNDCTL_DSP_GETODELAY _SIOR ('P', 23, int)
-
-#define SNDCTL_DSP_GETCHANNELMASK _SIOWR('P', 64, int)
-#define SNDCTL_DSP_BIND_CHANNEL _SIOWR('P', 65, int)
-# define DSP_BIND_QUERY 0x00000000
-# define DSP_BIND_FRONT 0x00000001
-# define DSP_BIND_SURR 0x00000002
-# define DSP_BIND_CENTER_LFE 0x00000004
-# define DSP_BIND_HANDSET 0x00000008
-# define DSP_BIND_MIC 0x00000010
-# define DSP_BIND_MODEM1 0x00000020
-# define DSP_BIND_MODEM2 0x00000040
-# define DSP_BIND_I2S 0x00000080
-# define DSP_BIND_SPDIF 0x00000100
-
-#define SNDCTL_DSP_SETSPDIF _SIOW ('P', 66, int)
-#define SNDCTL_DSP_GETSPDIF _SIOR ('P', 67, int)
-# define SPDIF_PRO 0x0001
-# define SPDIF_N_AUD 0x0002
-# define SPDIF_COPY 0x0004
-# define SPDIF_PRE 0x0008
-# define SPDIF_CC 0x07f0
-# define SPDIF_L 0x0800
-# define SPDIF_DRS 0x4000
-# define SPDIF_V 0x8000
-
-/*
- * Application's profile defines the way how playback underrun situations should be handled.
- *
- * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the
- * playback buffer whenever an underrun occurs. This consumes some time
- * prevents looping the existing buffer.
- * APF_CPUINTENS is intended to be set by CPU intensive applications which
- * are likely to run out of time occasionally. In this mode the buffer cleanup is
- * disabled which saves CPU time but also let's the previous buffer content to
- * be played during the "pause" after the underrun.
- */
-#define SNDCTL_DSP_PROFILE _SIOW ('P', 23, int)
-#define APF_NORMAL 0 /* Normal applications */
-#define APF_NETWORK 1 /* Underruns probably caused by an "external" delay */
-#define APF_CPUINTENS 2 /* Underruns probably caused by "overheating" the CPU */
-
-#define SOUND_PCM_READ_RATE _SIOR ('P', 2, int)
-#define SOUND_PCM_READ_CHANNELS _SIOR ('P', 6, int)
-#define SOUND_PCM_READ_BITS _SIOR ('P', 5, int)
-#define SOUND_PCM_READ_FILTER _SIOR ('P', 7, int)
-
-/* Some alias names */
-#define SOUND_PCM_WRITE_BITS SNDCTL_DSP_SETFMT
-#define SOUND_PCM_WRITE_RATE SNDCTL_DSP_SPEED
-#define SOUND_PCM_POST SNDCTL_DSP_POST
-#define SOUND_PCM_RESET SNDCTL_DSP_RESET
-#define SOUND_PCM_SYNC SNDCTL_DSP_SYNC
-#define SOUND_PCM_SUBDIVIDE SNDCTL_DSP_SUBDIVIDE
-#define SOUND_PCM_SETFRAGMENT SNDCTL_DSP_SETFRAGMENT
-#define SOUND_PCM_GETFMTS SNDCTL_DSP_GETFMTS
-#define SOUND_PCM_SETFMT SNDCTL_DSP_SETFMT
-#define SOUND_PCM_GETOSPACE SNDCTL_DSP_GETOSPACE
-#define SOUND_PCM_GETISPACE SNDCTL_DSP_GETISPACE
-#define SOUND_PCM_NONBLOCK SNDCTL_DSP_NONBLOCK
-#define SOUND_PCM_GETCAPS SNDCTL_DSP_GETCAPS
-#define SOUND_PCM_GETTRIGGER SNDCTL_DSP_GETTRIGGER
-#define SOUND_PCM_SETTRIGGER SNDCTL_DSP_SETTRIGGER
-#define SOUND_PCM_SETSYNCRO SNDCTL_DSP_SETSYNCRO
-#define SOUND_PCM_GETIPTR SNDCTL_DSP_GETIPTR
-#define SOUND_PCM_GETOPTR SNDCTL_DSP_GETOPTR
-#define SOUND_PCM_MAPINBUF SNDCTL_DSP_MAPINBUF
-#define SOUND_PCM_MAPOUTBUF SNDCTL_DSP_MAPOUTBUF
-
-/*
- * ioctl calls to be used in communication with coprocessors and
- * DSP chips.
- */
-
-typedef struct copr_buffer {
- int command; /* Set to 0 if not used */
- int flags;
-#define CPF_NONE 0x0000
-#define CPF_FIRST 0x0001 /* First block */
-#define CPF_LAST 0x0002 /* Last block */
- int len;
- int offs; /* If required by the device (0 if not used) */
-
- unsigned char data[4000]; /* NOTE! 4000 is not 4k */
- } copr_buffer;
-
-typedef struct copr_debug_buf {
- int command; /* Used internally. Set to 0 */
- int parm1;
- int parm2;
- int flags;
- int len; /* Length of data in bytes */
- } copr_debug_buf;
-
-typedef struct copr_msg {
- int len;
- unsigned char data[4000];
- } copr_msg;
-
-#define SNDCTL_COPR_RESET _SIO ('C', 0)
-#define SNDCTL_COPR_LOAD _SIOWR('C', 1, copr_buffer)
-#define SNDCTL_COPR_RDATA _SIOWR('C', 2, copr_debug_buf)
-#define SNDCTL_COPR_RCODE _SIOWR('C', 3, copr_debug_buf)
-#define SNDCTL_COPR_WDATA _SIOW ('C', 4, copr_debug_buf)
-#define SNDCTL_COPR_WCODE _SIOW ('C', 5, copr_debug_buf)
-#define SNDCTL_COPR_RUN _SIOWR('C', 6, copr_debug_buf)
-#define SNDCTL_COPR_HALT _SIOWR('C', 7, copr_debug_buf)
-#define SNDCTL_COPR_SENDMSG _SIOWR('C', 8, copr_msg)
-#define SNDCTL_COPR_RCVMSG _SIOR ('C', 9, copr_msg)
-
-/*********************************************
- * IOCTL commands for /dev/mixer
- */
-
-/*
- * Mixer devices
- *
- * There can be up to 20 different analog mixer channels. The
- * SOUND_MIXER_NRDEVICES gives the currently supported maximum.
- * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells
- * the devices supported by the particular mixer.
- */
-
-#define SOUND_MIXER_NRDEVICES 25
-#define SOUND_MIXER_VOLUME 0
-#define SOUND_MIXER_BASS 1
-#define SOUND_MIXER_TREBLE 2
-#define SOUND_MIXER_SYNTH 3
-#define SOUND_MIXER_PCM 4
-#define SOUND_MIXER_SPEAKER 5
-#define SOUND_MIXER_LINE 6
-#define SOUND_MIXER_MIC 7
-#define SOUND_MIXER_CD 8
-#define SOUND_MIXER_IMIX 9 /* Recording monitor */
-#define SOUND_MIXER_ALTPCM 10
-#define SOUND_MIXER_RECLEV 11 /* Recording level */
-#define SOUND_MIXER_IGAIN 12 /* Input gain */
-#define SOUND_MIXER_OGAIN 13 /* Output gain */
-/*
- * The AD1848 codec and compatibles have three line level inputs
- * (line, aux1 and aux2). Since each card manufacturer have assigned
- * different meanings to these inputs, it's inpractical to assign
- * specific meanings (line, cd, synth etc.) to them.
- */
-#define SOUND_MIXER_LINE1 14 /* Input source 1 (aux1) */
-#define SOUND_MIXER_LINE2 15 /* Input source 2 (aux2) */
-#define SOUND_MIXER_LINE3 16 /* Input source 3 (line) */
-#define SOUND_MIXER_DIGITAL1 17 /* Digital (input) 1 */
-#define SOUND_MIXER_DIGITAL2 18 /* Digital (input) 2 */
-#define SOUND_MIXER_DIGITAL3 19 /* Digital (input) 3 */
-#define SOUND_MIXER_PHONEIN 20 /* Phone input */
-#define SOUND_MIXER_PHONEOUT 21 /* Phone output */
-#define SOUND_MIXER_VIDEO 22 /* Video/TV (audio) in */
-#define SOUND_MIXER_RADIO 23 /* Radio in */
-#define SOUND_MIXER_MONITOR 24 /* Monitor (usually mic) volume */
-
-/* Some on/off settings (SOUND_SPECIAL_MIN - SOUND_SPECIAL_MAX) */
-/* Not counted to SOUND_MIXER_NRDEVICES, but use the same number space */
-#define SOUND_ONOFF_MIN 28
-#define SOUND_ONOFF_MAX 30
-
-/* Note! Number 31 cannot be used since the sign bit is reserved */
-#define SOUND_MIXER_NONE 31
-
-/*
- * The following unsupported macros are no longer functional.
- * Use SOUND_MIXER_PRIVATE# macros in future.
- */
-#define SOUND_MIXER_ENHANCE SOUND_MIXER_NONE
-#define SOUND_MIXER_MUTE SOUND_MIXER_NONE
-#define SOUND_MIXER_LOUD SOUND_MIXER_NONE
-
-
-#define SOUND_DEVICE_LABELS {"Vol ", "Bass ", "Trebl", "Synth", "Pcm ", "Spkr ", "Line ", \
- "Mic ", "CD ", "Mix ", "Pcm2 ", "Rec ", "IGain", "OGain", \
- "Line1", "Line2", "Line3", "Digital1", "Digital2", "Digital3", \
- "PhoneIn", "PhoneOut", "Video", "Radio", "Monitor"}
-
-#define SOUND_DEVICE_NAMES {"vol", "bass", "treble", "synth", "pcm", "speaker", "line", \
- "mic", "cd", "mix", "pcm2", "rec", "igain", "ogain", \
- "line1", "line2", "line3", "dig1", "dig2", "dig3", \
- "phin", "phout", "video", "radio", "monitor"}
-
-/* Device bitmask identifiers */
-
-#define SOUND_MIXER_RECSRC 0xff /* Arg contains a bit for each recording source */
-#define SOUND_MIXER_DEVMASK 0xfe /* Arg contains a bit for each supported device */
-#define SOUND_MIXER_RECMASK 0xfd /* Arg contains a bit for each supported recording source */
-#define SOUND_MIXER_CAPS 0xfc
-# define SOUND_CAP_EXCL_INPUT 0x00000001 /* Only one recording source at a time */
-#define SOUND_MIXER_STEREODEVS 0xfb /* Mixer channels supporting stereo */
-#define SOUND_MIXER_OUTSRC 0xfa /* Arg contains a bit for each input source to output */
-#define SOUND_MIXER_OUTMASK 0xf9 /* Arg contains a bit for each supported input source to output */
-
-/* Device mask bits */
-
-#define SOUND_MASK_VOLUME (1 << SOUND_MIXER_VOLUME)
-#define SOUND_MASK_BASS (1 << SOUND_MIXER_BASS)
-#define SOUND_MASK_TREBLE (1 << SOUND_MIXER_TREBLE)
-#define SOUND_MASK_SYNTH (1 << SOUND_MIXER_SYNTH)
-#define SOUND_MASK_PCM (1 << SOUND_MIXER_PCM)
-#define SOUND_MASK_SPEAKER (1 << SOUND_MIXER_SPEAKER)
-#define SOUND_MASK_LINE (1 << SOUND_MIXER_LINE)
-#define SOUND_MASK_MIC (1 << SOUND_MIXER_MIC)
-#define SOUND_MASK_CD (1 << SOUND_MIXER_CD)
-#define SOUND_MASK_IMIX (1 << SOUND_MIXER_IMIX)
-#define SOUND_MASK_ALTPCM (1 << SOUND_MIXER_ALTPCM)
-#define SOUND_MASK_RECLEV (1 << SOUND_MIXER_RECLEV)
-#define SOUND_MASK_IGAIN (1 << SOUND_MIXER_IGAIN)
-#define SOUND_MASK_OGAIN (1 << SOUND_MIXER_OGAIN)
-#define SOUND_MASK_LINE1 (1 << SOUND_MIXER_LINE1)
-#define SOUND_MASK_LINE2 (1 << SOUND_MIXER_LINE2)
-#define SOUND_MASK_LINE3 (1 << SOUND_MIXER_LINE3)
-#define SOUND_MASK_DIGITAL1 (1 << SOUND_MIXER_DIGITAL1)
-#define SOUND_MASK_DIGITAL2 (1 << SOUND_MIXER_DIGITAL2)
-#define SOUND_MASK_DIGITAL3 (1 << SOUND_MIXER_DIGITAL3)
-#define SOUND_MASK_PHONEIN (1 << SOUND_MIXER_PHONEIN)
-#define SOUND_MASK_PHONEOUT (1 << SOUND_MIXER_PHONEOUT)
-#define SOUND_MASK_RADIO (1 << SOUND_MIXER_RADIO)
-#define SOUND_MASK_VIDEO (1 << SOUND_MIXER_VIDEO)
-#define SOUND_MASK_MONITOR (1 << SOUND_MIXER_MONITOR)
-
-/* Obsolete macros */
-#define SOUND_MASK_MUTE (1 << SOUND_MIXER_MUTE)
-#define SOUND_MASK_ENHANCE (1 << SOUND_MIXER_ENHANCE)
-#define SOUND_MASK_LOUD (1 << SOUND_MIXER_LOUD)
-
-#define MIXER_READ(dev) _SIOR('M', dev, int)
-#define SOUND_MIXER_READ_VOLUME MIXER_READ(SOUND_MIXER_VOLUME)
-#define SOUND_MIXER_READ_BASS MIXER_READ(SOUND_MIXER_BASS)
-#define SOUND_MIXER_READ_TREBLE MIXER_READ(SOUND_MIXER_TREBLE)
-#define SOUND_MIXER_READ_SYNTH MIXER_READ(SOUND_MIXER_SYNTH)
-#define SOUND_MIXER_READ_PCM MIXER_READ(SOUND_MIXER_PCM)
-#define SOUND_MIXER_READ_SPEAKER MIXER_READ(SOUND_MIXER_SPEAKER)
-#define SOUND_MIXER_READ_LINE MIXER_READ(SOUND_MIXER_LINE)
-#define SOUND_MIXER_READ_MIC MIXER_READ(SOUND_MIXER_MIC)
-#define SOUND_MIXER_READ_CD MIXER_READ(SOUND_MIXER_CD)
-#define SOUND_MIXER_READ_IMIX MIXER_READ(SOUND_MIXER_IMIX)
-#define SOUND_MIXER_READ_ALTPCM MIXER_READ(SOUND_MIXER_ALTPCM)
-#define SOUND_MIXER_READ_RECLEV MIXER_READ(SOUND_MIXER_RECLEV)
-#define SOUND_MIXER_READ_IGAIN MIXER_READ(SOUND_MIXER_IGAIN)
-#define SOUND_MIXER_READ_OGAIN MIXER_READ(SOUND_MIXER_OGAIN)
-#define SOUND_MIXER_READ_LINE1 MIXER_READ(SOUND_MIXER_LINE1)
-#define SOUND_MIXER_READ_LINE2 MIXER_READ(SOUND_MIXER_LINE2)
-#define SOUND_MIXER_READ_LINE3 MIXER_READ(SOUND_MIXER_LINE3)
-
-/* Obsolete macros */
-#define SOUND_MIXER_READ_MUTE MIXER_READ(SOUND_MIXER_MUTE)
-#define SOUND_MIXER_READ_ENHANCE MIXER_READ(SOUND_MIXER_ENHANCE)
-#define SOUND_MIXER_READ_LOUD MIXER_READ(SOUND_MIXER_LOUD)
-
-#define SOUND_MIXER_READ_RECSRC MIXER_READ(SOUND_MIXER_RECSRC)
-#define SOUND_MIXER_READ_DEVMASK MIXER_READ(SOUND_MIXER_DEVMASK)
-#define SOUND_MIXER_READ_RECMASK MIXER_READ(SOUND_MIXER_RECMASK)
-#define SOUND_MIXER_READ_STEREODEVS MIXER_READ(SOUND_MIXER_STEREODEVS)
-#define SOUND_MIXER_READ_CAPS MIXER_READ(SOUND_MIXER_CAPS)
-
-#define MIXER_WRITE(dev) _SIOWR('M', dev, int)
-#define SOUND_MIXER_WRITE_VOLUME MIXER_WRITE(SOUND_MIXER_VOLUME)
-#define SOUND_MIXER_WRITE_BASS MIXER_WRITE(SOUND_MIXER_BASS)
-#define SOUND_MIXER_WRITE_TREBLE MIXER_WRITE(SOUND_MIXER_TREBLE)
-#define SOUND_MIXER_WRITE_SYNTH MIXER_WRITE(SOUND_MIXER_SYNTH)
-#define SOUND_MIXER_WRITE_PCM MIXER_WRITE(SOUND_MIXER_PCM)
-#define SOUND_MIXER_WRITE_SPEAKER MIXER_WRITE(SOUND_MIXER_SPEAKER)
-#define SOUND_MIXER_WRITE_LINE MIXER_WRITE(SOUND_MIXER_LINE)
-#define SOUND_MIXER_WRITE_MIC MIXER_WRITE(SOUND_MIXER_MIC)
-#define SOUND_MIXER_WRITE_CD MIXER_WRITE(SOUND_MIXER_CD)
-#define SOUND_MIXER_WRITE_IMIX MIXER_WRITE(SOUND_MIXER_IMIX)
-#define SOUND_MIXER_WRITE_ALTPCM MIXER_WRITE(SOUND_MIXER_ALTPCM)
-#define SOUND_MIXER_WRITE_RECLEV MIXER_WRITE(SOUND_MIXER_RECLEV)
-#define SOUND_MIXER_WRITE_IGAIN MIXER_WRITE(SOUND_MIXER_IGAIN)
-#define SOUND_MIXER_WRITE_OGAIN MIXER_WRITE(SOUND_MIXER_OGAIN)
-#define SOUND_MIXER_WRITE_LINE1 MIXER_WRITE(SOUND_MIXER_LINE1)
-#define SOUND_MIXER_WRITE_LINE2 MIXER_WRITE(SOUND_MIXER_LINE2)
-#define SOUND_MIXER_WRITE_LINE3 MIXER_WRITE(SOUND_MIXER_LINE3)
-
-/* Obsolete macros */
-#define SOUND_MIXER_WRITE_MUTE MIXER_WRITE(SOUND_MIXER_MUTE)
-#define SOUND_MIXER_WRITE_ENHANCE MIXER_WRITE(SOUND_MIXER_ENHANCE)
-#define SOUND_MIXER_WRITE_LOUD MIXER_WRITE(SOUND_MIXER_LOUD)
-
-#define SOUND_MIXER_WRITE_RECSRC MIXER_WRITE(SOUND_MIXER_RECSRC)
-
-typedef struct mixer_info
-{
- char id[16];
- char name[32];
- int modify_counter;
- int fillers[10];
-} mixer_info;
-
-typedef struct _old_mixer_info /* Obsolete */
-{
- char id[16];
- char name[32];
-} _old_mixer_info;
-
-#define SOUND_MIXER_INFO _SIOR ('M', 101, mixer_info)
-#define SOUND_OLD_MIXER_INFO _SIOR ('M', 101, _old_mixer_info)
-
-/*
- * A mechanism for accessing "proprietary" mixer features. This method
- * permits passing 128 bytes of arbitrary data between a mixer application
- * and the mixer driver. Interpretation of the record is defined by
- * the particular mixer driver.
- */
-typedef unsigned char mixer_record[128];
-
-#define SOUND_MIXER_ACCESS _SIOWR('M', 102, mixer_record)
-
-/*
- * Two ioctls for special souncard function
- */
-#define SOUND_MIXER_AGC _SIOWR('M', 103, int)
-#define SOUND_MIXER_3DSE _SIOWR('M', 104, int)
-
-/*
- * The SOUND_MIXER_PRIVATE# commands can be redefined by low level drivers.
- * These features can be used when accessing device specific features.
- */
-#define SOUND_MIXER_PRIVATE1 _SIOWR('M', 111, int)
-#define SOUND_MIXER_PRIVATE2 _SIOWR('M', 112, int)
-#define SOUND_MIXER_PRIVATE3 _SIOWR('M', 113, int)
-#define SOUND_MIXER_PRIVATE4 _SIOWR('M', 114, int)
-#define SOUND_MIXER_PRIVATE5 _SIOWR('M', 115, int)
-
-/*
- * SOUND_MIXER_GETLEVELS and SOUND_MIXER_SETLEVELS calls can be used
- * for querying current mixer settings from the driver and for loading
- * default volume settings _prior_ activating the mixer (loading
- * doesn't affect current state of the mixer hardware). These calls
- * are for internal use only.
- */
-
-typedef struct mixer_vol_table {
- int num; /* Index to volume table */
- char name[32];
- int levels[32];
-} mixer_vol_table;
-
-#define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table)
-#define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table)
-
-/*
- * An ioctl for identifying the driver version. It will return value
- * of the SOUND_VERSION macro used when compiling the driver.
- * This call was introduced in OSS version 3.6 and it will not work
- * with earlier versions (returns EINVAL).
- */
-#define OSS_GETVERSION _SIOR ('M', 118, int)
-
-/*
- * Level 2 event types for /dev/sequencer
- */
-
-/*
- * The 4 most significant bits of byte 0 specify the class of
- * the event:
- *
- * 0x8X = system level events,
- * 0x9X = device/port specific events, event[1] = device/port,
- * The last 4 bits give the subtype:
- * 0x02 = Channel event (event[3] = chn).
- * 0x01 = note event (event[4] = note).
- * (0x01 is not used alone but always with bit 0x02).
- * event[2] = MIDI message code (0x80=note off etc.)
- *
- */
-
-#define EV_SEQ_LOCAL 0x80
-#define EV_TIMING 0x81
-#define EV_CHN_COMMON 0x92
-#define EV_CHN_VOICE 0x93
-#define EV_SYSEX 0x94
-/*
- * Event types 200 to 220 are reserved for application use.
- * These numbers will not be used by the driver.
- */
-
-/*
- * Events for event type EV_CHN_VOICE
- */
-
-#define MIDI_NOTEOFF 0x80
-#define MIDI_NOTEON 0x90
-#define MIDI_KEY_PRESSURE 0xA0
-
-/*
- * Events for event type EV_CHN_COMMON
- */
-
-#define MIDI_CTL_CHANGE 0xB0
-#define MIDI_PGM_CHANGE 0xC0
-#define MIDI_CHN_PRESSURE 0xD0
-#define MIDI_PITCH_BEND 0xE0
-
-#define MIDI_SYSTEM_PREFIX 0xF0
-
-/*
- * Timer event types
- */
-#define TMR_WAIT_REL 1 /* Time relative to the prev time */
-#define TMR_WAIT_ABS 2 /* Absolute time since TMR_START */
-#define TMR_STOP 3
-#define TMR_START 4
-#define TMR_CONTINUE 5
-#define TMR_TEMPO 6
-#define TMR_ECHO 8
-#define TMR_CLOCK 9 /* MIDI clock */
-#define TMR_SPP 10 /* Song position pointer */
-#define TMR_TIMESIG 11 /* Time signature */
-
-/*
- * Local event types
- */
-#define LOCL_STARTAUDIO 1
-
-#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
-/*
- * Some convenience macros to simplify programming of the
- * /dev/sequencer interface
- *
- * These macros define the API which should be used when possible.
- */
-#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
-
-void seqbuf_dump(void); /* This function must be provided by programs */
-
-extern int OSS_init(int seqfd, int buflen);
-extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
-extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
-extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
-extern void OSS_patch_caching(int dev, int chn, int patch,
- int fd, unsigned char *buf, int buflen);
-extern void OSS_drum_caching(int dev, int chn, int patch,
- int fd, unsigned char *buf, int buflen);
-extern void OSS_write_patch(int fd, unsigned char *buf, int len);
-extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
-
-#define SEQ_PM_DEFINES int __foo_bar___
-#ifdef OSSLIB
-# define SEQ_USE_EXTBUF() \
- extern unsigned char *_seqbuf; \
- extern int _seqbuflen;extern int _seqbufptr
-# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
-# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
-# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
-# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
-
-# define SEQ_LOAD_GMINSTR(dev, instr) \
- OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
-# define SEQ_LOAD_GMDRUM(dev, drum) \
- OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
-#else /* !OSSLIB */
-
-# define SEQ_LOAD_GMINSTR(dev, instr)
-# define SEQ_LOAD_GMDRUM(dev, drum)
-
-# define SEQ_USE_EXTBUF() \
- extern unsigned char _seqbuf[]; \
- extern int _seqbuflen;extern int _seqbufptr
-
-#ifndef USE_SIMPLE_MACROS
-/* Sample seqbuf_dump() implementation:
- *
- * SEQ_DEFINEBUF (2048); -- Defines a buffer for 2048 bytes
- *
- * int seqfd; -- The file descriptor for /dev/sequencer.
- *
- * void
- * seqbuf_dump ()
- * {
- * if (_seqbufptr)
- * if (write (seqfd, _seqbuf, _seqbufptr) == -1)
- * {
- * perror ("write /dev/sequencer");
- * exit (-1);
- * }
- * _seqbufptr = 0;
- * }
- */
-
-#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
-#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
-#define _SEQ_ADVBUF(len) _seqbufptr += len
-#define SEQ_DUMPBUF seqbuf_dump
-#else
-/*
- * This variation of the sequencer macros is used just to format one event
- * using fixed buffer.
- *
- * The program using the macro library must define the following macros before
- * using this library.
- *
- * #define _seqbuf name of the buffer (unsigned char[])
- * #define _SEQ_ADVBUF(len) If the applic needs to know the exact
- * size of the event, this macro can be used.
- * Otherwise this must be defined as empty.
- * #define _seqbufptr Define the name of index variable or 0 if
- * not required.
- */
-#define _SEQ_NEEDBUF(len) /* empty */
-#endif
-#endif /* !OSSLIB */
-
-#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
- _seqbuf[_seqbufptr+1] = SEQ_VOLMODE;\
- _seqbuf[_seqbufptr+2] = (dev);\
- _seqbuf[_seqbufptr+3] = (mode);\
- _seqbuf[_seqbufptr+4] = 0;\
- _seqbuf[_seqbufptr+5] = 0;\
- _seqbuf[_seqbufptr+6] = 0;\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-
-/*
- * Midi voice messages
- */
-
-#define _CHN_VOICE(dev, event, chn, note, parm) \
- {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_CHN_VOICE;\
- _seqbuf[_seqbufptr+1] = (dev);\
- _seqbuf[_seqbufptr+2] = (event);\
- _seqbuf[_seqbufptr+3] = (chn);\
- _seqbuf[_seqbufptr+4] = (note);\
- _seqbuf[_seqbufptr+5] = (parm);\
- _seqbuf[_seqbufptr+6] = (0);\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-
-#define SEQ_START_NOTE(dev, chn, note, vol) \
- _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol)
-
-#define SEQ_STOP_NOTE(dev, chn, note, vol) \
- _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol)
-
-#define SEQ_KEY_PRESSURE(dev, chn, note, pressure) \
- _CHN_VOICE(dev, MIDI_KEY_PRESSURE, chn, note, pressure)
-
-/*
- * Midi channel messages
- */
-
-#define _CHN_COMMON(dev, event, chn, p1, p2, w14) \
- {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_CHN_COMMON;\
- _seqbuf[_seqbufptr+1] = (dev);\
- _seqbuf[_seqbufptr+2] = (event);\
- _seqbuf[_seqbufptr+3] = (chn);\
- _seqbuf[_seqbufptr+4] = (p1);\
- _seqbuf[_seqbufptr+5] = (p2);\
- *(short *)&_seqbuf[_seqbufptr+6] = (w14);\
- _SEQ_ADVBUF(8);}
-/*
- * SEQ_SYSEX permits sending of sysex messages. (It may look that it permits
- * sending any MIDI bytes but it's absolutely not possible. Trying to do
- * so _will_ cause problems with MPU401 intelligent mode).
- *
- * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be
- * sent by calling SEQ_SYSEX() several times (there must be no other events
- * between them). First sysex fragment must have 0xf0 in the first byte
- * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte
- * between these sysex start and end markers cannot be larger than 0x7f. Also
- * lengths of each fragments (except the last one) must be 6.
- *
- * Breaking the above rules may work with some MIDI ports but is likely to
- * cause fatal problems with some other devices (such as MPU401).
- */
-#define SEQ_SYSEX(dev, buf, len) \
- {int ii, ll=(len); \
- unsigned char *bufp=buf;\
- if (ll>6)ll=6;\
- _SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = EV_SYSEX;\
- _seqbuf[_seqbufptr+1] = (dev);\
- for(ii=0;ii<ll;ii++)\
- _seqbuf[_seqbufptr+ii+2] = bufp[ii];\
- for(ii=ll;ii<6;ii++)\
- _seqbuf[_seqbufptr+ii+2] = 0xff;\
- _SEQ_ADVBUF(8);}
-
-#define SEQ_CHN_PRESSURE(dev, chn, pressure) \
- _CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
-
-#define SEQ_SET_PATCH SEQ_PGM_CHANGE
-#ifdef OSSLIB
-# define SEQ_PGM_CHANGE(dev, chn, patch) \
- {OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
- _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
-#else
-# define SEQ_PGM_CHANGE(dev, chn, patch) \
- _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
-#endif
-
-#define SEQ_CONTROL(dev, chn, controller, value) \
- _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
-
-#define SEQ_BENDER(dev, chn, value) \
- _CHN_COMMON(dev, MIDI_PITCH_BEND, chn, 0, 0, value)
-
-
-#define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr] = SEQ_EXTENDED;\
- _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER;\
- _seqbuf[_seqbufptr+2] = (dev);\
- _seqbuf[_seqbufptr+3] = (voice);\
- _seqbuf[_seqbufptr+4] = (controller);\
- _seqbuf[_seqbufptr+5] = ((value)&0xff);\
- _seqbuf[_seqbufptr+6] = ((value>>8)&0xff);\
- _seqbuf[_seqbufptr+7] = 0;\
- _SEQ_ADVBUF(8);}
-/*
- * The following 5 macros are incorrectly implemented and obsolete.
- * Use SEQ_BENDER and SEQ_CONTROL (with proper controller) instead.
- */
-#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value)
-#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value)
-#define SEQ_EXPRESSION(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_EXPRESSION, value*128)
-#define SEQ_MAIN_VOLUME(dev, voice, value) SEQ_CONTROL(dev, voice, CTL_MAIN_VOLUME, (value*16383)/100)
-#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2)
-
-/*
- * Timing and syncronization macros
- */
-
-#define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr+0] = EV_TIMING; \
- _seqbuf[_seqbufptr+1] = (ev); \
- _seqbuf[_seqbufptr+2] = 0;\
- _seqbuf[_seqbufptr+3] = 0;\
- *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
- _SEQ_ADVBUF(8);}
-
-#define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0)
-#define SEQ_STOP_TIMER() _TIMER_EVENT(TMR_STOP, 0)
-#define SEQ_CONTINUE_TIMER() _TIMER_EVENT(TMR_CONTINUE, 0)
-#define SEQ_WAIT_TIME(ticks) _TIMER_EVENT(TMR_WAIT_ABS, ticks)
-#define SEQ_DELTA_TIME(ticks) _TIMER_EVENT(TMR_WAIT_REL, ticks)
-#define SEQ_ECHO_BACK(key) _TIMER_EVENT(TMR_ECHO, key)
-#define SEQ_SET_TEMPO(value) _TIMER_EVENT(TMR_TEMPO, value)
-#define SEQ_SONGPOS(pos) _TIMER_EVENT(TMR_SPP, pos)
-#define SEQ_TIME_SIGNATURE(sig) _TIMER_EVENT(TMR_TIMESIG, sig)
-
-/*
- * Local control events
- */
-
-#define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\
- _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \
- _seqbuf[_seqbufptr+1] = (ev); \
- _seqbuf[_seqbufptr+2] = 0;\
- _seqbuf[_seqbufptr+3] = 0;\
- *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \
- _SEQ_ADVBUF(8);}
-
-#define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask)
-/*
- * Events for the level 1 interface only
- */
-
-#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\
- _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\
- _seqbuf[_seqbufptr+1] = (byte);\
- _seqbuf[_seqbufptr+2] = (device);\
- _seqbuf[_seqbufptr+3] = 0;\
- _SEQ_ADVBUF(4);}
-
-/*
- * Patch loading.
- */
-#ifdef OSSLIB
-# define SEQ_WRPATCH(patchx, len) \
- OSS_write_patch(seqfd, (char*)(patchx), len)
-# define SEQ_WRPATCH2(patchx, len) \
- OSS_write_patch2(seqfd, (char*)(patchx), len)
-#else
-# define SEQ_WRPATCH(patchx, len) \
- {if (_seqbufptr) SEQ_DUMPBUF();\
- if (write(seqfd, (char*)(patchx), len)==-1) \
- perror("Write patch: /dev/sequencer");}
-# define SEQ_WRPATCH2(patchx, len) \
- (SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
-#endif
-
-#endif
-#endif
diff --git a/original/linux/spi/cpcap.h b/original/linux/spi/cpcap.h
deleted file mode 100644
index e7c5e3b..0000000
--- a/original/linux/spi/cpcap.h
+++ /dev/null
@@ -1,797 +0,0 @@
-#ifndef _LINUX_SPI_CPCAP_H
-#define _LINUX_SPI_CPCAP_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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- *
- */
-
-#include <linux/ioctl.h>
-#ifdef __KERNEL__
-#include <linux/workqueue.h>
-#include <linux/completion.h>
-#include <linux/power_supply.h>
-#include <linux/platform_device.h>
-#endif
-
-#ifdef CONFIG_RTC_INTF_CPCAP_SECCLKD
-#include <linux/rtc.h>
-#endif
-
-#define CPCAP_DEV_NAME "cpcap"
-#define CPCAP_NUM_REG_CPCAP (CPCAP_REG_END - CPCAP_REG_START + 1)
-
-#define CPCAP_IRQ_INT1_INDEX 0
-#define CPCAP_IRQ_INT2_INDEX 16
-#define CPCAP_IRQ_INT3_INDEX 32
-#define CPCAP_IRQ_INT4_INDEX 48
-#define CPCAP_IRQ_INT5_INDEX 64
-
-#define CPCAP_HWCFG_NUM 2 /* The number of hardware config words. */
-/*
- * Tell the uC to setup the secondary standby bits for the regulators used.
- */
-#define CPCAP_HWCFG0_SEC_STBY_SW1 0x0001
-#define CPCAP_HWCFG0_SEC_STBY_SW2 0x0002
-#define CPCAP_HWCFG0_SEC_STBY_SW3 0x0004
-#define CPCAP_HWCFG0_SEC_STBY_SW4 0x0008
-#define CPCAP_HWCFG0_SEC_STBY_SW5 0x0010
-#define CPCAP_HWCFG0_SEC_STBY_VAUDIO 0x0020
-#define CPCAP_HWCFG0_SEC_STBY_VCAM 0x0040
-#define CPCAP_HWCFG0_SEC_STBY_VCSI 0x0080
-#define CPCAP_HWCFG0_SEC_STBY_VDAC 0x0100
-#define CPCAP_HWCFG0_SEC_STBY_VDIG 0x0200
-#define CPCAP_HWCFG0_SEC_STBY_VHVIO 0x0400
-#define CPCAP_HWCFG0_SEC_STBY_VPLL 0x0800
-#define CPCAP_HWCFG0_SEC_STBY_VRF1 0x1000
-#define CPCAP_HWCFG0_SEC_STBY_VRF2 0x2000
-#define CPCAP_HWCFG0_SEC_STBY_VRFREF 0x4000
-#define CPCAP_HWCFG0_SEC_STBY_VSDIO 0x8000
-
-#define CPCAP_HWCFG1_SEC_STBY_VWLAN1 0x0001
-#define CPCAP_HWCFG1_SEC_STBY_VWLAN2 0x0002
-#define CPCAP_HWCFG1_SEC_STBY_VSIM 0x0004
-#define CPCAP_HWCFG1_SEC_STBY_VSIMCARD 0x0008
-
-#define CPCAP_WHISPER_MODE_PU 0x00000001
-#define CPCAP_WHISPER_ENABLE_UART 0x00000002
-#define CPCAP_WHISPER_ACCY_MASK 0xF8000000
-#define CPCAP_WHISPER_ACCY_SHFT 27
-#define CPCAP_WHISPER_ID_SIZE 16
-#define CPCAP_WHISPER_PROP_SIZE 7
-
-enum cpcap_regulator_id {
- CPCAP_SW2,
- CPCAP_SW4,
- CPCAP_SW5,
- CPCAP_VCAM,
- CPCAP_VCSI,
- CPCAP_VDAC,
- CPCAP_VDIG,
- CPCAP_VFUSE,
- CPCAP_VHVIO,
- CPCAP_VSDIO,
- CPCAP_VPLL,
- CPCAP_VRF1,
- CPCAP_VRF2,
- CPCAP_VRFREF,
- CPCAP_VWLAN1,
- CPCAP_VWLAN2,
- CPCAP_VSIM,
- CPCAP_VSIMCARD,
- CPCAP_VVIB,
- CPCAP_VUSB,
- CPCAP_VAUDIO,
- CPCAP_NUM_REGULATORS
-};
-
-/*
- * Enumeration of all registers in the cpcap. Note that the register
- * numbers on the CPCAP IC are not contiguous. The values of the enums below
- * are not the actual register numbers.
- */
-enum cpcap_reg {
- CPCAP_REG_START, /* Start of CPCAP registers. */
-
- CPCAP_REG_INT1 = CPCAP_REG_START, /* Interrupt 1 */
- CPCAP_REG_INT2, /* Interrupt 2 */
- CPCAP_REG_INT3, /* Interrupt 3 */
- CPCAP_REG_INT4, /* Interrupt 4 */
- CPCAP_REG_INTM1, /* Interrupt Mask 1 */
- CPCAP_REG_INTM2, /* Interrupt Mask 2 */
- CPCAP_REG_INTM3, /* Interrupt Mask 3 */
- CPCAP_REG_INTM4, /* Interrupt Mask 4 */
- CPCAP_REG_INTS1, /* Interrupt Sense 1 */
- CPCAP_REG_INTS2, /* Interrupt Sense 2 */
- CPCAP_REG_INTS3, /* Interrupt Sense 3 */
- CPCAP_REG_INTS4, /* Interrupt Sense 4 */
- CPCAP_REG_ASSIGN1, /* Resource Assignment 1 */
- CPCAP_REG_ASSIGN2, /* Resource Assignment 2 */
- CPCAP_REG_ASSIGN3, /* Resource Assignment 3 */
- CPCAP_REG_ASSIGN4, /* Resource Assignment 4 */
- CPCAP_REG_ASSIGN5, /* Resource Assignment 5 */
- CPCAP_REG_ASSIGN6, /* Resource Assignment 6 */
- CPCAP_REG_VERSC1, /* Version Control 1 */
- CPCAP_REG_VERSC2, /* Version Control 2 */
-
- CPCAP_REG_MI1, /* Macro Interrupt 1 */
- CPCAP_REG_MIM1, /* Macro Interrupt Mask 1 */
- CPCAP_REG_MI2, /* Macro Interrupt 2 */
- CPCAP_REG_MIM2, /* Macro Interrupt Mask 2 */
- CPCAP_REG_UCC1, /* UC Control 1 */
- CPCAP_REG_UCC2, /* UC Control 2 */
- CPCAP_REG_PC1, /* Power Cut 1 */
- CPCAP_REG_PC2, /* Power Cut 2 */
- CPCAP_REG_BPEOL, /* BP and EOL */
- CPCAP_REG_PGC, /* Power Gate and Control */
- CPCAP_REG_MT1, /* Memory Transfer 1 */
- CPCAP_REG_MT2, /* Memory Transfer 2 */
- CPCAP_REG_MT3, /* Memory Transfer 3 */
- CPCAP_REG_PF, /* Print Format */
-
- CPCAP_REG_SCC, /* System Clock Control */
- CPCAP_REG_SW1, /* Stop Watch 1 */
- CPCAP_REG_SW2, /* Stop Watch 2 */
- CPCAP_REG_UCTM, /* UC Turbo Mode */
- CPCAP_REG_TOD1, /* Time of Day 1 */
- CPCAP_REG_TOD2, /* Time of Day 2 */
- CPCAP_REG_TODA1, /* Time of Day Alarm 1 */
- CPCAP_REG_TODA2, /* Time of Day Alarm 2 */
- CPCAP_REG_DAY, /* Day */
- CPCAP_REG_DAYA, /* Day Alarm */
- CPCAP_REG_VAL1, /* Validity 1 */
- CPCAP_REG_VAL2, /* Validity 2 */
-
- CPCAP_REG_SDVSPLL, /* Switcher DVS and PLL */
- CPCAP_REG_SI2CC1, /* Switcher I2C Control 1 */
- CPCAP_REG_Si2CC2, /* Switcher I2C Control 2 */
- CPCAP_REG_S1C1, /* Switcher 1 Control 1 */
- CPCAP_REG_S1C2, /* Switcher 1 Control 2 */
- CPCAP_REG_S2C1, /* Switcher 2 Control 1 */
- CPCAP_REG_S2C2, /* Switcher 2 Control 2 */
- CPCAP_REG_S3C, /* Switcher 3 Control */
- CPCAP_REG_S4C1, /* Switcher 4 Control 1 */
- CPCAP_REG_S4C2, /* Switcher 4 Control 2 */
- CPCAP_REG_S5C, /* Switcher 5 Control */
- CPCAP_REG_S6C, /* Switcher 6 Control */
- CPCAP_REG_VCAMC, /* VCAM Control */
- CPCAP_REG_VCSIC, /* VCSI Control */
- CPCAP_REG_VDACC, /* VDAC Control */
- CPCAP_REG_VDIGC, /* VDIG Control */
- CPCAP_REG_VFUSEC, /* VFUSE Control */
- CPCAP_REG_VHVIOC, /* VHVIO Control */
- CPCAP_REG_VSDIOC, /* VSDIO Control */
- CPCAP_REG_VPLLC, /* VPLL Control */
- CPCAP_REG_VRF1C, /* VRF1 Control */
- CPCAP_REG_VRF2C, /* VRF2 Control */
- CPCAP_REG_VRFREFC, /* VRFREF Control */
- CPCAP_REG_VWLAN1C, /* VWLAN1 Control */
- CPCAP_REG_VWLAN2C, /* VWLAN2 Control */
- CPCAP_REG_VSIMC, /* VSIM Control */
- CPCAP_REG_VVIBC, /* VVIB Control */
- CPCAP_REG_VUSBC, /* VUSB Control */
- CPCAP_REG_VUSBINT1C, /* VUSBINT1 Control */
- CPCAP_REG_VUSBINT2C, /* VUSBINT2 Control */
- CPCAP_REG_URT, /* Useroff Regulator Trigger */
- CPCAP_REG_URM1, /* Useroff Regulator Mask 1 */
- CPCAP_REG_URM2, /* Useroff Regulator Mask 2 */
-
- CPCAP_REG_VAUDIOC, /* VAUDIO Control */
- CPCAP_REG_CC, /* Codec Control */
- CPCAP_REG_CDI, /* Codec Digital Interface */
- CPCAP_REG_SDAC, /* Stereo DAC */
- CPCAP_REG_SDACDI, /* Stereo DAC Digital Interface */
- CPCAP_REG_TXI, /* TX Inputs */
- CPCAP_REG_TXMP, /* TX MIC PGA's */
- CPCAP_REG_RXOA, /* RX Output Amplifiers */
- CPCAP_REG_RXVC, /* RX Volume Control */
- CPCAP_REG_RXCOA, /* RX Codec to Output Amps */
- CPCAP_REG_RXSDOA, /* RX Stereo DAC to Output Amps */
- CPCAP_REG_RXEPOA, /* RX External PGA to Output Amps */
- CPCAP_REG_RXLL, /* RX Low Latency */
- CPCAP_REG_A2LA, /* A2 Loudspeaker Amplifier */
- CPCAP_REG_MIPIS1, /* MIPI Slimbus 1 */
- CPCAP_REG_MIPIS2, /* MIPI Slimbus 2 */
- CPCAP_REG_MIPIS3, /* MIPI Slimbus 3. */
- CPCAP_REG_LVAB, /* LMR Volume and A4 Balanced. */
-
- CPCAP_REG_CCC1, /* Coulomb Counter Control 1 */
- CPCAP_REG_CRM, /* Charger and Reverse Mode */
- CPCAP_REG_CCCC2, /* Coincell and Coulomb Ctr Ctrl 2 */
- CPCAP_REG_CCS1, /* Coulomb Counter Sample 1 */
- CPCAP_REG_CCS2, /* Coulomb Counter Sample 2 */
- CPCAP_REG_CCA1, /* Coulomb Counter Accumulator 1 */
- CPCAP_REG_CCA2, /* Coulomb Counter Accumulator 2 */
- CPCAP_REG_CCM, /* Coulomb Counter Mode */
- CPCAP_REG_CCO, /* Coulomb Counter Offset */
- CPCAP_REG_CCI, /* Coulomb Counter Integrator */
-
- CPCAP_REG_ADCC1, /* A/D Converter Configuration 1 */
- CPCAP_REG_ADCC2, /* A/D Converter Configuration 2 */
- CPCAP_REG_ADCD0, /* A/D Converter Data 0 */
- CPCAP_REG_ADCD1, /* A/D Converter Data 1 */
- CPCAP_REG_ADCD2, /* A/D Converter Data 2 */
- CPCAP_REG_ADCD3, /* A/D Converter Data 3 */
- CPCAP_REG_ADCD4, /* A/D Converter Data 4 */
- CPCAP_REG_ADCD5, /* A/D Converter Data 5 */
- CPCAP_REG_ADCD6, /* A/D Converter Data 6 */
- CPCAP_REG_ADCD7, /* A/D Converter Data 7 */
- CPCAP_REG_ADCAL1, /* A/D Converter Calibration 1 */
- CPCAP_REG_ADCAL2, /* A/D Converter Calibration 2 */
-
- CPCAP_REG_USBC1, /* USB Control 1 */
- CPCAP_REG_USBC2, /* USB Control 2 */
- CPCAP_REG_USBC3, /* USB Control 3 */
- CPCAP_REG_UVIDL, /* ULPI Vendor ID Low */
- CPCAP_REG_UVIDH, /* ULPI Vendor ID High */
- CPCAP_REG_UPIDL, /* ULPI Product ID Low */
- CPCAP_REG_UPIDH, /* ULPI Product ID High */
- CPCAP_REG_UFC1, /* ULPI Function Control 1 */
- CPCAP_REG_UFC2, /* ULPI Function Control 2 */
- CPCAP_REG_UFC3, /* ULPI Function Control 3 */
- CPCAP_REG_UIC1, /* ULPI Interface Control 1 */
- CPCAP_REG_UIC2, /* ULPI Interface Control 2 */
- CPCAP_REG_UIC3, /* ULPI Interface Control 3 */
- CPCAP_REG_USBOTG1, /* USB OTG Control 1 */
- CPCAP_REG_USBOTG2, /* USB OTG Control 2 */
- CPCAP_REG_USBOTG3, /* USB OTG Control 3 */
- CPCAP_REG_UIER1, /* USB Interrupt Enable Rising 1 */
- CPCAP_REG_UIER2, /* USB Interrupt Enable Rising 2 */
- CPCAP_REG_UIER3, /* USB Interrupt Enable Rising 3 */
- CPCAP_REG_UIEF1, /* USB Interrupt Enable Falling 1 */
- CPCAP_REG_UIEF2, /* USB Interrupt Enable Falling 1 */
- CPCAP_REG_UIEF3, /* USB Interrupt Enable Falling 1 */
- CPCAP_REG_UIS, /* USB Interrupt Status */
- CPCAP_REG_UIL, /* USB Interrupt Latch */
- CPCAP_REG_USBD, /* USB Debug */
- CPCAP_REG_SCR1, /* Scratch 1 */
- CPCAP_REG_SCR2, /* Scratch 2 */
- CPCAP_REG_SCR3, /* Scratch 3 */
- CPCAP_REG_VMC, /* Video Mux Control */
- CPCAP_REG_OWDC, /* One Wire Device Control */
- CPCAP_REG_GPIO0, /* GPIO 0 Control */
- CPCAP_REG_GPIO1, /* GPIO 1 Control */
- CPCAP_REG_GPIO2, /* GPIO 2 Control */
- CPCAP_REG_GPIO3, /* GPIO 3 Control */
- CPCAP_REG_GPIO4, /* GPIO 4 Control */
- CPCAP_REG_GPIO5, /* GPIO 5 Control */
- CPCAP_REG_GPIO6, /* GPIO 6 Control */
-
- CPCAP_REG_MDLC, /* Main Display Lighting Control */
- CPCAP_REG_KLC, /* Keypad Lighting Control */
- CPCAP_REG_ADLC, /* Aux Display Lighting Control */
- CPCAP_REG_REDC, /* Red Triode Control */
- CPCAP_REG_GREENC, /* Green Triode Control */
- CPCAP_REG_BLUEC, /* Blue Triode Control */
- CPCAP_REG_CFC, /* Camera Flash Control */
- CPCAP_REG_ABC, /* Adaptive Boost Control */
- CPCAP_REG_BLEDC, /* Bluetooth LED Control */
- CPCAP_REG_CLEDC, /* Camera Privacy LED Control */
-
- CPCAP_REG_OW1C, /* One Wire 1 Command */
- CPCAP_REG_OW1D, /* One Wire 1 Data */
- CPCAP_REG_OW1I, /* One Wire 1 Interrupt */
- CPCAP_REG_OW1IE, /* One Wire 1 Interrupt Enable */
- CPCAP_REG_OW1, /* One Wire 1 Control */
- CPCAP_REG_OW2C, /* One Wire 2 Command */
- CPCAP_REG_OW2D, /* One Wire 2 Data */
- CPCAP_REG_OW2I, /* One Wire 2 Interrupt */
- CPCAP_REG_OW2IE, /* One Wire 2 Interrupt Enable */
- CPCAP_REG_OW2, /* One Wire 2 Control */
- CPCAP_REG_OW3C, /* One Wire 3 Command */
- CPCAP_REG_OW3D, /* One Wire 3 Data */
- CPCAP_REG_OW3I, /* One Wire 3 Interrupt */
- CPCAP_REG_OW3IE, /* One Wire 3 Interrupt Enable */
- CPCAP_REG_OW3, /* One Wire 3 Control */
- CPCAP_REG_GCAIC, /* GCAI Clock Control */
- CPCAP_REG_GCAIM, /* GCAI GPIO Mode */
- CPCAP_REG_LGDIR, /* LMR GCAI GPIO Direction */
- CPCAP_REG_LGPU, /* LMR GCAI GPIO Pull-up */
- CPCAP_REG_LGPIN, /* LMR GCAI GPIO Pin */
- CPCAP_REG_LGMASK, /* LMR GCAI GPIO Mask */
- CPCAP_REG_LDEB, /* LMR Debounce Settings */
- CPCAP_REG_LGDET, /* LMR GCAI Detach Detect */
- CPCAP_REG_LMISC, /* LMR Misc Bits */
- CPCAP_REG_LMACE, /* LMR Mace IC Support */
-
- CPCAP_REG_END = CPCAP_REG_LMACE, /* End of CPCAP registers. */
-
- CPCAP_REG_MAX /* The largest valid register value. */
- = CPCAP_REG_END,
-
- CPCAP_REG_SIZE = CPCAP_REG_MAX + 1,
- CPCAP_REG_UNUSED = CPCAP_REG_MAX + 2,
-};
-
-enum {
- CPCAP_IOCTL_NUM_TEST__START,
- CPCAP_IOCTL_NUM_TEST_READ_REG,
- CPCAP_IOCTL_NUM_TEST_WRITE_REG,
- CPCAP_IOCTL_NUM_TEST__END,
-
- CPCAP_IOCTL_NUM_ADC__START,
- CPCAP_IOCTL_NUM_ADC_PHASE,
- CPCAP_IOCTL_NUM_ADC__END,
-
- CPCAP_IOCTL_NUM_BATT__START,
- CPCAP_IOCTL_NUM_BATT_DISPLAY_UPDATE,
- CPCAP_IOCTL_NUM_BATT_ATOD_ASYNC,
- CPCAP_IOCTL_NUM_BATT_ATOD_SYNC,
- CPCAP_IOCTL_NUM_BATT_ATOD_READ,
- CPCAP_IOCTL_NUM_BATT__END,
-
- CPCAP_IOCTL_NUM_UC__START,
- CPCAP_IOCTL_NUM_UC_MACRO_START,
- CPCAP_IOCTL_NUM_UC_MACRO_STOP,
- CPCAP_IOCTL_NUM_UC_GET_VENDOR,
- CPCAP_IOCTL_NUM_UC_SET_TURBO_MODE,
- CPCAP_IOCTL_NUM_UC__END,
-
-#ifdef CONFIG_RTC_INTF_CPCAP_SECCLKD
- CPCAP_IOCTL_NUM_RTC__START,
- CPCAP_IOCTL_NUM_RTC_COUNT,
- CPCAP_IOCTL_NUM_RTC__END,
-#endif
-
- CPCAP_IOCTL_NUM_ACCY__START,
- CPCAP_IOCTL_NUM_ACCY_WHISPER,
- CPCAP_IOCTL_NUM_ACCY__END,
-};
-
-enum cpcap_irqs {
- CPCAP_IRQ__START, /* 1st supported interrupt event */
- CPCAP_IRQ_HSCLK = CPCAP_IRQ_INT1_INDEX, /* High Speed Clock */
- CPCAP_IRQ_PRIMAC, /* Primary Macro */
- CPCAP_IRQ_SECMAC, /* Secondary Macro */
- CPCAP_IRQ_LOWBPL, /* Low Battery Low Threshold */
- CPCAP_IRQ_SEC2PRI, /* 2nd Macro to Primary Processor */
- CPCAP_IRQ_LOWBPH, /* Low Battery High Threshold */
- CPCAP_IRQ_EOL, /* End of Life */
- CPCAP_IRQ_TS, /* Touchscreen */
- CPCAP_IRQ_ADCDONE, /* ADC Conversion Complete */
- CPCAP_IRQ_HS, /* Headset */
- CPCAP_IRQ_MB2, /* Mic Bias2 */
- CPCAP_IRQ_VBUSOV, /* Overvoltage Detected */
- CPCAP_IRQ_RVRS_CHRG, /* Reverse Charge */
- CPCAP_IRQ_CHRG_DET, /* Charger Detected */
- CPCAP_IRQ_IDFLOAT, /* ID Float */
- CPCAP_IRQ_IDGND, /* ID Ground */
-
- CPCAP_IRQ_SE1 = CPCAP_IRQ_INT2_INDEX, /* SE1 Detector */
- CPCAP_IRQ_SESSEND, /* Session End */
- CPCAP_IRQ_SESSVLD, /* Session Valid */
- CPCAP_IRQ_VBUSVLD, /* VBUS Valid */
- CPCAP_IRQ_CHRG_CURR1, /* Charge Current Monitor (20mA) */
- CPCAP_IRQ_CHRG_CURR2, /* Charge Current Monitor (250mA) */
- CPCAP_IRQ_RVRS_MODE, /* Reverse Current Limit */
- CPCAP_IRQ_ON, /* On Signal */
- CPCAP_IRQ_ON2, /* On 2 Signal */
- CPCAP_IRQ_CLK, /* 32k Clock Transition */
- CPCAP_IRQ_1HZ, /* 1Hz Tick */
- CPCAP_IRQ_PTT, /* Push To Talk */
- CPCAP_IRQ_SE0CONN, /* SE0 Condition */
- CPCAP_IRQ_CHRG_SE1B, /* CHRG_SE1B Pin */
- CPCAP_IRQ_UART_ECHO_OVERRUN, /* UART Buffer Overflow */
- CPCAP_IRQ_EXTMEMHD, /* External MEMHOLD */
-
- CPCAP_IRQ_WARM = CPCAP_IRQ_INT3_INDEX, /* Warm Start */
- CPCAP_IRQ_SYSRSTR, /* System Restart */
- CPCAP_IRQ_SOFTRST, /* Soft Reset */
- CPCAP_IRQ_DIEPWRDWN, /* Die Temperature Powerdown */
- CPCAP_IRQ_DIETEMPH, /* Die Temperature High */
- CPCAP_IRQ_PC, /* Power Cut */
- CPCAP_IRQ_OFLOWSW, /* Stopwatch Overflow */
- CPCAP_IRQ_TODA, /* TOD Alarm */
- CPCAP_IRQ_OPT_SEL_DTCH, /* Detach Detect */
- CPCAP_IRQ_OPT_SEL_STATE, /* State Change */
- CPCAP_IRQ_ONEWIRE1, /* Onewire 1 Block */
- CPCAP_IRQ_ONEWIRE2, /* Onewire 2 Block */
- CPCAP_IRQ_ONEWIRE3, /* Onewire 3 Block */
- CPCAP_IRQ_UCRESET, /* Microcontroller Reset */
- CPCAP_IRQ_PWRGOOD, /* BP Turn On */
- CPCAP_IRQ_USBDPLLCLK, /* USB DPLL Status */
-
- CPCAP_IRQ_DPI = CPCAP_IRQ_INT4_INDEX, /* DP Line */
- CPCAP_IRQ_DMI, /* DM Line */
- CPCAP_IRQ_UCBUSY, /* Microcontroller Busy */
- CPCAP_IRQ_GCAI_CURR1, /* Charge Current Monitor (65mA) */
- CPCAP_IRQ_GCAI_CURR2, /* Charge Current Monitor (600mA) */
- CPCAP_IRQ_SB_MAX_RETRANSMIT_ERR,/* SLIMbus Retransmit Error */
- CPCAP_IRQ_BATTDETB, /* Battery Presence Detected */
- CPCAP_IRQ_PRIHALT, /* Primary Microcontroller Halt */
- CPCAP_IRQ_SECHALT, /* Secondary Microcontroller Halt */
- CPCAP_IRQ_CC_CAL, /* CC Calibration */
-
- CPCAP_IRQ_UC_PRIROMR = CPCAP_IRQ_INT5_INDEX, /* Prim ROM Rd Macro Int */
- CPCAP_IRQ_UC_PRIRAMW, /* Primary RAM Write Macro Int */
- CPCAP_IRQ_UC_PRIRAMR, /* Primary RAM Read Macro Int */
- CPCAP_IRQ_UC_USEROFF, /* USEROFF Macro Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_4, /* Primary Macro 4 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_5, /* Primary Macro 5 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_6, /* Primary Macro 6 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_7, /* Primary Macro 7 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_8, /* Primary Macro 8 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_9, /* Primary Macro 9 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_10, /* Primary Macro 10 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_11, /* Primary Macro 11 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_12, /* Primary Macro 12 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_13, /* Primary Macro 13 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_14, /* Primary Macro 14 Interrupt */
- CPCAP_IRQ_UC_PRIMACRO_15, /* Primary Macro 15 Interrupt */
- CPCAP_IRQ__NUM /* Number of allocated events */
-};
-
-enum cpcap_adc_bank0 {
- CPCAP_ADC_AD0_BATTDETB,
- CPCAP_ADC_BATTP,
- CPCAP_ADC_VBUS,
- CPCAP_ADC_AD3,
- CPCAP_ADC_BPLUS_AD4,
- CPCAP_ADC_CHG_ISENSE,
- CPCAP_ADC_BATTI_ADC,
- CPCAP_ADC_USB_ID,
-
- CPCAP_ADC_BANK0_NUM,
-};
-
-enum cpcap_adc_bank1 {
- CPCAP_ADC_AD8,
- CPCAP_ADC_AD9,
- CPCAP_ADC_LICELL,
- CPCAP_ADC_HV_BATTP,
- CPCAP_ADC_TSX1_AD12,
- CPCAP_ADC_TSX2_AD13,
- CPCAP_ADC_TSY1_AD14,
- CPCAP_ADC_TSY2_AD15,
-
- CPCAP_ADC_BANK1_NUM,
-};
-
-enum cpcap_adc_format {
- CPCAP_ADC_FORMAT_RAW,
- CPCAP_ADC_FORMAT_PHASED,
- CPCAP_ADC_FORMAT_CONVERTED,
-};
-
-enum cpcap_adc_timing {
- CPCAP_ADC_TIMING_IMM,
- CPCAP_ADC_TIMING_IN,
- CPCAP_ADC_TIMING_OUT,
-};
-
-enum cpcap_adc_type {
- CPCAP_ADC_TYPE_BANK_0,
- CPCAP_ADC_TYPE_BANK_1,
- CPCAP_ADC_TYPE_BATT_PI,
-};
-
-enum cpcap_macro {
- CPCAP_MACRO_ROMR,
- CPCAP_MACRO_RAMW,
- CPCAP_MACRO_RAMR,
- CPCAP_MACRO_USEROFF,
- CPCAP_MACRO_4,
- CPCAP_MACRO_5,
- CPCAP_MACRO_6,
- CPCAP_MACRO_7,
- CPCAP_MACRO_8,
- CPCAP_MACRO_9,
- CPCAP_MACRO_10,
- CPCAP_MACRO_11,
- CPCAP_MACRO_12,
- CPCAP_MACRO_13,
- CPCAP_MACRO_14,
- CPCAP_MACRO_15,
-
- CPCAP_MACRO__END,
-};
-
-enum cpcap_vendor {
- CPCAP_VENDOR_ST,
- CPCAP_VENDOR_TI,
-};
-
-enum cpcap_revision {
- CPCAP_REVISION_1_0 = 0x08,
- CPCAP_REVISION_1_1 = 0x09,
- CPCAP_REVISION_2_0 = 0x10,
- CPCAP_REVISION_2_1 = 0x11,
-};
-
-enum cpcap_batt_usb_model {
- CPCAP_BATT_USB_MODEL_NONE,
- CPCAP_BATT_USB_MODEL_USB,
- CPCAP_BATT_USB_MODEL_FACTORY,
-};
-
-struct cpcap_spi_init_data {
- enum cpcap_reg reg;
- unsigned short data;
-};
-
-struct cpcap_adc_ato {
- unsigned short ato_in;
- unsigned short atox_in;
- unsigned short adc_ps_factor_in;
- unsigned short atox_ps_factor_in;
- unsigned short ato_out;
- unsigned short atox_out;
- unsigned short adc_ps_factor_out;
- unsigned short atox_ps_factor_out;
-};
-
-struct cpcap_batt_data {
- int status;
- int health;
- int present;
- int capacity;
- int batt_volt;
- int batt_temp;
-};
-
-struct cpcap_batt_ac_data {
- int online;
-};
-
-struct cpcap_batt_usb_data {
- int online;
- int current_now;
- enum cpcap_batt_usb_model model;
-};
-
-#ifdef CONFIG_RTC_INTF_CPCAP_SECCLKD
-struct cpcap_rtc_time_cnt {
- struct rtc_time time;
- unsigned short count;
-};
-#endif
-struct cpcap_device;
-
-#ifdef __KERNEL__
-struct cpcap_platform_data {
- struct cpcap_spi_init_data *init;
- int init_len;
- unsigned short *regulator_mode_values;
- unsigned short *regulator_off_mode_values;
- struct regulator_init_data *regulator_init;
- struct cpcap_adc_ato *adc_ato;
- void (*ac_changed)(struct power_supply *,
- struct cpcap_batt_ac_data *);
- void (*batt_changed)(struct power_supply *,
- struct cpcap_batt_data *);
- void (*usb_changed)(struct power_supply *,
- struct cpcap_batt_usb_data *);
- u16 hwcfg[CPCAP_HWCFG_NUM];
-};
-
-struct cpcap_whisper_pdata {
- unsigned int data_gpio;
- unsigned int pwr_gpio;
- unsigned char uartmux;
-};
-
-struct cpcap_adc_request {
- enum cpcap_adc_format format;
- enum cpcap_adc_timing timing;
- enum cpcap_adc_type type;
- int status;
- int result[CPCAP_ADC_BANK0_NUM];
- void (*callback)(struct cpcap_device *, void *);
- void *callback_param;
-
- /* Used in case of sync requests */
- struct completion completion;
-};
-#endif
-
-struct cpcap_adc_us_request {
- enum cpcap_adc_format format;
- enum cpcap_adc_timing timing;
- enum cpcap_adc_type type;
- int status;
- int result[CPCAP_ADC_BANK0_NUM];
-};
-
-struct cpcap_adc_phase {
- signed char offset_batti;
- unsigned char slope_batti;
- signed char offset_chrgi;
- unsigned char slope_chrgi;
- signed char offset_battp;
- unsigned char slope_battp;
- signed char offset_bp;
- unsigned char slope_bp;
- signed char offset_battt;
- unsigned char slope_battt;
- signed char offset_chrgv;
- unsigned char slope_chrgv;
-};
-
-struct cpcap_regacc {
- unsigned short reg;
- unsigned short value;
- unsigned short mask;
-};
-
-struct cpcap_whisper_request {
- unsigned int cmd;
- char dock_id[CPCAP_WHISPER_ID_SIZE];
- char dock_prop[CPCAP_WHISPER_PROP_SIZE];
-};
-
-/*
- * Gets the contents of the specified cpcap register.
- *
- * INPUTS: The register number in the cpcap driver's format.
- *
- * OUTPUTS: The command writes the register data back to user space at the
- * location specified, or it may return an error code.
- */
-#ifdef CONFIG_RTC_INTF_CPCAP_SECCLKD
-#define CPCAP_IOCTL_GET_RTC_TIME_COUNTER \
- _IOR(0, CPCAP_IOCTL_NUM_RTC_COUNT, struct cpcap_rtc_time_cnt)
-#endif
-
-#define CPCAP_IOCTL_TEST_READ_REG \
- _IOWR(0, CPCAP_IOCTL_NUM_TEST_READ_REG, struct cpcap_regacc*)
-
-/*
- * Writes the specifed cpcap register.
- *
- * This function writes the specified cpcap register with the specified
- * data.
- *
- * INPUTS: The register number in the cpcap driver's format and the data to
- * write to that register.
- *
- * OUTPUTS: The command has no output other than the returned error code for
- * the ioctl() call.
- */
-#define CPCAP_IOCTL_TEST_WRITE_REG \
- _IOWR(0, CPCAP_IOCTL_NUM_TEST_WRITE_REG, struct cpcap_regacc*)
-
-#define CPCAP_IOCTL_ADC_PHASE \
- _IOWR(0, CPCAP_IOCTL_NUM_ADC_PHASE, struct cpcap_adc_phase*)
-
-#define CPCAP_IOCTL_BATT_DISPLAY_UPDATE \
- _IOW(0, CPCAP_IOCTL_NUM_BATT_DISPLAY_UPDATE, struct cpcap_batt_data*)
-
-#define CPCAP_IOCTL_BATT_ATOD_ASYNC \
- _IOW(0, CPCAP_IOCTL_NUM_BATT_ATOD_ASYNC, struct cpcap_adc_us_request*)
-
-#define CPCAP_IOCTL_BATT_ATOD_SYNC \
- _IOWR(0, CPCAP_IOCTL_NUM_BATT_ATOD_SYNC, struct cpcap_adc_us_request*)
-
-#define CPCAP_IOCTL_BATT_ATOD_READ \
- _IOWR(0, CPCAP_IOCTL_NUM_BATT_ATOD_READ, struct cpcap_adc_us_request*)
-
-
-#define CPCAP_IOCTL_UC_MACRO_START \
- _IOWR(0, CPCAP_IOCTL_NUM_UC_MACRO_START, enum cpcap_macro)
-
-#define CPCAP_IOCTL_UC_MACRO_STOP \
- _IOWR(0, CPCAP_IOCTL_NUM_UC_MACRO_STOP, enum cpcap_macro)
-
-#define CPCAP_IOCTL_UC_GET_VENDOR \
- _IOWR(0, CPCAP_IOCTL_NUM_UC_GET_VENDOR, enum cpcap_vendor)
-
-#define CPCAP_IOCTL_UC_SET_TURBO_MODE \
- _IOW(0, CPCAP_IOCTL_NUM_UC_SET_TURBO_MODE, unsigned short)
-
-#define CPCAP_IOCTL_ACCY_WHISPER \
- _IOW(0, CPCAP_IOCTL_NUM_ACCY_WHISPER, struct cpcap_whisper_request*)
-
-#ifdef __KERNEL__
-struct cpcap_device {
- struct spi_device *spi;
- enum cpcap_vendor vendor;
- enum cpcap_revision revision;
- void *keydata;
- struct platform_device *regulator_pdev[CPCAP_NUM_REGULATORS];
- void *irqdata;
- void *adcdata;
- void *battdata;
- void *ucdata;
- void *accydata;
- void (*h2w_new_state)(int);
-};
-
-static inline void cpcap_set_keydata(struct cpcap_device *cpcap, void *data)
-{
- cpcap->keydata = data;
-}
-
-static inline void *cpcap_get_keydata(struct cpcap_device *cpcap)
-{
- return cpcap->keydata;
-}
-
-int cpcap_regacc_write(struct cpcap_device *cpcap, enum cpcap_reg reg,
- unsigned short value, unsigned short mask);
-
-int cpcap_regacc_read(struct cpcap_device *cpcap, enum cpcap_reg reg,
- unsigned short *value_ptr);
-
-int cpcap_regacc_init(struct cpcap_device *cpcap);
-
-void cpcap_broadcast_key_event(struct cpcap_device *cpcap,
- unsigned int code, int value);
-
-int cpcap_irq_init(struct cpcap_device *cpcap);
-
-void cpcap_irq_shutdown(struct cpcap_device *cpcap);
-
-int cpcap_irq_register(struct cpcap_device *cpcap, enum cpcap_irqs irq,
- void (*cb_func) (enum cpcap_irqs, void *), void *data);
-
-int cpcap_irq_free(struct cpcap_device *cpcap, enum cpcap_irqs irq);
-
-int cpcap_irq_get_data(struct cpcap_device *cpcap, enum cpcap_irqs irq,
- void **data);
-
-int cpcap_irq_clear(struct cpcap_device *cpcap, enum cpcap_irqs int_event);
-
-int cpcap_irq_mask(struct cpcap_device *cpcap, enum cpcap_irqs int_event);
-
-int cpcap_irq_unmask(struct cpcap_device *cpcap, enum cpcap_irqs int_event);
-
-int cpcap_irq_mask_get(struct cpcap_device *cpcap, enum cpcap_irqs int_event);
-
-int cpcap_irq_sense(struct cpcap_device *cpcap, enum cpcap_irqs int_event,
- unsigned char clear);
-
-#ifdef CONFIG_PM
-int cpcap_irq_suspend(struct cpcap_device *cpcap);
-
-int cpcap_irq_resume(struct cpcap_device *cpcap);
-#endif
-
-int cpcap_adc_sync_read(struct cpcap_device *cpcap,
- struct cpcap_adc_request *request);
-
-int cpcap_adc_async_read(struct cpcap_device *cpcap,
- struct cpcap_adc_request *request);
-
-void cpcap_adc_phase(struct cpcap_device *cpcap, struct cpcap_adc_phase *phase);
-
-void cpcap_batt_set_ac_prop(struct cpcap_device *cpcap, int online);
-
-void cpcap_batt_set_usb_prop_online(struct cpcap_device *cpcap, int online,
- enum cpcap_batt_usb_model model);
-
-void cpcap_batt_set_usb_prop_curr(struct cpcap_device *cpcap,
- unsigned int curr);
-
-int cpcap_uc_start(struct cpcap_device *cpcap, enum cpcap_macro macro);
-
-int cpcap_uc_stop(struct cpcap_device *cpcap, enum cpcap_macro macro);
-
-unsigned char cpcap_uc_status(struct cpcap_device *cpcap,
- enum cpcap_macro macro);
-
-int cpcap_accy_whisper(struct cpcap_device *cpcap,
- struct cpcap_whisper_request *req);
-
-void cpcap_accy_whisper_spdif_set_state(int state);
-
-#define cpcap_driver_register platform_driver_register
-#define cpcap_driver_unregister platform_driver_unregister
-
-int cpcap_device_register(struct platform_device *pdev);
-int cpcap_device_unregister(struct platform_device *pdev);
-
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SPI_CPCAP_H */
diff --git a/original/linux/spinlock.h b/original/linux/spinlock.h
deleted file mode 100644
index 31473db..0000000
--- a/original/linux/spinlock.h
+++ /dev/null
@@ -1,275 +0,0 @@
-#ifndef __LINUX_SPINLOCK_H
-#define __LINUX_SPINLOCK_H
-
-/*
- * include/linux/spinlock.h - generic spinlock/rwlock declarations
- *
- * here's the role of the various spinlock/rwlock related include files:
- *
- * on SMP builds:
- *
- * asm/spinlock_types.h: contains the raw_spinlock_t/raw_rwlock_t and the
- * initializers
- *
- * linux/spinlock_types.h:
- * defines the generic type and initializers
- *
- * asm/spinlock.h: contains the __raw_spin_*()/etc. lowlevel
- * implementations, mostly inline assembly code
- *
- * (also included on UP-debug builds:)
- *
- * linux/spinlock_api_smp.h:
- * contains the prototypes for the _spin_*() APIs.
- *
- * linux/spinlock.h: builds the final spin_*() APIs.
- *
- * on UP builds:
- *
- * linux/spinlock_type_up.h:
- * contains the generic, simplified UP spinlock type.
- * (which is an empty structure on non-debug builds)
- *
- * linux/spinlock_types.h:
- * defines the generic type and initializers
- *
- * linux/spinlock_up.h:
- * contains the __raw_spin_*()/etc. version of UP
- * builds. (which are NOPs on non-debug, non-preempt
- * builds)
- *
- * (included on UP-non-debug builds:)
- *
- * linux/spinlock_api_up.h:
- * builds the _spin_*() APIs.
- *
- * linux/spinlock.h: builds the final spin_*() APIs.
- */
-
-#include <linux/preempt.h>
-#include <linux/linkage.h>
-#include <linux/compiler.h>
-#include <linux/thread_info.h>
-#include <linux/kernel.h>
-#include <linux/stringify.h>
-
-#include <asm/system.h>
-
-/*
- * Must define these before including other files, inline functions need them
- */
-#define LOCK_SECTION_NAME ".text.lock."KBUILD_BASENAME
-
-#define LOCK_SECTION_START(extra) \
- ".subsection 1\n\t" \
- extra \
- ".ifndef " LOCK_SECTION_NAME "\n\t" \
- LOCK_SECTION_NAME ":\n\t" \
- ".endif\n"
-
-#define LOCK_SECTION_END \
- ".previous\n\t"
-
-#define __lockfunc fastcall __attribute__((section(".spinlock.text")))
-
-/*
- * Pull the raw_spinlock_t and raw_rwlock_t definitions:
- */
-#include <linux/spinlock_types.h>
-
-extern int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock);
-
-/*
- * Pull the __raw*() functions/declarations (UP-nondebug doesnt need them):
- */
-#ifdef CONFIG_SMP
-# include <asm/spinlock.h>
-#else
-# include <linux/spinlock_up.h>
-#endif
-
-#ifdef CONFIG_DEBUG_SPINLOCK
- extern void __spin_lock_init(spinlock_t *lock, const char *name,
- struct lock_class_key *key);
-# define spin_lock_init(lock) \
-do { \
- static struct lock_class_key __key; \
- \
- __spin_lock_init((lock), #lock, &__key); \
-} while (0)
-
-#else
-# define spin_lock_init(lock) \
- do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_SPINLOCK
- extern void __rwlock_init(rwlock_t *lock, const char *name,
- struct lock_class_key *key);
-# define rwlock_init(lock) \
-do { \
- static struct lock_class_key __key; \
- \
- __rwlock_init((lock), #lock, &__key); \
-} while (0)
-#else
-# define rwlock_init(lock) \
- do { *(lock) = RW_LOCK_UNLOCKED; } while (0)
-#endif
-
-#define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock)
-
-/**
- * spin_unlock_wait - wait until the spinlock gets unlocked
- * @lock: the spinlock in question.
- */
-#define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock)
-
-/*
- * Pull the _spin_*()/_read_*()/_write_*() functions/declarations:
- */
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
-# include <linux/spinlock_api_smp.h>
-#else
-# include <linux/spinlock_api_up.h>
-#endif
-
-#ifdef CONFIG_DEBUG_SPINLOCK
- extern void _raw_spin_lock(spinlock_t *lock);
-#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
- extern int _raw_spin_trylock(spinlock_t *lock);
- extern void _raw_spin_unlock(spinlock_t *lock);
- extern void _raw_read_lock(rwlock_t *lock);
- extern int _raw_read_trylock(rwlock_t *lock);
- extern void _raw_read_unlock(rwlock_t *lock);
- extern void _raw_write_lock(rwlock_t *lock);
- extern int _raw_write_trylock(rwlock_t *lock);
- extern void _raw_write_unlock(rwlock_t *lock);
-#else
-# define _raw_spin_lock(lock) __raw_spin_lock(&(lock)->raw_lock)
-# define _raw_spin_lock_flags(lock, flags) \
- __raw_spin_lock_flags(&(lock)->raw_lock, *(flags))
-# define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock)
-# define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
-# define _raw_read_lock(rwlock) __raw_read_lock(&(rwlock)->raw_lock)
-# define _raw_read_trylock(rwlock) __raw_read_trylock(&(rwlock)->raw_lock)
-# define _raw_read_unlock(rwlock) __raw_read_unlock(&(rwlock)->raw_lock)
-# define _raw_write_lock(rwlock) __raw_write_lock(&(rwlock)->raw_lock)
-# define _raw_write_trylock(rwlock) __raw_write_trylock(&(rwlock)->raw_lock)
-# define _raw_write_unlock(rwlock) __raw_write_unlock(&(rwlock)->raw_lock)
-#endif
-
-#define read_can_lock(rwlock) __raw_read_can_lock(&(rwlock)->raw_lock)
-#define write_can_lock(rwlock) __raw_write_can_lock(&(rwlock)->raw_lock)
-
-/*
- * Define the various spin_lock and rw_lock methods. Note we define these
- * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various
- * methods are defined as nops in the case they are not required.
- */
-#define spin_trylock(lock) __cond_lock(_spin_trylock(lock))
-#define read_trylock(lock) __cond_lock(_read_trylock(lock))
-#define write_trylock(lock) __cond_lock(_write_trylock(lock))
-
-#define spin_lock(lock) _spin_lock(lock)
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass)
-#else
-# define spin_lock_nested(lock, subclass) _spin_lock(lock)
-#endif
-
-#define write_lock(lock) _write_lock(lock)
-#define read_lock(lock) _read_lock(lock)
-
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
-#define spin_lock_irqsave(lock, flags) flags = _spin_lock_irqsave(lock)
-#define read_lock_irqsave(lock, flags) flags = _read_lock_irqsave(lock)
-#define write_lock_irqsave(lock, flags) flags = _write_lock_irqsave(lock)
-#else
-#define spin_lock_irqsave(lock, flags) _spin_lock_irqsave(lock, flags)
-#define read_lock_irqsave(lock, flags) _read_lock_irqsave(lock, flags)
-#define write_lock_irqsave(lock, flags) _write_lock_irqsave(lock, flags)
-#endif
-
-#define spin_lock_irq(lock) _spin_lock_irq(lock)
-#define spin_lock_bh(lock) _spin_lock_bh(lock)
-
-#define read_lock_irq(lock) _read_lock_irq(lock)
-#define read_lock_bh(lock) _read_lock_bh(lock)
-
-#define write_lock_irq(lock) _write_lock_irq(lock)
-#define write_lock_bh(lock) _write_lock_bh(lock)
-
-/*
- * We inline the unlock functions in the nondebug case:
- */
-#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT) || \
- !defined(CONFIG_SMP)
-# define spin_unlock(lock) _spin_unlock(lock)
-# define read_unlock(lock) _read_unlock(lock)
-# define write_unlock(lock) _write_unlock(lock)
-# define spin_unlock_irq(lock) _spin_unlock_irq(lock)
-# define read_unlock_irq(lock) _read_unlock_irq(lock)
-# define write_unlock_irq(lock) _write_unlock_irq(lock)
-#else
-# define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
-# define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock)
-# define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock)
-# define spin_unlock_irq(lock) \
- do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-# define read_unlock_irq(lock) \
- do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-# define write_unlock_irq(lock) \
- do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0)
-#endif
-
-#define spin_unlock_irqrestore(lock, flags) \
- _spin_unlock_irqrestore(lock, flags)
-#define spin_unlock_bh(lock) _spin_unlock_bh(lock)
-
-#define read_unlock_irqrestore(lock, flags) \
- _read_unlock_irqrestore(lock, flags)
-#define read_unlock_bh(lock) _read_unlock_bh(lock)
-
-#define write_unlock_irqrestore(lock, flags) \
- _write_unlock_irqrestore(lock, flags)
-#define write_unlock_bh(lock) _write_unlock_bh(lock)
-
-#define spin_trylock_bh(lock) __cond_lock(_spin_trylock_bh(lock))
-
-#define spin_trylock_irq(lock) \
-({ \
- local_irq_disable(); \
- _spin_trylock(lock) ? \
- 1 : ({ local_irq_enable(); 0; }); \
-})
-
-#define spin_trylock_irqsave(lock, flags) \
-({ \
- local_irq_save(flags); \
- _spin_trylock(lock) ? \
- 1 : ({ local_irq_restore(flags); 0; }); \
-})
-
-/*
- * Pull the atomic_t declaration:
- * (asm-mips/atomic.h needs above definitions)
- */
-#include <asm/atomic.h>
-/**
- * atomic_dec_and_lock - lock on reaching reference count zero
- * @atomic: the atomic counter
- * @lock: the spinlock in question
- */
-extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
-#define atomic_dec_and_lock(atomic, lock) \
- __cond_lock(_atomic_dec_and_lock(atomic, lock))
-
-/**
- * spin_can_lock - would spin_trylock() succeed?
- * @lock: the spinlock in question.
- */
-#define spin_can_lock(lock) (!spin_is_locked(lock))
-
-#endif /* __LINUX_SPINLOCK_H */
diff --git a/original/linux/spinlock_api_smp.h b/original/linux/spinlock_api_smp.h
deleted file mode 100644
index b2c4f82..0000000
--- a/original/linux/spinlock_api_smp.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __LINUX_SPINLOCK_API_SMP_H
-#define __LINUX_SPINLOCK_API_SMP_H
-
-#ifndef __LINUX_SPINLOCK_H
-# error "please don't include this file directly"
-#endif
-
-/*
- * include/linux/spinlock_api_smp.h
- *
- * spinlock API declarations on SMP (and debug)
- * (implemented in kernel/spinlock.c)
- *
- * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
- * Released under the General Public License (GPL).
- */
-
-int in_lock_functions(unsigned long addr);
-
-#define assert_spin_locked(x) BUG_ON(!spin_is_locked(x))
-
-void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t);
-void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
- __acquires(spinlock_t);
-void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t);
-void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t);
-void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t);
-void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
-void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
-void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t);
-void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
-void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
-unsigned long __lockfunc _spin_lock_irqsave(spinlock_t *lock)
- __acquires(spinlock_t);
-unsigned long __lockfunc _read_lock_irqsave(rwlock_t *lock)
- __acquires(rwlock_t);
-unsigned long __lockfunc _write_lock_irqsave(rwlock_t *lock)
- __acquires(rwlock_t);
-int __lockfunc _spin_trylock(spinlock_t *lock);
-int __lockfunc _read_trylock(rwlock_t *lock);
-int __lockfunc _write_trylock(rwlock_t *lock);
-int __lockfunc _spin_trylock_bh(spinlock_t *lock);
-void __lockfunc _spin_unlock(spinlock_t *lock) __releases(spinlock_t);
-void __lockfunc _read_unlock(rwlock_t *lock) __releases(rwlock_t);
-void __lockfunc _write_unlock(rwlock_t *lock) __releases(rwlock_t);
-void __lockfunc _spin_unlock_bh(spinlock_t *lock) __releases(spinlock_t);
-void __lockfunc _read_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
-void __lockfunc _write_unlock_bh(rwlock_t *lock) __releases(rwlock_t);
-void __lockfunc _spin_unlock_irq(spinlock_t *lock) __releases(spinlock_t);
-void __lockfunc _read_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
-void __lockfunc _write_unlock_irq(rwlock_t *lock) __releases(rwlock_t);
-void __lockfunc _spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
- __releases(spinlock_t);
-void __lockfunc _read_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
- __releases(rwlock_t);
-void __lockfunc _write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
- __releases(rwlock_t);
-
-#endif /* __LINUX_SPINLOCK_API_SMP_H */
diff --git a/original/linux/spinlock_api_up.h b/original/linux/spinlock_api_up.h
deleted file mode 100644
index 67faa04..0000000
--- a/original/linux/spinlock_api_up.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef __LINUX_SPINLOCK_API_UP_H
-#define __LINUX_SPINLOCK_API_UP_H
-
-#ifndef __LINUX_SPINLOCK_H
-# error "please don't include this file directly"
-#endif
-
-/*
- * include/linux/spinlock_api_up.h
- *
- * spinlock API implementation on UP-nondebug (inlined implementation)
- *
- * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
- * Released under the General Public License (GPL).
- */
-
-#define in_lock_functions(ADDR) 0
-
-#define assert_spin_locked(lock) do { (void)(lock); } while (0)
-
-/*
- * In the UP-nondebug case there's no real locking going on, so the
- * only thing we have to do is to keep the preempt counts and irq
- * flags straight, to supress compiler warnings of unused lock
- * variables, and to add the proper checker annotations:
- */
-#define __LOCK(lock) \
- do { preempt_disable(); __acquire(lock); (void)(lock); } while (0)
-
-#define __LOCK_BH(lock) \
- do { local_bh_disable(); __LOCK(lock); } while (0)
-
-#define __LOCK_IRQ(lock) \
- do { local_irq_disable(); __LOCK(lock); } while (0)
-
-#define __LOCK_IRQSAVE(lock, flags) \
- do { local_irq_save(flags); __LOCK(lock); } while (0)
-
-#define __UNLOCK(lock) \
- do { preempt_enable(); __release(lock); (void)(lock); } while (0)
-
-#define __UNLOCK_BH(lock) \
- do { preempt_enable_no_resched(); local_bh_enable(); __release(lock); (void)(lock); } while (0)
-
-#define __UNLOCK_IRQ(lock) \
- do { local_irq_enable(); __UNLOCK(lock); } while (0)
-
-#define __UNLOCK_IRQRESTORE(lock, flags) \
- do { local_irq_restore(flags); __UNLOCK(lock); } while (0)
-
-#define _spin_lock(lock) __LOCK(lock)
-#define _spin_lock_nested(lock, subclass) __LOCK(lock)
-#define _read_lock(lock) __LOCK(lock)
-#define _write_lock(lock) __LOCK(lock)
-#define _spin_lock_bh(lock) __LOCK_BH(lock)
-#define _read_lock_bh(lock) __LOCK_BH(lock)
-#define _write_lock_bh(lock) __LOCK_BH(lock)
-#define _spin_lock_irq(lock) __LOCK_IRQ(lock)
-#define _read_lock_irq(lock) __LOCK_IRQ(lock)
-#define _write_lock_irq(lock) __LOCK_IRQ(lock)
-#define _spin_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
-#define _read_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
-#define _write_lock_irqsave(lock, flags) __LOCK_IRQSAVE(lock, flags)
-#define _spin_trylock(lock) ({ __LOCK(lock); 1; })
-#define _read_trylock(lock) ({ __LOCK(lock); 1; })
-#define _write_trylock(lock) ({ __LOCK(lock); 1; })
-#define _spin_trylock_bh(lock) ({ __LOCK_BH(lock); 1; })
-#define _spin_unlock(lock) __UNLOCK(lock)
-#define _read_unlock(lock) __UNLOCK(lock)
-#define _write_unlock(lock) __UNLOCK(lock)
-#define _spin_unlock_bh(lock) __UNLOCK_BH(lock)
-#define _write_unlock_bh(lock) __UNLOCK_BH(lock)
-#define _read_unlock_bh(lock) __UNLOCK_BH(lock)
-#define _spin_unlock_irq(lock) __UNLOCK_IRQ(lock)
-#define _read_unlock_irq(lock) __UNLOCK_IRQ(lock)
-#define _write_unlock_irq(lock) __UNLOCK_IRQ(lock)
-#define _spin_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
-#define _read_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
-#define _write_unlock_irqrestore(lock, flags) __UNLOCK_IRQRESTORE(lock, flags)
-
-#endif /* __LINUX_SPINLOCK_API_UP_H */
diff --git a/original/linux/spinlock_types.h b/original/linux/spinlock_types.h
deleted file mode 100644
index dc5fb69..0000000
--- a/original/linux/spinlock_types.h
+++ /dev/null
@@ -1,94 +0,0 @@
-#ifndef __LINUX_SPINLOCK_TYPES_H
-#define __LINUX_SPINLOCK_TYPES_H
-
-/*
- * include/linux/spinlock_types.h - generic spinlock type definitions
- * and initializers
- *
- * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
- * Released under the General Public License (GPL).
- */
-
-#include <linux/lockdep.h>
-
-#if defined(CONFIG_SMP)
-# include <asm/spinlock_types.h>
-#else
-# include <linux/spinlock_types_up.h>
-#endif
-
-typedef struct {
- raw_spinlock_t raw_lock;
-#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
- unsigned int break_lock;
-#endif
-#ifdef CONFIG_DEBUG_SPINLOCK
- unsigned int magic, owner_cpu;
- void *owner;
-#endif
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
- struct lockdep_map dep_map;
-#endif
-} spinlock_t;
-
-#define SPINLOCK_MAGIC 0xdead4ead
-
-typedef struct {
- raw_rwlock_t raw_lock;
-#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
- unsigned int break_lock;
-#endif
-#ifdef CONFIG_DEBUG_SPINLOCK
- unsigned int magic, owner_cpu;
- void *owner;
-#endif
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
- struct lockdep_map dep_map;
-#endif
-} rwlock_t;
-
-#define RWLOCK_MAGIC 0xdeaf1eed
-
-#define SPINLOCK_OWNER_INIT ((void *)-1L)
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define SPIN_DEP_MAP_INIT(lockname) .dep_map = { .name = #lockname }
-#else
-# define SPIN_DEP_MAP_INIT(lockname)
-#endif
-
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
-# define RW_DEP_MAP_INIT(lockname) .dep_map = { .name = #lockname }
-#else
-# define RW_DEP_MAP_INIT(lockname)
-#endif
-
-#ifdef CONFIG_DEBUG_SPINLOCK
-# define __SPIN_LOCK_UNLOCKED(lockname) \
- (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, \
- .magic = SPINLOCK_MAGIC, \
- .owner = SPINLOCK_OWNER_INIT, \
- .owner_cpu = -1, \
- SPIN_DEP_MAP_INIT(lockname) }
-#define __RW_LOCK_UNLOCKED(lockname) \
- (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, \
- .magic = RWLOCK_MAGIC, \
- .owner = SPINLOCK_OWNER_INIT, \
- .owner_cpu = -1, \
- RW_DEP_MAP_INIT(lockname) }
-#else
-# define __SPIN_LOCK_UNLOCKED(lockname) \
- (spinlock_t) { .raw_lock = __RAW_SPIN_LOCK_UNLOCKED, \
- SPIN_DEP_MAP_INIT(lockname) }
-#define __RW_LOCK_UNLOCKED(lockname) \
- (rwlock_t) { .raw_lock = __RAW_RW_LOCK_UNLOCKED, \
- RW_DEP_MAP_INIT(lockname) }
-#endif
-
-#define SPIN_LOCK_UNLOCKED __SPIN_LOCK_UNLOCKED(old_style_spin_init)
-#define RW_LOCK_UNLOCKED __RW_LOCK_UNLOCKED(old_style_rw_init)
-
-#define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
-#define DEFINE_RWLOCK(x) rwlock_t x = __RW_LOCK_UNLOCKED(x)
-
-#endif /* __LINUX_SPINLOCK_TYPES_H */
diff --git a/original/linux/spinlock_types_up.h b/original/linux/spinlock_types_up.h
deleted file mode 100644
index 27644af..0000000
--- a/original/linux/spinlock_types_up.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __LINUX_SPINLOCK_TYPES_UP_H
-#define __LINUX_SPINLOCK_TYPES_UP_H
-
-#ifndef __LINUX_SPINLOCK_TYPES_H
-# error "please don't include this file directly"
-#endif
-
-/*
- * include/linux/spinlock_types_up.h - spinlock type definitions for UP
- *
- * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
- * Released under the General Public License (GPL).
- */
-
-#if defined(CONFIG_DEBUG_SPINLOCK) || \
- defined(CONFIG_DEBUG_LOCK_ALLOC)
-
-typedef struct {
- volatile unsigned int slock;
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
- struct lockdep_map dep_map;
-#endif
-} raw_spinlock_t;
-
-#define __RAW_SPIN_LOCK_UNLOCKED { 1 }
-
-#else
-
-typedef struct { } raw_spinlock_t;
-
-#define __RAW_SPIN_LOCK_UNLOCKED { }
-
-#endif
-
-typedef struct {
- /* no debug version on UP */
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
- struct lockdep_map dep_map;
-#endif
-} raw_rwlock_t;
-
-#define __RAW_RW_LOCK_UNLOCKED { }
-
-#endif /* __LINUX_SPINLOCK_TYPES_UP_H */
diff --git a/original/linux/spinlock_up.h b/original/linux/spinlock_up.h
deleted file mode 100644
index ea54c4c..0000000
--- a/original/linux/spinlock_up.h
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef __LINUX_SPINLOCK_UP_H
-#define __LINUX_SPINLOCK_UP_H
-
-#ifndef __LINUX_SPINLOCK_H
-# error "please don't include this file directly"
-#endif
-
-/*
- * include/linux/spinlock_up.h - UP-debug version of spinlocks.
- *
- * portions Copyright 2005, Red Hat, Inc., Ingo Molnar
- * Released under the General Public License (GPL).
- *
- * In the debug case, 1 means unlocked, 0 means locked. (the values
- * are inverted, to catch initialization bugs)
- *
- * No atomicity anywhere, we are on UP.
- */
-
-#ifdef CONFIG_DEBUG_SPINLOCK
-#define __raw_spin_is_locked(x) ((x)->slock == 0)
-
-static inline void __raw_spin_lock(raw_spinlock_t *lock)
-{
- lock->slock = 0;
-}
-
-static inline void
-__raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
-{
- local_irq_save(flags);
- lock->slock = 0;
-}
-
-static inline int __raw_spin_trylock(raw_spinlock_t *lock)
-{
- char oldval = lock->slock;
-
- lock->slock = 0;
-
- return oldval > 0;
-}
-
-static inline void __raw_spin_unlock(raw_spinlock_t *lock)
-{
- lock->slock = 1;
-}
-
-/*
- * Read-write spinlocks. No debug version.
- */
-#define __raw_read_lock(lock) do { (void)(lock); } while (0)
-#define __raw_write_lock(lock) do { (void)(lock); } while (0)
-#define __raw_read_trylock(lock) ({ (void)(lock); 1; })
-#define __raw_write_trylock(lock) ({ (void)(lock); 1; })
-#define __raw_read_unlock(lock) do { (void)(lock); } while (0)
-#define __raw_write_unlock(lock) do { (void)(lock); } while (0)
-
-#else /* DEBUG_SPINLOCK */
-#define __raw_spin_is_locked(lock) ((void)(lock), 0)
-/* for sched.c and kernel_lock.c: */
-# define __raw_spin_lock(lock) do { (void)(lock); } while (0)
-# define __raw_spin_unlock(lock) do { (void)(lock); } while (0)
-# define __raw_spin_trylock(lock) ({ (void)(lock); 1; })
-#endif /* DEBUG_SPINLOCK */
-
-#define __raw_read_can_lock(lock) (((void)(lock), 1))
-#define __raw_write_can_lock(lock) (((void)(lock), 1))
-
-#define __raw_spin_unlock_wait(lock) \
- do { cpu_relax(); } while (__raw_spin_is_locked(lock))
-
-#endif /* __LINUX_SPINLOCK_UP_H */
diff --git a/original/linux/stacktrace.h b/original/linux/stacktrace.h
deleted file mode 100644
index 9cc81e5..0000000
--- a/original/linux/stacktrace.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef __LINUX_STACKTRACE_H
-#define __LINUX_STACKTRACE_H
-
-#ifdef CONFIG_STACKTRACE
-struct stack_trace {
- unsigned int nr_entries, max_entries;
- unsigned long *entries;
-};
-
-extern void save_stack_trace(struct stack_trace *trace,
- struct task_struct *task, int all_contexts,
- unsigned int skip);
-
-extern void print_stack_trace(struct stack_trace *trace, int spaces);
-#else
-# define save_stack_trace(trace, task, all, skip) do { } while (0)
-# define print_stack_trace(trace) do { } while (0)
-#endif
-
-#endif
diff --git a/original/linux/stat.h b/original/linux/stat.h
deleted file mode 100644
index 8669291..0000000
--- a/original/linux/stat.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef _LINUX_STAT_H
-#define _LINUX_STAT_H
-
-#ifdef __KERNEL__
-
-#include <asm/stat.h>
-
-#endif
-
-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
-
-#define S_IFMT 00170000
-#define S_IFSOCK 0140000
-#define S_IFLNK 0120000
-#define S_IFREG 0100000
-#define S_IFBLK 0060000
-#define S_IFDIR 0040000
-#define S_IFCHR 0020000
-#define S_IFIFO 0010000
-#define S_ISUID 0004000
-#define S_ISGID 0002000
-#define S_ISVTX 0001000
-
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-
-#define S_IRWXU 00700
-#define S_IRUSR 00400
-#define S_IWUSR 00200
-#define S_IXUSR 00100
-
-#define S_IRWXG 00070
-#define S_IRGRP 00040
-#define S_IWGRP 00020
-#define S_IXGRP 00010
-
-#define S_IRWXO 00007
-#define S_IROTH 00004
-#define S_IWOTH 00002
-#define S_IXOTH 00001
-
-#endif
-
-#ifdef __KERNEL__
-#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
-#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
-#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
-#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
-#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
-
-#include <linux/types.h>
-#include <linux/time.h>
-
-struct kstat {
- unsigned long ino;
- dev_t dev;
- umode_t mode;
- unsigned int nlink;
- uid_t uid;
- gid_t gid;
- dev_t rdev;
- loff_t size;
- struct timespec atime;
- struct timespec mtime;
- struct timespec ctime;
- unsigned long blksize;
- unsigned long long blocks;
-};
-
-#endif
-
-#endif
diff --git a/original/linux/statfs.h b/original/linux/statfs.h
deleted file mode 100644
index b34cc82..0000000
--- a/original/linux/statfs.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _LINUX_STATFS_H
-#define _LINUX_STATFS_H
-
-#include <linux/types.h>
-
-#include <asm/statfs.h>
-
-struct kstatfs {
- long f_type;
- long f_bsize;
- u64 f_blocks;
- u64 f_bfree;
- u64 f_bavail;
- u64 f_files;
- u64 f_ffree;
- __kernel_fsid_t f_fsid;
- long f_namelen;
- long f_frsize;
- long f_spare[5];
-};
-
-#endif
diff --git a/original/linux/stddef.h b/original/linux/stddef.h
deleted file mode 100644
index 6a40c76..0000000
--- a/original/linux/stddef.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _LINUX_STDDEF_H
-#define _LINUX_STDDEF_H
-
-#include <linux/compiler.h>
-
-#undef NULL
-#if defined(__cplusplus)
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-
-#ifdef __KERNEL__
-
-enum {
- false = 0,
- true = 1
-};
-
-#undef offsetof
-#ifdef __compiler_offsetof
-#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
-#else
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/string.h b/original/linux/string.h
deleted file mode 100644
index e4c7558..0000000
--- a/original/linux/string.h
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef _LINUX_STRING_H_
-#define _LINUX_STRING_H_
-
-/* We don't want strings.h stuff being user by user stuff by accident */
-
-#ifdef __KERNEL__
-
-#include <linux/compiler.h> /* for inline */
-#include <linux/types.h> /* for size_t */
-#include <linux/stddef.h> /* for NULL */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern char *strndup_user(const char __user *, long);
-
-/*
- * Include machine specific inline routines
- */
-#include <asm/string.h>
-
-#ifndef __HAVE_ARCH_STRCPY
-extern char * strcpy(char *,const char *);
-#endif
-#ifndef __HAVE_ARCH_STRNCPY
-extern char * strncpy(char *,const char *, __kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_STRLCPY
-size_t strlcpy(char *, const char *, size_t);
-#endif
-#ifndef __HAVE_ARCH_STRCAT
-extern char * strcat(char *, const char *);
-#endif
-#ifndef __HAVE_ARCH_STRNCAT
-extern char * strncat(char *, const char *, __kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_STRLCAT
-extern size_t strlcat(char *, const char *, __kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_STRCMP
-extern int strcmp(const char *,const char *);
-#endif
-#ifndef __HAVE_ARCH_STRNCMP
-extern int strncmp(const char *,const char *,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_STRNICMP
-extern int strnicmp(const char *, const char *, __kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_STRCHR
-extern char * strchr(const char *,int);
-#endif
-#ifndef __HAVE_ARCH_STRNCHR
-extern char * strnchr(const char *, size_t, int);
-#endif
-#ifndef __HAVE_ARCH_STRRCHR
-extern char * strrchr(const char *,int);
-#endif
-extern char * strstrip(char *);
-#ifndef __HAVE_ARCH_STRSTR
-extern char * strstr(const char *,const char *);
-#endif
-#ifndef __HAVE_ARCH_STRLEN
-extern __kernel_size_t strlen(const char *);
-#endif
-#ifndef __HAVE_ARCH_STRNLEN
-extern __kernel_size_t strnlen(const char *,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_STRPBRK
-extern char * strpbrk(const char *,const char *);
-#endif
-#ifndef __HAVE_ARCH_STRSEP
-extern char * strsep(char **,const char *);
-#endif
-#ifndef __HAVE_ARCH_STRSPN
-extern __kernel_size_t strspn(const char *,const char *);
-#endif
-#ifndef __HAVE_ARCH_STRCSPN
-extern __kernel_size_t strcspn(const char *,const char *);
-#endif
-
-#ifndef __HAVE_ARCH_MEMSET
-extern void * memset(void *,int,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_MEMCPY
-extern void * memcpy(void *,const void *,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_MEMMOVE
-extern void * memmove(void *,const void *,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_MEMSCAN
-extern void * memscan(void *,int,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_MEMCMP
-extern int memcmp(const void *,const void *,__kernel_size_t);
-#endif
-#ifndef __HAVE_ARCH_MEMCHR
-extern void * memchr(const void *,int,__kernel_size_t);
-#endif
-
-extern char *kstrdup(const char *s, gfp_t gfp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-#endif /* _LINUX_STRING_H_ */
diff --git a/original/linux/stringify.h b/original/linux/stringify.h
deleted file mode 100644
index 0b43883..0000000
--- a/original/linux/stringify.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __LINUX_STRINGIFY_H
-#define __LINUX_STRINGIFY_H
-
-/* Indirect stringification. Doing two levels allows the parameter to be a
- * macro itself. For example, compile with -DFOO=bar, __stringify(FOO)
- * converts to "bar".
- */
-
-#define __stringify_1(x) #x
-#define __stringify(x) __stringify_1(x)
-
-#endif /* !__LINUX_STRINGIFY_H */
diff --git a/original/linux/sunrpc/auth.h b/original/linux/sunrpc/auth.h
deleted file mode 100644
index a6de332..0000000
--- a/original/linux/sunrpc/auth.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * linux/include/linux/sunrpc/auth.h
- *
- * Declarations for the RPC client authentication machinery.
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_AUTH_H
-#define _LINUX_SUNRPC_AUTH_H
-
-#ifdef __KERNEL__
-
-#include <linux/sunrpc/sched.h>
-#include <linux/sunrpc/msg_prot.h>
-#include <linux/sunrpc/xdr.h>
-
-#include <asm/atomic.h>
-
-/* size of the nodename buffer */
-#define UNX_MAXNODENAME 32
-
-/* Maximum size (in bytes) of an rpc credential or verifier */
-#define RPC_MAX_AUTH_SIZE (400)
-
-/* Work around the lack of a VFS credential */
-struct auth_cred {
- uid_t uid;
- gid_t gid;
- struct group_info *group_info;
-};
-
-/*
- * Client user credentials
- */
-struct rpc_cred {
- struct hlist_node cr_hash; /* hash chain */
- struct rpc_credops * cr_ops;
- unsigned long cr_expire; /* when to gc */
- atomic_t cr_count; /* ref count */
- unsigned short cr_flags; /* various flags */
-#ifdef RPC_DEBUG
- unsigned long cr_magic; /* 0x0f4aa4f0 */
-#endif
-
- uid_t cr_uid;
-
- /* per-flavor data */
-};
-#define RPCAUTH_CRED_NEW 0x0001
-#define RPCAUTH_CRED_UPTODATE 0x0002
-
-#define RPCAUTH_CRED_MAGIC 0x0f4aa4f0
-
-/*
- * Client authentication handle
- */
-#define RPC_CREDCACHE_NR 8
-#define RPC_CREDCACHE_MASK (RPC_CREDCACHE_NR - 1)
-struct rpc_cred_cache {
- struct hlist_head hashtable[RPC_CREDCACHE_NR];
- unsigned long nextgc; /* next garbage collection */
- unsigned long expire; /* cache expiry interval */
-};
-
-struct rpc_auth {
- unsigned int au_cslack; /* call cred size estimate */
- /* guess at number of u32's auth adds before
- * reply data; normally the verifier size: */
- unsigned int au_rslack;
- /* for gss, used to calculate au_rslack: */
- unsigned int au_verfsize;
-
- unsigned int au_flags; /* various flags */
- struct rpc_authops * au_ops; /* operations */
- rpc_authflavor_t au_flavor; /* pseudoflavor (note may
- * differ from the flavor in
- * au_ops->au_flavor in gss
- * case) */
- atomic_t au_count; /* Reference counter */
-
- struct rpc_cred_cache * au_credcache;
- /* per-flavor data */
-};
-
-/* Flags for rpcauth_lookupcred() */
-#define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */
-#define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */
-
-/*
- * Client authentication ops
- */
-struct rpc_authops {
- struct module *owner;
- rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */
-#ifdef RPC_DEBUG
- char * au_name;
-#endif
- struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t);
- void (*destroy)(struct rpc_auth *);
-
- struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int);
- struct rpc_cred * (*crcreate)(struct rpc_auth*, struct auth_cred *, int);
-};
-
-struct rpc_credops {
- const char * cr_name; /* Name of the auth flavour */
- int (*cr_init)(struct rpc_auth *, struct rpc_cred *);
- void (*crdestroy)(struct rpc_cred *);
-
- int (*crmatch)(struct auth_cred *, struct rpc_cred *, int);
- u32 * (*crmarshal)(struct rpc_task *, u32 *);
- int (*crrefresh)(struct rpc_task *);
- u32 * (*crvalidate)(struct rpc_task *, u32 *);
- int (*crwrap_req)(struct rpc_task *, kxdrproc_t,
- void *, u32 *, void *);
- int (*crunwrap_resp)(struct rpc_task *, kxdrproc_t,
- void *, u32 *, void *);
-};
-
-extern struct rpc_authops authunix_ops;
-extern struct rpc_authops authnull_ops;
-#ifdef CONFIG_SUNRPC_SECURE
-extern struct rpc_authops authdes_ops;
-#endif
-
-int rpcauth_register(struct rpc_authops *);
-int rpcauth_unregister(struct rpc_authops *);
-struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *);
-void rpcauth_destroy(struct rpc_auth *);
-struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int);
-struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int);
-struct rpc_cred * rpcauth_bindcred(struct rpc_task *);
-void rpcauth_holdcred(struct rpc_task *);
-void put_rpccred(struct rpc_cred *);
-void rpcauth_unbindcred(struct rpc_task *);
-u32 * rpcauth_marshcred(struct rpc_task *, u32 *);
-u32 * rpcauth_checkverf(struct rpc_task *, u32 *);
-int rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, u32 *data, void *obj);
-int rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, u32 *data, void *obj);
-int rpcauth_refreshcred(struct rpc_task *);
-void rpcauth_invalcred(struct rpc_task *);
-int rpcauth_uptodatecred(struct rpc_task *);
-int rpcauth_init_credcache(struct rpc_auth *, unsigned long);
-void rpcauth_free_credcache(struct rpc_auth *);
-
-static inline
-struct rpc_cred * get_rpccred(struct rpc_cred *cred)
-{
- atomic_inc(&cred->cr_count);
- return cred;
-}
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SUNRPC_AUTH_H */
diff --git a/original/linux/sunrpc/auth_gss.h b/original/linux/sunrpc/auth_gss.h
deleted file mode 100644
index 03084dc..0000000
--- a/original/linux/sunrpc/auth_gss.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * linux/include/linux/auth_gss.h
- *
- * Declarations for RPCSEC_GSS
- *
- * Dug Song <dugsong@monkey.org>
- * Andy Adamson <andros@umich.edu>
- * Bruce Fields <bfields@umich.edu>
- * Copyright (c) 2000 The Regents of the University of Michigan
- *
- * $Id$
- */
-
-#ifndef _LINUX_SUNRPC_AUTH_GSS_H
-#define _LINUX_SUNRPC_AUTH_GSS_H
-
-#ifdef __KERNEL__
-#include <linux/sunrpc/auth.h>
-#include <linux/sunrpc/svc.h>
-#include <linux/sunrpc/gss_api.h>
-
-#define RPC_GSS_VERSION 1
-
-#define MAXSEQ 0x80000000 /* maximum legal sequence number, from rfc 2203 */
-
-enum rpc_gss_proc {
- RPC_GSS_PROC_DATA = 0,
- RPC_GSS_PROC_INIT = 1,
- RPC_GSS_PROC_CONTINUE_INIT = 2,
- RPC_GSS_PROC_DESTROY = 3
-};
-
-enum rpc_gss_svc {
- RPC_GSS_SVC_NONE = 1,
- RPC_GSS_SVC_INTEGRITY = 2,
- RPC_GSS_SVC_PRIVACY = 3
-};
-
-/* on-the-wire gss cred: */
-struct rpc_gss_wire_cred {
- u32 gc_v; /* version */
- u32 gc_proc; /* control procedure */
- u32 gc_seq; /* sequence number */
- u32 gc_svc; /* service */
- struct xdr_netobj gc_ctx; /* context handle */
-};
-
-/* on-the-wire gss verifier: */
-struct rpc_gss_wire_verf {
- u32 gv_flavor;
- struct xdr_netobj gv_verf;
-};
-
-/* return from gss NULL PROC init sec context */
-struct rpc_gss_init_res {
- struct xdr_netobj gr_ctx; /* context handle */
- u32 gr_major; /* major status */
- u32 gr_minor; /* minor status */
- u32 gr_win; /* sequence window */
- struct xdr_netobj gr_token; /* token */
-};
-
-/* The gss_cl_ctx struct holds all the information the rpcsec_gss client
- * code needs to know about a single security context. In particular,
- * gc_gss_ctx is the context handle that is used to do gss-api calls, while
- * gc_wire_ctx is the context handle that is used to identify the context on
- * the wire when communicating with a server. */
-
-struct gss_cl_ctx {
- atomic_t count;
- enum rpc_gss_proc gc_proc;
- u32 gc_seq;
- spinlock_t gc_seq_lock;
- struct gss_ctx *gc_gss_ctx;
- struct xdr_netobj gc_wire_ctx;
- u32 gc_win;
- unsigned long gc_expiry;
-};
-
-struct gss_upcall_msg;
-struct gss_cred {
- struct rpc_cred gc_base;
- enum rpc_gss_svc gc_service;
- struct gss_cl_ctx *gc_ctx;
- struct gss_upcall_msg *gc_upcall;
-};
-
-#define gc_uid gc_base.cr_uid
-#define gc_count gc_base.cr_count
-#define gc_flags gc_base.cr_flags
-#define gc_expire gc_base.cr_expire
-
-void print_hexl(u32 *p, u_int length, u_int offset);
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SUNRPC_AUTH_GSS_H */
-
diff --git a/original/linux/sunrpc/clnt.h b/original/linux/sunrpc/clnt.h
deleted file mode 100644
index 8fe9f35..0000000
--- a/original/linux/sunrpc/clnt.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * linux/include/linux/sunrpc/clnt.h
- *
- * Declarations for the high-level RPC client interface
- *
- * Copyright (C) 1995, 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_CLNT_H
-#define _LINUX_SUNRPC_CLNT_H
-
-#include <linux/sunrpc/msg_prot.h>
-#include <linux/sunrpc/sched.h>
-#include <linux/sunrpc/xprt.h>
-#include <linux/sunrpc/auth.h>
-#include <linux/sunrpc/stats.h>
-#include <linux/sunrpc/xdr.h>
-#include <linux/sunrpc/timer.h>
-#include <asm/signal.h>
-
-/*
- * This defines an RPC port mapping
- */
-struct rpc_portmap {
- __u32 pm_prog;
- __u32 pm_vers;
- __u32 pm_prot;
- __u16 pm_port;
- unsigned char pm_binding : 1; /* doing a getport() */
- struct rpc_wait_queue pm_bindwait; /* waiting on getport() */
-};
-
-struct rpc_inode;
-
-/*
- * The high-level client handle
- */
-struct rpc_clnt {
- atomic_t cl_count; /* Number of clones */
- atomic_t cl_users; /* number of references */
- struct rpc_xprt * cl_xprt; /* transport */
- struct rpc_procinfo * cl_procinfo; /* procedure info */
- u32 cl_maxproc; /* max procedure number */
-
- char * cl_server; /* server machine name */
- char * cl_protname; /* protocol name */
- struct rpc_auth * cl_auth; /* authenticator */
- struct rpc_stat * cl_stats; /* per-program statistics */
- struct rpc_iostats * cl_metrics; /* per-client statistics */
-
- unsigned int cl_softrtry : 1,/* soft timeouts */
- cl_intr : 1,/* interruptible */
- cl_autobind : 1,/* use getport() */
- cl_oneshot : 1,/* dispose after use */
- cl_dead : 1;/* abandoned */
-
- struct rpc_rtt * cl_rtt; /* RTO estimator data */
- struct rpc_portmap * cl_pmap; /* port mapping */
-
- int cl_nodelen; /* nodename length */
- char cl_nodename[UNX_MAXNODENAME];
- char cl_pathname[30];/* Path in rpc_pipe_fs */
- struct vfsmount * cl_vfsmnt;
- struct dentry * cl_dentry; /* inode */
- struct rpc_clnt * cl_parent; /* Points to parent of clones */
- struct rpc_rtt cl_rtt_default;
- struct rpc_portmap cl_pmap_default;
- char cl_inline_name[32];
-};
-#define cl_timeout cl_xprt->timeout
-#define cl_prog cl_pmap->pm_prog
-#define cl_vers cl_pmap->pm_vers
-#define cl_port cl_pmap->pm_port
-#define cl_prot cl_pmap->pm_prot
-
-/*
- * General RPC program info
- */
-#define RPC_MAXVERSION 4
-struct rpc_program {
- char * name; /* protocol name */
- u32 number; /* program number */
- unsigned int nrvers; /* number of versions */
- struct rpc_version ** version; /* version array */
- struct rpc_stat * stats; /* statistics */
- char * pipe_dir_name; /* path to rpc_pipefs dir */
-};
-
-struct rpc_version {
- u32 number; /* version number */
- unsigned int nrprocs; /* number of procs */
- struct rpc_procinfo * procs; /* procedure array */
-};
-
-/*
- * Procedure information
- */
-struct rpc_procinfo {
- u32 p_proc; /* RPC procedure number */
- kxdrproc_t p_encode; /* XDR encode function */
- kxdrproc_t p_decode; /* XDR decode function */
- unsigned int p_bufsiz; /* req. buffer size */
- unsigned int p_count; /* call count */
- unsigned int p_timer; /* Which RTT timer to use */
- u32 p_statidx; /* Which procedure to account */
- char * p_name; /* name of procedure */
-};
-
-#define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt))
-#define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr)
-
-#ifdef __KERNEL__
-
-struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname,
- struct rpc_program *info,
- u32 version, rpc_authflavor_t authflavor);
-struct rpc_clnt *rpc_new_client(struct rpc_xprt *xprt, char *servname,
- struct rpc_program *info,
- u32 version, rpc_authflavor_t authflavor);
-struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
- struct rpc_program *, int);
-struct rpc_clnt *rpc_clone_client(struct rpc_clnt *);
-int rpc_shutdown_client(struct rpc_clnt *);
-int rpc_destroy_client(struct rpc_clnt *);
-void rpc_release_client(struct rpc_clnt *);
-void rpc_getport(struct rpc_task *, struct rpc_clnt *);
-int rpc_register(u32, u32, int, unsigned short, int *);
-
-void rpc_call_setup(struct rpc_task *, struct rpc_message *, int);
-
-int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg,
- int flags, const struct rpc_call_ops *tk_ops,
- void *calldata);
-int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg,
- int flags);
-void rpc_restart_call(struct rpc_task *);
-void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset);
-void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset);
-void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
-size_t rpc_max_payload(struct rpc_clnt *);
-void rpc_force_rebind(struct rpc_clnt *);
-int rpc_ping(struct rpc_clnt *clnt, int flags);
-
-/*
- * Helper function for NFSroot support
- */
-int rpc_getport_external(struct sockaddr_in *, __u32, __u32, int);
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SUNRPC_CLNT_H */
diff --git a/original/linux/sunrpc/debug.h b/original/linux/sunrpc/debug.h
deleted file mode 100644
index e4729aa..0000000
--- a/original/linux/sunrpc/debug.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * linux/include/linux/sunrpc/debug.h
- *
- * Debugging support for sunrpc module
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_DEBUG_H_
-#define _LINUX_SUNRPC_DEBUG_H_
-
-/*
- * RPC debug facilities
- */
-#define RPCDBG_XPRT 0x0001
-#define RPCDBG_CALL 0x0002
-#define RPCDBG_DEBUG 0x0004
-#define RPCDBG_NFS 0x0008
-#define RPCDBG_AUTH 0x0010
-#define RPCDBG_PMAP 0x0020
-#define RPCDBG_SCHED 0x0040
-#define RPCDBG_TRANS 0x0080
-#define RPCDBG_SVCSOCK 0x0100
-#define RPCDBG_SVCDSP 0x0200
-#define RPCDBG_MISC 0x0400
-#define RPCDBG_CACHE 0x0800
-#define RPCDBG_ALL 0x7fff
-
-#ifdef __KERNEL__
-
-#include <linux/timer.h>
-#include <linux/workqueue.h>
-
-/*
- * Enable RPC debugging/profiling.
- */
-#ifdef CONFIG_SYSCTL
-#define RPC_DEBUG
-#endif
-/* #define RPC_PROFILE */
-
-/*
- * Debugging macros etc
- */
-#ifdef RPC_DEBUG
-extern unsigned int rpc_debug;
-extern unsigned int nfs_debug;
-extern unsigned int nfsd_debug;
-extern unsigned int nlm_debug;
-#endif
-
-#define dprintk(args...) dfprintk(FACILITY, ## args)
-
-#undef ifdebug
-#ifdef RPC_DEBUG
-# define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac))
-# define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0)
-# define RPC_IFDEBUG(x) x
-#else
-# define ifdebug(fac) if (0)
-# define dfprintk(fac, args...) do ; while (0)
-# define RPC_IFDEBUG(x)
-#endif
-
-#ifdef RPC_PROFILE
-# define pprintk(args...) printk(## args)
-#else
-# define pprintk(args...) do ; while (0)
-#endif
-
-/*
- * Sysctl interface for RPC debugging
- */
-#ifdef RPC_DEBUG
-void rpc_register_sysctl(void);
-void rpc_unregister_sysctl(void);
-#endif
-
-#endif /* __KERNEL__ */
-
-/*
- * Declarations for the sysctl debug interface, which allows to read or
- * change the debug flags for rpc, nfs, nfsd, and lockd. Since the sunrpc
- * module currently registers its sysctl table dynamically, the sysctl path
- * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>.
- */
-#define CTL_SUNRPC 7249 /* arbitrary and hopefully unused */
-
-enum {
- CTL_RPCDEBUG = 1,
- CTL_NFSDEBUG,
- CTL_NFSDDEBUG,
- CTL_NLMDEBUG,
- CTL_SLOTTABLE_UDP,
- CTL_SLOTTABLE_TCP,
- CTL_MIN_RESVPORT,
- CTL_MAX_RESVPORT,
-};
-
-#endif /* _LINUX_SUNRPC_DEBUG_H_ */
diff --git a/original/linux/sunrpc/gss_api.h b/original/linux/sunrpc/gss_api.h
deleted file mode 100644
index 6e112cc..0000000
--- a/original/linux/sunrpc/gss_api.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * linux/include/linux/gss_api.h
- *
- * Somewhat simplified version of the gss api.
- *
- * Dug Song <dugsong@monkey.org>
- * Andy Adamson <andros@umich.edu>
- * Bruce Fields <bfields@umich.edu>
- * Copyright (c) 2000 The Regents of the University of Michigan
- *
- * $Id$
- */
-
-#ifndef _LINUX_SUNRPC_GSS_API_H
-#define _LINUX_SUNRPC_GSS_API_H
-
-#ifdef __KERNEL__
-#include <linux/sunrpc/xdr.h>
-#include <linux/uio.h>
-
-/* The mechanism-independent gss-api context: */
-struct gss_ctx {
- struct gss_api_mech *mech_type;
- void *internal_ctx_id;
-};
-
-#define GSS_C_NO_BUFFER ((struct xdr_netobj) 0)
-#define GSS_C_NO_CONTEXT ((struct gss_ctx *) 0)
-#define GSS_C_NULL_OID ((struct xdr_netobj) 0)
-
-/*XXX arbitrary length - is this set somewhere? */
-#define GSS_OID_MAX_LEN 32
-
-/* gss-api prototypes; note that these are somewhat simplified versions of
- * the prototypes specified in RFC 2744. */
-int gss_import_sec_context(
- const void* input_token,
- size_t bufsize,
- struct gss_api_mech *mech,
- struct gss_ctx **ctx_id);
-u32 gss_get_mic(
- struct gss_ctx *ctx_id,
- struct xdr_buf *message,
- struct xdr_netobj *mic_token);
-u32 gss_verify_mic(
- struct gss_ctx *ctx_id,
- struct xdr_buf *message,
- struct xdr_netobj *mic_token);
-u32 gss_wrap(
- struct gss_ctx *ctx_id,
- int offset,
- struct xdr_buf *outbuf,
- struct page **inpages);
-u32 gss_unwrap(
- struct gss_ctx *ctx_id,
- int offset,
- struct xdr_buf *inbuf);
-u32 gss_delete_sec_context(
- struct gss_ctx **ctx_id);
-
-u32 gss_pseudoflavor_to_service(struct gss_api_mech *, u32 pseudoflavor);
-char *gss_service_to_auth_domain_name(struct gss_api_mech *, u32 service);
-
-struct pf_desc {
- u32 pseudoflavor;
- u32 service;
- char *name;
- char *auth_domain_name;
-};
-
-/* Different mechanisms (e.g., krb5 or spkm3) may implement gss-api, and
- * mechanisms may be dynamically registered or unregistered by modules. */
-
-/* Each mechanism is described by the following struct: */
-struct gss_api_mech {
- struct list_head gm_list;
- struct module *gm_owner;
- struct xdr_netobj gm_oid;
- char *gm_name;
- struct gss_api_ops *gm_ops;
- /* pseudoflavors supported by this mechanism: */
- int gm_pf_num;
- struct pf_desc * gm_pfs;
-};
-
-/* and must provide the following operations: */
-struct gss_api_ops {
- int (*gss_import_sec_context)(
- const void *input_token,
- size_t bufsize,
- struct gss_ctx *ctx_id);
- u32 (*gss_get_mic)(
- struct gss_ctx *ctx_id,
- struct xdr_buf *message,
- struct xdr_netobj *mic_token);
- u32 (*gss_verify_mic)(
- struct gss_ctx *ctx_id,
- struct xdr_buf *message,
- struct xdr_netobj *mic_token);
- u32 (*gss_wrap)(
- struct gss_ctx *ctx_id,
- int offset,
- struct xdr_buf *outbuf,
- struct page **inpages);
- u32 (*gss_unwrap)(
- struct gss_ctx *ctx_id,
- int offset,
- struct xdr_buf *buf);
- void (*gss_delete_sec_context)(
- void *internal_ctx_id);
-};
-
-int gss_mech_register(struct gss_api_mech *);
-void gss_mech_unregister(struct gss_api_mech *);
-
-/* returns a mechanism descriptor given an OID, and increments the mechanism's
- * reference count. */
-struct gss_api_mech * gss_mech_get_by_OID(struct xdr_netobj *);
-
-/* Returns a reference to a mechanism, given a name like "krb5" etc. */
-struct gss_api_mech *gss_mech_get_by_name(const char *);
-
-/* Similar, but get by pseudoflavor. */
-struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32);
-
-/* Just increments the mechanism's reference count and returns its input: */
-struct gss_api_mech * gss_mech_get(struct gss_api_mech *);
-
-/* For every successful gss_mech_get or gss_mech_get_by_* call there must be a
- * corresponding call to gss_mech_put. */
-void gss_mech_put(struct gss_api_mech *);
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SUNRPC_GSS_API_H */
-
diff --git a/original/linux/sunrpc/gss_asn1.h b/original/linux/sunrpc/gss_asn1.h
deleted file mode 100644
index 3ccecd0..0000000
--- a/original/linux/sunrpc/gss_asn1.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * linux/include/linux/sunrpc/gss_asn1.h
- *
- * minimal asn1 for generic encoding/decoding of gss tokens
- *
- * Adapted from MIT Kerberos 5-1.2.1 lib/include/krb5.h,
- * lib/gssapi/krb5/gssapiP_krb5.h, and others
- *
- * Copyright (c) 2000 The Regents of the University of Michigan.
- * All rights reserved.
- *
- * Andy Adamson <andros@umich.edu>
- */
-
-/*
- * Copyright 1995 by the Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- * require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- *
- */
-
-
-#include <linux/sunrpc/gss_api.h>
-
-#define SIZEOF_INT 4
-
-/* from gssapi_err_generic.h */
-#define G_BAD_SERVICE_NAME (-2045022976L)
-#define G_BAD_STRING_UID (-2045022975L)
-#define G_NOUSER (-2045022974L)
-#define G_VALIDATE_FAILED (-2045022973L)
-#define G_BUFFER_ALLOC (-2045022972L)
-#define G_BAD_MSG_CTX (-2045022971L)
-#define G_WRONG_SIZE (-2045022970L)
-#define G_BAD_USAGE (-2045022969L)
-#define G_UNKNOWN_QOP (-2045022968L)
-#define G_NO_HOSTNAME (-2045022967L)
-#define G_BAD_HOSTNAME (-2045022966L)
-#define G_WRONG_MECH (-2045022965L)
-#define G_BAD_TOK_HEADER (-2045022964L)
-#define G_BAD_DIRECTION (-2045022963L)
-#define G_TOK_TRUNC (-2045022962L)
-#define G_REFLECT (-2045022961L)
-#define G_WRONG_TOKID (-2045022960L)
-
-#define g_OID_equal(o1,o2) \
- (((o1)->len == (o2)->len) && \
- (memcmp((o1)->data,(o2)->data,(int) (o1)->len) == 0))
-
-u32 g_verify_token_header(
- struct xdr_netobj *mech,
- int *body_size,
- unsigned char **buf_in,
- int toksize);
-
-int g_token_size(
- struct xdr_netobj *mech,
- unsigned int body_size);
-
-void g_make_token_header(
- struct xdr_netobj *mech,
- int body_size,
- unsigned char **buf);
diff --git a/original/linux/sunrpc/gss_err.h b/original/linux/sunrpc/gss_err.h
deleted file mode 100644
index a680786..0000000
--- a/original/linux/sunrpc/gss_err.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * linux/include/sunrpc/gss_err.h
- *
- * Adapted from MIT Kerberos 5-1.2.1 include/gssapi/gssapi.h
- *
- * Copyright (c) 2002 The Regents of the University of Michigan.
- * All rights reserved.
- *
- * Andy Adamson <andros@umich.edu>
- */
-
-/*
- * Copyright 1993 by OpenVision Technologies, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appears in all copies and
- * that both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of OpenVision not be used
- * in advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. OpenVision makes no
- * representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied warranty.
- *
- * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
- * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _LINUX_SUNRPC_GSS_ERR_H
-#define _LINUX_SUNRPC_GSS_ERR_H
-
-#ifdef __KERNEL__
-
-typedef unsigned int OM_uint32;
-
-/*
- * Flag bits for context-level services.
- */
-#define GSS_C_DELEG_FLAG 1
-#define GSS_C_MUTUAL_FLAG 2
-#define GSS_C_REPLAY_FLAG 4
-#define GSS_C_SEQUENCE_FLAG 8
-#define GSS_C_CONF_FLAG 16
-#define GSS_C_INTEG_FLAG 32
-#define GSS_C_ANON_FLAG 64
-#define GSS_C_PROT_READY_FLAG 128
-#define GSS_C_TRANS_FLAG 256
-
-/*
- * Credential usage options
- */
-#define GSS_C_BOTH 0
-#define GSS_C_INITIATE 1
-#define GSS_C_ACCEPT 2
-
-/*
- * Status code types for gss_display_status
- */
-#define GSS_C_GSS_CODE 1
-#define GSS_C_MECH_CODE 2
-
-
-/*
- * Expiration time of 2^32-1 seconds means infinite lifetime for a
- * credential or security context
- */
-#define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful)
-
-
-/* Major status codes */
-
-#define GSS_S_COMPLETE 0
-
-/*
- * Some "helper" definitions to make the status code macros obvious.
- */
-#define GSS_C_CALLING_ERROR_OFFSET 24
-#define GSS_C_ROUTINE_ERROR_OFFSET 16
-#define GSS_C_SUPPLEMENTARY_OFFSET 0
-#define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul)
-#define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul)
-#define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul)
-
-/*
- * The macros that test status codes for error conditions. Note that the
- * GSS_ERROR() macro has changed slightly from the V1 GSSAPI so that it now
- * evaluates its argument only once.
- */
-#define GSS_CALLING_ERROR(x) \
- ((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
-#define GSS_ROUTINE_ERROR(x) \
- ((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
-#define GSS_SUPPLEMENTARY_INFO(x) \
- ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
-#define GSS_ERROR(x) \
- ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
- (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
-
-/*
- * Now the actual status code definitions
- */
-
-/*
- * Calling errors:
- */
-#define GSS_S_CALL_INACCESSIBLE_READ \
- (((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET)
-#define GSS_S_CALL_INACCESSIBLE_WRITE \
- (((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET)
-#define GSS_S_CALL_BAD_STRUCTURE \
- (((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET)
-
-/*
- * Routine errors:
- */
-#define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_DEFECTIVE_CREDENTIAL \
- (((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_CREDENTIALS_EXPIRED \
- (((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_CONTEXT_EXPIRED \
- (((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_DUPLICATE_ELEMENT \
- (((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-#define GSS_S_NAME_NOT_MN \
- (((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET)
-
-/*
- * Supplementary info bits:
- */
-#define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
-#define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
-#define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
-#define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
-#define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
-
-/* XXXX these are not part of the GSSAPI C bindings! (but should be) */
-
-#define GSS_CALLING_ERROR_FIELD(x) \
- (((x) >> GSS_C_CALLING_ERROR_OFFSET) & GSS_C_CALLING_ERROR_MASK)
-#define GSS_ROUTINE_ERROR_FIELD(x) \
- (((x) >> GSS_C_ROUTINE_ERROR_OFFSET) & GSS_C_ROUTINE_ERROR_MASK)
-#define GSS_SUPPLEMENTARY_INFO_FIELD(x) \
- (((x) >> GSS_C_SUPPLEMENTARY_OFFSET) & GSS_C_SUPPLEMENTARY_MASK)
-
-/* XXXX This is a necessary evil until the spec is fixed */
-#define GSS_S_CRED_UNAVAIL GSS_S_FAILURE
-
-#endif /* __KERNEL__ */
-#endif /* __LINUX_SUNRPC_GSS_ERR_H */
diff --git a/original/linux/sunrpc/msg_prot.h b/original/linux/sunrpc/msg_prot.h
deleted file mode 100644
index f43f237..0000000
--- a/original/linux/sunrpc/msg_prot.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * linux/include/net/sunrpc/msg_prot.h
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_MSGPROT_H_
-#define _LINUX_SUNRPC_MSGPROT_H_
-
-#ifdef __KERNEL__ /* user programs should get these from the rpc header files */
-
-#define RPC_VERSION 2
-
-/* spec defines authentication flavor as an unsigned 32 bit integer */
-typedef u32 rpc_authflavor_t;
-
-enum rpc_auth_flavors {
- RPC_AUTH_NULL = 0,
- RPC_AUTH_UNIX = 1,
- RPC_AUTH_SHORT = 2,
- RPC_AUTH_DES = 3,
- RPC_AUTH_KRB = 4,
- RPC_AUTH_GSS = 6,
- RPC_AUTH_MAXFLAVOR = 8,
- /* pseudoflavors: */
- RPC_AUTH_GSS_KRB5 = 390003,
- RPC_AUTH_GSS_KRB5I = 390004,
- RPC_AUTH_GSS_KRB5P = 390005,
- RPC_AUTH_GSS_LKEY = 390006,
- RPC_AUTH_GSS_LKEYI = 390007,
- RPC_AUTH_GSS_LKEYP = 390008,
- RPC_AUTH_GSS_SPKM = 390009,
- RPC_AUTH_GSS_SPKMI = 390010,
- RPC_AUTH_GSS_SPKMP = 390011,
-};
-
-enum rpc_msg_type {
- RPC_CALL = 0,
- RPC_REPLY = 1
-};
-
-enum rpc_reply_stat {
- RPC_MSG_ACCEPTED = 0,
- RPC_MSG_DENIED = 1
-};
-
-enum rpc_accept_stat {
- RPC_SUCCESS = 0,
- RPC_PROG_UNAVAIL = 1,
- RPC_PROG_MISMATCH = 2,
- RPC_PROC_UNAVAIL = 3,
- RPC_GARBAGE_ARGS = 4,
- RPC_SYSTEM_ERR = 5
-};
-
-enum rpc_reject_stat {
- RPC_MISMATCH = 0,
- RPC_AUTH_ERROR = 1
-};
-
-enum rpc_auth_stat {
- RPC_AUTH_OK = 0,
- RPC_AUTH_BADCRED = 1,
- RPC_AUTH_REJECTEDCRED = 2,
- RPC_AUTH_BADVERF = 3,
- RPC_AUTH_REJECTEDVERF = 4,
- RPC_AUTH_TOOWEAK = 5,
- /* RPCSEC_GSS errors */
- RPCSEC_GSS_CREDPROBLEM = 13,
- RPCSEC_GSS_CTXPROBLEM = 14
-};
-
-#define RPC_PMAP_PROGRAM 100000
-#define RPC_PMAP_VERSION 2
-#define RPC_PMAP_PORT 111
-
-#define RPC_MAXNETNAMELEN 256
-
-/*
- * From RFC 1831:
- *
- * "A record is composed of one or more record fragments. A record
- * fragment is a four-byte header followed by 0 to (2**31) - 1 bytes of
- * fragment data. The bytes encode an unsigned binary number; as with
- * XDR integers, the byte order is from highest to lowest. The number
- * encodes two values -- a boolean which indicates whether the fragment
- * is the last fragment of the record (bit value 1 implies the fragment
- * is the last fragment) and a 31-bit unsigned binary value which is the
- * length in bytes of the fragment's data. The boolean value is the
- * highest-order bit of the header; the length is the 31 low-order bits.
- * (Note that this record specification is NOT in XDR standard form!)"
- *
- * The Linux RPC client always sends its requests in a single record
- * fragment, limiting the maximum payload size for stream transports to
- * 2GB.
- */
-
-typedef u32 rpc_fraghdr;
-
-#define RPC_LAST_STREAM_FRAGMENT (1U << 31)
-#define RPC_FRAGMENT_SIZE_MASK (~RPC_LAST_STREAM_FRAGMENT)
-#define RPC_MAX_FRAGMENT_SIZE ((1U << 31) - 1)
-
-#endif /* __KERNEL__ */
-#endif /* _LINUX_SUNRPC_MSGPROT_H_ */
diff --git a/original/linux/sunrpc/sched.h b/original/linux/sunrpc/sched.h
deleted file mode 100644
index 82a91bb..0000000
--- a/original/linux/sunrpc/sched.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * linux/include/linux/sunrpc/sched.h
- *
- * Scheduling primitives for kernel Sun RPC.
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_SCHED_H_
-#define _LINUX_SUNRPC_SCHED_H_
-
-#include <linux/timer.h>
-#include <linux/sunrpc/types.h>
-#include <linux/spinlock.h>
-#include <linux/wait.h>
-#include <linux/workqueue.h>
-#include <linux/sunrpc/xdr.h>
-
-/*
- * This is the actual RPC procedure call info.
- */
-struct rpc_procinfo;
-struct rpc_message {
- struct rpc_procinfo * rpc_proc; /* Procedure information */
- void * rpc_argp; /* Arguments */
- void * rpc_resp; /* Result */
- struct rpc_cred * rpc_cred; /* Credentials */
-};
-
-struct rpc_call_ops;
-struct rpc_wait_queue;
-struct rpc_wait {
- struct list_head list; /* wait queue links */
- struct list_head links; /* Links to related tasks */
- struct rpc_wait_queue * rpc_waitq; /* RPC wait queue we're on */
-};
-
-/*
- * This is the RPC task struct
- */
-struct rpc_task {
-#ifdef RPC_DEBUG
- unsigned long tk_magic; /* 0xf00baa */
-#endif
- atomic_t tk_count; /* Reference count */
- struct list_head tk_task; /* global list of tasks */
- struct rpc_clnt * tk_client; /* RPC client */
- struct rpc_rqst * tk_rqstp; /* RPC request */
- int tk_status; /* result of last operation */
-
- /*
- * RPC call state
- */
- struct rpc_message tk_msg; /* RPC call info */
- __u8 tk_garb_retry;
- __u8 tk_cred_retry;
-
- unsigned long tk_cookie; /* Cookie for batching tasks */
-
- /*
- * timeout_fn to be executed by timer bottom half
- * callback to be executed after waking up
- * action next procedure for async tasks
- * tk_ops caller callbacks
- */
- void (*tk_timeout_fn)(struct rpc_task *);
- void (*tk_callback)(struct rpc_task *);
- void (*tk_action)(struct rpc_task *);
- const struct rpc_call_ops *tk_ops;
- void * tk_calldata;
-
- /*
- * tk_timer is used for async processing by the RPC scheduling
- * primitives. You should not access this directly unless
- * you have a pathological interest in kernel oopses.
- */
- struct timer_list tk_timer; /* kernel timer */
- unsigned long tk_timeout; /* timeout for rpc_sleep() */
- unsigned short tk_flags; /* misc flags */
- unsigned char tk_priority : 2;/* Task priority */
- unsigned long tk_runstate; /* Task run status */
- struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could
- * be any workqueue
- */
- union {
- struct work_struct tk_work; /* Async task work queue */
- struct rpc_wait tk_wait; /* RPC wait */
- } u;
-
- unsigned short tk_timeouts; /* maj timeouts */
- size_t tk_bytes_sent; /* total bytes sent */
- unsigned long tk_start; /* RPC task init timestamp */
- long tk_rtt; /* round-trip time (jiffies) */
-
-#ifdef RPC_DEBUG
- unsigned short tk_pid; /* debugging aid */
-#endif
-};
-#define tk_auth tk_client->cl_auth
-#define tk_xprt tk_client->cl_xprt
-
-/* support walking a list of tasks on a wait queue */
-#define task_for_each(task, pos, head) \
- list_for_each(pos, head) \
- if ((task=list_entry(pos, struct rpc_task, u.tk_wait.list)),1)
-
-#define task_for_first(task, head) \
- if (!list_empty(head) && \
- ((task=list_entry((head)->next, struct rpc_task, u.tk_wait.list)),1))
-
-/* .. and walking list of all tasks */
-#define alltask_for_each(task, pos, head) \
- list_for_each(pos, head) \
- if ((task=list_entry(pos, struct rpc_task, tk_task)),1)
-
-typedef void (*rpc_action)(struct rpc_task *);
-
-struct rpc_call_ops {
- void (*rpc_call_prepare)(struct rpc_task *, void *);
- void (*rpc_call_done)(struct rpc_task *, void *);
- void (*rpc_release)(void *);
-};
-
-
-/*
- * RPC task flags
- */
-#define RPC_TASK_ASYNC 0x0001 /* is an async task */
-#define RPC_TASK_SWAPPER 0x0002 /* is swapping in/out */
-#define RPC_TASK_CHILD 0x0008 /* is child of other task */
-#define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */
-#define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */
-#define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */
-#define RPC_TASK_KILLED 0x0100 /* task was killed */
-#define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */
-#define RPC_TASK_NOINTR 0x0400 /* uninterruptible task */
-
-#define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
-#define RPC_IS_CHILD(t) ((t)->tk_flags & RPC_TASK_CHILD)
-#define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER)
-#define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS)
-#define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED)
-#define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL)
-#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT)
-#define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR)
-
-#define RPC_TASK_RUNNING 0
-#define RPC_TASK_QUEUED 1
-#define RPC_TASK_WAKEUP 2
-#define RPC_TASK_HAS_TIMER 3
-#define RPC_TASK_ACTIVE 4
-
-#define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
-#define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
-#define rpc_test_and_set_running(t) \
- (test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate))
-#define rpc_clear_running(t) \
- do { \
- smp_mb__before_clear_bit(); \
- clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \
- smp_mb__after_clear_bit(); \
- } while (0)
-
-#define RPC_IS_QUEUED(t) (test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
-#define rpc_set_queued(t) (set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate))
-#define rpc_clear_queued(t) \
- do { \
- smp_mb__before_clear_bit(); \
- clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \
- smp_mb__after_clear_bit(); \
- } while (0)
-
-#define rpc_start_wakeup(t) \
- (test_and_set_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate) == 0)
-#define rpc_finish_wakeup(t) \
- do { \
- smp_mb__before_clear_bit(); \
- clear_bit(RPC_TASK_WAKEUP, &(t)->tk_runstate); \
- smp_mb__after_clear_bit(); \
- } while (0)
-
-#define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
-#define rpc_set_active(t) (set_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate))
-#define rpc_clear_active(t) \
- do { \
- smp_mb__before_clear_bit(); \
- clear_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate); \
- smp_mb__after_clear_bit(); \
- } while(0)
-
-/*
- * Task priorities.
- * Note: if you change these, you must also change
- * the task initialization definitions below.
- */
-#define RPC_PRIORITY_LOW 0
-#define RPC_PRIORITY_NORMAL 1
-#define RPC_PRIORITY_HIGH 2
-#define RPC_NR_PRIORITY (RPC_PRIORITY_HIGH+1)
-
-/*
- * RPC synchronization objects
- */
-struct rpc_wait_queue {
- spinlock_t lock;
- struct list_head tasks[RPC_NR_PRIORITY]; /* task queue for each priority level */
- unsigned long cookie; /* cookie of last task serviced */
- unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */
- unsigned char priority; /* current priority */
- unsigned char count; /* # task groups remaining serviced so far */
- unsigned char nr; /* # tasks remaining for cookie */
- unsigned short qlen; /* total # tasks waiting in queue */
-#ifdef RPC_DEBUG
- const char * name;
-#endif
-};
-
-/*
- * This is the # requests to send consecutively
- * from a single cookie. The aim is to improve
- * performance of NFS operations such as read/write.
- */
-#define RPC_BATCH_COUNT 16
-
-#ifndef RPC_DEBUG
-# define RPC_WAITQ_INIT(var,qname) { \
- .lock = SPIN_LOCK_UNLOCKED, \
- .tasks = { \
- [0] = LIST_HEAD_INIT(var.tasks[0]), \
- [1] = LIST_HEAD_INIT(var.tasks[1]), \
- [2] = LIST_HEAD_INIT(var.tasks[2]), \
- }, \
- }
-#else
-# define RPC_WAITQ_INIT(var,qname) { \
- .lock = SPIN_LOCK_UNLOCKED, \
- .tasks = { \
- [0] = LIST_HEAD_INIT(var.tasks[0]), \
- [1] = LIST_HEAD_INIT(var.tasks[1]), \
- [2] = LIST_HEAD_INIT(var.tasks[2]), \
- }, \
- .name = qname, \
- }
-#endif
-# define RPC_WAITQ(var,qname) struct rpc_wait_queue var = RPC_WAITQ_INIT(var,qname)
-
-#define RPC_IS_PRIORITY(q) ((q)->maxpriority > 0)
-
-/*
- * Function prototypes
- */
-struct rpc_task *rpc_new_task(struct rpc_clnt *, int flags,
- const struct rpc_call_ops *ops, void *data);
-struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags,
- const struct rpc_call_ops *ops, void *data);
-struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent);
-void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt,
- int flags, const struct rpc_call_ops *ops,
- void *data);
-void rpc_release_task(struct rpc_task *);
-void rpc_exit_task(struct rpc_task *);
-void rpc_killall_tasks(struct rpc_clnt *);
-int rpc_execute(struct rpc_task *);
-void rpc_run_child(struct rpc_task *parent, struct rpc_task *child,
- rpc_action action);
-void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *);
-void rpc_init_wait_queue(struct rpc_wait_queue *, const char *);
-void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *,
- rpc_action action, rpc_action timer);
-void rpc_wake_up_task(struct rpc_task *);
-void rpc_wake_up(struct rpc_wait_queue *);
-struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
-void rpc_wake_up_status(struct rpc_wait_queue *, int);
-void rpc_delay(struct rpc_task *, unsigned long);
-void * rpc_malloc(struct rpc_task *, size_t);
-void rpc_free(struct rpc_task *);
-int rpciod_up(void);
-void rpciod_down(void);
-int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *));
-#ifdef RPC_DEBUG
-void rpc_show_tasks(void);
-#endif
-int rpc_init_mempool(void);
-void rpc_destroy_mempool(void);
-extern struct workqueue_struct *rpciod_workqueue;
-
-static inline void rpc_exit(struct rpc_task *task, int status)
-{
- task->tk_status = status;
- task->tk_action = rpc_exit_task;
-}
-
-static inline int rpc_wait_for_completion_task(struct rpc_task *task)
-{
- return __rpc_wait_for_completion_task(task, NULL);
-}
-
-#ifdef RPC_DEBUG
-static inline const char * rpc_qname(struct rpc_wait_queue *q)
-{
- return ((q && q->name) ? q->name : "unknown");
-}
-#endif
-
-#endif /* _LINUX_SUNRPC_SCHED_H_ */
diff --git a/original/linux/sunrpc/stats.h b/original/linux/sunrpc/stats.h
deleted file mode 100644
index 5fa0f20..0000000
--- a/original/linux/sunrpc/stats.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * linux/include/linux/sunrpc/stats.h
- *
- * Client statistics collection for SUN RPC
- *
- * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_STATS_H
-#define _LINUX_SUNRPC_STATS_H
-
-#include <linux/proc_fs.h>
-
-struct rpc_stat {
- struct rpc_program * program;
-
- unsigned int netcnt,
- netudpcnt,
- nettcpcnt,
- nettcpconn,
- netreconn;
- unsigned int rpccnt,
- rpcretrans,
- rpcauthrefresh,
- rpcgarbage;
-};
-
-struct svc_stat {
- struct svc_program * program;
-
- unsigned int netcnt,
- netudpcnt,
- nettcpcnt,
- nettcpconn;
- unsigned int rpccnt,
- rpcbadfmt,
- rpcbadauth,
- rpcbadclnt;
-};
-
-void rpc_proc_init(void);
-void rpc_proc_exit(void);
-#ifdef MODULE
-void rpc_modcount(struct inode *, int);
-#endif
-
-#ifdef CONFIG_PROC_FS
-struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
-void rpc_proc_unregister(const char *);
-void rpc_proc_zero(struct rpc_program *);
-struct proc_dir_entry * svc_proc_register(struct svc_stat *,
- const struct file_operations *);
-void svc_proc_unregister(const char *);
-
-void svc_seq_show(struct seq_file *,
- const struct svc_stat *);
-
-extern struct proc_dir_entry *proc_net_rpc;
-
-#else
-
-static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; }
-static inline void rpc_proc_unregister(const char *p) {}
-static inline void rpc_proc_zero(struct rpc_program *p) {}
-
-static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
- const struct file_operations *f) { return NULL; }
-static inline void svc_proc_unregister(const char *p) {}
-
-static inline void svc_seq_show(struct seq_file *seq,
- const struct svc_stat *st) {}
-
-#define proc_net_rpc NULL
-
-#endif
-
-#endif /* _LINUX_SUNRPC_STATS_H */
diff --git a/original/linux/sunrpc/svc.h b/original/linux/sunrpc/svc.h
deleted file mode 100644
index 7b27c09..0000000
--- a/original/linux/sunrpc/svc.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * linux/include/linux/sunrpc/svc.h
- *
- * RPC server declarations.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-
-#ifndef SUNRPC_SVC_H
-#define SUNRPC_SVC_H
-
-#include <linux/in.h>
-#include <linux/sunrpc/types.h>
-#include <linux/sunrpc/xdr.h>
-#include <linux/sunrpc/svcauth.h>
-#include <linux/wait.h>
-#include <linux/mm.h>
-
-/*
- * RPC service.
- *
- * An RPC service is a ``daemon,'' possibly multithreaded, which
- * receives and processes incoming RPC messages.
- * It has one or more transport sockets associated with it, and maintains
- * a list of idle threads waiting for input.
- *
- * We currently do not support more than one RPC program per daemon.
- */
-struct svc_serv {
- struct list_head sv_threads; /* idle server threads */
- struct list_head sv_sockets; /* pending sockets */
- struct svc_program * sv_program; /* RPC program */
- struct svc_stat * sv_stats; /* RPC statistics */
- spinlock_t sv_lock;
- unsigned int sv_nrthreads; /* # of server threads */
- unsigned int sv_bufsz; /* datagram buffer size */
- unsigned int sv_xdrsize; /* XDR buffer size */
-
- struct list_head sv_permsocks; /* all permanent sockets */
- struct list_head sv_tempsocks; /* all temporary sockets */
- int sv_tmpcnt; /* count of temporary sockets */
-
- char * sv_name; /* service name */
-};
-
-/*
- * Maximum payload size supported by a kernel RPC server.
- * This is use to determine the max number of pages nfsd is
- * willing to return in a single READ operation.
- */
-#define RPCSVC_MAXPAYLOAD (64*1024u)
-
-/*
- * RPC Requsts and replies are stored in one or more pages.
- * We maintain an array of pages for each server thread.
- * Requests are copied into these pages as they arrive. Remaining
- * pages are available to write the reply into.
- *
- * Pages are sent using ->sendpage so each server thread needs to
- * allocate more to replace those used in sending. To help keep track
- * of these pages we have a receive list where all pages initialy live,
- * and a send list where pages are moved to when there are to be part
- * of a reply.
- *
- * We use xdr_buf for holding responses as it fits well with NFS
- * read responses (that have a header, and some data pages, and possibly
- * a tail) and means we can share some client side routines.
- *
- * The xdr_buf.head kvec always points to the first page in the rq_*pages
- * list. The xdr_buf.pages pointer points to the second page on that
- * list. xdr_buf.tail points to the end of the first page.
- * This assumes that the non-page part of an rpc reply will fit
- * in a page - NFSd ensures this. lockd also has no trouble.
- *
- * Each request/reply pair can have at most one "payload", plus two pages,
- * one for the request, and one for the reply.
- */
-#define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 2)
-
-static inline u32 svc_getu32(struct kvec *iov)
-{
- u32 val, *vp;
- vp = iov->iov_base;
- val = *vp++;
- iov->iov_base = (void*)vp;
- iov->iov_len -= sizeof(u32);
- return val;
-}
-
-static inline void svc_ungetu32(struct kvec *iov)
-{
- u32 *vp = (u32 *)iov->iov_base;
- iov->iov_base = (void *)(vp - 1);
- iov->iov_len += sizeof(*vp);
-}
-
-static inline void svc_putu32(struct kvec *iov, u32 val)
-{
- u32 *vp = iov->iov_base + iov->iov_len;
- *vp = val;
- iov->iov_len += sizeof(u32);
-}
-
-
-/*
- * The context of a single thread, including the request currently being
- * processed.
- * NOTE: First two items must be prev/next.
- */
-struct svc_rqst {
- struct list_head rq_list; /* idle list */
- struct svc_sock * rq_sock; /* socket */
- struct sockaddr_in rq_addr; /* peer address */
- int rq_addrlen;
-
- struct svc_serv * rq_server; /* RPC service definition */
- struct svc_procedure * rq_procinfo; /* procedure info */
- struct auth_ops * rq_authop; /* authentication flavour */
- struct svc_cred rq_cred; /* auth info */
- struct sk_buff * rq_skbuff; /* fast recv inet buffer */
- struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */
-
- struct xdr_buf rq_arg;
- struct xdr_buf rq_res;
- struct page * rq_argpages[RPCSVC_MAXPAGES];
- struct page * rq_respages[RPCSVC_MAXPAGES];
- int rq_restailpage;
- short rq_argused; /* pages used for argument */
- short rq_arghi; /* pages available in argument page list */
- short rq_resused; /* pages used for result */
-
- u32 rq_xid; /* transmission id */
- u32 rq_prog; /* program number */
- u32 rq_vers; /* program version */
- u32 rq_proc; /* procedure number */
- u32 rq_prot; /* IP protocol */
- unsigned short
- rq_secure : 1; /* secure port */
-
-
- __u32 rq_daddr; /* dest addr of request - reply from here */
-
- void * rq_argp; /* decoded arguments */
- void * rq_resp; /* xdr'd results */
- void * rq_auth_data; /* flavor-specific data */
-
- int rq_reserved; /* space on socket outq
- * reserved for this request
- */
-
- struct cache_req rq_chandle; /* handle passed to caches for
- * request delaying
- */
- /* Catering to nfsd */
- struct auth_domain * rq_client; /* RPC peer info */
- struct svc_cacherep * rq_cacherep; /* cache info */
- struct knfsd_fh * rq_reffh; /* Referrence filehandle, used to
- * determine what device number
- * to report (real or virtual)
- */
- int rq_sendfile_ok; /* turned off in gss privacy
- * to prevent encrypting page
- * cache pages */
- wait_queue_head_t rq_wait; /* synchronization */
-};
-
-/*
- * Check buffer bounds after decoding arguments
- */
-static inline int
-xdr_argsize_check(struct svc_rqst *rqstp, u32 *p)
-{
- char *cp = (char *)p;
- struct kvec *vec = &rqstp->rq_arg.head[0];
- return cp >= (char*)vec->iov_base
- && cp <= (char*)vec->iov_base + vec->iov_len;
-}
-
-static inline int
-xdr_ressize_check(struct svc_rqst *rqstp, u32 *p)
-{
- struct kvec *vec = &rqstp->rq_res.head[0];
- char *cp = (char*)p;
-
- vec->iov_len = cp - (char*)vec->iov_base;
-
- return vec->iov_len <= PAGE_SIZE;
-}
-
-static inline struct page *
-svc_take_res_page(struct svc_rqst *rqstp)
-{
- if (rqstp->rq_arghi <= rqstp->rq_argused)
- return NULL;
- rqstp->rq_arghi--;
- rqstp->rq_respages[rqstp->rq_resused] =
- rqstp->rq_argpages[rqstp->rq_arghi];
- return rqstp->rq_respages[rqstp->rq_resused++];
-}
-
-static inline void svc_take_page(struct svc_rqst *rqstp)
-{
- if (rqstp->rq_arghi <= rqstp->rq_argused) {
- WARN_ON(1);
- return;
- }
- rqstp->rq_arghi--;
- rqstp->rq_respages[rqstp->rq_resused] =
- rqstp->rq_argpages[rqstp->rq_arghi];
- rqstp->rq_resused++;
-}
-
-static inline void svc_pushback_allpages(struct svc_rqst *rqstp)
-{
- while (rqstp->rq_resused) {
- if (rqstp->rq_respages[--rqstp->rq_resused] == NULL)
- continue;
- rqstp->rq_argpages[rqstp->rq_arghi++] =
- rqstp->rq_respages[rqstp->rq_resused];
- rqstp->rq_respages[rqstp->rq_resused] = NULL;
- }
-}
-
-static inline void svc_pushback_unused_pages(struct svc_rqst *rqstp)
-{
- while (rqstp->rq_resused &&
- rqstp->rq_res.pages != &rqstp->rq_respages[rqstp->rq_resused]) {
-
- if (rqstp->rq_respages[--rqstp->rq_resused] != NULL) {
- rqstp->rq_argpages[rqstp->rq_arghi++] =
- rqstp->rq_respages[rqstp->rq_resused];
- rqstp->rq_respages[rqstp->rq_resused] = NULL;
- }
- }
-}
-
-static inline void svc_free_allpages(struct svc_rqst *rqstp)
-{
- while (rqstp->rq_resused) {
- if (rqstp->rq_respages[--rqstp->rq_resused] == NULL)
- continue;
- put_page(rqstp->rq_respages[rqstp->rq_resused]);
- rqstp->rq_respages[rqstp->rq_resused] = NULL;
- }
-}
-
-struct svc_deferred_req {
- u32 prot; /* protocol (UDP or TCP) */
- struct sockaddr_in addr;
- struct svc_sock *svsk; /* where reply must go */
- u32 daddr; /* where reply must come from */
- struct cache_deferred_req handle;
- int argslen;
- u32 args[0];
-};
-
-/*
- * List of RPC programs on the same transport endpoint
- */
-struct svc_program {
- struct svc_program * pg_next; /* other programs (same xprt) */
- u32 pg_prog; /* program number */
- unsigned int pg_lovers; /* lowest version */
- unsigned int pg_hivers; /* lowest version */
- unsigned int pg_nvers; /* number of versions */
- struct svc_version ** pg_vers; /* version array */
- char * pg_name; /* service name */
- char * pg_class; /* class name: services sharing authentication */
- struct svc_stat * pg_stats; /* rpc statistics */
- int (*pg_authenticate)(struct svc_rqst *);
-};
-
-/*
- * RPC program version
- */
-struct svc_version {
- u32 vs_vers; /* version number */
- u32 vs_nproc; /* number of procedures */
- struct svc_procedure * vs_proc; /* per-procedure info */
- u32 vs_xdrsize; /* xdrsize needed for this version */
-
- /* Override dispatch function (e.g. when caching replies).
- * A return value of 0 means drop the request.
- * vs_dispatch == NULL means use default dispatcher.
- */
- int (*vs_dispatch)(struct svc_rqst *, u32 *);
-};
-
-/*
- * RPC procedure info
- */
-typedef int (*svc_procfunc)(struct svc_rqst *, void *argp, void *resp);
-struct svc_procedure {
- svc_procfunc pc_func; /* process the request */
- kxdrproc_t pc_decode; /* XDR decode args */
- kxdrproc_t pc_encode; /* XDR encode result */
- kxdrproc_t pc_release; /* XDR free result */
- unsigned int pc_argsize; /* argument struct size */
- unsigned int pc_ressize; /* result struct size */
- unsigned int pc_count; /* call count */
- unsigned int pc_cachetype; /* cache info (NFS) */
- unsigned int pc_xdrressize; /* maximum size of XDR reply */
-};
-
-/*
- * This is the RPC server thread function prototype
- */
-typedef void (*svc_thread_fn)(struct svc_rqst *);
-
-/*
- * Function prototypes.
- */
-struct svc_serv * svc_create(struct svc_program *, unsigned int);
-int svc_create_thread(svc_thread_fn, struct svc_serv *);
-void svc_exit_thread(struct svc_rqst *);
-void svc_destroy(struct svc_serv *);
-int svc_process(struct svc_serv *, struct svc_rqst *);
-int svc_register(struct svc_serv *, int, unsigned short);
-void svc_wake_up(struct svc_serv *);
-void svc_reserve(struct svc_rqst *rqstp, int space);
-
-#endif /* SUNRPC_SVC_H */
diff --git a/original/linux/sunrpc/svcauth.h b/original/linux/sunrpc/svcauth.h
deleted file mode 100644
index 2fe2087..0000000
--- a/original/linux/sunrpc/svcauth.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * linux/include/linux/sunrpc/svcauth.h
- *
- * RPC server-side authentication stuff.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_SVCAUTH_H_
-#define _LINUX_SUNRPC_SVCAUTH_H_
-
-#ifdef __KERNEL__
-
-#include <linux/string.h>
-#include <linux/sunrpc/msg_prot.h>
-#include <linux/sunrpc/cache.h>
-#include <linux/hash.h>
-
-#define SVC_CRED_NGROUPS 32
-struct svc_cred {
- uid_t cr_uid;
- gid_t cr_gid;
- struct group_info *cr_group_info;
-};
-
-struct svc_rqst; /* forward decl */
-
-/* Authentication is done in the context of a domain.
- *
- * Currently, the nfs server uses the auth_domain to stand
- * for the "client" listed in /etc/exports.
- *
- * More generally, a domain might represent a group of clients using
- * a common mechanism for authentication and having a common mapping
- * between local identity (uid) and network identity. All clients
- * in a domain have similar general access rights. Each domain can
- * contain multiple principals which will have different specific right
- * based on normal Discretionary Access Control.
- *
- * A domain is created by an authentication flavour module based on name
- * only. Userspace then fills in detail on demand.
- *
- * In the case of auth_unix and auth_null, the auth_domain is also
- * associated with entries in another cache representing the mapping
- * of ip addresses to the given client.
- */
-struct auth_domain {
- struct kref ref;
- struct hlist_node hash;
- char *name;
- struct auth_ops *flavour;
-};
-
-/*
- * Each authentication flavour registers an auth_ops
- * structure.
- * name is simply the name.
- * flavour gives the auth flavour. It determines where the flavour is registered
- * accept() is given a request and should verify it.
- * It should inspect the authenticator and verifier, and possibly the data.
- * If there is a problem with the authentication *authp should be set.
- * The return value of accept() can indicate:
- * OK - authorised. client and credential are set in rqstp.
- * reqbuf points to arguments
- * resbuf points to good place for results. verfier
- * is (probably) already in place. Certainly space is
- * reserved for it.
- * DROP - simply drop the request. It may have been deferred
- * GARBAGE - rpc garbage_args error
- * SYSERR - rpc system_err error
- * DENIED - authp holds reason for denial.
- * COMPLETE - the reply is encoded already and ready to be sent; no
- * further processing is necessary. (This is used for processing
- * null procedure calls which are used to set up encryption
- * contexts.)
- *
- * accept is passed the proc number so that it can accept NULL rpc requests
- * even if it cannot authenticate the client (as is sometimes appropriate).
- *
- * release() is given a request after the procedure has been run.
- * It should sign/encrypt the results if needed
- * It should return:
- * OK - the resbuf is ready to be sent
- * DROP - the reply should be quitely dropped
- * DENIED - authp holds a reason for MSG_DENIED
- * SYSERR - rpc system_err
- *
- * domain_release()
- * This call releases a domain.
- * set_client()
- * Givens a pending request (struct svc_rqst), finds and assigns
- * an appropriate 'auth_domain' as the client.
- */
-struct auth_ops {
- char * name;
- struct module *owner;
- int flavour;
- int (*accept)(struct svc_rqst *rq, u32 *authp);
- int (*release)(struct svc_rqst *rq);
- void (*domain_release)(struct auth_domain *);
- int (*set_client)(struct svc_rqst *rq);
-};
-
-#define SVC_GARBAGE 1
-#define SVC_SYSERR 2
-#define SVC_VALID 3
-#define SVC_NEGATIVE 4
-#define SVC_OK 5
-#define SVC_DROP 6
-#define SVC_DENIED 7
-#define SVC_PENDING 8
-#define SVC_COMPLETE 9
-
-
-extern int svc_authenticate(struct svc_rqst *rqstp, u32 *authp);
-extern int svc_authorise(struct svc_rqst *rqstp);
-extern int svc_set_client(struct svc_rqst *rqstp);
-extern int svc_auth_register(rpc_authflavor_t flavor, struct auth_ops *aops);
-extern void svc_auth_unregister(rpc_authflavor_t flavor);
-
-extern struct auth_domain *unix_domain_find(char *name);
-extern void auth_domain_put(struct auth_domain *item);
-extern int auth_unix_add_addr(struct in_addr addr, struct auth_domain *dom);
-extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new);
-extern struct auth_domain *auth_domain_find(char *name);
-extern struct auth_domain *auth_unix_lookup(struct in_addr addr);
-extern int auth_unix_forget_old(struct auth_domain *dom);
-extern void svcauth_unix_purge(void);
-
-static inline unsigned long hash_str(char *name, int bits)
-{
- unsigned long hash = 0;
- unsigned long l = 0;
- int len = 0;
- unsigned char c;
- do {
- if (unlikely(!(c = *name++))) {
- c = (char)len; len = -1;
- }
- l = (l << 8) | c;
- len++;
- if ((len & (BITS_PER_LONG/8-1))==0)
- hash = hash_long(hash^l, BITS_PER_LONG);
- } while (len);
- return hash >> (BITS_PER_LONG - bits);
-}
-
-static inline unsigned long hash_mem(char *buf, int length, int bits)
-{
- unsigned long hash = 0;
- unsigned long l = 0;
- int len = 0;
- unsigned char c;
- do {
- if (len == length) {
- c = (char)len; len = -1;
- } else
- c = *buf++;
- l = (l << 8) | c;
- len++;
- if ((len & (BITS_PER_LONG/8-1))==0)
- hash = hash_long(hash^l, BITS_PER_LONG);
- } while (len);
- return hash >> (BITS_PER_LONG - bits);
-}
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SUNRPC_SVCAUTH_H_ */
diff --git a/original/linux/sunrpc/timer.h b/original/linux/sunrpc/timer.h
deleted file mode 100644
index a67fd73..0000000
--- a/original/linux/sunrpc/timer.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * linux/include/linux/sunrpc/timer.h
- *
- * Declarations for the RPC transport timer.
- *
- * Copyright (C) 2002 Trond Myklebust <trond.myklebust@fys.uio.no>
- */
-
-#ifndef _LINUX_SUNRPC_TIMER_H
-#define _LINUX_SUNRPC_TIMER_H
-
-#include <asm/atomic.h>
-
-struct rpc_rtt {
- unsigned long timeo; /* default timeout value */
- unsigned long srtt[5]; /* smoothed round trip time << 3 */
- unsigned long sdrtt[5]; /* smoothed medium deviation of RTT */
- int ntimeouts[5]; /* Number of timeouts for the last request */
-};
-
-
-extern void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo);
-extern void rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m);
-extern unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer);
-
-static inline void rpc_set_timeo(struct rpc_rtt *rt, int timer, int ntimeo)
-{
- int *t;
- if (!timer)
- return;
- t = &rt->ntimeouts[timer-1];
- if (ntimeo < *t) {
- if (*t > 0)
- (*t)--;
- } else {
- if (ntimeo > 8)
- ntimeo = 8;
- *t = ntimeo;
- }
-}
-
-static inline int rpc_ntimeo(struct rpc_rtt *rt, int timer)
-{
- if (!timer)
- return 0;
- return rt->ntimeouts[timer-1];
-}
-
-#endif /* _LINUX_SUNRPC_TIMER_H */
diff --git a/original/linux/sunrpc/types.h b/original/linux/sunrpc/types.h
deleted file mode 100644
index d222f47..0000000
--- a/original/linux/sunrpc/types.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * linux/include/linux/sunrpc/types.h
- *
- * Generic types and misc stuff for RPC.
- *
- * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_TYPES_H_
-#define _LINUX_SUNRPC_TYPES_H_
-
-#include <linux/timer.h>
-#include <linux/workqueue.h>
-#include <linux/sunrpc/debug.h>
-#include <linux/list.h>
-
-/*
- * Shorthands
- */
-#define signalled() (signal_pending(current))
-
-#endif /* _LINUX_SUNRPC_TYPES_H_ */
diff --git a/original/linux/sunrpc/xdr.h b/original/linux/sunrpc/xdr.h
deleted file mode 100644
index e6d3d34..0000000
--- a/original/linux/sunrpc/xdr.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * include/linux/sunrpc/xdr.h
- *
- * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _SUNRPC_XDR_H_
-#define _SUNRPC_XDR_H_
-
-#ifdef __KERNEL__
-
-#include <linux/uio.h>
-#include <asm/byteorder.h>
-
-/*
- * Buffer adjustment
- */
-#define XDR_QUADLEN(l) (((l) + 3) >> 2)
-
-/*
- * Generic opaque `network object.' At the kernel level, this type
- * is used only by lockd.
- */
-#define XDR_MAX_NETOBJ 1024
-struct xdr_netobj {
- unsigned int len;
- u8 * data;
-};
-
-/*
- * This is the generic XDR function. rqstp is either a rpc_rqst (client
- * side) or svc_rqst pointer (server side).
- * Encode functions always assume there's enough room in the buffer.
- */
-typedef int (*kxdrproc_t)(void *rqstp, u32 *data, void *obj);
-
-/*
- * Basic structure for transmission/reception of a client XDR message.
- * Features a header (for a linear buffer containing RPC headers
- * and the data payload for short messages), and then an array of
- * pages.
- * The tail iovec allows you to append data after the page array. Its
- * main interest is for appending padding to the pages in order to
- * satisfy the int_32-alignment requirements in RFC1832.
- *
- * For the future, we might want to string several of these together
- * in a list if anybody wants to make use of NFSv4 COMPOUND
- * operations and/or has a need for scatter/gather involving pages.
- */
-struct xdr_buf {
- struct kvec head[1], /* RPC header + non-page data */
- tail[1]; /* Appended after page data */
-
- struct page ** pages; /* Array of contiguous pages */
- unsigned int page_base, /* Start of page data */
- page_len; /* Length of page data */
-
- unsigned int buflen, /* Total length of storage buffer */
- len; /* Length of XDR encoded message */
-
-};
-
-/*
- * pre-xdr'ed macros.
- */
-
-#define xdr_zero __constant_htonl(0)
-#define xdr_one __constant_htonl(1)
-#define xdr_two __constant_htonl(2)
-
-#define rpc_success __constant_htonl(RPC_SUCCESS)
-#define rpc_prog_unavail __constant_htonl(RPC_PROG_UNAVAIL)
-#define rpc_prog_mismatch __constant_htonl(RPC_PROG_MISMATCH)
-#define rpc_proc_unavail __constant_htonl(RPC_PROC_UNAVAIL)
-#define rpc_garbage_args __constant_htonl(RPC_GARBAGE_ARGS)
-#define rpc_system_err __constant_htonl(RPC_SYSTEM_ERR)
-
-#define rpc_auth_ok __constant_htonl(RPC_AUTH_OK)
-#define rpc_autherr_badcred __constant_htonl(RPC_AUTH_BADCRED)
-#define rpc_autherr_rejectedcred __constant_htonl(RPC_AUTH_REJECTEDCRED)
-#define rpc_autherr_badverf __constant_htonl(RPC_AUTH_BADVERF)
-#define rpc_autherr_rejectedverf __constant_htonl(RPC_AUTH_REJECTEDVERF)
-#define rpc_autherr_tooweak __constant_htonl(RPC_AUTH_TOOWEAK)
-#define rpcsec_gsserr_credproblem __constant_htonl(RPCSEC_GSS_CREDPROBLEM)
-#define rpcsec_gsserr_ctxproblem __constant_htonl(RPCSEC_GSS_CTXPROBLEM)
-#define rpc_autherr_oldseqnum __constant_htonl(101)
-
-/*
- * Miscellaneous XDR helper functions
- */
-u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len);
-u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len);
-u32 * xdr_encode_string(u32 *p, const char *s);
-u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen);
-u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *);
-u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *);
-
-void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int,
- unsigned int);
-void xdr_inline_pages(struct xdr_buf *, unsigned int,
- struct page **, unsigned int, unsigned int);
-
-static inline u32 *xdr_encode_array(u32 *p, const void *s, unsigned int len)
-{
- return xdr_encode_opaque(p, s, len);
-}
-
-/*
- * Decode 64bit quantities (NFSv3 support)
- */
-static inline u32 *
-xdr_encode_hyper(u32 *p, __u64 val)
-{
- *p++ = htonl(val >> 32);
- *p++ = htonl(val & 0xFFFFFFFF);
- return p;
-}
-
-static inline u32 *
-xdr_decode_hyper(u32 *p, __u64 *valp)
-{
- *valp = ((__u64) ntohl(*p++)) << 32;
- *valp |= ntohl(*p++);
- return p;
-}
-
-/*
- * Adjust kvec to reflect end of xdr'ed data (RPC client XDR)
- */
-static inline int
-xdr_adjust_iovec(struct kvec *iov, u32 *p)
-{
- return iov->iov_len = ((u8 *) p - (u8 *) iov->iov_base);
-}
-
-/*
- * XDR buffer helper functions
- */
-extern void xdr_shift_buf(struct xdr_buf *, size_t);
-extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *);
-extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int);
-extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int);
-extern int read_bytes_from_xdr_buf(struct xdr_buf *, int, void *, int);
-extern int write_bytes_to_xdr_buf(struct xdr_buf *, int, void *, int);
-
-/*
- * Helper structure for copying from an sk_buff.
- */
-typedef struct {
- struct sk_buff *skb;
- unsigned int offset;
- size_t count;
- unsigned int csum;
-} skb_reader_t;
-
-typedef size_t (*skb_read_actor_t)(skb_reader_t *desc, void *to, size_t len);
-
-extern int csum_partial_copy_to_xdr(struct xdr_buf *, struct sk_buff *);
-extern ssize_t xdr_partial_copy_from_skb(struct xdr_buf *, unsigned int,
- skb_reader_t *, skb_read_actor_t);
-
-extern int xdr_encode_word(struct xdr_buf *, int, u32);
-extern int xdr_decode_word(struct xdr_buf *, int, u32 *);
-
-struct xdr_array2_desc;
-typedef int (*xdr_xcode_elem_t)(struct xdr_array2_desc *desc, void *elem);
-struct xdr_array2_desc {
- unsigned int elem_size;
- unsigned int array_len;
- unsigned int array_maxlen;
- xdr_xcode_elem_t xcode;
-};
-
-extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base,
- struct xdr_array2_desc *desc);
-extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base,
- struct xdr_array2_desc *desc);
-
-/*
- * Provide some simple tools for XDR buffer overflow-checking etc.
- */
-struct xdr_stream {
- uint32_t *p; /* start of available buffer */
- struct xdr_buf *buf; /* XDR buffer to read/write */
-
- uint32_t *end; /* end of available buffer space */
- struct kvec *iov; /* pointer to the current kvec */
-};
-
-extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p);
-extern uint32_t *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
-extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages,
- unsigned int base, unsigned int len);
-extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, uint32_t *p);
-extern uint32_t *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes);
-extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
-extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len);
-
-#endif /* __KERNEL__ */
-
-#endif /* _SUNRPC_XDR_H_ */
diff --git a/original/linux/sunrpc/xprt.h b/original/linux/sunrpc/xprt.h
deleted file mode 100644
index 3a0cca2..0000000
--- a/original/linux/sunrpc/xprt.h
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * linux/include/linux/sunrpc/xprt.h
- *
- * Declarations for the RPC transport interface.
- *
- * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
- */
-
-#ifndef _LINUX_SUNRPC_XPRT_H
-#define _LINUX_SUNRPC_XPRT_H
-
-#include <linux/uio.h>
-#include <linux/socket.h>
-#include <linux/in.h>
-#include <linux/sunrpc/sched.h>
-#include <linux/sunrpc/xdr.h>
-
-extern unsigned int xprt_udp_slot_table_entries;
-extern unsigned int xprt_tcp_slot_table_entries;
-
-#define RPC_MIN_SLOT_TABLE (2U)
-#define RPC_DEF_SLOT_TABLE (16U)
-#define RPC_MAX_SLOT_TABLE (128U)
-
-/*
- * RPC call and reply header size as number of 32bit words (verifier
- * size computed separately)
- */
-#define RPC_CALLHDRSIZE 6
-#define RPC_REPHDRSIZE 4
-
-/*
- * Parameters for choosing a free port
- */
-extern unsigned int xprt_min_resvport;
-extern unsigned int xprt_max_resvport;
-
-#define RPC_MIN_RESVPORT (1U)
-#define RPC_MAX_RESVPORT (65535U)
-#define RPC_DEF_MIN_RESVPORT (665U)
-#define RPC_DEF_MAX_RESVPORT (1023U)
-
-/*
- * This describes a timeout strategy
- */
-struct rpc_timeout {
- unsigned long to_initval, /* initial timeout */
- to_maxval, /* max timeout */
- to_increment; /* if !exponential */
- unsigned int to_retries; /* max # of retries */
- unsigned char to_exponential;
-};
-
-struct rpc_task;
-struct rpc_xprt;
-struct seq_file;
-
-/*
- * This describes a complete RPC request
- */
-struct rpc_rqst {
- /*
- * This is the user-visible part
- */
- struct rpc_xprt * rq_xprt; /* RPC client */
- struct xdr_buf rq_snd_buf; /* send buffer */
- struct xdr_buf rq_rcv_buf; /* recv buffer */
-
- /*
- * This is the private part
- */
- struct rpc_task * rq_task; /* RPC task data */
- __u32 rq_xid; /* request XID */
- int rq_cong; /* has incremented xprt->cong */
- int rq_received; /* receive completed */
- u32 rq_seqno; /* gss seq no. used on req. */
- int rq_enc_pages_num;
- struct page **rq_enc_pages; /* scratch pages for use by
- gss privacy code */
- void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */
- struct list_head rq_list;
-
- __u32 * rq_buffer; /* XDR encode buffer */
- size_t rq_bufsize;
-
- struct xdr_buf rq_private_buf; /* The receive buffer
- * used in the softirq.
- */
- unsigned long rq_majortimeo; /* major timeout alarm */
- unsigned long rq_timeout; /* Current timeout value */
- unsigned int rq_retries; /* # of retries */
-
- /*
- * Partial send handling
- */
- u32 rq_bytes_sent; /* Bytes we have sent */
-
- unsigned long rq_xtime; /* when transmitted */
- int rq_ntrans;
-};
-#define rq_svec rq_snd_buf.head
-#define rq_slen rq_snd_buf.len
-
-struct rpc_xprt_ops {
- void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
- int (*reserve_xprt)(struct rpc_task *task);
- void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
- void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
- void (*connect)(struct rpc_task *task);
- void * (*buf_alloc)(struct rpc_task *task, size_t size);
- void (*buf_free)(struct rpc_task *task);
- int (*send_request)(struct rpc_task *task);
- void (*set_retrans_timeout)(struct rpc_task *task);
- void (*timer)(struct rpc_task *task);
- void (*release_request)(struct rpc_task *task);
- void (*close)(struct rpc_xprt *xprt);
- void (*destroy)(struct rpc_xprt *xprt);
- void (*print_stats)(struct rpc_xprt *xprt, struct seq_file *seq);
-};
-
-struct rpc_xprt {
- struct rpc_xprt_ops * ops; /* transport methods */
- struct socket * sock; /* BSD socket layer */
- struct sock * inet; /* INET layer */
-
- struct rpc_timeout timeout; /* timeout parms */
- struct sockaddr_in addr; /* server address */
- int prot; /* IP protocol */
-
- unsigned long cong; /* current congestion */
- unsigned long cwnd; /* congestion window */
-
- size_t rcvsize, /* transport rcv buffer size */
- sndsize; /* transport send buffer size */
-
- size_t max_payload; /* largest RPC payload size,
- in bytes */
- unsigned int tsh_size; /* size of transport specific
- header */
-
- struct rpc_wait_queue sending; /* requests waiting to send */
- struct rpc_wait_queue resend; /* requests waiting to resend */
- struct rpc_wait_queue pending; /* requests in flight */
- struct rpc_wait_queue backlog; /* waiting for slot */
- struct list_head free; /* free slots */
- struct rpc_rqst * slot; /* slot table storage */
- unsigned int max_reqs; /* total slots */
- unsigned long state; /* transport state */
- unsigned char shutdown : 1, /* being shut down */
- resvport : 1; /* use a reserved port */
-
- /*
- * XID
- */
- __u32 xid; /* Next XID value to use */
-
- /*
- * State of TCP reply receive stuff
- */
- u32 tcp_recm, /* Fragment header */
- tcp_xid, /* Current XID */
- tcp_reclen, /* fragment length */
- tcp_offset; /* fragment offset */
- unsigned long tcp_copied, /* copied to request */
- tcp_flags;
- /*
- * Connection of transports
- */
- unsigned long connect_timeout,
- bind_timeout,
- reestablish_timeout;
- struct work_struct connect_worker;
- unsigned short port;
-
- /*
- * Disconnection of idle transports
- */
- struct work_struct task_cleanup;
- struct timer_list timer;
- unsigned long last_used,
- idle_timeout;
-
- /*
- * Send stuff
- */
- spinlock_t transport_lock; /* lock transport info */
- spinlock_t reserve_lock; /* lock slot table */
- struct rpc_task * snd_task; /* Task blocked in send */
-
- struct list_head recv;
-
- struct {
- unsigned long bind_count, /* total number of binds */
- connect_count, /* total number of connects */
- connect_start, /* connect start timestamp */
- connect_time, /* jiffies waiting for connect */
- sends, /* how many complete requests */
- recvs, /* how many complete requests */
- bad_xids; /* lookup_rqst didn't find XID */
-
- unsigned long long req_u, /* average requests on the wire */
- bklog_u; /* backlog queue utilization */
- } stat;
-
- void (*old_data_ready)(struct sock *, int);
- void (*old_state_change)(struct sock *);
- void (*old_write_space)(struct sock *);
-};
-
-#define XPRT_LAST_FRAG (1 << 0)
-#define XPRT_COPY_RECM (1 << 1)
-#define XPRT_COPY_XID (1 << 2)
-#define XPRT_COPY_DATA (1 << 3)
-
-#ifdef __KERNEL__
-
-/*
- * Transport operations used by ULPs
- */
-struct rpc_xprt * xprt_create_proto(int proto, struct sockaddr_in *addr, struct rpc_timeout *to);
-void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long incr);
-
-/*
- * Generic internal transport functions
- */
-void xprt_connect(struct rpc_task *task);
-void xprt_reserve(struct rpc_task *task);
-int xprt_reserve_xprt(struct rpc_task *task);
-int xprt_reserve_xprt_cong(struct rpc_task *task);
-int xprt_prepare_transmit(struct rpc_task *task);
-void xprt_transmit(struct rpc_task *task);
-void xprt_end_transmit(struct rpc_task *task);
-int xprt_adjust_timeout(struct rpc_rqst *req);
-void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task);
-void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task);
-void xprt_release(struct rpc_task *task);
-int xprt_destroy(struct rpc_xprt *xprt);
-
-static inline u32 *xprt_skip_transport_header(struct rpc_xprt *xprt, u32 *p)
-{
- return p + xprt->tsh_size;
-}
-
-/*
- * Transport switch helper functions
- */
-void xprt_set_retrans_timeout_def(struct rpc_task *task);
-void xprt_set_retrans_timeout_rtt(struct rpc_task *task);
-void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status);
-void xprt_wait_for_buffer_space(struct rpc_task *task);
-void xprt_write_space(struct rpc_xprt *xprt);
-void xprt_update_rtt(struct rpc_task *task);
-void xprt_adjust_cwnd(struct rpc_task *task, int result);
-struct rpc_rqst * xprt_lookup_rqst(struct rpc_xprt *xprt, u32 xid);
-void xprt_complete_rqst(struct rpc_task *task, int copied);
-void xprt_release_rqst_cong(struct rpc_task *task);
-void xprt_disconnect(struct rpc_xprt *xprt);
-
-/*
- * Socket transport setup operations
- */
-int xs_setup_udp(struct rpc_xprt *xprt, struct rpc_timeout *to);
-int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to);
-
-/*
- * Reserved bit positions in xprt->state
- */
-#define XPRT_LOCKED (0)
-#define XPRT_CONNECTED (1)
-#define XPRT_CONNECTING (2)
-#define XPRT_CLOSE_WAIT (3)
-
-static inline void xprt_set_connected(struct rpc_xprt *xprt)
-{
- set_bit(XPRT_CONNECTED, &xprt->state);
-}
-
-static inline void xprt_clear_connected(struct rpc_xprt *xprt)
-{
- clear_bit(XPRT_CONNECTED, &xprt->state);
-}
-
-static inline int xprt_connected(struct rpc_xprt *xprt)
-{
- return test_bit(XPRT_CONNECTED, &xprt->state);
-}
-
-static inline int xprt_test_and_set_connected(struct rpc_xprt *xprt)
-{
- return test_and_set_bit(XPRT_CONNECTED, &xprt->state);
-}
-
-static inline int xprt_test_and_clear_connected(struct rpc_xprt *xprt)
-{
- return test_and_clear_bit(XPRT_CONNECTED, &xprt->state);
-}
-
-static inline void xprt_clear_connecting(struct rpc_xprt *xprt)
-{
- smp_mb__before_clear_bit();
- clear_bit(XPRT_CONNECTING, &xprt->state);
- smp_mb__after_clear_bit();
-}
-
-static inline int xprt_connecting(struct rpc_xprt *xprt)
-{
- return test_bit(XPRT_CONNECTING, &xprt->state);
-}
-
-static inline int xprt_test_and_set_connecting(struct rpc_xprt *xprt)
-{
- return test_and_set_bit(XPRT_CONNECTING, &xprt->state);
-}
-
-#endif /* __KERNEL__*/
-
-#endif /* _LINUX_SUNRPC_XPRT_H */
diff --git a/original/linux/sw_sync.h b/original/linux/sw_sync.h
deleted file mode 100644
index bd6f208..0000000
--- a/original/linux/sw_sync.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * include/linux/sw_sync.h
- *
- * Copyright (C) 2012 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_SW_SYNC_H
-#define _LINUX_SW_SYNC_H
-
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-
-#include <linux/sync.h>
-
-struct sw_sync_timeline {
- struct sync_timeline obj;
-
- u32 value;
-};
-
-struct sw_sync_pt {
- struct sync_pt pt;
-
- u32 value;
-};
-
-struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
-void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
-
-struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
-
-#endif /* __KERNEL __ */
-
-struct sw_sync_create_fence_data {
- __u32 value;
- char name[32];
- __s32 fence; /* fd of new fence */
-};
-
-#define SW_SYNC_IOC_MAGIC 'W'
-
-#define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0,\
- struct sw_sync_create_fence_data)
-#define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
-
-
-#endif /* _LINUX_SW_SYNC_H */
diff --git a/original/linux/swab.h b/original/linux/swab.h
deleted file mode 100644
index ea0c02f..0000000
--- a/original/linux/swab.h
+++ /dev/null
@@ -1,299 +0,0 @@
-#ifndef _LINUX_SWAB_H
-#define _LINUX_SWAB_H
-
-#include <linux/types.h>
-#include <linux/compiler.h>
-#include <asm/swab.h>
-
-/*
- * casts are necessary for constants, because we never know how for sure
- * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
- */
-#define ___constant_swab16(x) ((__u16)( \
- (((__u16)(x) & (__u16)0x00ffU) << 8) | \
- (((__u16)(x) & (__u16)0xff00U) >> 8)))
-
-#define ___constant_swab32(x) ((__u32)( \
- (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
- (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
- (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
- (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
-
-#define ___constant_swab64(x) ((__u64)( \
- (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
- (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
- (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
- (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \
- (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \
- (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
- (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
- (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56)))
-
-#define ___constant_swahw32(x) ((__u32)( \
- (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \
- (((__u32)(x) & (__u32)0xffff0000UL) >> 16)))
-
-#define ___constant_swahb32(x) ((__u32)( \
- (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \
- (((__u32)(x) & (__u32)0xff00ff00UL) >> 8)))
-
-/*
- * Implement the following as inlines, but define the interface using
- * macros to allow constant folding when possible:
- * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
- */
-
-static inline __attribute_const__ __u16 __fswab16(__u16 val)
-{
-#ifdef __arch_swab16
- return __arch_swab16(val);
-#else
- return ___constant_swab16(val);
-#endif
-}
-
-static inline __attribute_const__ __u32 __fswab32(__u32 val)
-{
-#ifdef __arch_swab32
- return __arch_swab32(val);
-#else
- return ___constant_swab32(val);
-#endif
-}
-
-static inline __attribute_const__ __u64 __fswab64(__u64 val)
-{
-#ifdef __arch_swab64
- return __arch_swab64(val);
-#elif defined(__SWAB_64_THRU_32__)
- __u32 h = val >> 32;
- __u32 l = val & ((1ULL << 32) - 1);
- return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
-#else
- return ___constant_swab64(val);
-#endif
-}
-
-static inline __attribute_const__ __u32 __fswahw32(__u32 val)
-{
-#ifdef __arch_swahw32
- return __arch_swahw32(val);
-#else
- return ___constant_swahw32(val);
-#endif
-}
-
-static inline __attribute_const__ __u32 __fswahb32(__u32 val)
-{
-#ifdef __arch_swahb32
- return __arch_swahb32(val);
-#else
- return ___constant_swahb32(val);
-#endif
-}
-
-/**
- * __swab16 - return a byteswapped 16-bit value
- * @x: value to byteswap
- */
-#define __swab16(x) \
- (__builtin_constant_p((__u16)(x)) ? \
- ___constant_swab16(x) : \
- __fswab16(x))
-
-/**
- * __swab32 - return a byteswapped 32-bit value
- * @x: value to byteswap
- */
-#define __swab32(x) \
- (__builtin_constant_p((__u32)(x)) ? \
- ___constant_swab32(x) : \
- __fswab32(x))
-
-/**
- * __swab64 - return a byteswapped 64-bit value
- * @x: value to byteswap
- */
-#define __swab64(x) \
- (__builtin_constant_p((__u64)(x)) ? \
- ___constant_swab64(x) : \
- __fswab64(x))
-
-/**
- * __swahw32 - return a word-swapped 32-bit value
- * @x: value to wordswap
- *
- * __swahw32(0x12340000) is 0x00001234
- */
-#define __swahw32(x) \
- (__builtin_constant_p((__u32)(x)) ? \
- ___constant_swahw32(x) : \
- __fswahw32(x))
-
-/**
- * __swahb32 - return a high and low byte-swapped 32-bit value
- * @x: value to byteswap
- *
- * __swahb32(0x12345678) is 0x34127856
- */
-#define __swahb32(x) \
- (__builtin_constant_p((__u32)(x)) ? \
- ___constant_swahb32(x) : \
- __fswahb32(x))
-
-/**
- * __swab16p - return a byteswapped 16-bit value from a pointer
- * @p: pointer to a naturally-aligned 16-bit value
- */
-static inline __u16 __swab16p(const __u16 *p)
-{
-#ifdef __arch_swab16p
- return __arch_swab16p(p);
-#else
- return __swab16(*p);
-#endif
-}
-
-/**
- * __swab32p - return a byteswapped 32-bit value from a pointer
- * @p: pointer to a naturally-aligned 32-bit value
- */
-static inline __u32 __swab32p(const __u32 *p)
-{
-#ifdef __arch_swab32p
- return __arch_swab32p(p);
-#else
- return __swab32(*p);
-#endif
-}
-
-/**
- * __swab64p - return a byteswapped 64-bit value from a pointer
- * @p: pointer to a naturally-aligned 64-bit value
- */
-static inline __u64 __swab64p(const __u64 *p)
-{
-#ifdef __arch_swab64p
- return __arch_swab64p(p);
-#else
- return __swab64(*p);
-#endif
-}
-
-/**
- * __swahw32p - return a wordswapped 32-bit value from a pointer
- * @p: pointer to a naturally-aligned 32-bit value
- *
- * See __swahw32() for details of wordswapping.
- */
-static inline __u32 __swahw32p(const __u32 *p)
-{
-#ifdef __arch_swahw32p
- return __arch_swahw32p(p);
-#else
- return __swahw32(*p);
-#endif
-}
-
-/**
- * __swahb32p - return a high and low byteswapped 32-bit value from a pointer
- * @p: pointer to a naturally-aligned 32-bit value
- *
- * See __swahb32() for details of high/low byteswapping.
- */
-static inline __u32 __swahb32p(const __u32 *p)
-{
-#ifdef __arch_swahb32p
- return __arch_swahb32p(p);
-#else
- return __swahb32(*p);
-#endif
-}
-
-/**
- * __swab16s - byteswap a 16-bit value in-place
- * @p: pointer to a naturally-aligned 16-bit value
- */
-static inline void __swab16s(__u16 *p)
-{
-#ifdef __arch_swab16s
- __arch_swab16s(p);
-#else
- *p = __swab16p(p);
-#endif
-}
-/**
- * __swab32s - byteswap a 32-bit value in-place
- * @p: pointer to a naturally-aligned 32-bit value
- */
-static inline void __swab32s(__u32 *p)
-{
-#ifdef __arch_swab32s
- __arch_swab32s(p);
-#else
- *p = __swab32p(p);
-#endif
-}
-
-/**
- * __swab64s - byteswap a 64-bit value in-place
- * @p: pointer to a naturally-aligned 64-bit value
- */
-static inline void __swab64s(__u64 *p)
-{
-#ifdef __arch_swab64s
- __arch_swab64s(p);
-#else
- *p = __swab64p(p);
-#endif
-}
-
-/**
- * __swahw32s - wordswap a 32-bit value in-place
- * @p: pointer to a naturally-aligned 32-bit value
- *
- * See __swahw32() for details of wordswapping
- */
-static inline void __swahw32s(__u32 *p)
-{
-#ifdef __arch_swahw32s
- __arch_swahw32s(p);
-#else
- *p = __swahw32p(p);
-#endif
-}
-
-/**
- * __swahb32s - high and low byteswap a 32-bit value in-place
- * @p: pointer to a naturally-aligned 32-bit value
- *
- * See __swahb32() for details of high and low byte swapping
- */
-static inline void __swahb32s(__u32 *p)
-{
-#ifdef __arch_swahb32s
- __arch_swahb32s(p);
-#else
- *p = __swahb32p(p);
-#endif
-}
-
-#ifdef __KERNEL__
-# define swab16 __swab16
-# define swab32 __swab32
-# define swab64 __swab64
-# define swahw32 __swahw32
-# define swahb32 __swahb32
-# define swab16p __swab16p
-# define swab32p __swab32p
-# define swab64p __swab64p
-# define swahw32p __swahw32p
-# define swahb32p __swahb32p
-# define swab16s __swab16s
-# define swab32s __swab32s
-# define swab64s __swab64s
-# define swahw32s __swahw32s
-# define swahb32s __swahb32s
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SWAB_H */
diff --git a/original/linux/swap.h b/original/linux/swap.h
deleted file mode 100644
index 5e59184..0000000
--- a/original/linux/swap.h
+++ /dev/null
@@ -1,364 +0,0 @@
-#ifndef _LINUX_SWAP_H
-#define _LINUX_SWAP_H
-
-#include <linux/spinlock.h>
-#include <linux/linkage.h>
-#include <linux/mmzone.h>
-#include <linux/list.h>
-#include <linux/sched.h>
-
-#include <asm/atomic.h>
-#include <asm/page.h>
-
-#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
-#define SWAP_FLAG_PRIO_MASK 0x7fff
-#define SWAP_FLAG_PRIO_SHIFT 0
-
-static inline int current_is_kswapd(void)
-{
- return current->flags & PF_KSWAPD;
-}
-
-/*
- * MAX_SWAPFILES defines the maximum number of swaptypes: things which can
- * be swapped to. The swap type and the offset into that swap type are
- * encoded into pte's and into pgoff_t's in the swapcache. Using five bits
- * for the type means that the maximum number of swapcache pages is 27 bits
- * on 32-bit-pgoff_t architectures. And that assumes that the architecture packs
- * the type/offset into the pte as 5/27 as well.
- */
-#define MAX_SWAPFILES_SHIFT 5
-#ifndef CONFIG_MIGRATION
-#define MAX_SWAPFILES (1 << MAX_SWAPFILES_SHIFT)
-#else
-/* Use last two entries for page migration swap entries */
-#define MAX_SWAPFILES ((1 << MAX_SWAPFILES_SHIFT)-2)
-#define SWP_MIGRATION_READ MAX_SWAPFILES
-#define SWP_MIGRATION_WRITE (MAX_SWAPFILES + 1)
-#endif
-
-/*
- * Magic header for a swap area. The first part of the union is
- * what the swap magic looks like for the old (limited to 128MB)
- * swap area format, the second part of the union adds - in the
- * old reserved area - some extra information. Note that the first
- * kilobyte is reserved for boot loader or disk label stuff...
- *
- * Having the magic at the end of the PAGE_SIZE makes detecting swap
- * areas somewhat tricky on machines that support multiple page sizes.
- * For 2.5 we'll probably want to move the magic to just beyond the
- * bootbits...
- */
-union swap_header {
- struct {
- char reserved[PAGE_SIZE - 10];
- char magic[10]; /* SWAP-SPACE or SWAPSPACE2 */
- } magic;
- struct {
- char bootbits[1024]; /* Space for disklabel etc. */
- __u32 version;
- __u32 last_page;
- __u32 nr_badpages;
- unsigned char sws_uuid[16];
- unsigned char sws_volume[16];
- __u32 padding[117];
- __u32 badpages[1];
- } info;
-};
-
- /* A swap entry has to fit into a "unsigned long", as
- * the entry is hidden in the "index" field of the
- * swapper address space.
- */
-typedef struct {
- unsigned long val;
-} swp_entry_t;
-
-/*
- * current->reclaim_state points to one of these when a task is running
- * memory reclaim
- */
-struct reclaim_state {
- unsigned long reclaimed_slab;
-};
-
-#ifdef __KERNEL__
-
-struct address_space;
-struct sysinfo;
-struct writeback_control;
-struct zone;
-
-/*
- * A swap extent maps a range of a swapfile's PAGE_SIZE pages onto a range of
- * disk blocks. A list of swap extents maps the entire swapfile. (Where the
- * term `swapfile' refers to either a blockdevice or an IS_REG file. Apart
- * from setup, they're handled identically.
- *
- * We always assume that blocks are of size PAGE_SIZE.
- */
-struct swap_extent {
- struct list_head list;
- pgoff_t start_page;
- pgoff_t nr_pages;
- sector_t start_block;
-};
-
-/*
- * Max bad pages in the new format..
- */
-#define __swapoffset(x) ((unsigned long)&((union swap_header *)0)->x)
-#define MAX_SWAP_BADPAGES \
- ((__swapoffset(magic.magic) - __swapoffset(info.badpages)) / sizeof(int))
-
-enum {
- SWP_USED = (1 << 0), /* is slot in swap_info[] used? */
- SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */
- SWP_ACTIVE = (SWP_USED | SWP_WRITEOK),
- /* add others here before... */
- SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */
-};
-
-#define SWAP_CLUSTER_MAX 32
-
-#define SWAP_MAP_MAX 0x7fff
-#define SWAP_MAP_BAD 0x8000
-
-/*
- * The in-memory structure used to track swap areas.
- */
-struct swap_info_struct {
- unsigned int flags;
- int prio; /* swap priority */
- struct file *swap_file;
- struct block_device *bdev;
- struct list_head extent_list;
- struct swap_extent *curr_swap_extent;
- unsigned old_block_size;
- unsigned short * swap_map;
- unsigned int lowest_bit;
- unsigned int highest_bit;
- unsigned int cluster_next;
- unsigned int cluster_nr;
- unsigned int pages;
- unsigned int max;
- unsigned int inuse_pages;
- int next; /* next entry on swap list */
-};
-
-struct swap_list_t {
- int head; /* head of priority-ordered swapfile list */
- int next; /* swapfile to be used next */
-};
-
-/* Swap 50% full? Release swapcache more aggressively.. */
-#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
-
-/* linux/mm/oom_kill.c */
-extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
-
-/* linux/mm/memory.c */
-extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);
-
-/* linux/mm/page_alloc.c */
-extern unsigned long totalram_pages;
-extern unsigned long totalhigh_pages;
-extern unsigned long totalreserve_pages;
-extern long nr_swap_pages;
-extern unsigned int nr_free_pages(void);
-extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
-extern unsigned int nr_free_buffer_pages(void);
-extern unsigned int nr_free_pagecache_pages(void);
-
-/* linux/mm/swap.c */
-extern void FASTCALL(lru_cache_add(struct page *));
-extern void FASTCALL(lru_cache_add_active(struct page *));
-extern void FASTCALL(activate_page(struct page *));
-extern void FASTCALL(mark_page_accessed(struct page *));
-extern void lru_add_drain(void);
-extern int lru_add_drain_all(void);
-extern int rotate_reclaimable_page(struct page *page);
-extern void swap_setup(void);
-
-/* linux/mm/vmscan.c */
-extern unsigned long try_to_free_pages(struct zone **, gfp_t);
-extern unsigned long shrink_all_memory(unsigned long nr_pages);
-extern int vm_swappiness;
-extern int remove_mapping(struct address_space *mapping, struct page *page);
-extern long vm_total_pages;
-
-#ifdef CONFIG_NUMA
-extern int zone_reclaim_mode;
-extern int sysctl_min_unmapped_ratio;
-extern int zone_reclaim(struct zone *, gfp_t, unsigned int);
-#else
-#define zone_reclaim_mode 0
-static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order)
-{
- return 0;
-}
-#endif
-
-extern int kswapd_run(int nid);
-
-#ifdef CONFIG_MMU
-/* linux/mm/shmem.c */
-extern int shmem_unuse(swp_entry_t entry, struct page *page);
-#endif /* CONFIG_MMU */
-
-extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *);
-
-#ifdef CONFIG_SWAP
-/* linux/mm/page_io.c */
-extern int swap_readpage(struct file *, struct page *);
-extern int swap_writepage(struct page *page, struct writeback_control *wbc);
-extern int rw_swap_page_sync(int, swp_entry_t, struct page *);
-
-/* linux/mm/swap_state.c */
-extern struct address_space swapper_space;
-#define total_swapcache_pages swapper_space.nrpages
-extern void show_swap_cache_info(void);
-extern int add_to_swap(struct page *, gfp_t);
-extern void __delete_from_swap_cache(struct page *);
-extern void delete_from_swap_cache(struct page *);
-extern int move_to_swap_cache(struct page *, swp_entry_t);
-extern int move_from_swap_cache(struct page *, unsigned long,
- struct address_space *);
-extern void free_page_and_swap_cache(struct page *);
-extern void free_pages_and_swap_cache(struct page **, int);
-extern struct page * lookup_swap_cache(swp_entry_t);
-extern struct page * read_swap_cache_async(swp_entry_t, struct vm_area_struct *vma,
- unsigned long addr);
-/* linux/mm/swapfile.c */
-extern long total_swap_pages;
-extern unsigned int nr_swapfiles;
-extern void si_swapinfo(struct sysinfo *);
-extern swp_entry_t get_swap_page(void);
-extern swp_entry_t get_swap_page_of_type(int);
-extern int swap_duplicate(swp_entry_t);
-extern int valid_swaphandles(swp_entry_t, unsigned long *);
-extern void swap_free(swp_entry_t);
-extern void free_swap_and_cache(swp_entry_t);
-extern int swap_type_of(dev_t);
-extern unsigned int count_swap_pages(int, int);
-extern sector_t map_swap_page(struct swap_info_struct *, pgoff_t);
-extern struct swap_info_struct *get_swap_info_struct(unsigned);
-extern int can_share_swap_page(struct page *);
-extern int remove_exclusive_swap_page(struct page *);
-struct backing_dev_info;
-
-extern spinlock_t swap_lock;
-
-/* linux/mm/thrash.c */
-extern struct mm_struct * swap_token_mm;
-extern unsigned long swap_token_default_timeout;
-extern void grab_swap_token(void);
-extern void __put_swap_token(struct mm_struct *);
-
-static inline int has_swap_token(struct mm_struct *mm)
-{
- return (mm == swap_token_mm);
-}
-
-static inline void put_swap_token(struct mm_struct *mm)
-{
- if (has_swap_token(mm))
- __put_swap_token(mm);
-}
-
-static inline void disable_swap_token(void)
-{
- put_swap_token(swap_token_mm);
-}
-
-#else /* CONFIG_SWAP */
-
-#define total_swap_pages 0
-#define total_swapcache_pages 0UL
-
-#define si_swapinfo(val) \
- do { (val)->freeswap = (val)->totalswap = 0; } while (0)
-/* only sparc can not include linux/pagemap.h in this file
- * so leave page_cache_release and release_pages undeclared... */
-#define free_page_and_swap_cache(page) \
- page_cache_release(page)
-#define free_pages_and_swap_cache(pages, nr) \
- release_pages((pages), (nr), 0);
-
-static inline void show_swap_cache_info(void)
-{
-}
-
-static inline void free_swap_and_cache(swp_entry_t swp)
-{
-}
-
-static inline int swap_duplicate(swp_entry_t swp)
-{
- return 0;
-}
-
-static inline void swap_free(swp_entry_t swp)
-{
-}
-
-static inline struct page *read_swap_cache_async(swp_entry_t swp,
- struct vm_area_struct *vma, unsigned long addr)
-{
- return NULL;
-}
-
-static inline struct page *lookup_swap_cache(swp_entry_t swp)
-{
- return NULL;
-}
-
-static inline int valid_swaphandles(swp_entry_t entry, unsigned long *offset)
-{
- return 0;
-}
-
-#define can_share_swap_page(p) (page_mapcount(p) == 1)
-
-static inline int move_to_swap_cache(struct page *page, swp_entry_t entry)
-{
- return 1;
-}
-
-static inline int move_from_swap_cache(struct page *page, unsigned long index,
- struct address_space *mapping)
-{
- return 1;
-}
-
-static inline void __delete_from_swap_cache(struct page *page)
-{
-}
-
-static inline void delete_from_swap_cache(struct page *page)
-{
-}
-
-#define swap_token_default_timeout 0
-
-static inline int remove_exclusive_swap_page(struct page *p)
-{
- return 0;
-}
-
-static inline swp_entry_t get_swap_page(void)
-{
- swp_entry_t entry;
- entry.val = 0;
- return entry;
-}
-
-/* linux/mm/thrash.c */
-#define put_swap_token(x) do { } while(0)
-#define grab_swap_token() do { } while(0)
-#define has_swap_token(x) 0
-#define disable_swap_token() do { } while(0)
-
-#endif /* CONFIG_SWAP */
-#endif /* __KERNEL__*/
-#endif /* _LINUX_SWAP_H */
diff --git a/original/linux/sync.h b/original/linux/sync.h
deleted file mode 100644
index 75ed5f1..0000000
--- a/original/linux/sync.h
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * include/linux/sync.h
- *
- * Copyright (C) 2012 Google, Inc.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_SYNC_H
-#define _LINUX_SYNC_H
-
-#include <linux/types.h>
-#ifdef __KERNEL__
-
-#include <linux/kref.h>
-#include <linux/ktime.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <linux/wait.h>
-
-struct sync_timeline;
-struct sync_pt;
-struct sync_fence;
-
-/**
- * struct sync_timeline_ops - sync object implementation ops
- * @driver_name: name of the implentation
- * @dup: duplicate a sync_pt
- * @has_signaled: returns:
- * 1 if pt has signaled
- * 0 if pt has not signaled
- * <0 on error
- * @compare: returns:
- * 1 if b will signal before a
- * 0 if a and b will signal at the same time
- * -1 if a will signabl before b
- * @free_pt: called before sync_pt is freed
- * @release_obj: called before sync_timeline is freed
- * @print_obj: print aditional debug information about sync_timeline.
- * should not print a newline
- * @print_pt: print aditional debug information about sync_pt.
- * should not print a newline
- * @fill_driver_data: write implmentation specific driver data to data.
- * should return an error if there is not enough room
- * as specified by size. This information is returned
- * to userspace by SYNC_IOC_FENCE_INFO.
- */
-struct sync_timeline_ops {
- const char *driver_name;
-
- /* required */
- struct sync_pt *(*dup)(struct sync_pt *pt);
-
- /* required */
- int (*has_signaled)(struct sync_pt *pt);
-
- /* required */
- int (*compare)(struct sync_pt *a, struct sync_pt *b);
-
- /* optional */
- void (*free_pt)(struct sync_pt *sync_pt);
-
- /* optional */
- void (*release_obj)(struct sync_timeline *sync_timeline);
-
- /* optional */
- void (*print_obj)(struct seq_file *s,
- struct sync_timeline *sync_timeline);
-
- /* optional */
- void (*print_pt)(struct seq_file *s, struct sync_pt *sync_pt);
-
- /* optional */
- int (*fill_driver_data)(struct sync_pt *syncpt, void *data, int size);
-};
-
-/**
- * struct sync_timeline - sync object
- * @kref: reference count on fence.
- * @ops: ops that define the implementaiton of the sync_timeline
- * @name: name of the sync_timeline. Useful for debugging
- * @destoryed: set when sync_timeline is destroyed
- * @child_list_head: list of children sync_pts for this sync_timeline
- * @child_list_lock: lock protecting @child_list_head, destroyed, and
- * sync_pt.status
- * @active_list_head: list of active (unsignaled/errored) sync_pts
- * @sync_timeline_list: membership in global sync_timeline_list
- */
-struct sync_timeline {
- struct kref kref;
- const struct sync_timeline_ops *ops;
- char name[32];
-
- /* protected by child_list_lock */
- bool destroyed;
-
- struct list_head child_list_head;
- spinlock_t child_list_lock;
-
- struct list_head active_list_head;
- spinlock_t active_list_lock;
-
- struct list_head sync_timeline_list;
-};
-
-/**
- * struct sync_pt - sync point
- * @parent: sync_timeline to which this sync_pt belongs
- * @child_list: membership in sync_timeline.child_list_head
- * @active_list: membership in sync_timeline.active_list_head
- * @signaled_list: membership in temorary signaled_list on stack
- * @fence: sync_fence to which the sync_pt belongs
- * @pt_list: membership in sync_fence.pt_list_head
- * @status: 1: signaled, 0:active, <0: error
- * @timestamp: time which sync_pt status transitioned from active to
- * singaled or error.
- */
-struct sync_pt {
- struct sync_timeline *parent;
- struct list_head child_list;
-
- struct list_head active_list;
- struct list_head signaled_list;
-
- struct sync_fence *fence;
- struct list_head pt_list;
-
- /* protected by parent->active_list_lock */
- int status;
-
- ktime_t timestamp;
-};
-
-/**
- * struct sync_fence - sync fence
- * @file: file representing this fence
- * @kref: referenace count on fence.
- * @name: name of sync_fence. Useful for debugging
- * @pt_list_head: list of sync_pts in ths fence. immutable once fence
- * is created
- * @waiter_list_head: list of asynchronous waiters on this fence
- * @waiter_list_lock: lock protecting @waiter_list_head and @status
- * @status: 1: signaled, 0:active, <0: error
- *
- * @wq: wait queue for fence signaling
- * @sync_fence_list: membership in global fence list
- */
-struct sync_fence {
- struct file *file;
- struct kref kref;
- char name[32];
-
- /* this list is immutable once the fence is created */
- struct list_head pt_list_head;
-
- struct list_head waiter_list_head;
- spinlock_t waiter_list_lock; /* also protects status */
- int status;
-
- wait_queue_head_t wq;
-
- struct list_head sync_fence_list;
-};
-
-struct sync_fence_waiter;
-typedef void (*sync_callback_t)(struct sync_fence *fence,
- struct sync_fence_waiter *waiter);
-
-/**
- * struct sync_fence_waiter - metadata for asynchronous waiter on a fence
- * @waiter_list: membership in sync_fence.waiter_list_head
- * @callback: function pointer to call when fence signals
- * @callback_data: pointer to pass to @callback
- */
-struct sync_fence_waiter {
- struct list_head waiter_list;
-
- sync_callback_t callback;
-};
-
-static inline void sync_fence_waiter_init(struct sync_fence_waiter *waiter,
- sync_callback_t callback)
-{
- waiter->callback = callback;
-}
-
-/*
- * API for sync_timeline implementers
- */
-
-/**
- * sync_timeline_create() - creates a sync object
- * @ops: specifies the implemention ops for the object
- * @size: size to allocate for this obj
- * @name: sync_timeline name
- *
- * Creates a new sync_timeline which will use the implemetation specified by
- * @ops. @size bytes will be allocated allowing for implemntation specific
- * data to be kept after the generic sync_timeline stuct.
- */
-struct sync_timeline *sync_timeline_create(const struct sync_timeline_ops *ops,
- int size, const char *name);
-
-/**
- * sync_timeline_destory() - destorys a sync object
- * @obj: sync_timeline to destroy
- *
- * A sync implemntation should call this when the @obj is going away
- * (i.e. module unload.) @obj won't actually be freed until all its childern
- * sync_pts are freed.
- */
-void sync_timeline_destroy(struct sync_timeline *obj);
-
-/**
- * sync_timeline_signal() - signal a status change on a sync_timeline
- * @obj: sync_timeline to signal
- *
- * A sync implemntation should call this any time one of it's sync_pts
- * has signaled or has an error condition.
- */
-void sync_timeline_signal(struct sync_timeline *obj);
-
-/**
- * sync_pt_create() - creates a sync pt
- * @parent: sync_pt's parent sync_timeline
- * @size: size to allocate for this pt
- *
- * Creates a new sync_pt as a chiled of @parent. @size bytes will be
- * allocated allowing for implemntation specific data to be kept after
- * the generic sync_timeline struct.
- */
-struct sync_pt *sync_pt_create(struct sync_timeline *parent, int size);
-
-/**
- * sync_pt_free() - frees a sync pt
- * @pt: sync_pt to free
- *
- * This should only be called on sync_pts which have been created but
- * not added to a fence.
- */
-void sync_pt_free(struct sync_pt *pt);
-
-/**
- * sync_fence_create() - creates a sync fence
- * @name: name of fence to create
- * @pt: sync_pt to add to the fence
- *
- * Creates a fence containg @pt. Once this is called, the fence takes
- * ownership of @pt.
- */
-struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt);
-
-/*
- * API for sync_fence consumers
- */
-
-/**
- * sync_fence_merge() - merge two fences
- * @name: name of new fence
- * @a: fence a
- * @b: fence b
- *
- * Creates a new fence which contains copies of all the sync_pts in both
- * @a and @b. @a and @b remain valid, independent fences.
- */
-struct sync_fence *sync_fence_merge(const char *name,
- struct sync_fence *a, struct sync_fence *b);
-
-/**
- * sync_fence_fdget() - get a fence from an fd
- * @fd: fd referencing a fence
- *
- * Ensures @fd references a valid fence, increments the refcount of the backing
- * file, and returns the fence.
- */
-struct sync_fence *sync_fence_fdget(int fd);
-
-/**
- * sync_fence_put() - puts a refernnce of a sync fence
- * @fence: fence to put
- *
- * Puts a reference on @fence. If this is the last reference, the fence and
- * all it's sync_pts will be freed
- */
-void sync_fence_put(struct sync_fence *fence);
-
-/**
- * sync_fence_install() - installs a fence into a file descriptor
- * @fence: fence to instal
- * @fd: file descriptor in which to install the fence
- *
- * Installs @fence into @fd. @fd's should be acquired through get_unused_fd().
- */
-void sync_fence_install(struct sync_fence *fence, int fd);
-
-/**
- * sync_fence_wait_async() - registers and async wait on the fence
- * @fence: fence to wait on
- * @waiter: waiter callback struck
- *
- * Returns 1 if @fence has already signaled.
- *
- * Registers a callback to be called when @fence signals or has an error.
- * @waiter should be initialized with sync_fence_waiter_init().
- */
-int sync_fence_wait_async(struct sync_fence *fence,
- struct sync_fence_waiter *waiter);
-
-/**
- * sync_fence_cancel_async() - cancels an async wait
- * @fence: fence to wait on
- * @waiter: waiter callback struck
- *
- * returns 0 if waiter was removed from fence's async waiter list.
- * returns -ENOENT if waiter was not found on fence's async waiter list.
- *
- * Cancels a previously registered async wait. Will fail gracefully if
- * @waiter was never registered or if @fence has already signaled @waiter.
- */
-int sync_fence_cancel_async(struct sync_fence *fence,
- struct sync_fence_waiter *waiter);
-
-/**
- * sync_fence_wait() - wait on fence
- * @fence: fence to wait on
- * @tiemout: timeout in ms
- *
- * Wait for @fence to be signaled or have an error. Waits indefinitely
- * if @timeout < 0
- */
-int sync_fence_wait(struct sync_fence *fence, long timeout);
-
-#endif /* __KERNEL__ */
-
-/**
- * struct sync_merge_data - data passed to merge ioctl
- * @fd2: file descriptor of second fence
- * @name: name of new fence
- * @fence: returns the fd of the new fence to userspace
- */
-struct sync_merge_data {
- __s32 fd2; /* fd of second fence */
- char name[32]; /* name of new fence */
- __s32 fence; /* fd on newly created fence */
-};
-
-/**
- * struct sync_pt_info - detailed sync_pt information
- * @len: length of sync_pt_info including any driver_data
- * @obj_name: name of parent sync_timeline
- * @driver_name: name of driver implmenting the parent
- * @status: status of the sync_pt 0:active 1:signaled <0:error
- * @timestamp_ns: timestamp of status change in nanoseconds
- * @driver_data: any driver dependant data
- */
-struct sync_pt_info {
- __u32 len;
- char obj_name[32];
- char driver_name[32];
- __s32 status;
- __u64 timestamp_ns;
-
- __u8 driver_data[0];
-};
-
-/**
- * struct sync_fence_info_data - data returned from fence info ioctl
- * @len: ioctl caller writes the size of the buffer its passing in.
- * ioctl returns length of sync_fence_data reutnred to userspace
- * including pt_info.
- * @name: name of fence
- * @status: status of fence. 1: signaled 0:active <0:error
- * @pt_info: a sync_pt_info struct for every sync_pt in the fence
- */
-struct sync_fence_info_data {
- __u32 len;
- char name[32];
- __s32 status;
-
- __u8 pt_info[0];
-};
-
-#define SYNC_IOC_MAGIC '>'
-
-/**
- * DOC: SYNC_IOC_WAIT - wait for a fence to signal
- *
- * pass timeout in milliseconds. Waits indefinitely timeout < 0.
- */
-#define SYNC_IOC_WAIT _IOW(SYNC_IOC_MAGIC, 0, __s32)
-
-/**
- * DOC: SYNC_IOC_MERGE - merge two fences
- *
- * Takes a struct sync_merge_data. Creates a new fence containing copies of
- * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the
- * new fence's fd in sync_merge_data.fence
- */
-#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 1, struct sync_merge_data)
-
-/**
- * DOC: SYNC_IOC_FENCE_INFO - get detailed information on a fence
- *
- * Takes a struct sync_fence_info_data with extra space allocated for pt_info.
- * Caller should write the size of the buffer into len. On return, len is
- * updated to reflect the total size of the sync_fence_info_data including
- * pt_info.
- *
- * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence.
- * To itterate over the sync_pt_infos, use the sync_pt_info.len field.
- */
-#define SYNC_IOC_FENCE_INFO _IOWR(SYNC_IOC_MAGIC, 2,\
- struct sync_fence_info_data)
-
-#endif /* _LINUX_SYNC_H */
diff --git a/original/linux/sysctl.h b/original/linux/sysctl.h
deleted file mode 100644
index e4b1a4d..0000000
--- a/original/linux/sysctl.h
+++ /dev/null
@@ -1,1024 +0,0 @@
-/*
- * sysctl.h: General linux system control interface
- *
- * Begun 24 March 1995, Stephen Tweedie
- *
- ****************************************************************
- ****************************************************************
- **
- ** The values in this file are exported to user space via
- ** the sysctl() binary interface. However this interface
- ** is unstable and deprecated and will be removed in the future.
- ** For a stable interface use /proc/sys.
- **
- ****************************************************************
- ****************************************************************
- */
-
-#ifndef _LINUX_SYSCTL_H
-#define _LINUX_SYSCTL_H
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/compiler.h>
-
-struct file;
-struct completion;
-
-#define CTL_MAXNAME 10 /* how many path components do we allow in a
- call to sysctl? In other words, what is
- the largest acceptable value for the nlen
- member of a struct __sysctl_args to have? */
-
-struct __sysctl_args {
- int __user *name;
- int nlen;
- void __user *oldval;
- size_t __user *oldlenp;
- void __user *newval;
- size_t newlen;
- unsigned long __unused[4];
-};
-
-/* Define sysctl names first */
-
-/* Top-level names: */
-
-/* For internal pattern-matching use only: */
-#ifdef __KERNEL__
-#define CTL_ANY -1 /* Matches any name */
-#define CTL_NONE 0
-#endif
-
-enum
-{
- CTL_KERN=1, /* General kernel info and control */
- CTL_VM=2, /* VM management */
- CTL_NET=3, /* Networking */
- /* was CTL_PROC */
- CTL_FS=5, /* Filesystems */
- CTL_DEBUG=6, /* Debugging */
- CTL_DEV=7, /* Devices */
- CTL_BUS=8, /* Busses */
- CTL_ABI=9, /* Binary emulation */
- CTL_CPU=10 /* CPU stuff (speed scaling, etc) */
-};
-
-/* CTL_BUS names: */
-enum
-{
- CTL_BUS_ISA=1 /* ISA */
-};
-
-/* /proc/sys/fs/inotify/ */
-enum
-{
- INOTIFY_MAX_USER_INSTANCES=1, /* max instances per user */
- INOTIFY_MAX_USER_WATCHES=2, /* max watches per user */
- INOTIFY_MAX_QUEUED_EVENTS=3 /* max queued events per instance */
-};
-
-/* CTL_KERN names: */
-enum
-{
- KERN_OSTYPE=1, /* string: system version */
- KERN_OSRELEASE=2, /* string: system release */
- KERN_OSREV=3, /* int: system revision */
- KERN_VERSION=4, /* string: compile time info */
- KERN_SECUREMASK=5, /* struct: maximum rights mask */
- KERN_PROF=6, /* table: profiling information */
- KERN_NODENAME=7,
- KERN_DOMAINNAME=8,
-
- KERN_CAP_BSET=14, /* int: capability bounding set */
- KERN_PANIC=15, /* int: panic timeout */
- KERN_REALROOTDEV=16, /* real root device to mount after initrd */
-
- KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
- KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
- KERN_PRINTK=23, /* struct: control printk logging parameters */
- KERN_NAMETRANS=24, /* Name translation */
- KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */
- KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */
- KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */
- KERN_MODPROBE=28,
- KERN_SG_BIG_BUFF=29,
- KERN_ACCT=30, /* BSD process accounting parameters */
- KERN_PPC_L2CR=31, /* l2cr register on PPC */
-
- KERN_RTSIGNR=32, /* Number of rt sigs queued */
- KERN_RTSIGMAX=33, /* Max queuable */
-
- KERN_SHMMAX=34, /* long: Maximum shared memory segment */
- KERN_MSGMAX=35, /* int: Maximum size of a messege */
- KERN_MSGMNB=36, /* int: Maximum message queue size */
- KERN_MSGPOOL=37, /* int: Maximum system message pool size */
- KERN_SYSRQ=38, /* int: Sysreq enable */
- KERN_MAX_THREADS=39, /* int: Maximum nr of threads in the system */
- KERN_RANDOM=40, /* Random driver */
- KERN_SHMALL=41, /* int: Maximum size of shared memory */
- KERN_MSGMNI=42, /* int: msg queue identifiers */
- KERN_SEM=43, /* struct: sysv semaphore limits */
- KERN_SPARC_STOP_A=44, /* int: Sparc Stop-A enable */
- KERN_SHMMNI=45, /* int: shm array identifiers */
- KERN_OVERFLOWUID=46, /* int: overflow UID */
- KERN_OVERFLOWGID=47, /* int: overflow GID */
- KERN_SHMPATH=48, /* string: path to shm fs */
- KERN_HOTPLUG=49, /* string: path to uevent helper (deprecated) */
- KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */
- KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */
- KERN_CORE_USES_PID=52, /* int: use core or core.%pid */
- KERN_TAINTED=53, /* int: various kernel tainted flags */
- KERN_CADPID=54, /* int: PID of the process to notify on CAD */
- KERN_PIDMAX=55, /* int: PID # limit */
- KERN_CORE_PATTERN=56, /* string: pattern for core-file names */
- KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */
- KERN_HPPA_PWRSW=58, /* int: hppa soft-power enable */
- KERN_HPPA_UNALIGNED=59, /* int: hppa unaligned-trap enable */
- KERN_PRINTK_RATELIMIT=60, /* int: tune printk ratelimiting */
- KERN_PRINTK_RATELIMIT_BURST=61, /* int: tune printk ratelimiting */
- KERN_PTY=62, /* dir: pty driver */
- KERN_NGROUPS_MAX=63, /* int: NGROUPS_MAX */
- KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */
- KERN_HZ_TIMER=65, /* int: hz timer on or off */
- KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
- KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */
- KERN_RANDOMIZE=68, /* int: randomize virtual address space */
- KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */
- KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
- KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
- KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
- KERN_COMPAT_LOG=73, /* int: print compat layer messages */
- KERN_MAX_LOCK_DEPTH=74,
-};
-
-
-
-/* CTL_VM names: */
-enum
-{
- VM_UNUSED1=1, /* was: struct: Set vm swapping control */
- VM_UNUSED2=2, /* was; int: Linear or sqrt() swapout for hogs */
- VM_UNUSED3=3, /* was: struct: Set free page thresholds */
- VM_UNUSED4=4, /* Spare */
- VM_OVERCOMMIT_MEMORY=5, /* Turn off the virtual memory safety limit */
- VM_UNUSED5=6, /* was: struct: Set buffer memory thresholds */
- VM_UNUSED7=7, /* was: struct: Set cache memory thresholds */
- VM_UNUSED8=8, /* was: struct: Control kswapd behaviour */
- VM_UNUSED9=9, /* was: struct: Set page table cache parameters */
- VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */
- VM_DIRTY_BACKGROUND=11, /* dirty_background_ratio */
- VM_DIRTY_RATIO=12, /* dirty_ratio */
- VM_DIRTY_WB_CS=13, /* dirty_writeback_centisecs */
- VM_DIRTY_EXPIRE_CS=14, /* dirty_expire_centisecs */
- VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */
- VM_OVERCOMMIT_RATIO=16, /* percent of RAM to allow overcommit in */
- VM_PAGEBUF=17, /* struct: Control pagebuf parameters */
- VM_HUGETLB_PAGES=18, /* int: Number of available Huge Pages */
- VM_SWAPPINESS=19, /* Tendency to steal mapped memory */
- VM_LOWMEM_RESERVE_RATIO=20,/* reservation ratio for lower memory zones */
- VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */
- VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */
- VM_LAPTOP_MODE=23, /* vm laptop mode */
- VM_BLOCK_DUMP=24, /* block dump mode */
- VM_HUGETLB_GROUP=25, /* permitted hugetlb group */
- VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */
- VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */
- VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */
- VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */
- VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
- VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */
- VM_MIN_UNMAPPED=32, /* Set min percent of unmapped pages */
- VM_PANIC_ON_OOM=33, /* panic at out-of-memory */
- VM_VDSO_ENABLED=34, /* map VDSO into new processes? */
-};
-
-
-/* CTL_NET names: */
-enum
-{
- NET_CORE=1,
- NET_ETHER=2,
- NET_802=3,
- NET_UNIX=4,
- NET_IPV4=5,
- NET_IPX=6,
- NET_ATALK=7,
- NET_NETROM=8,
- NET_AX25=9,
- NET_BRIDGE=10,
- NET_ROSE=11,
- NET_IPV6=12,
- NET_X25=13,
- NET_TR=14,
- NET_DECNET=15,
- NET_ECONET=16,
- NET_SCTP=17,
- NET_LLC=18,
- NET_NETFILTER=19,
- NET_DCCP=20,
-};
-
-/* /proc/sys/kernel/random */
-enum
-{
- RANDOM_POOLSIZE=1,
- RANDOM_ENTROPY_COUNT=2,
- RANDOM_READ_THRESH=3,
- RANDOM_WRITE_THRESH=4,
- RANDOM_BOOT_ID=5,
- RANDOM_UUID=6
-};
-
-/* /proc/sys/kernel/pty */
-enum
-{
- PTY_MAX=1,
- PTY_NR=2
-};
-
-/* /proc/sys/bus/isa */
-enum
-{
- BUS_ISA_MEM_BASE=1,
- BUS_ISA_PORT_BASE=2,
- BUS_ISA_PORT_SHIFT=3
-};
-
-/* /proc/sys/net/core */
-enum
-{
- NET_CORE_WMEM_MAX=1,
- NET_CORE_RMEM_MAX=2,
- NET_CORE_WMEM_DEFAULT=3,
- NET_CORE_RMEM_DEFAULT=4,
-/* was NET_CORE_DESTROY_DELAY */
- NET_CORE_MAX_BACKLOG=6,
- NET_CORE_FASTROUTE=7,
- NET_CORE_MSG_COST=8,
- NET_CORE_MSG_BURST=9,
- NET_CORE_OPTMEM_MAX=10,
- NET_CORE_HOT_LIST_LENGTH=11,
- NET_CORE_DIVERT_VERSION=12,
- NET_CORE_NO_CONG_THRESH=13,
- NET_CORE_NO_CONG=14,
- NET_CORE_LO_CONG=15,
- NET_CORE_MOD_CONG=16,
- NET_CORE_DEV_WEIGHT=17,
- NET_CORE_SOMAXCONN=18,
- NET_CORE_BUDGET=19,
- NET_CORE_AEVENT_ETIME=20,
- NET_CORE_AEVENT_RSEQTH=21,
-};
-
-/* /proc/sys/net/ethernet */
-
-/* /proc/sys/net/802 */
-
-/* /proc/sys/net/unix */
-
-enum
-{
- NET_UNIX_DESTROY_DELAY=1,
- NET_UNIX_DELETE_DELAY=2,
- NET_UNIX_MAX_DGRAM_QLEN=3,
-};
-
-/* /proc/sys/net/netfilter */
-enum
-{
- NET_NF_CONNTRACK_MAX=1,
- NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
- NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
- NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
- NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
- NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
- NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
- NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
- NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
- NET_NF_CONNTRACK_UDP_TIMEOUT=10,
- NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
- NET_NF_CONNTRACK_ICMP_TIMEOUT=12,
- NET_NF_CONNTRACK_GENERIC_TIMEOUT=13,
- NET_NF_CONNTRACK_BUCKETS=14,
- NET_NF_CONNTRACK_LOG_INVALID=15,
- NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
- NET_NF_CONNTRACK_TCP_LOOSE=17,
- NET_NF_CONNTRACK_TCP_BE_LIBERAL=18,
- NET_NF_CONNTRACK_TCP_MAX_RETRANS=19,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
- NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
- NET_NF_CONNTRACK_COUNT=27,
- NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28,
- NET_NF_CONNTRACK_FRAG6_TIMEOUT=29,
- NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30,
- NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31,
- NET_NF_CONNTRACK_CHECKSUM=32,
-};
-
-/* /proc/sys/net/ipv4 */
-enum
-{
- /* v2.0 compatibile variables */
- NET_IPV4_FORWARD=8,
- NET_IPV4_DYNADDR=9,
-
- NET_IPV4_CONF=16,
- NET_IPV4_NEIGH=17,
- NET_IPV4_ROUTE=18,
- NET_IPV4_FIB_HASH=19,
- NET_IPV4_NETFILTER=20,
-
- NET_IPV4_TCP_TIMESTAMPS=33,
- NET_IPV4_TCP_WINDOW_SCALING=34,
- NET_IPV4_TCP_SACK=35,
- NET_IPV4_TCP_RETRANS_COLLAPSE=36,
- NET_IPV4_DEFAULT_TTL=37,
- NET_IPV4_AUTOCONFIG=38,
- NET_IPV4_NO_PMTU_DISC=39,
- NET_IPV4_TCP_SYN_RETRIES=40,
- NET_IPV4_IPFRAG_HIGH_THRESH=41,
- NET_IPV4_IPFRAG_LOW_THRESH=42,
- NET_IPV4_IPFRAG_TIME=43,
- NET_IPV4_TCP_MAX_KA_PROBES=44,
- NET_IPV4_TCP_KEEPALIVE_TIME=45,
- NET_IPV4_TCP_KEEPALIVE_PROBES=46,
- NET_IPV4_TCP_RETRIES1=47,
- NET_IPV4_TCP_RETRIES2=48,
- NET_IPV4_TCP_FIN_TIMEOUT=49,
- NET_IPV4_IP_MASQ_DEBUG=50,
- NET_TCP_SYNCOOKIES=51,
- NET_TCP_STDURG=52,
- NET_TCP_RFC1337=53,
- NET_TCP_SYN_TAILDROP=54,
- NET_TCP_MAX_SYN_BACKLOG=55,
- NET_IPV4_LOCAL_PORT_RANGE=56,
- NET_IPV4_ICMP_ECHO_IGNORE_ALL=57,
- NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58,
- NET_IPV4_ICMP_SOURCEQUENCH_RATE=59,
- NET_IPV4_ICMP_DESTUNREACH_RATE=60,
- NET_IPV4_ICMP_TIMEEXCEED_RATE=61,
- NET_IPV4_ICMP_PARAMPROB_RATE=62,
- NET_IPV4_ICMP_ECHOREPLY_RATE=63,
- NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
- NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
- NET_TCP_TW_RECYCLE=66,
- NET_IPV4_ALWAYS_DEFRAG=67,
- NET_IPV4_TCP_KEEPALIVE_INTVL=68,
- NET_IPV4_INET_PEER_THRESHOLD=69,
- NET_IPV4_INET_PEER_MINTTL=70,
- NET_IPV4_INET_PEER_MAXTTL=71,
- NET_IPV4_INET_PEER_GC_MINTIME=72,
- NET_IPV4_INET_PEER_GC_MAXTIME=73,
- NET_TCP_ORPHAN_RETRIES=74,
- NET_TCP_ABORT_ON_OVERFLOW=75,
- NET_TCP_SYNACK_RETRIES=76,
- NET_TCP_MAX_ORPHANS=77,
- NET_TCP_MAX_TW_BUCKETS=78,
- NET_TCP_FACK=79,
- NET_TCP_REORDERING=80,
- NET_TCP_ECN=81,
- NET_TCP_DSACK=82,
- NET_TCP_MEM=83,
- NET_TCP_WMEM=84,
- NET_TCP_RMEM=85,
- NET_TCP_APP_WIN=86,
- NET_TCP_ADV_WIN_SCALE=87,
- NET_IPV4_NONLOCAL_BIND=88,
- NET_IPV4_ICMP_RATELIMIT=89,
- NET_IPV4_ICMP_RATEMASK=90,
- NET_TCP_TW_REUSE=91,
- NET_TCP_FRTO=92,
- NET_TCP_LOW_LATENCY=93,
- NET_IPV4_IPFRAG_SECRET_INTERVAL=94,
- NET_IPV4_IGMP_MAX_MSF=96,
- NET_TCP_NO_METRICS_SAVE=97,
- NET_TCP_DEFAULT_WIN_SCALE=105,
- NET_TCP_MODERATE_RCVBUF=106,
- NET_TCP_TSO_WIN_DIVISOR=107,
- NET_TCP_BIC_BETA=108,
- NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
- NET_TCP_CONG_CONTROL=110,
- NET_TCP_ABC=111,
- NET_IPV4_IPFRAG_MAX_DIST=112,
- NET_TCP_MTU_PROBING=113,
- NET_TCP_BASE_MSS=114,
- NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
- NET_TCP_DMA_COPYBREAK=116,
- NET_TCP_SLOW_START_AFTER_IDLE=117,
-};
-
-enum {
- NET_IPV4_ROUTE_FLUSH=1,
- NET_IPV4_ROUTE_MIN_DELAY=2,
- NET_IPV4_ROUTE_MAX_DELAY=3,
- NET_IPV4_ROUTE_GC_THRESH=4,
- NET_IPV4_ROUTE_MAX_SIZE=5,
- NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
- NET_IPV4_ROUTE_GC_TIMEOUT=7,
- NET_IPV4_ROUTE_GC_INTERVAL=8,
- NET_IPV4_ROUTE_REDIRECT_LOAD=9,
- NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
- NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
- NET_IPV4_ROUTE_ERROR_COST=12,
- NET_IPV4_ROUTE_ERROR_BURST=13,
- NET_IPV4_ROUTE_GC_ELASTICITY=14,
- NET_IPV4_ROUTE_MTU_EXPIRES=15,
- NET_IPV4_ROUTE_MIN_PMTU=16,
- NET_IPV4_ROUTE_MIN_ADVMSS=17,
- NET_IPV4_ROUTE_SECRET_INTERVAL=18,
- NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19,
-};
-
-enum
-{
- NET_PROTO_CONF_ALL=-2,
- NET_PROTO_CONF_DEFAULT=-3
-
- /* And device ifindices ... */
-};
-
-enum
-{
- NET_IPV4_CONF_FORWARDING=1,
- NET_IPV4_CONF_MC_FORWARDING=2,
- NET_IPV4_CONF_PROXY_ARP=3,
- NET_IPV4_CONF_ACCEPT_REDIRECTS=4,
- NET_IPV4_CONF_SECURE_REDIRECTS=5,
- NET_IPV4_CONF_SEND_REDIRECTS=6,
- NET_IPV4_CONF_SHARED_MEDIA=7,
- NET_IPV4_CONF_RP_FILTER=8,
- NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9,
- NET_IPV4_CONF_BOOTP_RELAY=10,
- NET_IPV4_CONF_LOG_MARTIANS=11,
- NET_IPV4_CONF_TAG=12,
- NET_IPV4_CONF_ARPFILTER=13,
- NET_IPV4_CONF_MEDIUM_ID=14,
- NET_IPV4_CONF_NOXFRM=15,
- NET_IPV4_CONF_NOPOLICY=16,
- NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
- NET_IPV4_CONF_ARP_ANNOUNCE=18,
- NET_IPV4_CONF_ARP_IGNORE=19,
- NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
- NET_IPV4_CONF_ARP_ACCEPT=21,
- __NET_IPV4_CONF_MAX
-};
-
-/* /proc/sys/net/ipv4/netfilter */
-enum
-{
- NET_IPV4_NF_CONNTRACK_MAX=1,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9,
- NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10,
- NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11,
- NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12,
- NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13,
- NET_IPV4_NF_CONNTRACK_BUCKETS=14,
- NET_IPV4_NF_CONNTRACK_LOG_INVALID=15,
- NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16,
- NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17,
- NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18,
- NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25,
- NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26,
- NET_IPV4_NF_CONNTRACK_COUNT=27,
- NET_IPV4_NF_CONNTRACK_CHECKSUM=28,
-};
-
-/* /proc/sys/net/ipv6 */
-enum {
- NET_IPV6_CONF=16,
- NET_IPV6_NEIGH=17,
- NET_IPV6_ROUTE=18,
- NET_IPV6_ICMP=19,
- NET_IPV6_BINDV6ONLY=20,
- NET_IPV6_IP6FRAG_HIGH_THRESH=21,
- NET_IPV6_IP6FRAG_LOW_THRESH=22,
- NET_IPV6_IP6FRAG_TIME=23,
- NET_IPV6_IP6FRAG_SECRET_INTERVAL=24,
- NET_IPV6_MLD_MAX_MSF=25,
-};
-
-enum {
- NET_IPV6_ROUTE_FLUSH=1,
- NET_IPV6_ROUTE_GC_THRESH=2,
- NET_IPV6_ROUTE_MAX_SIZE=3,
- NET_IPV6_ROUTE_GC_MIN_INTERVAL=4,
- NET_IPV6_ROUTE_GC_TIMEOUT=5,
- NET_IPV6_ROUTE_GC_INTERVAL=6,
- NET_IPV6_ROUTE_GC_ELASTICITY=7,
- NET_IPV6_ROUTE_MTU_EXPIRES=8,
- NET_IPV6_ROUTE_MIN_ADVMSS=9,
- NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10
-};
-
-enum {
- NET_IPV6_FORWARDING=1,
- NET_IPV6_HOP_LIMIT=2,
- NET_IPV6_MTU=3,
- NET_IPV6_ACCEPT_RA=4,
- NET_IPV6_ACCEPT_REDIRECTS=5,
- NET_IPV6_AUTOCONF=6,
- NET_IPV6_DAD_TRANSMITS=7,
- NET_IPV6_RTR_SOLICITS=8,
- NET_IPV6_RTR_SOLICIT_INTERVAL=9,
- NET_IPV6_RTR_SOLICIT_DELAY=10,
- NET_IPV6_USE_TEMPADDR=11,
- NET_IPV6_TEMP_VALID_LFT=12,
- NET_IPV6_TEMP_PREFERED_LFT=13,
- NET_IPV6_REGEN_MAX_RETRY=14,
- NET_IPV6_MAX_DESYNC_FACTOR=15,
- NET_IPV6_MAX_ADDRESSES=16,
- NET_IPV6_FORCE_MLD_VERSION=17,
- NET_IPV6_ACCEPT_RA_DEFRTR=18,
- NET_IPV6_ACCEPT_RA_PINFO=19,
- NET_IPV6_ACCEPT_RA_RTR_PREF=20,
- NET_IPV6_RTR_PROBE_INTERVAL=21,
- NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
- __NET_IPV6_MAX
-};
-
-/* /proc/sys/net/ipv6/icmp */
-enum {
- NET_IPV6_ICMP_RATELIMIT=1
-};
-
-/* /proc/sys/net/<protocol>/neigh/<dev> */
-enum {
- NET_NEIGH_MCAST_SOLICIT=1,
- NET_NEIGH_UCAST_SOLICIT=2,
- NET_NEIGH_APP_SOLICIT=3,
- NET_NEIGH_RETRANS_TIME=4,
- NET_NEIGH_REACHABLE_TIME=5,
- NET_NEIGH_DELAY_PROBE_TIME=6,
- NET_NEIGH_GC_STALE_TIME=7,
- NET_NEIGH_UNRES_QLEN=8,
- NET_NEIGH_PROXY_QLEN=9,
- NET_NEIGH_ANYCAST_DELAY=10,
- NET_NEIGH_PROXY_DELAY=11,
- NET_NEIGH_LOCKTIME=12,
- NET_NEIGH_GC_INTERVAL=13,
- NET_NEIGH_GC_THRESH1=14,
- NET_NEIGH_GC_THRESH2=15,
- NET_NEIGH_GC_THRESH3=16,
- NET_NEIGH_RETRANS_TIME_MS=17,
- NET_NEIGH_REACHABLE_TIME_MS=18,
- __NET_NEIGH_MAX
-};
-
-/* /proc/sys/net/dccp */
-enum {
- NET_DCCP_DEFAULT=1,
-};
-
-/* /proc/sys/net/dccp/default */
-enum {
- NET_DCCP_DEFAULT_SEQ_WINDOW = 1,
- NET_DCCP_DEFAULT_RX_CCID = 2,
- NET_DCCP_DEFAULT_TX_CCID = 3,
- NET_DCCP_DEFAULT_ACK_RATIO = 4,
- NET_DCCP_DEFAULT_SEND_ACKVEC = 5,
- NET_DCCP_DEFAULT_SEND_NDP = 6,
-};
-
-/* /proc/sys/net/ipx */
-enum {
- NET_IPX_PPROP_BROADCASTING=1,
- NET_IPX_FORWARDING=2
-};
-
-/* /proc/sys/net/llc */
-enum {
- NET_LLC2=1,
- NET_LLC_STATION=2,
-};
-
-/* /proc/sys/net/llc/llc2 */
-enum {
- NET_LLC2_TIMEOUT=1,
-};
-
-/* /proc/sys/net/llc/station */
-enum {
- NET_LLC_STATION_ACK_TIMEOUT=1,
-};
-
-/* /proc/sys/net/llc/llc2/timeout */
-enum {
- NET_LLC2_ACK_TIMEOUT=1,
- NET_LLC2_P_TIMEOUT=2,
- NET_LLC2_REJ_TIMEOUT=3,
- NET_LLC2_BUSY_TIMEOUT=4,
-};
-
-/* /proc/sys/net/appletalk */
-enum {
- NET_ATALK_AARP_EXPIRY_TIME=1,
- NET_ATALK_AARP_TICK_TIME=2,
- NET_ATALK_AARP_RETRANSMIT_LIMIT=3,
- NET_ATALK_AARP_RESOLVE_TIME=4
-};
-
-
-/* /proc/sys/net/netrom */
-enum {
- NET_NETROM_DEFAULT_PATH_QUALITY=1,
- NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2,
- NET_NETROM_NETWORK_TTL_INITIALISER=3,
- NET_NETROM_TRANSPORT_TIMEOUT=4,
- NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5,
- NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6,
- NET_NETROM_TRANSPORT_BUSY_DELAY=7,
- NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8,
- NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9,
- NET_NETROM_ROUTING_CONTROL=10,
- NET_NETROM_LINK_FAILS_COUNT=11,
- NET_NETROM_RESET=12
-};
-
-/* /proc/sys/net/ax25 */
-enum {
- NET_AX25_IP_DEFAULT_MODE=1,
- NET_AX25_DEFAULT_MODE=2,
- NET_AX25_BACKOFF_TYPE=3,
- NET_AX25_CONNECT_MODE=4,
- NET_AX25_STANDARD_WINDOW=5,
- NET_AX25_EXTENDED_WINDOW=6,
- NET_AX25_T1_TIMEOUT=7,
- NET_AX25_T2_TIMEOUT=8,
- NET_AX25_T3_TIMEOUT=9,
- NET_AX25_IDLE_TIMEOUT=10,
- NET_AX25_N2=11,
- NET_AX25_PACLEN=12,
- NET_AX25_PROTOCOL=13,
- NET_AX25_DAMA_SLAVE_TIMEOUT=14
-};
-
-/* /proc/sys/net/rose */
-enum {
- NET_ROSE_RESTART_REQUEST_TIMEOUT=1,
- NET_ROSE_CALL_REQUEST_TIMEOUT=2,
- NET_ROSE_RESET_REQUEST_TIMEOUT=3,
- NET_ROSE_CLEAR_REQUEST_TIMEOUT=4,
- NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5,
- NET_ROSE_ROUTING_CONTROL=6,
- NET_ROSE_LINK_FAIL_TIMEOUT=7,
- NET_ROSE_MAX_VCS=8,
- NET_ROSE_WINDOW_SIZE=9,
- NET_ROSE_NO_ACTIVITY_TIMEOUT=10
-};
-
-/* /proc/sys/net/x25 */
-enum {
- NET_X25_RESTART_REQUEST_TIMEOUT=1,
- NET_X25_CALL_REQUEST_TIMEOUT=2,
- NET_X25_RESET_REQUEST_TIMEOUT=3,
- NET_X25_CLEAR_REQUEST_TIMEOUT=4,
- NET_X25_ACK_HOLD_BACK_TIMEOUT=5
-};
-
-/* /proc/sys/net/token-ring */
-enum
-{
- NET_TR_RIF_TIMEOUT=1
-};
-
-/* /proc/sys/net/decnet/ */
-enum {
- NET_DECNET_NODE_TYPE = 1,
- NET_DECNET_NODE_ADDRESS = 2,
- NET_DECNET_NODE_NAME = 3,
- NET_DECNET_DEFAULT_DEVICE = 4,
- NET_DECNET_TIME_WAIT = 5,
- NET_DECNET_DN_COUNT = 6,
- NET_DECNET_DI_COUNT = 7,
- NET_DECNET_DR_COUNT = 8,
- NET_DECNET_DST_GC_INTERVAL = 9,
- NET_DECNET_CONF = 10,
- NET_DECNET_NO_FC_MAX_CWND = 11,
- NET_DECNET_MEM = 12,
- NET_DECNET_RMEM = 13,
- NET_DECNET_WMEM = 14,
- NET_DECNET_DEBUG_LEVEL = 255
-};
-
-/* /proc/sys/net/decnet/conf/<dev> */
-enum {
- NET_DECNET_CONF_LOOPBACK = -2,
- NET_DECNET_CONF_DDCMP = -3,
- NET_DECNET_CONF_PPP = -4,
- NET_DECNET_CONF_X25 = -5,
- NET_DECNET_CONF_GRE = -6,
- NET_DECNET_CONF_ETHER = -7
-
- /* ... and ifindex of devices */
-};
-
-/* /proc/sys/net/decnet/conf/<dev>/ */
-enum {
- NET_DECNET_CONF_DEV_PRIORITY = 1,
- NET_DECNET_CONF_DEV_T1 = 2,
- NET_DECNET_CONF_DEV_T2 = 3,
- NET_DECNET_CONF_DEV_T3 = 4,
- NET_DECNET_CONF_DEV_FORWARDING = 5,
- NET_DECNET_CONF_DEV_BLKSIZE = 6,
- NET_DECNET_CONF_DEV_STATE = 7
-};
-
-/* /proc/sys/net/sctp */
-enum {
- NET_SCTP_RTO_INITIAL = 1,
- NET_SCTP_RTO_MIN = 2,
- NET_SCTP_RTO_MAX = 3,
- NET_SCTP_RTO_ALPHA = 4,
- NET_SCTP_RTO_BETA = 5,
- NET_SCTP_VALID_COOKIE_LIFE = 6,
- NET_SCTP_ASSOCIATION_MAX_RETRANS = 7,
- NET_SCTP_PATH_MAX_RETRANS = 8,
- NET_SCTP_MAX_INIT_RETRANSMITS = 9,
- NET_SCTP_HB_INTERVAL = 10,
- NET_SCTP_PRESERVE_ENABLE = 11,
- NET_SCTP_MAX_BURST = 12,
- NET_SCTP_ADDIP_ENABLE = 13,
- NET_SCTP_PRSCTP_ENABLE = 14,
- NET_SCTP_SNDBUF_POLICY = 15,
- NET_SCTP_SACK_TIMEOUT = 16,
- NET_SCTP_RCVBUF_POLICY = 17,
-};
-
-/* /proc/sys/net/bridge */
-enum {
- NET_BRIDGE_NF_CALL_ARPTABLES = 1,
- NET_BRIDGE_NF_CALL_IPTABLES = 2,
- NET_BRIDGE_NF_CALL_IP6TABLES = 3,
- NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4,
-};
-
-/* CTL_FS names: */
-enum
-{
- FS_NRINODE=1, /* int:current number of allocated inodes */
- FS_STATINODE=2,
- FS_MAXINODE=3, /* int:maximum number of inodes that can be allocated */
- FS_NRDQUOT=4, /* int:current number of allocated dquots */
- FS_MAXDQUOT=5, /* int:maximum number of dquots that can be allocated */
- FS_NRFILE=6, /* int:current number of allocated filedescriptors */
- FS_MAXFILE=7, /* int:maximum number of filedescriptors that can be allocated */
- FS_DENTRY=8,
- FS_NRSUPER=9, /* int:current number of allocated super_blocks */
- FS_MAXSUPER=10, /* int:maximum number of super_blocks that can be allocated */
- FS_OVERFLOWUID=11, /* int: overflow UID */
- FS_OVERFLOWGID=12, /* int: overflow GID */
- FS_LEASES=13, /* int: leases enabled */
- FS_DIR_NOTIFY=14, /* int: directory notification enabled */
- FS_LEASE_TIME=15, /* int: maximum time to wait for a lease break */
- FS_DQSTATS=16, /* disc quota usage statistics and control */
- FS_XFS=17, /* struct: control xfs parameters */
- FS_AIO_NR=18, /* current system-wide number of aio requests */
- FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */
- FS_INOTIFY=20, /* inotify submenu */
-};
-
-/* /proc/sys/fs/quota/ */
-enum {
- FS_DQ_LOOKUPS = 1,
- FS_DQ_DROPS = 2,
- FS_DQ_READS = 3,
- FS_DQ_WRITES = 4,
- FS_DQ_CACHE_HITS = 5,
- FS_DQ_ALLOCATED = 6,
- FS_DQ_FREE = 7,
- FS_DQ_SYNCS = 8,
- FS_DQ_WARNINGS = 9,
-};
-
-/* CTL_DEBUG names: */
-
-/* CTL_DEV names: */
-enum {
- DEV_CDROM=1,
- DEV_HWMON=2,
- DEV_PARPORT=3,
- DEV_RAID=4,
- DEV_MAC_HID=5,
- DEV_SCSI=6,
- DEV_IPMI=7,
-};
-
-/* /proc/sys/dev/cdrom */
-enum {
- DEV_CDROM_INFO=1,
- DEV_CDROM_AUTOCLOSE=2,
- DEV_CDROM_AUTOEJECT=3,
- DEV_CDROM_DEBUG=4,
- DEV_CDROM_LOCK=5,
- DEV_CDROM_CHECK_MEDIA=6
-};
-
-/* /proc/sys/dev/parport */
-enum {
- DEV_PARPORT_DEFAULT=-3
-};
-
-/* /proc/sys/dev/raid */
-enum {
- DEV_RAID_SPEED_LIMIT_MIN=1,
- DEV_RAID_SPEED_LIMIT_MAX=2
-};
-
-/* /proc/sys/dev/parport/default */
-enum {
- DEV_PARPORT_DEFAULT_TIMESLICE=1,
- DEV_PARPORT_DEFAULT_SPINTIME=2
-};
-
-/* /proc/sys/dev/parport/parport n */
-enum {
- DEV_PARPORT_SPINTIME=1,
- DEV_PARPORT_BASE_ADDR=2,
- DEV_PARPORT_IRQ=3,
- DEV_PARPORT_DMA=4,
- DEV_PARPORT_MODES=5,
- DEV_PARPORT_DEVICES=6,
- DEV_PARPORT_AUTOPROBE=16
-};
-
-/* /proc/sys/dev/parport/parport n/devices/ */
-enum {
- DEV_PARPORT_DEVICES_ACTIVE=-3,
-};
-
-/* /proc/sys/dev/parport/parport n/devices/device n */
-enum {
- DEV_PARPORT_DEVICE_TIMESLICE=1,
-};
-
-/* /proc/sys/dev/mac_hid */
-enum {
- DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1,
- DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2,
- DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3,
- DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4,
- DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5,
- DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6
-};
-
-/* /proc/sys/dev/scsi */
-enum {
- DEV_SCSI_LOGGING_LEVEL=1,
-};
-
-/* /proc/sys/dev/ipmi */
-enum {
- DEV_IPMI_POWEROFF_POWERCYCLE=1,
-};
-
-/* /proc/sys/abi */
-enum
-{
- ABI_DEFHANDLER_COFF=1, /* default handler for coff binaries */
- ABI_DEFHANDLER_ELF=2, /* default handler for ELF binaries */
- ABI_DEFHANDLER_LCALL7=3,/* default handler for procs using lcall7 */
- ABI_DEFHANDLER_LIBCSO=4,/* default handler for an libc.so ELF interp */
- ABI_TRACE=5, /* tracing flags */
- ABI_FAKE_UTSNAME=6, /* fake target utsname information */
-};
-
-#ifdef __KERNEL__
-#include <linux/list.h>
-
-extern void sysctl_init(void);
-
-typedef struct ctl_table ctl_table;
-
-typedef int ctl_handler (ctl_table *table, int __user *name, int nlen,
- void __user *oldval, size_t __user *oldlenp,
- void __user *newval, size_t newlen,
- void **context);
-
-typedef int proc_handler (ctl_table *ctl, int write, struct file * filp,
- void __user *buffer, size_t *lenp, loff_t *ppos);
-
-extern int proc_dostring(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_dointvec(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_dointvec_bset(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_dointvec_minmax(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_dointvec_jiffies(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_doulongvec_minmax(ctl_table *, int, struct file *,
- void __user *, size_t *, loff_t *);
-extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int,
- struct file *, void __user *, size_t *, loff_t *);
-
-extern int do_sysctl (int __user *name, int nlen,
- void __user *oldval, size_t __user *oldlenp,
- void __user *newval, size_t newlen);
-
-extern int do_sysctl_strategy (ctl_table *table,
- int __user *name, int nlen,
- void __user *oldval, size_t __user *oldlenp,
- void __user *newval, size_t newlen, void ** context);
-
-extern ctl_handler sysctl_string;
-extern ctl_handler sysctl_intvec;
-extern ctl_handler sysctl_jiffies;
-extern ctl_handler sysctl_ms_jiffies;
-
-
-/*
- * Register a set of sysctl names by calling register_sysctl_table
- * with an initialised array of ctl_table's. An entry with zero
- * ctl_name terminates the table. table->de will be set up by the
- * registration and need not be initialised in advance.
- *
- * sysctl names can be mirrored automatically under /proc/sys. The
- * procname supplied controls /proc naming.
- *
- * The table's mode will be honoured both for sys_sysctl(2) and
- * proc-fs access.
- *
- * Leaf nodes in the sysctl tree will be represented by a single file
- * under /proc; non-leaf nodes will be represented by directories. A
- * null procname disables /proc mirroring at this node.
- *
- * sysctl(2) can automatically manage read and write requests through
- * the sysctl table. The data and maxlen fields of the ctl_table
- * struct enable minimal validation of the values being written to be
- * performed, and the mode field allows minimal authentication.
- *
- * More sophisticated management can be enabled by the provision of a
- * strategy routine with the table entry. This will be called before
- * any automatic read or write of the data is performed.
- *
- * The strategy routine may return:
- * <0: Error occurred (error is passed to user process)
- * 0: OK - proceed with automatic read or write.
- * >0: OK - read or write has been done by the strategy routine, so
- * return immediately.
- *
- * There must be a proc_handler routine for any terminal nodes
- * mirrored under /proc/sys (non-terminals are handled by a built-in
- * directory handler). Several default handlers are available to
- * cover common cases.
- */
-
-/* A sysctl table is an array of struct ctl_table: */
-struct ctl_table
-{
- int ctl_name; /* Binary ID */
- const char *procname; /* Text ID for /proc/sys, or zero */
- void *data;
- int maxlen;
- mode_t mode;
- ctl_table *child;
- proc_handler *proc_handler; /* Callback for text formatting */
- ctl_handler *strategy; /* Callback function for all r/w */
- struct proc_dir_entry *de; /* /proc control block */
- void *extra1;
- void *extra2;
-};
-
-/* struct ctl_table_header is used to maintain dynamic lists of
- ctl_table trees. */
-struct ctl_table_header
-{
- ctl_table *ctl_table;
- struct list_head ctl_entry;
- int used;
- struct completion *unregistering;
-};
-
-struct ctl_table_header * register_sysctl_table(ctl_table * table,
- int insert_at_head);
-void unregister_sysctl_table(struct ctl_table_header * table);
-
-#else /* __KERNEL__ */
-
-#endif /* __KERNEL__ */
-
-#endif /* _LINUX_SYSCTL_H */
diff --git a/original/linux/sysdev.h b/original/linux/sysdev.h
deleted file mode 100644
index 166a2e5..0000000
--- a/original/linux/sysdev.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * System devices follow a slightly different driver model.
- * They don't need to do dynammic driver binding, can't be probed,
- * and don't reside on any type of peripheral bus.
- * So, we represent and treat them a little differently.
- *
- * We still have a notion of a driver for a system device, because we still
- * want to perform basic operations on these devices.
- *
- * We also support auxillary drivers binding to devices of a certain class.
- *
- * This allows configurable drivers to register themselves for devices of
- * a certain type. And, it allows class definitions to reside in generic
- * code while arch-specific code can register specific drivers.
- *
- * Auxillary drivers registered with a NULL cls are registered as drivers
- * for all system devices, and get notification calls for each device.
- */
-
-
-#ifndef _SYSDEV_H_
-#define _SYSDEV_H_
-
-#include <linux/kobject.h>
-#include <linux/pm.h>
-
-
-struct sys_device;
-
-struct sysdev_class {
- struct list_head drivers;
-
- /* Default operations for these types of devices */
- int (*shutdown)(struct sys_device *);
- int (*suspend)(struct sys_device *, pm_message_t state);
- int (*resume)(struct sys_device *);
- struct kset kset;
-};
-
-struct sysdev_class_attribute {
- struct attribute attr;
- ssize_t (*show)(struct sysdev_class *, char *);
- ssize_t (*store)(struct sysdev_class *, const char *, size_t);
-};
-
-#define SYSDEV_CLASS_ATTR(_name,_mode,_show,_store) \
-struct sysdev_class_attribute attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
- .show = _show, \
- .store = _store, \
-};
-
-
-extern int sysdev_class_register(struct sysdev_class *);
-extern void sysdev_class_unregister(struct sysdev_class *);
-
-extern int sysdev_class_create_file(struct sysdev_class *,
- struct sysdev_class_attribute *);
-extern void sysdev_class_remove_file(struct sysdev_class *,
- struct sysdev_class_attribute *);
-/**
- * Auxillary system device drivers.
- */
-
-struct sysdev_driver {
- struct list_head entry;
- int (*add)(struct sys_device *);
- int (*remove)(struct sys_device *);
- int (*shutdown)(struct sys_device *);
- int (*suspend)(struct sys_device *, pm_message_t state);
- int (*resume)(struct sys_device *);
-};
-
-
-extern int sysdev_driver_register(struct sysdev_class *, struct sysdev_driver *);
-extern void sysdev_driver_unregister(struct sysdev_class *, struct sysdev_driver *);
-
-
-/**
- * sys_devices can be simplified a lot from regular devices, because they're
- * simply not as versatile.
- */
-
-struct sys_device {
- u32 id;
- struct sysdev_class * cls;
- struct kobject kobj;
-};
-
-extern int sysdev_register(struct sys_device *);
-extern void sysdev_unregister(struct sys_device *);
-
-
-struct sysdev_attribute {
- struct attribute attr;
- ssize_t (*show)(struct sys_device *, char *);
- ssize_t (*store)(struct sys_device *, const char *, size_t);
-};
-
-
-#define SYSDEV_ATTR(_name,_mode,_show,_store) \
-struct sysdev_attribute attr_##_name = { \
- .attr = {.name = __stringify(_name), .mode = _mode }, \
- .show = _show, \
- .store = _store, \
-};
-
-extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
-extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
-
-#endif /* _SYSDEV_H_ */
diff --git a/original/linux/sysfs.h b/original/linux/sysfs.h
deleted file mode 100644
index 0767815..0000000
--- a/original/linux/sysfs.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * sysfs.h - definitions for the device driver filesystem
- *
- * Copyright (c) 2001,2002 Patrick Mochel
- * Copyright (c) 2004 Silicon Graphics, Inc.
- *
- * Please see Documentation/filesystems/sysfs.txt for more information.
- */
-
-#ifndef _SYSFS_H_
-#define _SYSFS_H_
-
-#include <asm/atomic.h>
-
-struct kobject;
-struct module;
-
-struct attribute {
- const char * name;
- struct module * owner;
- mode_t mode;
-};
-
-struct attribute_group {
- const char * name;
- struct attribute ** attrs;
-};
-
-
-
-/**
- * Use these macros to make defining attributes easier. See include/linux/device.h
- * for examples..
- */
-
-#define __ATTR(_name,_mode,_show,_store) { \
- .attr = {.name = __stringify(_name), .mode = _mode, .owner = THIS_MODULE }, \
- .show = _show, \
- .store = _store, \
-}
-
-#define __ATTR_RO(_name) { \
- .attr = { .name = __stringify(_name), .mode = 0444, .owner = THIS_MODULE }, \
- .show = _name##_show, \
-}
-
-#define __ATTR_NULL { .attr = { .name = NULL } }
-
-#define attr_name(_attr) (_attr).attr.name
-
-struct vm_area_struct;
-
-struct bin_attribute {
- struct attribute attr;
- size_t size;
- void *private;
- ssize_t (*read)(struct kobject *, char *, loff_t, size_t);
- ssize_t (*write)(struct kobject *, char *, loff_t, size_t);
- int (*mmap)(struct kobject *, struct bin_attribute *attr,
- struct vm_area_struct *vma);
-};
-
-struct sysfs_ops {
- ssize_t (*show)(struct kobject *, struct attribute *,char *);
- ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
-};
-
-struct sysfs_dirent {
- atomic_t s_count;
- struct list_head s_sibling;
- struct list_head s_children;
- void * s_element;
- int s_type;
- umode_t s_mode;
- struct dentry * s_dentry;
- struct iattr * s_iattr;
- atomic_t s_event;
-};
-
-#define SYSFS_ROOT 0x0001
-#define SYSFS_DIR 0x0002
-#define SYSFS_KOBJ_ATTR 0x0004
-#define SYSFS_KOBJ_BIN_ATTR 0x0008
-#define SYSFS_KOBJ_DEVICE 0x0010
-#define SYSFS_KOBJ_LINK 0x0020
-#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_DEVICE | SYSFS_KOBJ_LINK)
-
-#ifdef CONFIG_SYSFS
-
-extern int
-sysfs_create_dir(struct kobject *);
-
-extern void
-sysfs_remove_dir(struct kobject *);
-
-extern int
-sysfs_rename_dir(struct kobject *, const char *new_name);
-
-extern int
-sysfs_create_file(struct kobject *, const struct attribute *);
-
-extern int
-sysfs_update_file(struct kobject *, const struct attribute *);
-
-extern int
-sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode);
-
-extern void
-sysfs_remove_file(struct kobject *, const struct attribute *);
-
-extern int
-sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name);
-
-extern void
-sysfs_remove_link(struct kobject *, const char * name);
-
-int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr);
-int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr);
-
-int sysfs_create_group(struct kobject *, const struct attribute_group *);
-void sysfs_remove_group(struct kobject *, const struct attribute_group *);
-void sysfs_notify(struct kobject * k, char *dir, char *attr);
-
-void sysfs_create_device(struct kobject *, dev_t dev, mode_t mode);
-
-#else /* CONFIG_SYSFS */
-
-static inline int sysfs_create_dir(struct kobject * k)
-{
- return 0;
-}
-
-static inline void sysfs_remove_dir(struct kobject * k)
-{
- ;
-}
-
-static inline int sysfs_rename_dir(struct kobject * k, const char *new_name)
-{
- return 0;
-}
-
-static inline int sysfs_create_file(struct kobject * k, const struct attribute * a)
-{
- return 0;
-}
-
-static inline int sysfs_update_file(struct kobject * k, const struct attribute * a)
-{
- return 0;
-}
-static inline int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode)
-{
- return 0;
-}
-
-static inline void sysfs_remove_file(struct kobject * k, const struct attribute * a)
-{
- ;
-}
-
-static inline int sysfs_create_link(struct kobject * k, struct kobject * t, const char * n)
-{
- return 0;
-}
-
-static inline void sysfs_remove_link(struct kobject * k, const char * name)
-{
- ;
-}
-
-
-static inline int sysfs_create_bin_file(struct kobject * k, struct bin_attribute * a)
-{
- return 0;
-}
-
-static inline int sysfs_remove_bin_file(struct kobject * k, struct bin_attribute * a)
-{
- return 0;
-}
-
-static inline int sysfs_create_group(struct kobject * k, const struct attribute_group *g)
-{
- return 0;
-}
-
-static inline void sysfs_remove_group(struct kobject * k, const struct attribute_group * g)
-{
- ;
-}
-
-static inline void sysfs_notify(struct kobject * k, char *dir, char *attr)
-{
-}
-
-static inline void sysfs_create_device(struct kobject * k, dev_t d, mode_t m)
-{
- ;
-}
-
-#endif /* CONFIG_SYSFS */
-
-#endif /* _SYSFS_H_ */
diff --git a/original/linux/taskstats.h b/original/linux/taskstats.h
deleted file mode 100644
index 2466e55..0000000
--- a/original/linux/taskstats.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/* taskstats.h - exporting per-task statistics
- *
- * Copyright (C) Shailabh Nagar, IBM Corp. 2006
- * (C) Balbir Singh, IBM Corp. 2006
- * (C) Jay Lan, SGI, 2006
- *
- * 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.
- */
-
-#ifndef _LINUX_TASKSTATS_H
-#define _LINUX_TASKSTATS_H
-
-#include <linux/types.h>
-
-/* Format for per-task data returned to userland when
- * - a task exits
- * - listener requests stats for a task
- *
- * The struct is versioned. Newer versions should only add fields to
- * the bottom of the struct to maintain backward compatibility.
- *
- *
- * To add new fields
- * a) bump up TASKSTATS_VERSION
- * b) add comment indicating new version number at end of struct
- * c) add new fields after version comment; maintain 64-bit alignment
- */
-
-
-#define TASKSTATS_VERSION 8
-#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
- * in linux/sched.h */
-
-struct taskstats {
-
- /* The version number of this struct. This field is always set to
- * TAKSTATS_VERSION, which is defined in <linux/taskstats.h>.
- * Each time the struct is changed, the value should be incremented.
- */
- __u16 version;
- __u32 ac_exitcode; /* Exit status */
-
- /* The accounting flags of a task as defined in <linux/acct.h>
- * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG.
- */
- __u8 ac_flag; /* Record flags */
- __u8 ac_nice; /* task_nice */
-
- /* Delay accounting fields start
- *
- * All values, until comment "Delay accounting fields end" are
- * available only if delay accounting is enabled, even though the last
- * few fields are not delays
- *
- * xxx_count is the number of delay values recorded
- * xxx_delay_total is the corresponding cumulative delay in nanoseconds
- *
- * xxx_delay_total wraps around to zero on overflow
- * xxx_count incremented regardless of overflow
- */
-
- /* Delay waiting for cpu, while runnable
- * count, delay_total NOT updated atomically
- */
- __u64 cpu_count __attribute__((aligned(8)));
- __u64 cpu_delay_total;
-
- /* Following four fields atomically updated using task->delays->lock */
-
- /* Delay waiting for synchronous block I/O to complete
- * does not account for delays in I/O submission
- */
- __u64 blkio_count;
- __u64 blkio_delay_total;
-
- /* Delay waiting for page fault I/O (swap in only) */
- __u64 swapin_count;
- __u64 swapin_delay_total;
-
- /* cpu "wall-clock" running time
- * On some architectures, value will adjust for cpu time stolen
- * from the kernel in involuntary waits due to virtualization.
- * Value is cumulative, in nanoseconds, without a corresponding count
- * and wraps around to zero silently on overflow
- */
- __u64 cpu_run_real_total;
-
- /* cpu "virtual" running time
- * Uses time intervals seen by the kernel i.e. no adjustment
- * for kernel's involuntary waits due to virtualization.
- * Value is cumulative, in nanoseconds, without a corresponding count
- * and wraps around to zero silently on overflow
- */
- __u64 cpu_run_virtual_total;
- /* Delay accounting fields end */
- /* version 1 ends here */
-
- /* Basic Accounting Fields start */
- char ac_comm[TS_COMM_LEN]; /* Command name */
- __u8 ac_sched __attribute__((aligned(8)));
- /* Scheduling discipline */
- __u8 ac_pad[3];
- __u32 ac_uid __attribute__((aligned(8)));
- /* User ID */
- __u32 ac_gid; /* Group ID */
- __u32 ac_pid; /* Process ID */
- __u32 ac_ppid; /* Parent process ID */
- __u32 ac_btime; /* Begin time [sec since 1970] */
- __u64 ac_etime __attribute__((aligned(8)));
- /* Elapsed time [usec] */
- __u64 ac_utime; /* User CPU time [usec] */
- __u64 ac_stime; /* SYstem CPU time [usec] */
- __u64 ac_minflt; /* Minor Page Fault Count */
- __u64 ac_majflt; /* Major Page Fault Count */
- /* Basic Accounting Fields end */
-
- /* Extended accounting fields start */
- /* Accumulated RSS usage in duration of a task, in MBytes-usecs.
- * The current rss usage is added to this counter every time
- * a tick is charged to a task's system time. So, at the end we
- * will have memory usage multiplied by system time. Thus an
- * average usage per system time unit can be calculated.
- */
- __u64 coremem; /* accumulated RSS usage in MB-usec */
- /* Accumulated virtual memory usage in duration of a task.
- * Same as acct_rss_mem1 above except that we keep track of VM usage.
- */
- __u64 virtmem; /* accumulated VM usage in MB-usec */
-
- /* High watermark of RSS and virtual memory usage in duration of
- * a task, in KBytes.
- */
- __u64 hiwater_rss; /* High-watermark of RSS usage, in KB */
- __u64 hiwater_vm; /* High-water VM usage, in KB */
-
- /* The following four fields are I/O statistics of a task. */
- __u64 read_char; /* bytes read */
- __u64 write_char; /* bytes written */
- __u64 read_syscalls; /* read syscalls */
- __u64 write_syscalls; /* write syscalls */
- /* Extended accounting fields end */
-
-#define TASKSTATS_HAS_IO_ACCOUNTING
- /* Per-task storage I/O accounting starts */
- __u64 read_bytes; /* bytes of read I/O */
- __u64 write_bytes; /* bytes of write I/O */
- __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */
-
- __u64 nvcsw; /* voluntary_ctxt_switches */
- __u64 nivcsw; /* nonvoluntary_ctxt_switches */
-
- /* time accounting for SMT machines */
- __u64 ac_utimescaled; /* utime scaled on frequency etc */
- __u64 ac_stimescaled; /* stime scaled on frequency etc */
- __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */
-
- /* Delay waiting for memory reclaim */
- __u64 freepages_count;
- __u64 freepages_delay_total;
-};
-
-
-/*
- * Commands sent from userspace
- * Not versioned. New commands should only be inserted at the enum's end
- * prior to __TASKSTATS_CMD_MAX
- */
-
-enum {
- TASKSTATS_CMD_UNSPEC = 0, /* Reserved */
- TASKSTATS_CMD_GET, /* user->kernel request/get-response */
- TASKSTATS_CMD_NEW, /* kernel->user event */
- __TASKSTATS_CMD_MAX,
-};
-
-#define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1)
-
-enum {
- TASKSTATS_TYPE_UNSPEC = 0, /* Reserved */
- TASKSTATS_TYPE_PID, /* Process id */
- TASKSTATS_TYPE_TGID, /* Thread group id */
- TASKSTATS_TYPE_STATS, /* taskstats structure */
- TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */
- TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */
- TASKSTATS_TYPE_NULL, /* contains nothing */
- __TASKSTATS_TYPE_MAX,
-};
-
-#define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1)
-
-enum {
- TASKSTATS_CMD_ATTR_UNSPEC = 0,
- TASKSTATS_CMD_ATTR_PID,
- TASKSTATS_CMD_ATTR_TGID,
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK,
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK,
- __TASKSTATS_CMD_ATTR_MAX,
-};
-
-#define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1)
-
-/* NETLINK_GENERIC related info */
-
-#define TASKSTATS_GENL_NAME "TASKSTATS"
-#define TASKSTATS_GENL_VERSION 0x1
-
-#endif /* _LINUX_TASKSTATS_H */
diff --git a/original/linux/taskstats_kern.h b/original/linux/taskstats_kern.h
deleted file mode 100644
index 16894b7..0000000
--- a/original/linux/taskstats_kern.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* taskstats_kern.h - kernel header for per-task statistics interface
- *
- * Copyright (C) Shailabh Nagar, IBM Corp. 2006
- * (C) Balbir Singh, IBM Corp. 2006
- */
-
-#ifndef _LINUX_TASKSTATS_KERN_H
-#define _LINUX_TASKSTATS_KERN_H
-
-#include <linux/taskstats.h>
-#include <linux/sched.h>
-#include <net/genetlink.h>
-
-#ifdef CONFIG_TASKSTATS
-extern kmem_cache_t *taskstats_cache;
-extern struct mutex taskstats_exit_mutex;
-
-static inline void taskstats_exit_free(struct taskstats *tidstats)
-{
- if (tidstats)
- kmem_cache_free(taskstats_cache, tidstats);
-}
-
-static inline void taskstats_tgid_init(struct signal_struct *sig)
-{
- spin_lock_init(&sig->stats_lock);
- sig->stats = NULL;
-}
-
-static inline void taskstats_tgid_alloc(struct signal_struct *sig)
-{
- struct taskstats *stats;
- unsigned long flags;
-
- stats = kmem_cache_zalloc(taskstats_cache, SLAB_KERNEL);
- if (!stats)
- return;
-
- spin_lock_irqsave(&sig->stats_lock, flags);
- if (!sig->stats) {
- sig->stats = stats;
- stats = NULL;
- }
- spin_unlock_irqrestore(&sig->stats_lock, flags);
-
- if (stats)
- kmem_cache_free(taskstats_cache, stats);
-}
-
-static inline void taskstats_tgid_free(struct signal_struct *sig)
-{
- struct taskstats *stats = NULL;
- unsigned long flags;
-
- spin_lock_irqsave(&sig->stats_lock, flags);
- if (sig->stats) {
- stats = sig->stats;
- sig->stats = NULL;
- }
- spin_unlock_irqrestore(&sig->stats_lock, flags);
- if (stats)
- kmem_cache_free(taskstats_cache, stats);
-}
-
-extern void taskstats_exit_alloc(struct taskstats **, unsigned int *);
-extern void taskstats_exit_send(struct task_struct *, struct taskstats *, int, unsigned int);
-extern void taskstats_init_early(void);
-extern void taskstats_tgid_alloc(struct signal_struct *);
-#else
-static inline void taskstats_exit_alloc(struct taskstats **ptidstats, unsigned int *mycpu)
-{}
-static inline void taskstats_exit_free(struct taskstats *ptidstats)
-{}
-static inline void taskstats_exit_send(struct task_struct *tsk,
- struct taskstats *tidstats,
- int group_dead, unsigned int cpu)
-{}
-static inline void taskstats_tgid_init(struct signal_struct *sig)
-{}
-static inline void taskstats_tgid_alloc(struct signal_struct *sig)
-{}
-static inline void taskstats_tgid_free(struct signal_struct *sig)
-{}
-static inline void taskstats_init_early(void)
-{}
-#endif /* CONFIG_TASKSTATS */
-
-#endif
-
diff --git a/original/linux/tcp.h b/original/linux/tcp.h
deleted file mode 100644
index 8ebf497..0000000
--- a/original/linux/tcp.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions for the TCP protocol.
- *
- * Version: @(#)tcp.h 1.0.2 04/28/93
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_TCP_H
-#define _LINUX_TCP_H
-
-#include <linux/types.h>
-#include <asm/byteorder.h>
-
-struct tcphdr {
- __u16 source;
- __u16 dest;
- __u32 seq;
- __u32 ack_seq;
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u16 res1:4,
- doff:4,
- fin:1,
- syn:1,
- rst:1,
- psh:1,
- ack:1,
- urg:1,
- ece:1,
- cwr:1;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u16 doff:4,
- res1:4,
- cwr:1,
- ece:1,
- urg:1,
- ack:1,
- psh:1,
- rst:1,
- syn:1,
- fin:1;
-#else
-#error "Adjust your <asm/byteorder.h> defines"
-#endif
- __u16 window;
- __u16 check;
- __u16 urg_ptr;
-};
-
-/*
- * The union cast uses a gcc extension to avoid aliasing problems
- * (union is compatible to any of its members)
- * This means this part of the code is -fstrict-aliasing safe now.
- */
-union tcp_word_hdr {
- struct tcphdr hdr;
- __u32 words[5];
-};
-
-#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])
-
-enum {
- TCP_FLAG_CWR = __constant_htonl(0x00800000),
- TCP_FLAG_ECE = __constant_htonl(0x00400000),
- TCP_FLAG_URG = __constant_htonl(0x00200000),
- TCP_FLAG_ACK = __constant_htonl(0x00100000),
- TCP_FLAG_PSH = __constant_htonl(0x00080000),
- TCP_FLAG_RST = __constant_htonl(0x00040000),
- TCP_FLAG_SYN = __constant_htonl(0x00020000),
- TCP_FLAG_FIN = __constant_htonl(0x00010000),
- TCP_RESERVED_BITS = __constant_htonl(0x0F000000),
- TCP_DATA_OFFSET = __constant_htonl(0xF0000000)
-};
-
-/* TCP socket options */
-#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */
-#define TCP_MAXSEG 2 /* Limit MSS */
-#define TCP_CORK 3 /* Never send partially complete segments */
-#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
-#define TCP_KEEPINTVL 5 /* Interval between keepalives */
-#define TCP_KEEPCNT 6 /* Number of keepalives before death */
-#define TCP_SYNCNT 7 /* Number of SYN retransmits */
-#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
-#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
-#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
-#define TCP_INFO 11 /* Information about this connection. */
-#define TCP_QUICKACK 12 /* Block/reenable quick acks */
-#define TCP_CONGESTION 13 /* Congestion control algorithm */
-
-#define TCPI_OPT_TIMESTAMPS 1
-#define TCPI_OPT_SACK 2
-#define TCPI_OPT_WSCALE 4
-#define TCPI_OPT_ECN 8
-
-enum tcp_ca_state
-{
- TCP_CA_Open = 0,
-#define TCPF_CA_Open (1<<TCP_CA_Open)
- TCP_CA_Disorder = 1,
-#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
- TCP_CA_CWR = 2,
-#define TCPF_CA_CWR (1<<TCP_CA_CWR)
- TCP_CA_Recovery = 3,
-#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
- TCP_CA_Loss = 4
-#define TCPF_CA_Loss (1<<TCP_CA_Loss)
-};
-
-struct tcp_info
-{
- __u8 tcpi_state;
- __u8 tcpi_ca_state;
- __u8 tcpi_retransmits;
- __u8 tcpi_probes;
- __u8 tcpi_backoff;
- __u8 tcpi_options;
- __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
-
- __u32 tcpi_rto;
- __u32 tcpi_ato;
- __u32 tcpi_snd_mss;
- __u32 tcpi_rcv_mss;
-
- __u32 tcpi_unacked;
- __u32 tcpi_sacked;
- __u32 tcpi_lost;
- __u32 tcpi_retrans;
- __u32 tcpi_fackets;
-
- /* Times. */
- __u32 tcpi_last_data_sent;
- __u32 tcpi_last_ack_sent; /* Not remembered, sorry. */
- __u32 tcpi_last_data_recv;
- __u32 tcpi_last_ack_recv;
-
- /* Metrics. */
- __u32 tcpi_pmtu;
- __u32 tcpi_rcv_ssthresh;
- __u32 tcpi_rtt;
- __u32 tcpi_rttvar;
- __u32 tcpi_snd_ssthresh;
- __u32 tcpi_snd_cwnd;
- __u32 tcpi_advmss;
- __u32 tcpi_reordering;
-
- __u32 tcpi_rcv_rtt;
- __u32 tcpi_rcv_space;
-
- __u32 tcpi_total_retrans;
-};
-
-#ifdef __KERNEL__
-
-#include <linux/skbuff.h>
-#include <linux/dmaengine.h>
-#include <net/sock.h>
-#include <net/inet_connection_sock.h>
-#include <net/inet_timewait_sock.h>
-
-/* This defines a selective acknowledgement block. */
-struct tcp_sack_block {
- __u32 start_seq;
- __u32 end_seq;
-};
-
-struct tcp_options_received {
-/* PAWS/RTTM data */
- long ts_recent_stamp;/* Time we stored ts_recent (for aging) */
- __u32 ts_recent; /* Time stamp to echo next */
- __u32 rcv_tsval; /* Time stamp value */
- __u32 rcv_tsecr; /* Time stamp echo reply */
- __u16 saw_tstamp : 1, /* Saw TIMESTAMP on last packet */
- tstamp_ok : 1, /* TIMESTAMP seen on SYN packet */
- dsack : 1, /* D-SACK is scheduled */
- wscale_ok : 1, /* Wscale seen on SYN packet */
- sack_ok : 4, /* SACK seen on SYN packet */
- snd_wscale : 4, /* Window scaling received from sender */
- rcv_wscale : 4; /* Window scaling to send to receiver */
-/* SACKs data */
- __u8 eff_sacks; /* Size of SACK array to send with next packet */
- __u8 num_sacks; /* Number of SACK blocks */
- __u16 user_mss; /* mss requested by user in ioctl */
- __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
-};
-
-struct tcp_request_sock {
- struct inet_request_sock req;
- __u32 rcv_isn;
- __u32 snt_isn;
-};
-
-static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
-{
- return (struct tcp_request_sock *)req;
-}
-
-struct tcp_sock {
- /* inet_connection_sock has to be the first member of tcp_sock */
- struct inet_connection_sock inet_conn;
- int tcp_header_len; /* Bytes of tcp header to send */
-
-/*
- * Header prediction flags
- * 0x5?10 << 16 + snd_wnd in net byte order
- */
- __u32 pred_flags;
-
-/*
- * RFC793 variables by their proper names. This means you can
- * read the code and the spec side by side (and laugh ...)
- * See RFC793 and RFC1122. The RFC writes these in capitals.
- */
- __u32 rcv_nxt; /* What we want to receive next */
- __u32 snd_nxt; /* Next sequence we send */
-
- __u32 snd_una; /* First byte we want an ack for */
- __u32 snd_sml; /* Last byte of the most recently transmitted small packet */
- __u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
- __u32 lsndtime; /* timestamp of last sent data packet (for restart window) */
-
- /* Data for direct copy to user */
- struct {
- struct sk_buff_head prequeue;
- struct task_struct *task;
- struct iovec *iov;
- int memory;
- int len;
-#ifdef CONFIG_NET_DMA
- /* members for async copy */
- struct dma_chan *dma_chan;
- int wakeup;
- struct dma_pinned_list *pinned_list;
- dma_cookie_t dma_cookie;
-#endif
- } ucopy;
-
- __u32 snd_wl1; /* Sequence for window update */
- __u32 snd_wnd; /* The window we expect to receive */
- __u32 max_window; /* Maximal window ever seen from peer */
- __u32 mss_cache; /* Cached effective mss, not including SACKS */
- __u16 xmit_size_goal; /* Goal for segmenting output packets */
- /* XXX Two bytes hole, try to pack */
-
- __u32 window_clamp; /* Maximal window to advertise */
- __u32 rcv_ssthresh; /* Current window clamp */
-
- __u32 frto_highmark; /* snd_nxt when RTO occurred */
- __u8 reordering; /* Packet reordering metric. */
- __u8 frto_counter; /* Number of new acks after RTO */
- __u8 nonagle; /* Disable Nagle algorithm? */
- __u8 keepalive_probes; /* num of allowed keep alive probes */
-
-/* RTT measurement */
- __u32 srtt; /* smoothed round trip time << 3 */
- __u32 mdev; /* medium deviation */
- __u32 mdev_max; /* maximal mdev for the last rtt period */
- __u32 rttvar; /* smoothed mdev_max */
- __u32 rtt_seq; /* sequence number to update rttvar */
-
- __u32 packets_out; /* Packets which are "in flight" */
- __u32 left_out; /* Packets which leaved network */
- __u32 retrans_out; /* Retransmitted packets out */
-/*
- * Options received (usually on last packet, some only on SYN packets).
- */
- struct tcp_options_received rx_opt;
-
-/*
- * Slow start and congestion control (see also Nagle, and Karn & Partridge)
- */
- __u32 snd_ssthresh; /* Slow start size threshold */
- __u32 snd_cwnd; /* Sending congestion window */
- __u16 snd_cwnd_cnt; /* Linear increase counter */
- __u16 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
- __u32 snd_cwnd_used;
- __u32 snd_cwnd_stamp;
-
- struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
-
- __u32 rcv_wnd; /* Current receiver window */
- __u32 rcv_wup; /* rcv_nxt on last window update sent */
- __u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
- __u32 pushed_seq; /* Last pushed seq, required to talk to windows */
- __u32 copied_seq; /* Head of yet unread data */
-
-/* SACKs data */
- struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */
- struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/
-
- struct tcp_sack_block recv_sack_cache[4];
-
- /* from STCP, retrans queue hinting */
- struct sk_buff* lost_skb_hint;
-
- struct sk_buff *scoreboard_skb_hint;
- struct sk_buff *retransmit_skb_hint;
- struct sk_buff *forward_skb_hint;
- struct sk_buff *fastpath_skb_hint;
-
- int fastpath_cnt_hint;
- int lost_cnt_hint;
- int retransmit_cnt_hint;
- int forward_cnt_hint;
-
- __u16 advmss; /* Advertised MSS */
- __u16 prior_ssthresh; /* ssthresh saved at recovery start */
- __u32 lost_out; /* Lost packets */
- __u32 sacked_out; /* SACK'd packets */
- __u32 fackets_out; /* FACK'd packets */
- __u32 high_seq; /* snd_nxt at onset of congestion */
-
- __u32 retrans_stamp; /* Timestamp of the last retransmit,
- * also used in SYN-SENT to remember stamp of
- * the first SYN. */
- __u32 undo_marker; /* tracking retrans started here. */
- int undo_retrans; /* number of undoable retransmissions. */
- __u32 urg_seq; /* Seq of received urgent pointer */
- __u16 urg_data; /* Saved octet of OOB data and control flags */
- __u8 urg_mode; /* In urgent mode */
- __u8 ecn_flags; /* ECN status bits. */
- __u32 snd_up; /* Urgent pointer */
-
- __u32 total_retrans; /* Total retransmits for entire connection */
- __u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
-
- unsigned int keepalive_time; /* time before keep alive takes place */
- unsigned int keepalive_intvl; /* time interval between keep alive probes */
- int linger2;
-
- unsigned long last_synq_overflow;
-
-/* Receiver side RTT estimation */
- struct {
- __u32 rtt;
- __u32 seq;
- __u32 time;
- } rcv_rtt_est;
-
-/* Receiver queue space */
- struct {
- int space;
- __u32 seq;
- __u32 time;
- } rcvq_space;
-
-/* TCP-specific MTU probe information. */
- struct {
- __u32 probe_seq_start;
- __u32 probe_seq_end;
- } mtu_probe;
-};
-
-static inline struct tcp_sock *tcp_sk(const struct sock *sk)
-{
- return (struct tcp_sock *)sk;
-}
-
-struct tcp_timewait_sock {
- struct inet_timewait_sock tw_sk;
- __u32 tw_rcv_nxt;
- __u32 tw_snd_nxt;
- __u32 tw_rcv_wnd;
- __u32 tw_ts_recent;
- long tw_ts_recent_stamp;
-};
-
-static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk)
-{
- return (struct tcp_timewait_sock *)sk;
-}
-
-#endif
-
-#endif /* _LINUX_TCP_H */
diff --git a/original/linux/tegra_audio.h b/original/linux/tegra_audio.h
deleted file mode 100644
index db4661a..0000000
--- a/original/linux/tegra_audio.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* include/linux/tegra_audio.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Iliyan Malchev <malchev@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _TEGRA_AUDIO_H
-#define _TEGRA_AUDIO_H
-
-#include <linux/ioctl.h>
-
-#define TEGRA_AUDIO_MAGIC 't'
-
-#define TEGRA_AUDIO_IN_START _IO(TEGRA_AUDIO_MAGIC, 0)
-#define TEGRA_AUDIO_IN_STOP _IO(TEGRA_AUDIO_MAGIC, 1)
-
-struct tegra_audio_in_config {
- int rate;
- int stereo;
-};
-
-#define TEGRA_AUDIO_IN_SET_CONFIG _IOW(TEGRA_AUDIO_MAGIC, 2, \
- const struct tegra_audio_in_config *)
-#define TEGRA_AUDIO_IN_GET_CONFIG _IOR(TEGRA_AUDIO_MAGIC, 3, \
- struct tegra_audio_in_config *)
-
-#define TEGRA_AUDIO_IN_SET_NUM_BUFS _IOW(TEGRA_AUDIO_MAGIC, 4, \
- const unsigned int *)
-#define TEGRA_AUDIO_IN_GET_NUM_BUFS _IOW(TEGRA_AUDIO_MAGIC, 5, \
- unsigned int *)
-#define TEGRA_AUDIO_OUT_SET_NUM_BUFS _IOW(TEGRA_AUDIO_MAGIC, 6, \
- const unsigned int *)
-#define TEGRA_AUDIO_OUT_GET_NUM_BUFS _IOW(TEGRA_AUDIO_MAGIC, 7, \
- unsigned int *)
-
-#define TEGRA_AUDIO_OUT_FLUSH _IO(TEGRA_AUDIO_MAGIC, 10)
-
-#define TEGRA_AUDIO_BIT_FORMAT_DEFAULT 0
-#define TEGRA_AUDIO_BIT_FORMAT_DSP 1
-#define TEGRA_AUDIO_SET_BIT_FORMAT _IOW(TEGRA_AUDIO_MAGIC, 11, \
- const unsigned int *)
-#define TEGRA_AUDIO_GET_BIT_FORMAT _IOR(TEGRA_AUDIO_MAGIC, 12, \
- unsigned int *)
-
-#endif/*_CPCAP_AUDIO_H*/
diff --git a/original/linux/tegra_avp.h b/original/linux/tegra_avp.h
deleted file mode 100644
index 2650b55..0000000
--- a/original/linux/tegra_avp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2010 Google, Inc.
- * Author: Dima Zavin <dima@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_TEGRA_AVP_H
-#define __LINUX_TEGRA_AVP_H
-
-#include <linux/ioctl.h>
-#include <linux/types.h>
-
-#define TEGRA_AVP_LIB_MAX_NAME 32
-#define TEGRA_AVP_LIB_MAX_ARGS 220 /* DO NOT CHANGE THIS! */
-
-struct tegra_avp_lib {
- char name[TEGRA_AVP_LIB_MAX_NAME];
- void __user *args;
- size_t args_len;
- int greedy;
- unsigned long handle;
-};
-
-#define TEGRA_AVP_IOCTL_MAGIC 'r'
-
-#define TEGRA_AVP_IOCTL_LOAD_LIB _IOWR(TEGRA_AVP_IOCTL_MAGIC, 0x40, struct tegra_avp_lib)
-#define TEGRA_AVP_IOCTL_UNLOAD_LIB _IOW(TEGRA_AVP_IOCTL_MAGIC, 0x41, unsigned long)
-
-#define TEGRA_AVP_IOCTL_MIN_NR _IOC_NR(TEGRA_AVP_IOCTL_LOAD_LIB)
-#define TEGRA_AVP_IOCTL_MAX_NR _IOC_NR(TEGRA_AVP_IOCTL_UNLOAD_LIB)
-
-#endif
diff --git a/original/linux/tegra_rpc.h b/original/linux/tegra_rpc.h
deleted file mode 100644
index 16e6367..0000000
--- a/original/linux/tegra_rpc.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Dima Zavin <dima@android.com>
- *
- * Based on original code from NVIDIA, and a partial rewrite by:
- * Gary King <gking@nvidia.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_TEGRA_RPC_H
-#define __LINUX_TEGRA_RPC_H
-
-#define TEGRA_RPC_MAX_MSG_LEN 256
-
-/* Note: the actual size of the name in the protocol message is 16 bytes,
- * but that is because the name there is not NUL terminated, only NUL
- * padded. */
-#define TEGRA_RPC_MAX_NAME_LEN 17
-
-struct tegra_rpc_port_desc {
- char name[TEGRA_RPC_MAX_NAME_LEN];
- int notify_fd; /* fd representing a trpc_sema to signal when a
- * message has been received */
-};
-
-#define TEGRA_RPC_IOCTL_MAGIC 'r'
-
-#define TEGRA_RPC_IOCTL_PORT_CREATE _IOW(TEGRA_RPC_IOCTL_MAGIC, 0x20, struct tegra_rpc_port_desc)
-#define TEGRA_RPC_IOCTL_PORT_GET_NAME _IOR(TEGRA_RPC_IOCTL_MAGIC, 0x21, char *)
-#define TEGRA_RPC_IOCTL_PORT_CONNECT _IOR(TEGRA_RPC_IOCTL_MAGIC, 0x22, long)
-#define TEGRA_RPC_IOCTL_PORT_LISTEN _IOR(TEGRA_RPC_IOCTL_MAGIC, 0x23, long)
-
-#define TEGRA_RPC_IOCTL_MIN_NR _IOC_NR(TEGRA_RPC_IOCTL_PORT_CREATE)
-#define TEGRA_RPC_IOCTL_MAX_NR _IOC_NR(TEGRA_RPC_IOCTL_PORT_LISTEN)
-
-#endif
diff --git a/original/linux/tegra_sema.h b/original/linux/tegra_sema.h
deleted file mode 100644
index 7b423b6..0000000
--- a/original/linux/tegra_sema.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Dima Zavin <dima@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_TEGRA_SEMA_H
-#define __LINUX_TEGRA_SEMA_H
-
-/* this shares the magic with the tegra RPC and AVP drivers.
- * See include/linux/tegra_avp.h and include/linux/tegra_rpc.h */
-#define TEGRA_SEMA_IOCTL_MAGIC 'r'
-
-/* If IOCTL_WAIT is interrupted by a signal and the timeout was not -1,
- * then the value pointed to by the argument will be updated with the amount
- * of time remaining for the wait. */
-#define TEGRA_SEMA_IOCTL_WAIT _IOW(TEGRA_SEMA_IOCTL_MAGIC, 0x30, long *)
-#define TEGRA_SEMA_IOCTL_SIGNAL _IO(TEGRA_SEMA_IOCTL_MAGIC, 0x31)
-
-#define TEGRA_SEMA_IOCTL_MIN_NR _IOC_NR(TEGRA_SEMA_IOCTL_WAIT)
-#define TEGRA_SEMA_IOCTL_MAX_NR _IOC_NR(TEGRA_SEMA_IOCTL_SIGNAL)
-
-#endif
diff --git a/original/linux/tegrafb.h b/original/linux/tegrafb.h
deleted file mode 100644
index 6e765c5..0000000
--- a/original/linux/tegrafb.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * include/video/tegrafb.h
- *
- * Copyright (C) 2010 Google, Inc.
- * Author: Erik Gilling <konkers@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_TEGRAFB_H_
-#define _LINUX_TEGRAFB_H_
-
-#include <linux/fb.h>
-#include <linux/types.h>
-#include <asm/ioctl.h>
-
-#define TEGRA_FB_WIN_FMT_P1 0
-#define TEGRA_FB_WIN_FMT_P2 1
-#define TEGRA_FB_WIN_FMT_P4 2
-#define TEGRA_FB_WIN_FMT_P8 3
-#define TEGRA_FB_WIN_FMT_B4G4R4A4 4
-#define TEGRA_FB_WIN_FMT_B5G5R5A 5
-#define TEGRA_FB_WIN_FMT_B5G6R5 6
-#define TEGRA_FB_WIN_FMT_AB5G5R5 7
-#define TEGRA_FB_WIN_FMT_B8G8R8A8 12
-#define TEGRA_FB_WIN_FMT_R8G8B8A8 13
-#define TEGRA_FB_WIN_FMT_B6x2G6x2R6x2A8 14
-#define TEGRA_FB_WIN_FMT_R6x2G6x2B6x2A8 15
-#define TEGRA_FB_WIN_FMT_YCbCr422 16
-#define TEGRA_FB_WIN_FMT_YUV422 17
-#define TEGRA_FB_WIN_FMT_YCbCr420P 18
-#define TEGRA_FB_WIN_FMT_YUV420P 19
-#define TEGRA_FB_WIN_FMT_YCbCr422P 20
-#define TEGRA_FB_WIN_FMT_YUV422P 21
-#define TEGRA_FB_WIN_FMT_YCbCr422R 22
-#define TEGRA_FB_WIN_FMT_YUV422R 23
-#define TEGRA_FB_WIN_FMT_YCbCr422RA 24
-#define TEGRA_FB_WIN_FMT_YUV422RA 25
-
-#define TEGRA_FB_WIN_BLEND_NONE 0
-#define TEGRA_FB_WIN_BLEND_PREMULT 1
-#define TEGRA_FB_WIN_BLEND_COVERAGE 2
-
-#define TEGRA_FB_WIN_FLAG_INVERT_H (1 << 0)
-#define TEGRA_FB_WIN_FLAG_INVERT_V (1 << 1)
-#define TEGRA_FB_WIN_FLAG_TILED (1 << 2)
-
-/* set index to -1 to ignore window data */
-struct tegra_fb_windowattr {
- __s32 index;
- __u32 buff_id;
- __u32 flags;
- __u32 blend;
- __u32 offset;
- __u32 offset_u;
- __u32 offset_v;
- __u32 stride;
- __u32 stride_uv;
- __u32 pixformat;
- __u32 x;
- __u32 y;
- __u32 w;
- __u32 h;
- __u32 out_x;
- __u32 out_y;
- __u32 out_w;
- __u32 out_h;
- __u32 z;
- __u32 pre_syncpt_id;
- __u32 pre_syncpt_val;
-};
-
-#define TEGRA_FB_FLIP_N_WINDOWS 3
-
-struct tegra_fb_flip_args {
- struct tegra_fb_windowattr win[TEGRA_FB_FLIP_N_WINDOWS];
- __u32 post_syncpt_id;
- __u32 post_syncpt_val;
-};
-
-struct tegra_fb_modedb {
- struct fb_var_screeninfo *modedb;
- __u32 modedb_len;
-};
-
-#define FBIO_TEGRA_SET_NVMAP_FD _IOW('F', 0x40, __u32)
-#define FBIO_TEGRA_FLIP _IOW('F', 0x41, struct tegra_fb_flip_args)
-#define FBIO_TEGRA_GET_MODEDB _IOWR('F', 0x42, struct tegra_fb_modedb)
-
-#endif
diff --git a/original/linux/telephony.h b/original/linux/telephony.h
deleted file mode 100644
index 0d0cf2a..0000000
--- a/original/linux/telephony.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/******************************************************************************
- *
- * telephony.h
- *
- * Basic Linux Telephony Interface
- *
- * (c) Copyright 1999-2001 Quicknet Technologies, 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.
- *
- * Authors: Ed Okerson, <eokerson@quicknet.net>
- * Greg Herlein, <gherlein@quicknet.net>
- *
- * Contributors: Alan Cox, <alan@redhat.com>
- * David W. Erhart, <derhart@quicknet.net>
- *
- * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
- * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF QUICKNET
- * TECHNOLOGIES, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * QUICKNET TECHNOLOGIES, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND QUICKNET TECHNOLOGIES, INC. HAS NO OBLIGATION
- * TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Version: $Revision: 4.2 $
- *
- * $Id: telephony.h,v 4.2 2001/08/06 07:09:43 craigs Exp $
- *
- *****************************************************************************/
-
-#ifndef TELEPHONY_H
-#define TELEPHONY_H
-
-#define TELEPHONY_VERSION 3013
-
-#define PHONE_VENDOR_IXJ 1
-#define PHONE_VENDOR_QUICKNET PHONE_VENDOR_IXJ
-#define PHONE_VENDOR_VOICETRONIX 2
-#define PHONE_VENDOR_ACULAB 3
-#define PHONE_VENDOR_DIGI 4
-#define PHONE_VENDOR_FRANKLIN 5
-
-/******************************************************************************
- * Vendor Summary Information Area
- *
- * Quicknet Technologies, Inc. - makes low density analog telephony cards
- * with audio compression, POTS and PSTN interfaces (www.quicknet.net)
- *
- * (other vendors following this API shuld add a short description of
- * the telephony products they support under Linux)
- *
- *****************************************************************************/
-#define QTI_PHONEJACK 100
-#define QTI_LINEJACK 300
-#define QTI_PHONEJACK_LITE 400
-#define QTI_PHONEJACK_PCI 500
-#define QTI_PHONECARD 600
-
-/******************************************************************************
-*
-* The capabilities ioctls can inform you of the capabilities of each phone
-* device installed in your system. The PHONECTL_CAPABILITIES ioctl
-* returns an integer value indicating the number of capabilities the
-* device has. The PHONECTL_CAPABILITIES_LIST will fill an array of
-* capability structs with all of its capabilities. The
-* PHONECTL_CAPABILITIES_CHECK takes a single capability struct and returns
-* a TRUE if the device has that capability, otherwise it returns false.
-*
-******************************************************************************/
-typedef enum {
- vendor = 0,
- device,
- port,
- codec,
- dsp
-} phone_cap;
-
-struct phone_capability {
- char desc[80];
- phone_cap captype;
- int cap;
- int handle;
-};
-
-typedef enum {
- pots = 0,
- pstn,
- handset,
- speaker
-} phone_ports;
-
-#define PHONE_CAPABILITIES _IO ('q', 0x80)
-#define PHONE_CAPABILITIES_LIST _IOR ('q', 0x81, struct phone_capability *)
-#define PHONE_CAPABILITIES_CHECK _IOW ('q', 0x82, struct phone_capability *)
-
-typedef struct {
- char month[3];
- char day[3];
- char hour[3];
- char min[3];
- int numlen;
- char number[11];
- int namelen;
- char name[80];
-} PHONE_CID;
-
-#define PHONE_RING _IO ('q', 0x83)
-#define PHONE_HOOKSTATE _IO ('q', 0x84)
-#define PHONE_MAXRINGS _IOW ('q', 0x85, char)
-#define PHONE_RING_CADENCE _IOW ('q', 0x86, short)
-#define OLD_PHONE_RING_START _IO ('q', 0x87)
-#define PHONE_RING_START _IOW ('q', 0x87, PHONE_CID *)
-#define PHONE_RING_STOP _IO ('q', 0x88)
-
-#define USA_RING_CADENCE 0xC0C0
-
-#define PHONE_REC_CODEC _IOW ('q', 0x89, int)
-#define PHONE_REC_START _IO ('q', 0x8A)
-#define PHONE_REC_STOP _IO ('q', 0x8B)
-#define PHONE_REC_DEPTH _IOW ('q', 0x8C, int)
-#define PHONE_FRAME _IOW ('q', 0x8D, int)
-#define PHONE_REC_VOLUME _IOW ('q', 0x8E, int)
-#define PHONE_REC_VOLUME_LINEAR _IOW ('q', 0xDB, int)
-#define PHONE_REC_LEVEL _IO ('q', 0x8F)
-
-#define PHONE_PLAY_CODEC _IOW ('q', 0x90, int)
-#define PHONE_PLAY_START _IO ('q', 0x91)
-#define PHONE_PLAY_STOP _IO ('q', 0x92)
-#define PHONE_PLAY_DEPTH _IOW ('q', 0x93, int)
-#define PHONE_PLAY_VOLUME _IOW ('q', 0x94, int)
-#define PHONE_PLAY_VOLUME_LINEAR _IOW ('q', 0xDC, int)
-#define PHONE_PLAY_LEVEL _IO ('q', 0x95)
-#define PHONE_DTMF_READY _IOR ('q', 0x96, int)
-#define PHONE_GET_DTMF _IOR ('q', 0x97, int)
-#define PHONE_GET_DTMF_ASCII _IOR ('q', 0x98, int)
-#define PHONE_DTMF_OOB _IOW ('q', 0x99, int)
-#define PHONE_EXCEPTION _IOR ('q', 0x9A, int)
-#define PHONE_PLAY_TONE _IOW ('q', 0x9B, char)
-#define PHONE_SET_TONE_ON_TIME _IOW ('q', 0x9C, int)
-#define PHONE_SET_TONE_OFF_TIME _IOW ('q', 0x9D, int)
-#define PHONE_GET_TONE_ON_TIME _IO ('q', 0x9E)
-#define PHONE_GET_TONE_OFF_TIME _IO ('q', 0x9F)
-#define PHONE_GET_TONE_STATE _IO ('q', 0xA0)
-#define PHONE_BUSY _IO ('q', 0xA1)
-#define PHONE_RINGBACK _IO ('q', 0xA2)
-#define PHONE_DIALTONE _IO ('q', 0xA3)
-#define PHONE_CPT_STOP _IO ('q', 0xA4)
-
-#define PHONE_PSTN_SET_STATE _IOW ('q', 0xA4, int)
-#define PHONE_PSTN_GET_STATE _IO ('q', 0xA5)
-
-#define PSTN_ON_HOOK 0
-#define PSTN_RINGING 1
-#define PSTN_OFF_HOOK 2
-#define PSTN_PULSE_DIAL 3
-
-/******************************************************************************
-*
-* The wink duration is tunable with this ioctl. The default wink duration
-* is 320ms. You do not need to use this ioctl if you do not require a
-* different wink duration.
-*
-******************************************************************************/
-#define PHONE_WINK_DURATION _IOW ('q', 0xA6, int)
-#define PHONE_WINK _IOW ('q', 0xAA, int)
-
-/******************************************************************************
-*
-* Codec Definitions
-*
-******************************************************************************/
-typedef enum {
- G723_63 = 1,
- G723_53 = 2,
- TS85 = 3,
- TS48 = 4,
- TS41 = 5,
- G728 = 6,
- G729 = 7,
- ULAW = 8,
- ALAW = 9,
- LINEAR16 = 10,
- LINEAR8 = 11,
- WSS = 12,
- G729B = 13
-} phone_codec;
-
-struct phone_codec_data
-{
- phone_codec type;
- unsigned short buf_min, buf_opt, buf_max;
-};
-
-#define PHONE_QUERY_CODEC _IOWR ('q', 0xA7, struct phone_codec_data *)
-#define PHONE_PSTN_LINETEST _IO ('q', 0xA8)
-
-/******************************************************************************
-*
-* This controls the VAD/CNG functionality of G.723.1. The driver will
-* always pass full size frames, any unused bytes will be padded with zeros,
-* and frames passed to the driver should also be padded with zeros. The
-* frame type is encoded in the least significant two bits of the first
-* WORD of the frame as follows:
-*
-* bits 1-0 Frame Type Data Rate Significant Words
-* 00 0 G.723.1 6.3 12
-* 01 1 G.723.1 5.3 10
-* 10 2 VAD/CNG 2
-* 11 3 Repeat last CNG 2 bits
-*
-******************************************************************************/
-#define PHONE_VAD _IOW ('q', 0xA9, int)
-
-
-/******************************************************************************
-*
-* The exception structure allows us to multiplex multiple events onto the
-* select() exception set. If any of these flags are set select() will
-* return with a positive indication on the exception set. The dtmf_ready
-* bit indicates if there is data waiting in the DTMF buffer. The
-* hookstate bit is set if there is a change in hookstate status, it does not
-* indicate the current state of the hookswitch. The pstn_ring bit
-* indicates that the DAA on a LineJACK card has detected ring voltage on
-* the PSTN port. The caller_id bit indicates that caller_id data has been
-* received and is available. The pstn_wink bit indicates that the DAA on
-* the LineJACK has received a wink from the telco switch. The f0, f1, f2
-* and f3 bits indicate that the filter has been triggered by detecting the
-* frequency programmed into that filter.
-*
-* The remaining bits should be set to zero. They will become defined over time
-* for other interface cards and their needs.
-*
-******************************************************************************/
-struct phone_except
-{
- unsigned int dtmf_ready:1;
- unsigned int hookstate:1;
- unsigned int pstn_ring:1;
- unsigned int caller_id:1;
- unsigned int pstn_wink:1;
- unsigned int f0:1;
- unsigned int f1:1;
- unsigned int f2:1;
- unsigned int f3:1;
- unsigned int flash:1;
- unsigned int fc0:1;
- unsigned int fc1:1;
- unsigned int fc2:1;
- unsigned int fc3:1;
- unsigned int reserved:18;
-};
-
-union telephony_exception {
- struct phone_except bits;
- unsigned int bytes;
-};
-
-
-#endif /* TELEPHONY_H */
-
diff --git a/original/linux/termios.h b/original/linux/termios.h
deleted file mode 100644
index 4786628..0000000
--- a/original/linux/termios.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _LINUX_TERMIOS_H
-#define _LINUX_TERMIOS_H
-
-#include <linux/types.h>
-#include <asm/termios.h>
-
-#endif
diff --git a/original/linux/textsearch.h b/original/linux/textsearch.h
deleted file mode 100644
index 7dac8f0..0000000
--- a/original/linux/textsearch.h
+++ /dev/null
@@ -1,182 +0,0 @@
-#ifndef __LINUX_TEXTSEARCH_H
-#define __LINUX_TEXTSEARCH_H
-
-#ifdef __KERNEL__
-
-#include <linux/types.h>
-#include <linux/list.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/err.h>
-#include <linux/slab.h>
-
-struct ts_config;
-
-/**
- * TS_AUTOLOAD - Automatically load textsearch modules when needed
- */
-#define TS_AUTOLOAD 1
-
-/**
- * struct ts_state - search state
- * @offset: offset for next match
- * @cb: control buffer, for persistant variables of get_next_block()
- */
-struct ts_state
-{
- unsigned int offset;
- char cb[40];
-};
-
-/**
- * struct ts_ops - search module operations
- * @name: name of search algorithm
- * @init: initialization function to prepare a search
- * @find: find the next occurrence of the pattern
- * @destroy: destroy algorithm specific parts of a search configuration
- * @get_pattern: return head of pattern
- * @get_pattern_len: return length of pattern
- * @owner: module reference to algorithm
- */
-struct ts_ops
-{
- const char *name;
- struct ts_config * (*init)(const void *, unsigned int, gfp_t);
- unsigned int (*find)(struct ts_config *,
- struct ts_state *);
- void (*destroy)(struct ts_config *);
- void * (*get_pattern)(struct ts_config *);
- unsigned int (*get_pattern_len)(struct ts_config *);
- struct module *owner;
- struct list_head list;
-};
-
-/**
- * struct ts_config - search configuration
- * @ops: operations of chosen algorithm
- * @get_next_block: callback to fetch the next block to search in
- * @finish: callback to finalize a search
- */
-struct ts_config
-{
- struct ts_ops *ops;
-
- /**
- * get_next_block - fetch next block of data
- * @consumed: number of bytes consumed by the caller
- * @dst: destination buffer
- * @conf: search configuration
- * @state: search state
- *
- * Called repeatedly until 0 is returned. Must assign the
- * head of the next block of data to &*dst and return the length
- * of the block or 0 if at the end. consumed == 0 indicates
- * a new search. May store/read persistant values in state->cb.
- */
- unsigned int (*get_next_block)(unsigned int consumed,
- const u8 **dst,
- struct ts_config *conf,
- struct ts_state *state);
-
- /**
- * finish - finalize/clean a series of get_next_block() calls
- * @conf: search configuration
- * @state: search state
- *
- * Called after the last use of get_next_block(), may be used
- * to cleanup any leftovers.
- */
- void (*finish)(struct ts_config *conf,
- struct ts_state *state);
-};
-
-/**
- * textsearch_next - continue searching for a pattern
- * @conf: search configuration
- * @state: search state
- *
- * Continues a search looking for more occurrences of the pattern.
- * textsearch_find() must be called to find the first occurrence
- * in order to reset the state.
- *
- * Returns the position of the next occurrence of the pattern or
- * UINT_MAX if not match was found.
- */
-static inline unsigned int textsearch_next(struct ts_config *conf,
- struct ts_state *state)
-{
- unsigned int ret = conf->ops->find(conf, state);
-
- if (conf->finish)
- conf->finish(conf, state);
-
- return ret;
-}
-
-/**
- * textsearch_find - start searching for a pattern
- * @conf: search configuration
- * @state: search state
- *
- * Returns the position of first occurrence of the pattern or
- * UINT_MAX if no match was found.
- */
-static inline unsigned int textsearch_find(struct ts_config *conf,
- struct ts_state *state)
-{
- state->offset = 0;
- return textsearch_next(conf, state);
-}
-
-/**
- * textsearch_get_pattern - return head of the pattern
- * @conf: search configuration
- */
-static inline void *textsearch_get_pattern(struct ts_config *conf)
-{
- return conf->ops->get_pattern(conf);
-}
-
-/**
- * textsearch_get_pattern_len - return length of the pattern
- * @conf: search configuration
- */
-static inline unsigned int textsearch_get_pattern_len(struct ts_config *conf)
-{
- return conf->ops->get_pattern_len(conf);
-}
-
-extern int textsearch_register(struct ts_ops *);
-extern int textsearch_unregister(struct ts_ops *);
-extern struct ts_config *textsearch_prepare(const char *, const void *,
- unsigned int, gfp_t, int);
-extern void textsearch_destroy(struct ts_config *conf);
-extern unsigned int textsearch_find_continuous(struct ts_config *,
- struct ts_state *,
- const void *, unsigned int);
-
-
-#define TS_PRIV_ALIGNTO 8
-#define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1))
-
-static inline struct ts_config *alloc_ts_config(size_t payload,
- gfp_t gfp_mask)
-{
- struct ts_config *conf;
-
- conf = kmalloc(TS_PRIV_ALIGN(sizeof(*conf)) + payload, gfp_mask);
- if (conf == NULL)
- return ERR_PTR(-ENOMEM);
-
- memset(conf, 0, TS_PRIV_ALIGN(sizeof(*conf)) + payload);
- return conf;
-}
-
-static inline void *ts_config_priv(struct ts_config *conf)
-{
- return ((u8 *) conf + TS_PRIV_ALIGN(sizeof(struct ts_config)));
-}
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/thread_info.h b/original/linux/thread_info.h
deleted file mode 100644
index 1c4eb41..0000000
--- a/original/linux/thread_info.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* thread_info.h: common low-level thread information accessors
- *
- * Copyright (C) 2002 David Howells (dhowells@redhat.com)
- * - Incorporating suggestions made by Linus Torvalds
- */
-
-#ifndef _LINUX_THREAD_INFO_H
-#define _LINUX_THREAD_INFO_H
-
-/*
- * System call restart block.
- */
-struct restart_block {
- long (*fn)(struct restart_block *);
- unsigned long arg0, arg1, arg2, arg3;
-};
-
-extern long do_no_restart_syscall(struct restart_block *parm);
-
-#include <linux/bitops.h>
-#include <asm/thread_info.h>
-
-#ifdef __KERNEL__
-
-/*
- * flag set/clear/test wrappers
- * - pass TIF_xxxx constants to these functions
- */
-
-static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
-{
- set_bit(flag,&ti->flags);
-}
-
-static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
-{
- clear_bit(flag,&ti->flags);
-}
-
-static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
-{
- return test_and_set_bit(flag,&ti->flags);
-}
-
-static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
-{
- return test_and_clear_bit(flag,&ti->flags);
-}
-
-static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
-{
- return test_bit(flag,&ti->flags);
-}
-
-#define set_thread_flag(flag) \
- set_ti_thread_flag(current_thread_info(), flag)
-#define clear_thread_flag(flag) \
- clear_ti_thread_flag(current_thread_info(), flag)
-#define test_and_set_thread_flag(flag) \
- test_and_set_ti_thread_flag(current_thread_info(), flag)
-#define test_and_clear_thread_flag(flag) \
- test_and_clear_ti_thread_flag(current_thread_info(), flag)
-#define test_thread_flag(flag) \
- test_ti_thread_flag(current_thread_info(), flag)
-
-#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
-#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
-
-#endif
-
-#endif /* _LINUX_THREAD_INFO_H */
diff --git a/original/linux/threads.h b/original/linux/threads.h
deleted file mode 100644
index 38d1a5d..0000000
--- a/original/linux/threads.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _LINUX_THREADS_H
-#define _LINUX_THREADS_H
-
-
-/*
- * The default limit for the nr of threads is now in
- * /proc/sys/kernel/threads-max.
- */
-
-/*
- * Maximum supported processors that can run under SMP. This value is
- * set via configure setting. The maximum is equal to the size of the
- * bitmasks used on that platform, i.e. 32 or 64. Setting this smaller
- * saves quite a bit of memory.
- */
-#ifdef CONFIG_SMP
-#define NR_CPUS CONFIG_NR_CPUS
-#else
-#define NR_CPUS 1
-#endif
-
-#define MIN_THREADS_LEFT_FOR_ROOT 4
-
-/*
- * This controls the default maximum pid allocated to a process
- */
-#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000)
-
-/*
- * A maximum of 4 million PIDs should be enough for a while.
- * [NOTE: PID/TIDs are limited to 2^29 ~= 500+ million, see futex.h.]
- */
-#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \
- (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT))
-
-#endif
diff --git a/original/linux/time.h b/original/linux/time.h
deleted file mode 100644
index e75e1b6..0000000
--- a/original/linux/time.h
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef _UAPI_LINUX_TIME_H
-#define _UAPI_LINUX_TIME_H
-
-#include <linux/types.h>
-
-
-#ifndef _STRUCT_TIMESPEC
-#define _STRUCT_TIMESPEC
-struct timespec {
- __kernel_time_t tv_sec; /* seconds */
- long tv_nsec; /* nanoseconds */
-};
-#endif
-
-struct timeval {
- __kernel_time_t tv_sec; /* seconds */
- __kernel_suseconds_t tv_usec; /* microseconds */
-};
-
-struct timezone {
- int tz_minuteswest; /* minutes west of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-
-
-/*
- * Names of the interval timers, and structure
- * defining a timer setting:
- */
-#define ITIMER_REAL 0
-#define ITIMER_VIRTUAL 1
-#define ITIMER_PROF 2
-
-struct itimerspec {
- struct timespec it_interval; /* timer period */
- struct timespec it_value; /* timer expiration */
-};
-
-struct itimerval {
- struct timeval it_interval; /* timer interval */
- struct timeval it_value; /* current value */
-};
-
-/*
- * The IDs of the various system clocks (for POSIX.1b interval timers):
- */
-#define CLOCK_REALTIME 0
-#define CLOCK_MONOTONIC 1
-#define CLOCK_PROCESS_CPUTIME_ID 2
-#define CLOCK_THREAD_CPUTIME_ID 3
-#define CLOCK_MONOTONIC_RAW 4
-#define CLOCK_REALTIME_COARSE 5
-#define CLOCK_MONOTONIC_COARSE 6
-#define CLOCK_BOOTTIME 7
-#define CLOCK_REALTIME_ALARM 8
-#define CLOCK_BOOTTIME_ALARM 9
-#define CLOCK_SGI_CYCLE 10 /* Hardware specific */
-#define CLOCK_TAI 11
-
-#define MAX_CLOCKS 16
-#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
-#define CLOCKS_MONO CLOCK_MONOTONIC
-
-/*
- * The various flags for setting POSIX.1b interval timers:
- */
-#define TIMER_ABSTIME 0x01
-
-#endif /* _UAPI_LINUX_TIME_H */
diff --git a/original/linux/timer.h b/original/linux/timer.h
deleted file mode 100644
index c982304..0000000
--- a/original/linux/timer.h
+++ /dev/null
@@ -1,101 +0,0 @@
-#ifndef _LINUX_TIMER_H
-#define _LINUX_TIMER_H
-
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <linux/stddef.h>
-
-struct tvec_t_base_s;
-
-struct timer_list {
- struct list_head entry;
- unsigned long expires;
-
- void (*function)(unsigned long);
- unsigned long data;
-
- struct tvec_t_base_s *base;
-};
-
-extern struct tvec_t_base_s boot_tvec_bases;
-
-#define TIMER_INITIALIZER(_function, _expires, _data) { \
- .function = (_function), \
- .expires = (_expires), \
- .data = (_data), \
- .base = &boot_tvec_bases, \
- }
-
-#define DEFINE_TIMER(_name, _function, _expires, _data) \
- struct timer_list _name = \
- TIMER_INITIALIZER(_function, _expires, _data)
-
-void fastcall init_timer(struct timer_list * timer);
-
-static inline void setup_timer(struct timer_list * timer,
- void (*function)(unsigned long),
- unsigned long data)
-{
- timer->function = function;
- timer->data = data;
- init_timer(timer);
-}
-
-/***
- * timer_pending - is a timer pending?
- * @timer: the timer in question
- *
- * timer_pending will tell whether a given timer is currently pending,
- * or not. Callers must ensure serialization wrt. other operations done
- * to this timer, eg. interrupt contexts, or other CPUs on SMP.
- *
- * return value: 1 if the timer is pending, 0 if not.
- */
-static inline int timer_pending(const struct timer_list * timer)
-{
- return timer->entry.next != NULL;
-}
-
-extern void add_timer_on(struct timer_list *timer, int cpu);
-extern int del_timer(struct timer_list * timer);
-extern int __mod_timer(struct timer_list *timer, unsigned long expires);
-extern int mod_timer(struct timer_list *timer, unsigned long expires);
-
-extern unsigned long next_timer_interrupt(void);
-
-/***
- * add_timer - start a timer
- * @timer: the timer to be added
- *
- * The kernel will do a ->function(->data) callback from the
- * timer interrupt at the ->expires point in the future. The
- * current time is 'jiffies'.
- *
- * The timer's ->expires, ->function (and if the handler uses it, ->data)
- * fields must be set prior calling this function.
- *
- * Timers with an ->expires field in the past will be executed in the next
- * timer tick.
- */
-static inline void add_timer(struct timer_list *timer)
-{
- BUG_ON(timer_pending(timer));
- __mod_timer(timer, timer->expires);
-}
-
-#ifdef CONFIG_SMP
- extern int try_to_del_timer_sync(struct timer_list *timer);
- extern int del_timer_sync(struct timer_list *timer);
-#else
-# define try_to_del_timer_sync(t) del_timer(t)
-# define del_timer_sync(t) del_timer(t)
-#endif
-
-#define del_singleshot_timer_sync(t) del_timer_sync(t)
-
-extern void init_timers(void);
-extern void run_local_timers(void);
-struct hrtimer;
-extern int it_real_fn(struct hrtimer *);
-
-#endif
diff --git a/original/linux/timerfd.h b/original/linux/timerfd.h
deleted file mode 100644
index d3b57fa..0000000
--- a/original/linux/timerfd.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * include/linux/timerfd.h
- *
- * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
- *
- */
-
-#ifndef _LINUX_TIMERFD_H
-#define _LINUX_TIMERFD_H
-
-/* For O_CLOEXEC and O_NONBLOCK */
-#include <linux/fcntl.h>
-
-/*
- * CAREFUL: Check include/asm-generic/fcntl.h when defining
- * new flags, since they might collide with O_* ones. We want
- * to re-use O_* flags that couldn't possibly have a meaning
- * from eventfd, in order to leave a free define-space for
- * shared O_* flags.
- */
-#define TFD_TIMER_ABSTIME (1 << 0)
-#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
-#define TFD_CLOEXEC O_CLOEXEC
-#define TFD_NONBLOCK O_NONBLOCK
-
-#define TFD_SHARED_FCNTL_FLAGS (TFD_CLOEXEC | TFD_NONBLOCK)
-/* Flags for timerfd_create. */
-#define TFD_CREATE_FLAGS TFD_SHARED_FCNTL_FLAGS
-/* Flags for timerfd_settime. */
-#define TFD_SETTIME_FLAGS (TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET)
-
-#endif /* _LINUX_TIMERFD_H */
diff --git a/original/linux/times.h b/original/linux/times.h
deleted file mode 100644
index e2d3020..0000000
--- a/original/linux/times.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _LINUX_TIMES_H
-#define _LINUX_TIMES_H
-
-#include <linux/types.h>
-
-struct tms {
- clock_t tms_utime;
- clock_t tms_stime;
- clock_t tms_cutime;
- clock_t tms_cstime;
-};
-
-#endif
diff --git a/original/linux/timex.h b/original/linux/timex.h
deleted file mode 100644
index d543d38..0000000
--- a/original/linux/timex.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/*****************************************************************************
- * *
- * Copyright (c) David L. Mills 1993 *
- * *
- * Permission to use, copy, modify, and distribute this software and its *
- * documentation for any purpose and without fee is hereby granted, provided *
- * that the above copyright notice appears in all copies and that both the *
- * copyright notice and this permission notice appear in supporting *
- * documentation, and that the name University of Delaware not be used in *
- * advertising or publicity pertaining to distribution of the software *
- * without specific, written prior permission. The University of Delaware *
- * makes no representations about the suitability this software for any *
- * purpose. It is provided "as is" without express or implied warranty. *
- * *
- *****************************************************************************/
-
-/*
- * Modification history timex.h
- *
- * 29 Dec 97 Russell King
- * Moved CLOCK_TICK_RATE, CLOCK_TICK_FACTOR and FINETUNE to asm/timex.h
- * for ARM machines
- *
- * 9 Jan 97 Adrian Sun
- * Shifted LATCH define to allow access to alpha machines.
- *
- * 26 Sep 94 David L. Mills
- * Added defines for hybrid phase/frequency-lock loop.
- *
- * 19 Mar 94 David L. Mills
- * Moved defines from kernel routines to header file and added new
- * defines for PPS phase-lock loop.
- *
- * 20 Feb 94 David L. Mills
- * Revised status codes and structures for external clock and PPS
- * signal discipline.
- *
- * 28 Nov 93 David L. Mills
- * Adjusted parameters to improve stability and increase poll
- * interval.
- *
- * 17 Sep 93 David L. Mills
- * Created file $NTP/include/sys/timex.h
- * 07 Oct 93 Torsten Duwe
- * Derived linux/timex.h
- * 1995-08-13 Torsten Duwe
- * kernel PLL updated to 1994-12-13 specs (rfc-1589)
- * 1997-08-30 Ulrich Windl
- * Added new constant NTP_PHASE_LIMIT
- * 2004-08-12 Christoph Lameter
- * Reworked time interpolation logic
- */
-#ifndef _LINUX_TIMEX_H
-#define _LINUX_TIMEX_H
-
-#include <linux/compiler.h>
-#include <linux/time.h>
-
-#include <asm/param.h>
-
-/*
- * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
- * for a slightly underdamped convergence characteristic. SHIFT_KH
- * establishes the damping of the FLL and is chosen by wisdom and black
- * art.
- *
- * MAXTC establishes the maximum time constant of the PLL. With the
- * SHIFT_KG and SHIFT_KF values given and a time constant range from
- * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours,
- * respectively.
- */
-#define SHIFT_KG 6 /* phase factor (shift) */
-#define SHIFT_KF 16 /* PLL frequency factor (shift) */
-#define SHIFT_KH 2 /* FLL frequency factor (shift) */
-#define MAXTC 6 /* maximum time constant (shift) */
-
-/*
- * The SHIFT_SCALE define establishes the decimal point of the time_phase
- * variable which serves as an extension to the low-order bits of the
- * system clock variable. The SHIFT_UPDATE define establishes the decimal
- * point of the time_offset variable which represents the current offset
- * with respect to standard time. The FINENSEC define represents 1 nsec in
- * scaled units.
- *
- * SHIFT_USEC defines the scaling (shift) of the time_freq and
- * time_tolerance variables, which represent the current frequency
- * offset and maximum frequency tolerance.
- *
- * FINENSEC is 1 ns in SHIFT_UPDATE units of the time_phase variable.
- */
-#define SHIFT_SCALE 22 /* phase scale (shift) */
-#define SHIFT_UPDATE (SHIFT_KG + MAXTC) /* time offset scale (shift) */
-#define SHIFT_USEC 16 /* frequency offset scale (shift) */
-#define FINENSEC (1L << (SHIFT_SCALE - 10)) /* ~1 ns in phase units */
-
-#define MAXPHASE 512000L /* max phase error (us) */
-#define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */
-#define MINSEC 16L /* min interval between updates (s) */
-#define MAXSEC 1200L /* max interval between updates (s) */
-#define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */
-
-/*
- * syscall interface - used (mainly by NTP daemon)
- * to discipline kernel clock oscillator
- */
-struct timex {
- unsigned int modes; /* mode selector */
- long offset; /* time offset (usec) */
- long freq; /* frequency offset (scaled ppm) */
- long maxerror; /* maximum error (usec) */
- long esterror; /* estimated error (usec) */
- int status; /* clock command/status */
- long constant; /* pll time constant */
- long precision; /* clock precision (usec) (read only) */
- long tolerance; /* clock frequency tolerance (ppm)
- * (read only)
- */
- struct timeval time; /* (read only) */
- long tick; /* (modified) usecs between clock ticks */
-
- long ppsfreq; /* pps frequency (scaled ppm) (ro) */
- long jitter; /* pps jitter (us) (ro) */
- int shift; /* interval duration (s) (shift) (ro) */
- long stabil; /* pps stability (scaled ppm) (ro) */
- long jitcnt; /* jitter limit exceeded (ro) */
- long calcnt; /* calibration intervals (ro) */
- long errcnt; /* calibration errors (ro) */
- long stbcnt; /* stability limit exceeded (ro) */
-
- int :32; int :32; int :32; int :32;
- int :32; int :32; int :32; int :32;
- int :32; int :32; int :32; int :32;
-};
-
-/*
- * Mode codes (timex.mode)
- */
-#define ADJ_OFFSET 0x0001 /* time offset */
-#define ADJ_FREQUENCY 0x0002 /* frequency offset */
-#define ADJ_MAXERROR 0x0004 /* maximum time error */
-#define ADJ_ESTERROR 0x0008 /* estimated time error */
-#define ADJ_STATUS 0x0010 /* clock status */
-#define ADJ_TIMECONST 0x0020 /* pll time constant */
-#define ADJ_TICK 0x4000 /* tick value */
-#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
-
-/* xntp 3.4 compatibility names */
-#define MOD_OFFSET ADJ_OFFSET
-#define MOD_FREQUENCY ADJ_FREQUENCY
-#define MOD_MAXERROR ADJ_MAXERROR
-#define MOD_ESTERROR ADJ_ESTERROR
-#define MOD_STATUS ADJ_STATUS
-#define MOD_TIMECONST ADJ_TIMECONST
-#define MOD_CLKB ADJ_TICK
-#define MOD_CLKA ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */
-
-
-/*
- * Status codes (timex.status)
- */
-#define STA_PLL 0x0001 /* enable PLL updates (rw) */
-#define STA_PPSFREQ 0x0002 /* enable PPS freq discipline (rw) */
-#define STA_PPSTIME 0x0004 /* enable PPS time discipline (rw) */
-#define STA_FLL 0x0008 /* select frequency-lock mode (rw) */
-
-#define STA_INS 0x0010 /* insert leap (rw) */
-#define STA_DEL 0x0020 /* delete leap (rw) */
-#define STA_UNSYNC 0x0040 /* clock unsynchronized (rw) */
-#define STA_FREQHOLD 0x0080 /* hold frequency (rw) */
-
-#define STA_PPSSIGNAL 0x0100 /* PPS signal present (ro) */
-#define STA_PPSJITTER 0x0200 /* PPS signal jitter exceeded (ro) */
-#define STA_PPSWANDER 0x0400 /* PPS signal wander exceeded (ro) */
-#define STA_PPSERROR 0x0800 /* PPS signal calibration error (ro) */
-
-#define STA_CLOCKERR 0x1000 /* clock hardware fault (ro) */
-
-#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
- STA_PPSERROR | STA_CLOCKERR) /* read-only bits */
-
-/*
- * Clock states (time_state)
- */
-#define TIME_OK 0 /* clock synchronized, no leap second */
-#define TIME_INS 1 /* insert leap second */
-#define TIME_DEL 2 /* delete leap second */
-#define TIME_OOP 3 /* leap second in progress */
-#define TIME_WAIT 4 /* leap second has occurred */
-#define TIME_ERROR 5 /* clock not synchronized */
-#define TIME_BAD TIME_ERROR /* bw compat */
-
-#ifdef __KERNEL__
-#include <asm/timex.h>
-
-/*
- * kernel variables
- * Note: maximum error = NTP synch distance = dispersion + delay / 2;
- * estimated error = NTP dispersion.
- */
-extern unsigned long tick_usec; /* USER_HZ period (usec) */
-extern unsigned long tick_nsec; /* ACTHZ period (nsec) */
-extern int tickadj; /* amount of adjustment per tick */
-
-/*
- * phase-lock loop variables
- */
-extern int time_state; /* clock status */
-extern int time_status; /* clock synchronization status bits */
-extern long time_offset; /* time adjustment (us) */
-extern long time_constant; /* pll time constant */
-extern long time_tolerance; /* frequency tolerance (ppm) */
-extern long time_precision; /* clock precision (us) */
-extern long time_maxerror; /* maximum error */
-extern long time_esterror; /* estimated error */
-
-extern long time_freq; /* frequency offset (scaled ppm) */
-extern long time_reftime; /* time at last adjustment (s) */
-
-extern long time_adjust; /* The amount of adjtime left */
-extern long time_next_adjust; /* Value for time_adjust at next tick */
-
-/**
- * ntp_clear - Clears the NTP state variables
- *
- * Must be called while holding a write on the xtime_lock
- */
-static inline void ntp_clear(void)
-{
- time_adjust = 0; /* stop active adjtime() */
- time_status |= STA_UNSYNC;
- time_maxerror = NTP_PHASE_LIMIT;
- time_esterror = NTP_PHASE_LIMIT;
-}
-
-/**
- * ntp_synced - Returns 1 if the NTP status is not UNSYNC
- *
- */
-static inline int ntp_synced(void)
-{
- return !(time_status & STA_UNSYNC);
-}
-
-/* Required to safely shift negative values */
-#define shift_right(x, s) ({ \
- __typeof__(x) __x = (x); \
- __typeof__(s) __s = (s); \
- __x < 0 ? -(-__x >> __s) : __x >> __s; \
-})
-
-
-#ifdef CONFIG_TIME_INTERPOLATION
-
-#define TIME_SOURCE_CPU 0
-#define TIME_SOURCE_MMIO64 1
-#define TIME_SOURCE_MMIO32 2
-#define TIME_SOURCE_FUNCTION 3
-
-/* For proper operations time_interpolator clocks must run slightly slower
- * than the standard clock since the interpolator may only correct by having
- * time jump forward during a tick. A slower clock is usually a side effect
- * of the integer divide of the nanoseconds in a second by the frequency.
- * The accuracy of the division can be increased by specifying a shift.
- * However, this may cause the clock not to be slow enough.
- * The interpolator will self-tune the clock by slowing down if no
- * resets occur or speeding up if the time jumps per analysis cycle
- * become too high.
- *
- * Setting jitter compensates for a fluctuating timesource by comparing
- * to the last value read from the timesource to insure that an earlier value
- * is not returned by a later call. The price to pay
- * for the compensation is that the timer routines are not as scalable anymore.
- */
-
-struct time_interpolator {
- u16 source; /* time source flags */
- u8 shift; /* increases accuracy of multiply by shifting. */
- /* Note that bits may be lost if shift is set too high */
- u8 jitter; /* if set compensate for fluctuations */
- u32 nsec_per_cyc; /* set by register_time_interpolator() */
- void *addr; /* address of counter or function */
- u64 mask; /* mask the valid bits of the counter */
- unsigned long offset; /* nsec offset at last update of interpolator */
- u64 last_counter; /* counter value in units of the counter at last update */
- u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */
- u64 frequency; /* frequency in counts/second */
- long drift; /* drift in parts-per-million (or -1) */
- unsigned long skips; /* skips forward */
- unsigned long ns_skipped; /* nanoseconds skipped */
- struct time_interpolator *next;
-};
-
-extern void register_time_interpolator(struct time_interpolator *);
-extern void unregister_time_interpolator(struct time_interpolator *);
-extern void time_interpolator_reset(void);
-extern unsigned long time_interpolator_get_offset(void);
-
-#else /* !CONFIG_TIME_INTERPOLATION */
-
-static inline void
-time_interpolator_reset(void)
-{
-}
-
-#endif /* !CONFIG_TIME_INTERPOLATION */
-
-#define TICK_LENGTH_SHIFT 32
-
-/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
-extern u64 current_tick_length(void);
-
-extern int do_adjtimex(struct timex *);
-
-#endif /* KERNEL */
-
-#endif /* LINUX_TIMEX_H */
diff --git a/original/linux/tiocl.h b/original/linux/tiocl.h
deleted file mode 100644
index 4756862..0000000
--- a/original/linux/tiocl.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _LINUX_TIOCL_H
-#define _LINUX_TIOCL_H
-
-#define TIOCL_SETSEL 2 /* set a selection */
-#define TIOCL_SELCHAR 0 /* select characters */
-#define TIOCL_SELWORD 1 /* select whole words */
-#define TIOCL_SELLINE 2 /* select whole lines */
-#define TIOCL_SELPOINTER 3 /* show the pointer */
-#define TIOCL_SELCLEAR 4 /* clear visibility of selection */
-#define TIOCL_SELMOUSEREPORT 16 /* report beginning of selection */
-#define TIOCL_SELBUTTONMASK 15 /* button mask for report */
-/* selection extent */
-struct tiocl_selection {
- unsigned short xs; /* X start */
- unsigned short ys; /* Y start */
- unsigned short xe; /* X end */
- unsigned short ye; /* Y end */
- unsigned short sel_mode; /* selection mode */
-};
-
-#define TIOCL_PASTESEL 3 /* paste previous selection */
-#define TIOCL_UNBLANKSCREEN 4 /* unblank screen */
-
-#define TIOCL_SELLOADLUT 5
- /* set characters to be considered alphabetic when selecting */
- /* u32[8] bit array, 4 bytes-aligned with type */
-
-/* these two don't return a value: they write it back in the type */
-#define TIOCL_GETSHIFTSTATE 6 /* write shift state */
-#define TIOCL_GETMOUSEREPORTING 7 /* write whether mouse event are reported */
-#define TIOCL_SETVESABLANK 10 /* set vesa blanking mode */
-#define TIOCL_SETKMSGREDIRECT 11 /* restrict kernel messages to a vt */
-#define TIOCL_GETFGCONSOLE 12 /* get foreground vt */
-#define TIOCL_SCROLLCONSOLE 13 /* scroll console */
-#define TIOCL_BLANKSCREEN 14 /* keep screen blank even if a key is pressed */
-#define TIOCL_BLANKEDSCREEN 15 /* return which vt was blanked */
-#define TIOCL_GETKMSGREDIRECT 17 /* get the vt the kernel messages are restricted to */
-
-#endif /* _LINUX_TIOCL_H */
diff --git a/original/linux/tpa2018d1.h b/original/linux/tpa2018d1.h
deleted file mode 100644
index 26f608b..0000000
--- a/original/linux/tpa2018d1.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* include/linux/tpa2018d1.h - tpa2018d1 speaker amplifier driver
- *
- * Copyright (C) 2009 HTC Corporation.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef _LINUX_TPA2018D1_H
-#define _LINUX_TPA2018D1_H
-
-#include <linux/ioctl.h>
-
-enum tpa2018d1_mode {
- TPA2018_MODE_OFF,
- TPA2018_MODE_PLAYBACK,
- TPA2018_MODE_RINGTONE,
- TPA2018_MODE_VOICE_CALL,
- TPA2018_NUM_MODES,
-};
-
-#define TPA2018_IOCTL_MAGIC 'a'
-#define TPA2018_SET_CONFIG _IOW(TPA2018_IOCTL_MAGIC, 1, unsigned)
-#define TPA2018_READ_CONFIG _IOR(TPA2018_IOCTL_MAGIC, 2, unsigned)
-#define TPA2018_SET_PARAM _IOW(TPA2018_IOCTL_MAGIC, 3, unsigned)
-#define TPA2018_SET_MODE _IOW(TPA2018_IOCTL_MAGIC, 4, unsigned)
-
-#endif
-
diff --git a/original/linux/transport_class.h b/original/linux/transport_class.h
deleted file mode 100644
index 1d6cc22..0000000
--- a/original/linux/transport_class.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * transport_class.h - a generic container for all transport classes
- *
- * Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com>
- *
- * This file is licensed under GPLv2
- */
-
-#ifndef _TRANSPORT_CLASS_H_
-#define _TRANSPORT_CLASS_H_
-
-#include <linux/device.h>
-#include <linux/attribute_container.h>
-
-struct transport_container;
-
-struct transport_class {
- struct class class;
- int (*setup)(struct transport_container *, struct device *,
- struct class_device *);
- int (*configure)(struct transport_container *, struct device *,
- struct class_device *);
- int (*remove)(struct transport_container *, struct device *,
- struct class_device *);
-};
-
-#define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \
-struct transport_class cls = { \
- .class = { \
- .name = nm, \
- }, \
- .setup = su, \
- .remove = rm, \
- .configure = cfg, \
-}
-
-
-struct anon_transport_class {
- struct transport_class tclass;
- struct attribute_container container;
-};
-
-#define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg) \
-struct anon_transport_class cls = { \
- .tclass = { \
- .configure = cfg, \
- }, \
- . container = { \
- .match = mtch, \
- }, \
-}
-
-#define class_to_transport_class(x) \
- container_of(x, struct transport_class, class)
-
-struct transport_container {
- struct attribute_container ac;
- struct attribute_group *statistics;
-};
-
-#define attribute_container_to_transport_container(x) \
- container_of(x, struct transport_container, ac)
-
-void transport_remove_device(struct device *);
-void transport_add_device(struct device *);
-void transport_setup_device(struct device *);
-void transport_configure_device(struct device *);
-void transport_destroy_device(struct device *);
-
-static inline void
-transport_register_device(struct device *dev)
-{
- transport_setup_device(dev);
- transport_add_device(dev);
-}
-
-static inline void
-transport_unregister_device(struct device *dev)
-{
- transport_remove_device(dev);
- transport_destroy_device(dev);
-}
-
-static inline int transport_container_register(struct transport_container *tc)
-{
- return attribute_container_register(&tc->ac);
-}
-
-static inline int transport_container_unregister(struct transport_container *tc)
-{
- return attribute_container_unregister(&tc->ac);
-}
-
-int transport_class_register(struct transport_class *);
-int anon_transport_class_register(struct anon_transport_class *);
-void transport_class_unregister(struct transport_class *);
-void anon_transport_class_unregister(struct anon_transport_class *);
-
-
-#endif
diff --git a/original/linux/tty.h b/original/linux/tty.h
deleted file mode 100644
index 551e968..0000000
--- a/original/linux/tty.h
+++ /dev/null
@@ -1,345 +0,0 @@
-#ifndef _LINUX_TTY_H
-#define _LINUX_TTY_H
-
-/*
- * 'tty.h' defines some structures used by tty_io.c and some defines.
- */
-
-#define N_CAIF 20 /* CAIF protocol for talking to modems */
-
-#ifdef __KERNEL__
-#include <linux/fs.h>
-#include <linux/major.h>
-#include <linux/termios.h>
-#include <linux/workqueue.h>
-#include <linux/tty_driver.h>
-#include <linux/tty_ldisc.h>
-#include <linux/mutex.h>
-
-#include <asm/system.h>
-
-
-/*
- * (Note: the *_driver.minor_start values 1, 64, 128, 192 are
- * hardcoded at present.)
- */
-#define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */
-#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
-#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
-#define NR_LDISCS 16
-
-/*
- * This character is the same as _POSIX_VDISABLE: it cannot be used as
- * a c_cc[] character, but indicates that a particular special character
- * isn't in use (eg VINTR has no character etc)
- */
-#define __DISABLED_CHAR '\0'
-
-/*
- * This is the flip buffer used for the tty driver. The buffer is
- * located in the tty structure, and is used as a high speed interface
- * between the tty driver and the tty line discipline.
- */
-#define TTY_FLIPBUF_SIZE 512
-
-struct tty_buffer {
- struct tty_buffer *next;
- char *char_buf_ptr;
- unsigned char *flag_buf_ptr;
- int used;
- int size;
- int commit;
- int read;
- /* Data points here */
- unsigned long data[0];
-};
-
-struct tty_bufhead {
- struct work_struct work;
- struct semaphore pty_sem;
- spinlock_t lock;
- struct tty_buffer *head; /* Queue head */
- struct tty_buffer *tail; /* Active buffer */
- struct tty_buffer *free; /* Free queue head */
- int memory_used; /* Buffer space used excluding free queue */
-};
-/*
- * The pty uses char_buf and flag_buf as a contiguous buffer
- */
-#define PTY_BUF_SIZE 4*TTY_FLIPBUF_SIZE
-
-/*
- * When a break, frame error, or parity error happens, these codes are
- * stuffed into the flags buffer.
- */
-#define TTY_NORMAL 0
-#define TTY_BREAK 1
-#define TTY_FRAME 2
-#define TTY_PARITY 3
-#define TTY_OVERRUN 4
-
-#define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR])
-#define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT])
-#define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE])
-#define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL])
-#define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF])
-#define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME])
-#define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN])
-#define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC])
-#define START_CHAR(tty) ((tty)->termios->c_cc[VSTART])
-#define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP])
-#define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP])
-#define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL])
-#define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT])
-#define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD])
-#define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE])
-#define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT])
-#define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2])
-
-#define _I_FLAG(tty,f) ((tty)->termios->c_iflag & (f))
-#define _O_FLAG(tty,f) ((tty)->termios->c_oflag & (f))
-#define _C_FLAG(tty,f) ((tty)->termios->c_cflag & (f))
-#define _L_FLAG(tty,f) ((tty)->termios->c_lflag & (f))
-
-#define I_IGNBRK(tty) _I_FLAG((tty),IGNBRK)
-#define I_BRKINT(tty) _I_FLAG((tty),BRKINT)
-#define I_IGNPAR(tty) _I_FLAG((tty),IGNPAR)
-#define I_PARMRK(tty) _I_FLAG((tty),PARMRK)
-#define I_INPCK(tty) _I_FLAG((tty),INPCK)
-#define I_ISTRIP(tty) _I_FLAG((tty),ISTRIP)
-#define I_INLCR(tty) _I_FLAG((tty),INLCR)
-#define I_IGNCR(tty) _I_FLAG((tty),IGNCR)
-#define I_ICRNL(tty) _I_FLAG((tty),ICRNL)
-#define I_IUCLC(tty) _I_FLAG((tty),IUCLC)
-#define I_IXON(tty) _I_FLAG((tty),IXON)
-#define I_IXANY(tty) _I_FLAG((tty),IXANY)
-#define I_IXOFF(tty) _I_FLAG((tty),IXOFF)
-#define I_IMAXBEL(tty) _I_FLAG((tty),IMAXBEL)
-#define I_IUTF8(tty) _I_FLAG((tty),IUTF8)
-
-#define O_OPOST(tty) _O_FLAG((tty),OPOST)
-#define O_OLCUC(tty) _O_FLAG((tty),OLCUC)
-#define O_ONLCR(tty) _O_FLAG((tty),ONLCR)
-#define O_OCRNL(tty) _O_FLAG((tty),OCRNL)
-#define O_ONOCR(tty) _O_FLAG((tty),ONOCR)
-#define O_ONLRET(tty) _O_FLAG((tty),ONLRET)
-#define O_OFILL(tty) _O_FLAG((tty),OFILL)
-#define O_OFDEL(tty) _O_FLAG((tty),OFDEL)
-#define O_NLDLY(tty) _O_FLAG((tty),NLDLY)
-#define O_CRDLY(tty) _O_FLAG((tty),CRDLY)
-#define O_TABDLY(tty) _O_FLAG((tty),TABDLY)
-#define O_BSDLY(tty) _O_FLAG((tty),BSDLY)
-#define O_VTDLY(tty) _O_FLAG((tty),VTDLY)
-#define O_FFDLY(tty) _O_FLAG((tty),FFDLY)
-
-#define C_BAUD(tty) _C_FLAG((tty),CBAUD)
-#define C_CSIZE(tty) _C_FLAG((tty),CSIZE)
-#define C_CSTOPB(tty) _C_FLAG((tty),CSTOPB)
-#define C_CREAD(tty) _C_FLAG((tty),CREAD)
-#define C_PARENB(tty) _C_FLAG((tty),PARENB)
-#define C_PARODD(tty) _C_FLAG((tty),PARODD)
-#define C_HUPCL(tty) _C_FLAG((tty),HUPCL)
-#define C_CLOCAL(tty) _C_FLAG((tty),CLOCAL)
-#define C_CIBAUD(tty) _C_FLAG((tty),CIBAUD)
-#define C_CRTSCTS(tty) _C_FLAG((tty),CRTSCTS)
-
-#define L_ISIG(tty) _L_FLAG((tty),ISIG)
-#define L_ICANON(tty) _L_FLAG((tty),ICANON)
-#define L_XCASE(tty) _L_FLAG((tty),XCASE)
-#define L_ECHO(tty) _L_FLAG((tty),ECHO)
-#define L_ECHOE(tty) _L_FLAG((tty),ECHOE)
-#define L_ECHOK(tty) _L_FLAG((tty),ECHOK)
-#define L_ECHONL(tty) _L_FLAG((tty),ECHONL)
-#define L_NOFLSH(tty) _L_FLAG((tty),NOFLSH)
-#define L_TOSTOP(tty) _L_FLAG((tty),TOSTOP)
-#define L_ECHOCTL(tty) _L_FLAG((tty),ECHOCTL)
-#define L_ECHOPRT(tty) _L_FLAG((tty),ECHOPRT)
-#define L_ECHOKE(tty) _L_FLAG((tty),ECHOKE)
-#define L_FLUSHO(tty) _L_FLAG((tty),FLUSHO)
-#define L_PENDIN(tty) _L_FLAG((tty),PENDIN)
-#define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN)
-
-struct device;
-/*
- * Where all of the state associated with a tty is kept while the tty
- * is open. Since the termios state should be kept even if the tty
- * has been closed --- for things like the baud rate, etc --- it is
- * not stored here, but rather a pointer to the real state is stored
- * here. Possible the winsize structure should have the same
- * treatment, but (1) the default 80x24 is usually right and (2) it's
- * most often used by a windowing system, which will set the correct
- * size each time the window is created or resized anyway.
- * - TYT, 9/14/92
- */
-struct tty_struct {
- int magic;
- struct tty_driver *driver;
- int index;
- struct tty_ldisc ldisc;
- struct semaphore termios_sem;
- struct termios *termios, *termios_locked;
- char name[64];
- int pgrp;
- int session;
- unsigned long flags;
- int count;
- struct winsize winsize;
- unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1;
- unsigned char low_latency:1, warned:1;
- unsigned char ctrl_status;
- unsigned int receive_room; /* Bytes free for queue */
-
- struct tty_struct *link;
- struct fasync_struct *fasync;
- struct tty_bufhead buf;
- int max_flip_cnt;
- int alt_speed; /* For magic substitution of 38400 bps */
- wait_queue_head_t write_wait;
- wait_queue_head_t read_wait;
- struct work_struct hangup_work;
- void *disc_data;
- void *driver_data;
- struct list_head tty_files;
-
-#define N_TTY_BUF_SIZE 4096
-
- /*
- * The following is data for the N_TTY line discipline. For
- * historical reasons, this is included in the tty structure.
- */
- unsigned int column;
- unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1;
- unsigned char closing:1;
- unsigned short minimum_to_wake;
- unsigned long overrun_time;
- int num_overrun;
- unsigned long process_char_map[256/(8*sizeof(unsigned long))];
- char *read_buf;
- int read_head;
- int read_tail;
- int read_cnt;
- unsigned long read_flags[N_TTY_BUF_SIZE/(8*sizeof(unsigned long))];
- int canon_data;
- unsigned long canon_head;
- unsigned int canon_column;
- struct mutex atomic_read_lock;
- struct mutex atomic_write_lock;
- unsigned char *write_buf;
- int write_cnt;
- spinlock_t read_lock;
- /* If the tty has a pending do_SAK, queue it here - akpm */
- struct work_struct SAK_work;
-};
-
-/* tty magic number */
-#define TTY_MAGIC 0x5401
-
-/*
- * These bits are used in the flags field of the tty structure.
- *
- * So that interrupts won't be able to mess up the queues,
- * copy_to_cooked must be atomic with respect to itself, as must
- * tty->write. Thus, you must use the inline functions set_bit() and
- * clear_bit() to make things atomic.
- */
-#define TTY_THROTTLED 0 /* Call unthrottle() at threshold min */
-#define TTY_IO_ERROR 1 /* Canse an I/O error (may be no ldisc too) */
-#define TTY_OTHER_CLOSED 2 /* Other side (if any) has closed */
-#define TTY_EXCLUSIVE 3 /* Exclusive open mode */
-#define TTY_DEBUG 4 /* Debugging */
-#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */
-#define TTY_PUSH 6 /* n_tty private */
-#define TTY_CLOSING 7 /* ->close() in progress */
-#define TTY_LDISC 9 /* Line discipline attached */
-#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */
-#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */
-#define TTY_PTY_LOCK 16 /* pty private */
-#define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */
-#define TTY_HUPPED 18 /* Post driver->hangup() */
-
-#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
-
-extern void tty_write_flush(struct tty_struct *);
-
-extern struct termios tty_std_termios;
-
-extern int kmsg_redirect;
-
-extern void console_init(void);
-extern int vcs_init(void);
-
-extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
- const char *routine);
-extern char *tty_name(struct tty_struct *tty, char *buf);
-extern void tty_wait_until_sent(struct tty_struct * tty, long timeout);
-extern int tty_check_change(struct tty_struct * tty);
-extern void stop_tty(struct tty_struct * tty);
-extern void start_tty(struct tty_struct * tty);
-extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc);
-extern int tty_unregister_ldisc(int disc);
-extern int tty_register_driver(struct tty_driver *driver);
-extern int tty_unregister_driver(struct tty_driver *driver);
-extern struct class_device *tty_register_device(struct tty_driver *driver,
- unsigned index,
- struct device *dev);
-extern void tty_unregister_device(struct tty_driver *driver, unsigned index);
-extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
- int buflen);
-extern void tty_write_message(struct tty_struct *tty, char *msg);
-
-extern int is_orphaned_pgrp(int pgrp);
-extern int is_ignored(int sig);
-extern int tty_signal(int sig, struct tty_struct *tty);
-extern void tty_hangup(struct tty_struct * tty);
-extern void tty_vhangup(struct tty_struct * tty);
-extern void tty_unhangup(struct file *filp);
-extern int tty_hung_up_p(struct file * filp);
-extern void do_SAK(struct tty_struct *tty);
-extern void disassociate_ctty(int priv);
-extern void tty_flip_buffer_push(struct tty_struct *tty);
-extern int tty_get_baud_rate(struct tty_struct *tty);
-extern int tty_termios_baud_rate(struct termios *termios);
-
-extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);
-extern void tty_ldisc_deref(struct tty_ldisc *);
-extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *);
-
-extern struct tty_ldisc *tty_ldisc_get(int);
-extern void tty_ldisc_put(int);
-
-extern void tty_wakeup(struct tty_struct *tty);
-extern void tty_ldisc_flush(struct tty_struct *tty);
-
-extern struct mutex tty_mutex;
-
-/* n_tty.c */
-extern struct tty_ldisc tty_ldisc_N_TTY;
-
-/* tty_ioctl.c */
-extern int n_tty_ioctl(struct tty_struct * tty, struct file * file,
- unsigned int cmd, unsigned long arg);
-
-/* serial.c */
-
-extern void serial_console_init(void);
-
-/* pcxx.c */
-
-extern int pcxe_open(struct tty_struct *tty, struct file *filp);
-
-/* printk.c */
-
-extern void console_print(const char *);
-
-/* vt.c */
-
-extern int vt_ioctl(struct tty_struct *tty, struct file * file,
- unsigned int cmd, unsigned long arg);
-
-static inline dev_t tty_devnum(struct tty_struct *tty)
-{
- return MKDEV(tty->driver->major, tty->driver->minor_start) + tty->index;
-}
-
-#endif /* __KERNEL__ */
-#endif
diff --git a/original/linux/types.h b/original/linux/types.h
deleted file mode 100644
index 0351bf2..0000000
--- a/original/linux/types.h
+++ /dev/null
@@ -1,210 +0,0 @@
-#ifndef _LINUX_TYPES_H
-#define _LINUX_TYPES_H
-
-#ifdef __KERNEL__
-
-#define BITS_TO_LONGS(bits) \
- (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
-#define DECLARE_BITMAP(name,bits) \
- unsigned long name[BITS_TO_LONGS(bits)]
-
-#define BITS_PER_BYTE 8
-#endif
-
-#include <linux/posix_types.h>
-#include <asm/types.h>
-
-#ifndef __KERNEL_STRICT_NAMES
-
-typedef __u32 __kernel_dev_t;
-
-typedef __kernel_fd_set fd_set;
-typedef __kernel_dev_t dev_t;
-typedef __kernel_ino_t ino_t;
-typedef __kernel_mode_t mode_t;
-typedef __kernel_nlink_t nlink_t;
-typedef __kernel_off_t off_t;
-typedef __kernel_pid_t pid_t;
-typedef __kernel_daddr_t daddr_t;
-typedef __kernel_key_t key_t;
-typedef __kernel_suseconds_t suseconds_t;
-typedef __kernel_timer_t timer_t;
-typedef __kernel_clockid_t clockid_t;
-typedef __kernel_mqd_t mqd_t;
-
-#ifdef __KERNEL__
-typedef _Bool bool;
-
-typedef __kernel_uid32_t uid_t;
-typedef __kernel_gid32_t gid_t;
-typedef __kernel_uid16_t uid16_t;
-typedef __kernel_gid16_t gid16_t;
-
-#ifdef CONFIG_UID16
-/* This is defined by include/asm-{arch}/posix_types.h */
-typedef __kernel_old_uid_t old_uid_t;
-typedef __kernel_old_gid_t old_gid_t;
-#endif /* CONFIG_UID16 */
-
-/* libc5 includes this file to define uid_t, thus uid_t can never change
- * when it is included by non-kernel code
- */
-#else
-typedef __kernel_uid_t uid_t;
-typedef __kernel_gid_t gid_t;
-#endif /* __KERNEL__ */
-
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-typedef __kernel_loff_t loff_t;
-#endif
-
-/*
- * The following typedefs are also protected by individual ifdefs for
- * historical reasons:
- */
-#ifndef _SIZE_T
-#define _SIZE_T
-typedef __kernel_size_t size_t;
-#endif
-
-#ifndef _SSIZE_T
-#define _SSIZE_T
-typedef __kernel_ssize_t ssize_t;
-#endif
-
-#ifndef _PTRDIFF_T
-#define _PTRDIFF_T
-typedef __kernel_ptrdiff_t ptrdiff_t;
-#endif
-
-#ifndef _TIME_T
-#define _TIME_T
-typedef __kernel_time_t time_t;
-#endif
-
-#ifndef _CLOCK_T
-#define _CLOCK_T
-typedef __kernel_clock_t clock_t;
-#endif
-
-#ifndef _CADDR_T
-#define _CADDR_T
-typedef __kernel_caddr_t caddr_t;
-#endif
-
-/* bsd */
-typedef unsigned char u_char;
-typedef unsigned short u_short;
-typedef unsigned int u_int;
-typedef unsigned long u_long;
-
-/* sysv */
-typedef unsigned char unchar;
-typedef unsigned short ushort;
-typedef unsigned int uint;
-typedef unsigned long ulong;
-
-#ifndef __BIT_TYPES_DEFINED__
-#define __BIT_TYPES_DEFINED__
-
-typedef __u8 u_int8_t;
-typedef __s8 int8_t;
-typedef __u16 u_int16_t;
-typedef __s16 int16_t;
-typedef __u32 u_int32_t;
-typedef __s32 int32_t;
-
-#endif /* !(__BIT_TYPES_DEFINED__) */
-
-typedef __u8 uint8_t;
-typedef __u16 uint16_t;
-typedef __u32 uint32_t;
-
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-typedef __u64 uint64_t;
-typedef __u64 u_int64_t;
-typedef __s64 int64_t;
-#endif
-
-/* this is a special 64bit data type that is 8-byte aligned */
-#define aligned_u64 unsigned long long __attribute__((aligned(8)))
-#define aligned_be64 __be64 __attribute__((aligned(8)))
-#define aligned_le64 __le64 __attribute__((aligned(8)))
-
-/**
- * The type used for indexing onto a disc or disc partition.
- *
- * Linux always considers sectors to be 512 bytes long independently
- * of the devices real block size.
- */
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#else
-typedef unsigned long sector_t;
-#endif
-
-/*
- * The type of the inode's block count.
- */
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#else
-typedef unsigned long blkcnt_t;
-#endif
-
-/*
- * The type of an index into the pagecache. Use a #define so asm/types.h
- * can override it.
- */
-#ifndef pgoff_t
-#define pgoff_t unsigned long
-#endif
-
-#endif /* __KERNEL_STRICT_NAMES */
-
-/*
- * Below are truly Linux-specific types that should never collide with
- * any application/library that wants linux/types.h.
- */
-
-#ifdef __CHECKER__
-#define __bitwise__ __attribute__((bitwise))
-#else
-#define __bitwise__
-#endif
-#ifdef __CHECK_ENDIAN__
-#define __bitwise __bitwise__
-#else
-#define __bitwise
-#endif
-
-typedef __u16 __bitwise __le16;
-typedef __u16 __bitwise __be16;
-typedef __u32 __bitwise __le32;
-typedef __u32 __bitwise __be32;
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-typedef __u64 __bitwise __le64;
-typedef __u64 __bitwise __be64;
-#endif
-typedef __u16 __bitwise __sum16;
-typedef __u32 __bitwise __wsum;
-
-#ifdef __KERNEL__
-typedef unsigned __bitwise__ gfp_t;
-
-#ifdef CONFIG_RESOURCES_64BIT
-typedef u64 resource_size_t;
-#else
-typedef u32 resource_size_t;
-#endif
-
-#endif /* __KERNEL__ */
-
-struct ustat {
- __kernel_daddr_t f_tfree;
- __kernel_ino_t f_tinode;
- char f_fname[6];
- char f_fpack[6];
-};
-
-#endif /* _LINUX_TYPES_H */
diff --git a/original/linux/ublock.h b/original/linux/ublock.h
deleted file mode 100644
index d8475f1..0000000
--- a/original/linux/ublock.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * drivers/block/ublock.c
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Thomas Tuttle <ttuttle@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __UBLOCK_H_
-#define __UBLOCK_H_
-
-#include <linux/types.h>
-
-#define UBLOCK_VERSION 0
-
-enum {
- UBLOCK_INIT_IN = 0,
- UBLOCK_INIT_OUT = 1,
- UBLOCK_READY_IN = 2,
- UBLOCK_READY_OUT = 3,
- UBLOCK_READ_IN = 4,
- UBLOCK_READ_OUT = 5,
- UBLOCK_WRITE_IN = 6,
- UBLOCK_WRITE_OUT = 7,
-};
-
-struct ublock_in_header {
- __u32 seq;
- __u32 opcode;
-};
-
-struct ublock_out_header {
- __u32 seq;
- __u32 opcode;
-};
-
-struct ublock_init_in {
- __u32 version;
- __u32 max_buf;
- __u32 index;
-};
-
-struct ublock_init_out {
- __u32 version;
- __u32 max_buf;
- __u64 size;
-};
-
-struct ublock_ready_in {
- __u32 _unused;
-};
-
-struct ublock_ready_out {
- __u32 _unused;
-};
-
-struct ublock_read_in {
- __u64 offset;
- __u64 length;
-};
-
-struct ublock_read_out {
- __s32 status;
- __u8 data[];
-};
-
-struct ublock_write_in {
- __u64 offset;
- __u64 length;
- __u8 data[];
-};
-
-struct ublock_write_out {
- __s32 status;
-};
-
-#endif
diff --git a/original/linux/udp.h b/original/linux/udp.h
deleted file mode 100644
index 90223f0..0000000
--- a/original/linux/udp.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * INET An implementation of the TCP/IP protocol suite for the LINUX
- * operating system. INET is implemented using the BSD Socket
- * interface as the means of communication with the user level.
- *
- * Definitions for the UDP protocol.
- *
- * Version: @(#)udp.h 1.0.2 04/28/93
- *
- * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
- *
- * 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.
- */
-#ifndef _LINUX_UDP_H
-#define _LINUX_UDP_H
-
-#include <linux/types.h>
-
-struct udphdr {
- __u16 source;
- __u16 dest;
- __u16 len;
- __u16 check;
-};
-
-/* UDP socket options */
-#define UDP_CORK 1 /* Never send partially complete segments */
-#define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */
-
-/* UDP encapsulation types */
-#define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */
-#define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */
-
-#ifdef __KERNEL__
-#include <linux/types.h>
-
-#include <net/inet_sock.h>
-
-struct udp_sock {
- /* inet_sock has to be the first member */
- struct inet_sock inet;
- int pending; /* Any pending frames ? */
- unsigned int corkflag; /* Cork is required */
- __u16 encap_type; /* Is this an Encapsulation socket? */
- /*
- * Following member retains the information to create a UDP header
- * when the socket is uncorked.
- */
- __u16 len; /* total length of pending frames */
-};
-
-static inline struct udp_sock *udp_sk(const struct sock *sk)
-{
- return (struct udp_sock *)sk;
-}
-
-#endif
-
-#endif /* _LINUX_UDP_H */
diff --git a/original/linux/ufs_fs_i.h b/original/linux/ufs_fs_i.h
deleted file mode 100644
index f50ce3b..0000000
--- a/original/linux/ufs_fs_i.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * linux/include/linux/ufs_fs_i.h
- *
- * Copyright (C) 1996
- * Adrian Rodriguez (adrian@franklins-tower.rutgers.edu)
- * Laboratory for Computer Science Research Computing Facility
- * Rutgers, The State University of New Jersey
- *
- * NeXTstep support added on February 5th 1998 by
- * Niels Kristian Bech Jensen <nkbj@image.dk>.
- */
-
-#ifndef _LINUX_UFS_FS_I_H
-#define _LINUX_UFS_FS_I_H
-
-struct ufs_inode_info {
- union {
- __fs32 i_data[15];
- __u8 i_symlink[4*15];
- __fs64 u2_i_data[15];
- } i_u1;
- __u32 i_flags;
- __u32 i_gen;
- __u32 i_shadow;
- __u32 i_unused1;
- __u32 i_unused2;
- __u32 i_oeftflag;
- __u16 i_osync;
- __u32 i_lastfrag;
- __u32 i_dir_start_lookup;
- struct inode vfs_inode;
-};
-
-#endif /* _LINUX_UFS_FS_I_H */
diff --git a/original/linux/ufs_fs_sb.h b/original/linux/ufs_fs_sb.h
deleted file mode 100644
index 8ff13c1..0000000
--- a/original/linux/ufs_fs_sb.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * linux/include/linux/ufs_fs_sb.h
- *
- * Copyright (C) 1996
- * Adrian Rodriguez (adrian@franklins-tower.rutgers.edu)
- * Laboratory for Computer Science Research Computing Facility
- * Rutgers, The State University of New Jersey
- *
- * $Id: ufs_fs_sb.h,v 1.8 1998/05/06 12:04:40 jj Exp $
- *
- * Write support by Daniel Pirkl <daniel.pirkl@email.cz>
- */
-
-#ifndef __LINUX_UFS_FS_SB_H
-#define __LINUX_UFS_FS_SB_H
-
-
-#define UFS_MAX_GROUP_LOADED 8
-#define UFS_CGNO_EMPTY ((unsigned)-1)
-
-struct ufs_sb_private_info;
-struct ufs_cg_private_info;
-struct ufs_csum;
-#define UFS_MAXCSBUFS 31
-
-struct ufs_sb_info {
- struct ufs_sb_private_info * s_uspi;
- struct ufs_csum * s_csp;
- unsigned s_bytesex;
- unsigned s_flags;
- struct buffer_head ** s_ucg;
- struct ufs_cg_private_info * s_ucpi[UFS_MAX_GROUP_LOADED];
- unsigned s_cgno[UFS_MAX_GROUP_LOADED];
- unsigned short s_cg_loaded;
- unsigned s_mount_opt;
-};
-
-#endif
diff --git a/original/linux/uhid.h b/original/linux/uhid.h
deleted file mode 100644
index 9c6974f..0000000
--- a/original/linux/uhid.h
+++ /dev/null
@@ -1,104 +0,0 @@
-#ifndef __UHID_H_
-#define __UHID_H_
-
-/*
- * User-space I/O driver support for HID subsystem
- * Copyright (c) 2012 David Herrmann
- */
-
-/*
- * 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.
- */
-
-/*
- * Public header for user-space communication. We try to keep every structure
- * aligned but to be safe we also use __attribute__((__packed__)). Therefore,
- * the communication should be ABI compatible even between architectures.
- */
-
-#include <linux/input.h>
-#include <linux/types.h>
-
-enum uhid_event_type {
- UHID_CREATE,
- UHID_DESTROY,
- UHID_START,
- UHID_STOP,
- UHID_OPEN,
- UHID_CLOSE,
- UHID_OUTPUT,
- UHID_OUTPUT_EV,
- UHID_INPUT,
- UHID_FEATURE,
- UHID_FEATURE_ANSWER,
-};
-
-struct uhid_create_req {
- __u8 name[128];
- __u8 phys[64];
- __u8 uniq[64];
- __u8 __user *rd_data;
- __u16 rd_size;
-
- __u16 bus;
- __u32 vendor;
- __u32 product;
- __u32 version;
- __u32 country;
-} __attribute__((__packed__));
-
-#define UHID_DATA_MAX 4096
-
-enum uhid_report_type {
- UHID_FEATURE_REPORT,
- UHID_OUTPUT_REPORT,
- UHID_INPUT_REPORT,
-};
-
-struct uhid_input_req {
- __u8 data[UHID_DATA_MAX];
- __u16 size;
-} __attribute__((__packed__));
-
-struct uhid_output_req {
- __u8 data[UHID_DATA_MAX];
- __u16 size;
- __u8 rtype;
-} __attribute__((__packed__));
-
-struct uhid_output_ev_req {
- __u16 type;
- __u16 code;
- __s32 value;
-} __attribute__((__packed__));
-
-struct uhid_feature_req {
- __u32 id;
- __u8 rnum;
- __u8 rtype;
-} __attribute__((__packed__));
-
-struct uhid_feature_answer_req {
- __u32 id;
- __u16 err;
- __u16 size;
- __u8 data[UHID_DATA_MAX];
-};
-
-struct uhid_event {
- __u32 type;
-
- union {
- struct uhid_create_req create;
- struct uhid_input_req input;
- struct uhid_output_req output;
- struct uhid_output_ev_req output_ev;
- struct uhid_feature_req feature;
- struct uhid_feature_answer_req feature_answer;
- } u;
-} __attribute__((__packed__));
-
-#endif /* __UHID_H_ */
diff --git a/original/linux/uinput.h b/original/linux/uinput.h
deleted file mode 100644
index 2aa2881..0000000
--- a/original/linux/uinput.h
+++ /dev/null
@@ -1,176 +0,0 @@
-#ifndef __UINPUT_H_
-#define __UINPUT_H_
-/*
- * User level driver support for input subsystem
- *
- * Heavily based on evdev.c by Vojtech Pavlik
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
- *
- * Changes/Revisions:
- * 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
- * - update ff support for the changes in kernel interface
- * - add UINPUT_VERSION
- * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>)
- * - added force feedback support
- * - added UI_SET_PHYS
- * 0.1 20/06/2002
- * - first public version
- */
-
-#include <linux/input.h>
-
-#define UINPUT_VERSION 3
-
-#ifdef __KERNEL__
-#define UINPUT_NAME "uinput"
-#define UINPUT_BUFFER_SIZE 16
-#define UINPUT_NUM_REQUESTS 16
-
-enum uinput_state { UIST_NEW_DEVICE, UIST_SETUP_COMPLETE, UIST_CREATED };
-
-struct uinput_request {
- int id;
- int code; /* UI_FF_UPLOAD, UI_FF_ERASE */
-
- int retval;
- struct completion done;
-
- union {
- int effect_id;
- struct {
- struct ff_effect *effect;
- struct ff_effect *old;
- } upload;
- } u;
-};
-
-struct uinput_device {
- struct input_dev *dev;
- struct mutex mutex;
- enum uinput_state state;
- wait_queue_head_t waitq;
- unsigned char ready;
- unsigned char head;
- unsigned char tail;
- struct input_event buff[UINPUT_BUFFER_SIZE];
- unsigned int ff_effects_max;
-
- struct uinput_request *requests[UINPUT_NUM_REQUESTS];
- wait_queue_head_t requests_waitq;
- spinlock_t requests_lock;
-};
-#endif /* __KERNEL__ */
-
-struct uinput_ff_upload {
- int request_id;
- int retval;
- struct ff_effect effect;
- struct ff_effect old;
-};
-
-struct uinput_ff_erase {
- int request_id;
- int retval;
- int effect_id;
-};
-
-/* ioctl */
-#define UINPUT_IOCTL_BASE 'U'
-#define UI_DEV_CREATE _IO(UINPUT_IOCTL_BASE, 1)
-#define UI_DEV_DESTROY _IO(UINPUT_IOCTL_BASE, 2)
-
-#define UI_SET_EVBIT _IOW(UINPUT_IOCTL_BASE, 100, int)
-#define UI_SET_KEYBIT _IOW(UINPUT_IOCTL_BASE, 101, int)
-#define UI_SET_RELBIT _IOW(UINPUT_IOCTL_BASE, 102, int)
-#define UI_SET_ABSBIT _IOW(UINPUT_IOCTL_BASE, 103, int)
-#define UI_SET_MSCBIT _IOW(UINPUT_IOCTL_BASE, 104, int)
-#define UI_SET_LEDBIT _IOW(UINPUT_IOCTL_BASE, 105, int)
-#define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int)
-#define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int)
-#define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*)
-#define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int)
-#define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int)
-
-#define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload)
-#define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload)
-#define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase)
-#define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase)
-
-/*
- * To write a force-feedback-capable driver, the upload_effect
- * and erase_effect callbacks in input_dev must be implemented.
- * The uinput driver will generate a fake input event when one of
- * these callbacks are invoked. The userspace code then uses
- * ioctls to retrieve additional parameters and send the return code.
- * The callback blocks until this return code is sent.
- *
- * The described callback mechanism is only used if ff_effects_max
- * is set.
- *
- * To implement upload_effect():
- * 1. Wait for an event with type == EV_UINPUT and code == UI_FF_UPLOAD.
- * A request ID will be given in 'value'.
- * 2. Allocate a uinput_ff_upload struct, fill in request_id with
- * the 'value' from the EV_UINPUT event.
- * 3. Issue a UI_BEGIN_FF_UPLOAD ioctl, giving it the
- * uinput_ff_upload struct. It will be filled in with the
- * ff_effects passed to upload_effect().
- * 4. Perform the effect upload, and place a return code back into
- the uinput_ff_upload struct.
- * 5. Issue a UI_END_FF_UPLOAD ioctl, also giving it the
- * uinput_ff_upload_effect struct. This will complete execution
- * of our upload_effect() handler.
- *
- * To implement erase_effect():
- * 1. Wait for an event with type == EV_UINPUT and code == UI_FF_ERASE.
- * A request ID will be given in 'value'.
- * 2. Allocate a uinput_ff_erase struct, fill in request_id with
- * the 'value' from the EV_UINPUT event.
- * 3. Issue a UI_BEGIN_FF_ERASE ioctl, giving it the
- * uinput_ff_erase struct. It will be filled in with the
- * effect ID passed to erase_effect().
- * 4. Perform the effect erasure, and place a return code back
- * into the uinput_ff_erase struct.
- * 5. Issue a UI_END_FF_ERASE ioctl, also giving it the
- * uinput_ff_erase_effect struct. This will complete execution
- * of our erase_effect() handler.
- */
-
-/*
- * This is the new event type, used only by uinput.
- * 'code' is UI_FF_UPLOAD or UI_FF_ERASE, and 'value'
- * is the unique request ID. This number was picked
- * arbitrarily, above EV_MAX (since the input system
- * never sees it) but in the range of a 16-bit int.
- */
-#define EV_UINPUT 0x0101
-#define UI_FF_UPLOAD 1
-#define UI_FF_ERASE 2
-
-#define UINPUT_MAX_NAME_SIZE 80
-struct uinput_user_dev {
- char name[UINPUT_MAX_NAME_SIZE];
- struct input_id id;
- int ff_effects_max;
- int absmax[ABS_CNT];
- int absmin[ABS_CNT];
- int absfuzz[ABS_CNT];
- int absflat[ABS_CNT];
-};
-#endif /* __UINPUT_H_ */
-
diff --git a/original/linux/uio.h b/original/linux/uio.h
deleted file mode 100644
index 9af8bbc..0000000
--- a/original/linux/uio.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef __LINUX_UIO_H
-#define __LINUX_UIO_H
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-
-/*
- * Berkeley style UIO structures - Alan Cox 1994.
- *
- * 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.
- */
-
-
-/* A word of warning: Our uio structure will clash with the C library one (which is now obsolete). Remove the C
- library one from sys/uio.h if you have a very old library set */
-
-struct iovec
-{
- void __user *iov_base; /* BSD uses caddr_t (1003.1g requires void *) */
- __kernel_size_t iov_len; /* Must be size_t (1003.1g) */
-};
-
-#ifdef __KERNEL__
-
-struct kvec {
- void *iov_base; /* and that should *never* hold a userland pointer */
- size_t iov_len;
-};
-
-#endif
-
-/*
- * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
- */
-
-#define UIO_FASTIOV 8
-#define UIO_MAXIOV 1024
-#if 0
-#define UIO_MAXIOV 16 /* Maximum iovec's in one operation
- 16 matches BSD */
- /* Beg pardon: BSD has 1024 --ANK */
-#endif
-
-/*
- * Total number of bytes covered by an iovec.
- *
- * NOTE that it is not safe to use this function until all the iovec's
- * segment lengths have been validated. Because the individual lengths can
- * overflow a size_t when added together.
- */
-static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
-{
- unsigned long seg;
- size_t ret = 0;
-
- for (seg = 0; seg < nr_segs; seg++)
- ret += iov[seg].iov_len;
- return ret;
-}
-
-unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
-
-#endif
diff --git a/original/linux/un.h b/original/linux/un.h
deleted file mode 100644
index 45561c5..0000000
--- a/original/linux/un.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _LINUX_UN_H
-#define _LINUX_UN_H
-
-#define UNIX_PATH_MAX 108
-
-struct sockaddr_un {
- sa_family_t sun_family; /* AF_UNIX */
- char sun_path[UNIX_PATH_MAX]; /* pathname */
-};
-
-#endif /* _LINUX_UN_H */
diff --git a/original/linux/unistd.h b/original/linux/unistd.h
deleted file mode 100644
index c18c60f..0000000
--- a/original/linux/unistd.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _LINUX_UNISTD_H_
-#define _LINUX_UNISTD_H_
-
-#ifdef __KERNEL__
-extern int errno;
-#endif
-
-/*
- * Include machine specific syscallX macros
- */
-#include <asm/unistd.h>
-
-#endif /* _LINUX_UNISTD_H_ */
diff --git a/original/linux/usb.h b/original/linux/usb.h
deleted file mode 100644
index d2bd0c8..0000000
--- a/original/linux/usb.h
+++ /dev/null
@@ -1,1222 +0,0 @@
-#ifndef __LINUX_USB_H
-#define __LINUX_USB_H
-
-#include <linux/mod_devicetable.h>
-#include <linux/usb_ch9.h>
-
-#define USB_MAJOR 180
-#define USB_DEVICE_MAJOR 189
-
-
-#ifdef __KERNEL__
-
-#include <linux/errno.h> /* for -ENODEV */
-#include <linux/delay.h> /* for mdelay() */
-#include <linux/interrupt.h> /* for in_interrupt() */
-#include <linux/list.h> /* for struct list_head */
-#include <linux/kref.h> /* for struct kref */
-#include <linux/device.h> /* for struct device */
-#include <linux/fs.h> /* for struct file_operations */
-#include <linux/completion.h> /* for struct completion */
-#include <linux/sched.h> /* for current && schedule_timeout */
-
-struct usb_device;
-struct usb_driver;
-
-/*-------------------------------------------------------------------------*/
-
-/*
- * Host-side wrappers for standard USB descriptors ... these are parsed
- * from the data provided by devices. Parsing turns them from a flat
- * sequence of descriptors into a hierarchy:
- *
- * - devices have one (usually) or more configs;
- * - configs have one (often) or more interfaces;
- * - interfaces have one (usually) or more settings;
- * - each interface setting has zero or (usually) more endpoints.
- *
- * And there might be other descriptors mixed in with those.
- *
- * Devices may also have class-specific or vendor-specific descriptors.
- */
-
-struct ep_device;
-
-/**
- * struct usb_host_endpoint - host-side endpoint descriptor and queue
- * @desc: descriptor for this endpoint, wMaxPacketSize in native byteorder
- * @urb_list: urbs queued to this endpoint; maintained by usbcore
- * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH)
- * with one or more transfer descriptors (TDs) per urb
- * @ep_dev: ep_device for sysfs info
- * @extra: descriptors following this endpoint in the configuration
- * @extralen: how many bytes of "extra" are valid
- *
- * USB requests are always queued to a given endpoint, identified by a
- * descriptor within an active interface in a given USB configuration.
- */
-struct usb_host_endpoint {
- struct usb_endpoint_descriptor desc;
- struct list_head urb_list;
- void *hcpriv;
- struct ep_device *ep_dev; /* For sysfs info */
-
- unsigned char *extra; /* Extra descriptors */
- int extralen;
-};
-
-/* host-side wrapper for one interface setting's parsed descriptors */
-struct usb_host_interface {
- struct usb_interface_descriptor desc;
-
- /* array of desc.bNumEndpoint endpoints associated with this
- * interface setting. these will be in no particular order.
- */
- struct usb_host_endpoint *endpoint;
-
- char *string; /* iInterface string, if present */
- unsigned char *extra; /* Extra descriptors */
- int extralen;
-};
-
-enum usb_interface_condition {
- USB_INTERFACE_UNBOUND = 0,
- USB_INTERFACE_BINDING,
- USB_INTERFACE_BOUND,
- USB_INTERFACE_UNBINDING,
-};
-
-/**
- * struct usb_interface - what usb device drivers talk to
- * @altsetting: array of interface structures, one for each alternate
- * setting that may be selected. Each one includes a set of
- * endpoint configurations. They will be in no particular order.
- * @num_altsetting: number of altsettings defined.
- * @cur_altsetting: the current altsetting.
- * @driver: the USB driver that is bound to this interface.
- * @minor: the minor number assigned to this interface, if this
- * interface is bound to a driver that uses the USB major number.
- * If this interface does not use the USB major, this field should
- * be unused. The driver should set this value in the probe()
- * function of the driver, after it has been assigned a minor
- * number from the USB core by calling usb_register_dev().
- * @condition: binding state of the interface: not bound, binding
- * (in probe()), bound to a driver, or unbinding (in disconnect())
- * @dev: driver model's view of this device
- * @class_dev: driver model's class view of this device.
- *
- * USB device drivers attach to interfaces on a physical device. Each
- * interface encapsulates a single high level function, such as feeding
- * an audio stream to a speaker or reporting a change in a volume control.
- * Many USB devices only have one interface. The protocol used to talk to
- * an interface's endpoints can be defined in a usb "class" specification,
- * or by a product's vendor. The (default) control endpoint is part of
- * every interface, but is never listed among the interface's descriptors.
- *
- * The driver that is bound to the interface can use standard driver model
- * calls such as dev_get_drvdata() on the dev member of this structure.
- *
- * Each interface may have alternate settings. The initial configuration
- * of a device sets altsetting 0, but the device driver can change
- * that setting using usb_set_interface(). Alternate settings are often
- * used to control the the use of periodic endpoints, such as by having
- * different endpoints use different amounts of reserved USB bandwidth.
- * All standards-conformant USB devices that use isochronous endpoints
- * will use them in non-default settings.
- *
- * The USB specification says that alternate setting numbers must run from
- * 0 to one less than the total number of alternate settings. But some
- * devices manage to mess this up, and the structures aren't necessarily
- * stored in numerical order anyhow. Use usb_altnum_to_altsetting() to
- * look up an alternate setting in the altsetting array based on its number.
- */
-struct usb_interface {
- /* array of alternate settings for this interface,
- * stored in no particular order */
- struct usb_host_interface *altsetting;
-
- struct usb_host_interface *cur_altsetting; /* the currently
- * active alternate setting */
- unsigned num_altsetting; /* number of alternate settings */
-
- int minor; /* minor number this interface is
- * bound to */
- enum usb_interface_condition condition; /* state of binding */
- struct device dev; /* interface specific device info */
- struct class_device *class_dev;
-};
-#define to_usb_interface(d) container_of(d, struct usb_interface, dev)
-#define interface_to_usbdev(intf) \
- container_of(intf->dev.parent, struct usb_device, dev)
-
-static inline void *usb_get_intfdata (struct usb_interface *intf)
-{
- return dev_get_drvdata (&intf->dev);
-}
-
-static inline void usb_set_intfdata (struct usb_interface *intf, void *data)
-{
- dev_set_drvdata(&intf->dev, data);
-}
-
-struct usb_interface *usb_get_intf(struct usb_interface *intf);
-void usb_put_intf(struct usb_interface *intf);
-
-/* this maximum is arbitrary */
-#define USB_MAXINTERFACES 32
-
-/**
- * struct usb_interface_cache - long-term representation of a device interface
- * @num_altsetting: number of altsettings defined.
- * @ref: reference counter.
- * @altsetting: variable-length array of interface structures, one for
- * each alternate setting that may be selected. Each one includes a
- * set of endpoint configurations. They will be in no particular order.
- *
- * These structures persist for the lifetime of a usb_device, unlike
- * struct usb_interface (which persists only as long as its configuration
- * is installed). The altsetting arrays can be accessed through these
- * structures at any time, permitting comparison of configurations and
- * providing support for the /proc/bus/usb/devices pseudo-file.
- */
-struct usb_interface_cache {
- unsigned num_altsetting; /* number of alternate settings */
- struct kref ref; /* reference counter */
-
- /* variable-length array of alternate settings for this interface,
- * stored in no particular order */
- struct usb_host_interface altsetting[0];
-};
-#define ref_to_usb_interface_cache(r) \
- container_of(r, struct usb_interface_cache, ref)
-#define altsetting_to_usb_interface_cache(a) \
- container_of(a, struct usb_interface_cache, altsetting[0])
-
-/**
- * struct usb_host_config - representation of a device's configuration
- * @desc: the device's configuration descriptor.
- * @string: pointer to the cached version of the iConfiguration string, if
- * present for this configuration.
- * @interface: array of pointers to usb_interface structures, one for each
- * interface in the configuration. The number of interfaces is stored
- * in desc.bNumInterfaces. These pointers are valid only while the
- * the configuration is active.
- * @intf_cache: array of pointers to usb_interface_cache structures, one
- * for each interface in the configuration. These structures exist
- * for the entire life of the device.
- * @extra: pointer to buffer containing all extra descriptors associated
- * with this configuration (those preceding the first interface
- * descriptor).
- * @extralen: length of the extra descriptors buffer.
- *
- * USB devices may have multiple configurations, but only one can be active
- * at any time. Each encapsulates a different operational environment;
- * for example, a dual-speed device would have separate configurations for
- * full-speed and high-speed operation. The number of configurations
- * available is stored in the device descriptor as bNumConfigurations.
- *
- * A configuration can contain multiple interfaces. Each corresponds to
- * a different function of the USB device, and all are available whenever
- * the configuration is active. The USB standard says that interfaces
- * are supposed to be numbered from 0 to desc.bNumInterfaces-1, but a lot
- * of devices get this wrong. In addition, the interface array is not
- * guaranteed to be sorted in numerical order. Use usb_ifnum_to_if() to
- * look up an interface entry based on its number.
- *
- * Device drivers should not attempt to activate configurations. The choice
- * of which configuration to install is a policy decision based on such
- * considerations as available power, functionality provided, and the user's
- * desires (expressed through userspace tools). However, drivers can call
- * usb_reset_configuration() to reinitialize the current configuration and
- * all its interfaces.
- */
-struct usb_host_config {
- struct usb_config_descriptor desc;
-
- char *string; /* iConfiguration string, if present */
- /* the interfaces associated with this configuration,
- * stored in no particular order */
- struct usb_interface *interface[USB_MAXINTERFACES];
-
- /* Interface information available even when this is not the
- * active configuration */
- struct usb_interface_cache *intf_cache[USB_MAXINTERFACES];
-
- unsigned char *extra; /* Extra descriptors */
- int extralen;
-};
-
-int __usb_get_extra_descriptor(char *buffer, unsigned size,
- unsigned char type, void **ptr);
-#define usb_get_extra_descriptor(ifpoint,type,ptr)\
- __usb_get_extra_descriptor((ifpoint)->extra,(ifpoint)->extralen,\
- type,(void**)ptr)
-
-/* ----------------------------------------------------------------------- */
-
-struct usb_operations;
-
-/* USB device number allocation bitmap */
-struct usb_devmap {
- unsigned long devicemap[128 / (8*sizeof(unsigned long))];
-};
-
-/*
- * Allocated per bus (tree of devices) we have:
- */
-struct usb_bus {
- struct device *controller; /* host/master side hardware */
- int busnum; /* Bus number (in order of reg) */
- char *bus_name; /* stable id (PCI slot_name etc) */
- u8 otg_port; /* 0, or number of OTG/HNP port */
- unsigned is_b_host:1; /* true during some HNP roleswitches */
- unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
-
- int devnum_next; /* Next open device number in
- * round-robin allocation */
-
- struct usb_devmap devmap; /* device address allocation map */
- struct usb_operations *op; /* Operations (specific to the HC) */
- struct usb_device *root_hub; /* Root hub */
- struct list_head bus_list; /* list of busses */
- void *hcpriv; /* Host Controller private data */
-
- int bandwidth_allocated; /* on this bus: how much of the time
- * reserved for periodic (intr/iso)
- * requests is used, on average?
- * Units: microseconds/frame.
- * Limits: Full/low speed reserve 90%,
- * while high speed reserves 80%.
- */
- int bandwidth_int_reqs; /* number of Interrupt requests */
- int bandwidth_isoc_reqs; /* number of Isoc. requests */
-
- struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */
-
- struct class_device *class_dev; /* class device for this bus */
- struct kref kref; /* reference counting for this bus */
- void (*release)(struct usb_bus *bus);
-
-#if defined(CONFIG_USB_MON)
- struct mon_bus *mon_bus; /* non-null when associated */
- int monitored; /* non-zero when monitored */
-#endif
-};
-
-/* ----------------------------------------------------------------------- */
-
-/* This is arbitrary.
- * From USB 2.0 spec Table 11-13, offset 7, a hub can
- * have up to 255 ports. The most yet reported is 10.
- */
-#define USB_MAXCHILDREN (16)
-
-struct usb_tt;
-
-/*
- * struct usb_device - kernel's representation of a USB device
- *
- * FIXME: Write the kerneldoc!
- *
- * Usbcore drivers should not set usbdev->state directly. Instead use
- * usb_set_device_state().
- */
-struct usb_device {
- int devnum; /* Address on USB bus */
- char devpath [16]; /* Use in messages: /port/port/... */
- enum usb_device_state state; /* configured, not attached, etc */
- enum usb_device_speed speed; /* high/full/low (or error) */
-
- struct usb_tt *tt; /* low/full speed dev, highspeed hub */
- int ttport; /* device port on that tt hub */
-
- unsigned int toggle[2]; /* one bit for each endpoint
- * ([0] = IN, [1] = OUT) */
-
- struct usb_device *parent; /* our hub, unless we're the root */
- struct usb_bus *bus; /* Bus we're part of */
- struct usb_host_endpoint ep0;
-
- struct device dev; /* Generic device interface */
-
- struct usb_device_descriptor descriptor;/* Descriptor */
- struct usb_host_config *config; /* All of the configs */
-
- struct usb_host_config *actconfig;/* the active configuration */
- struct usb_host_endpoint *ep_in[16];
- struct usb_host_endpoint *ep_out[16];
-
- char **rawdescriptors; /* Raw descriptors for each config */
-
- unsigned short bus_mA; /* Current available from the bus */
- u8 portnum; /* Parent port number (origin 1) */
-
- int have_langid; /* whether string_langid is valid */
- int string_langid; /* language ID for strings */
-
- /* static strings from the device */
- char *product; /* iProduct string, if present */
- char *manufacturer; /* iManufacturer string, if present */
- char *serial; /* iSerialNumber string, if present */
-
- struct list_head filelist;
- struct class_device *class_dev;
- struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */
-
- /*
- * Child devices - these can be either new devices
- * (if this is a hub device), or different instances
- * of this same device.
- *
- * Each instance needs its own set of data structures.
- */
-
- int maxchild; /* Number of ports if hub */
- struct usb_device *children[USB_MAXCHILDREN];
-};
-#define to_usb_device(d) container_of(d, struct usb_device, dev)
-
-extern struct usb_device *usb_get_dev(struct usb_device *dev);
-extern void usb_put_dev(struct usb_device *dev);
-
-/* USB device locking */
-#define usb_lock_device(udev) down(&(udev)->dev.sem)
-#define usb_unlock_device(udev) up(&(udev)->dev.sem)
-#define usb_trylock_device(udev) down_trylock(&(udev)->dev.sem)
-extern int usb_lock_device_for_reset(struct usb_device *udev,
- struct usb_interface *iface);
-
-/* USB port reset for device reinitialization */
-extern int usb_reset_device(struct usb_device *dev);
-extern int usb_reset_composite_device(struct usb_device *dev,
- struct usb_interface *iface);
-
-extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id);
-
-/*-------------------------------------------------------------------------*/
-
-/* for drivers using iso endpoints */
-extern int usb_get_current_frame_number (struct usb_device *usb_dev);
-
-/* used these for multi-interface device registration */
-extern int usb_driver_claim_interface(struct usb_driver *driver,
- struct usb_interface *iface, void* priv);
-
-/**
- * usb_interface_claimed - returns true iff an interface is claimed
- * @iface: the interface being checked
- *
- * Returns true (nonzero) iff the interface is claimed, else false (zero).
- * Callers must own the driver model's usb bus readlock. So driver
- * probe() entries don't need extra locking, but other call contexts
- * may need to explicitly claim that lock.
- *
- */
-static inline int usb_interface_claimed(struct usb_interface *iface) {
- return (iface->dev.driver != NULL);
-}
-
-extern void usb_driver_release_interface(struct usb_driver *driver,
- struct usb_interface *iface);
-const struct usb_device_id *usb_match_id(struct usb_interface *interface,
- const struct usb_device_id *id);
-
-extern struct usb_interface *usb_find_interface(struct usb_driver *drv,
- int minor);
-extern struct usb_interface *usb_ifnum_to_if(struct usb_device *dev,
- unsigned ifnum);
-extern struct usb_host_interface *usb_altnum_to_altsetting(
- struct usb_interface *intf, unsigned int altnum);
-
-
-/**
- * usb_make_path - returns stable device path in the usb tree
- * @dev: the device whose path is being constructed
- * @buf: where to put the string
- * @size: how big is "buf"?
- *
- * Returns length of the string (> 0) or negative if size was too small.
- *
- * This identifier is intended to be "stable", reflecting physical paths in
- * hardware such as physical bus addresses for host controllers or ports on
- * USB hubs. That makes it stay the same until systems are physically
- * reconfigured, by re-cabling a tree of USB devices or by moving USB host
- * controllers. Adding and removing devices, including virtual root hubs
- * in host controller driver modules, does not change these path identifers;
- * neither does rebooting or re-enumerating. These are more useful identifiers
- * than changeable ("unstable") ones like bus numbers or device addresses.
- *
- * With a partial exception for devices connected to USB 2.0 root hubs, these
- * identifiers are also predictable. So long as the device tree isn't changed,
- * plugging any USB device into a given hub port always gives it the same path.
- * Because of the use of "companion" controllers, devices connected to ports on
- * USB 2.0 root hubs (EHCI host controllers) will get one path ID if they are
- * high speed, and a different one if they are full or low speed.
- */
-static inline int usb_make_path (struct usb_device *dev, char *buf,
- size_t size)
-{
- int actual;
- actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name,
- dev->devpath);
- return (actual >= (int)size) ? -1 : actual;
-}
-
-/*-------------------------------------------------------------------------*/
-
-#define USB_DEVICE_ID_MATCH_DEVICE \
- (USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT)
-#define USB_DEVICE_ID_MATCH_DEV_RANGE \
- (USB_DEVICE_ID_MATCH_DEV_LO | USB_DEVICE_ID_MATCH_DEV_HI)
-#define USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
- (USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_DEV_RANGE)
-#define USB_DEVICE_ID_MATCH_DEV_INFO \
- (USB_DEVICE_ID_MATCH_DEV_CLASS | \
- USB_DEVICE_ID_MATCH_DEV_SUBCLASS | \
- USB_DEVICE_ID_MATCH_DEV_PROTOCOL)
-#define USB_DEVICE_ID_MATCH_INT_INFO \
- (USB_DEVICE_ID_MATCH_INT_CLASS | \
- USB_DEVICE_ID_MATCH_INT_SUBCLASS | \
- USB_DEVICE_ID_MATCH_INT_PROTOCOL)
-
-/**
- * USB_DEVICE - macro used to describe a specific usb device
- * @vend: the 16 bit USB Vendor ID
- * @prod: the 16 bit USB Product ID
- *
- * This macro is used to create a struct usb_device_id that matches a
- * specific device.
- */
-#define USB_DEVICE(vend,prod) \
- .match_flags = USB_DEVICE_ID_MATCH_DEVICE, .idVendor = (vend), \
- .idProduct = (prod)
-/**
- * USB_DEVICE_VER - macro used to describe a specific usb device with a
- * version range
- * @vend: the 16 bit USB Vendor ID
- * @prod: the 16 bit USB Product ID
- * @lo: the bcdDevice_lo value
- * @hi: the bcdDevice_hi value
- *
- * This macro is used to create a struct usb_device_id that matches a
- * specific device, with a version range.
- */
-#define USB_DEVICE_VER(vend,prod,lo,hi) \
- .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION, \
- .idVendor = (vend), .idProduct = (prod), \
- .bcdDevice_lo = (lo), .bcdDevice_hi = (hi)
-
-/**
- * USB_DEVICE_INFO - macro used to describe a class of usb devices
- * @cl: bDeviceClass value
- * @sc: bDeviceSubClass value
- * @pr: bDeviceProtocol value
- *
- * This macro is used to create a struct usb_device_id that matches a
- * specific class of devices.
- */
-#define USB_DEVICE_INFO(cl,sc,pr) \
- .match_flags = USB_DEVICE_ID_MATCH_DEV_INFO, .bDeviceClass = (cl), \
- .bDeviceSubClass = (sc), .bDeviceProtocol = (pr)
-
-/**
- * USB_INTERFACE_INFO - macro used to describe a class of usb interfaces
- * @cl: bInterfaceClass value
- * @sc: bInterfaceSubClass value
- * @pr: bInterfaceProtocol value
- *
- * This macro is used to create a struct usb_device_id that matches a
- * specific class of interfaces.
- */
-#define USB_INTERFACE_INFO(cl,sc,pr) \
- .match_flags = USB_DEVICE_ID_MATCH_INT_INFO, .bInterfaceClass = (cl), \
- .bInterfaceSubClass = (sc), .bInterfaceProtocol = (pr)
-
-/* ----------------------------------------------------------------------- */
-
-struct usb_dynids {
- spinlock_t lock;
- struct list_head list;
-};
-
-/**
- * struct usb_driver - identifies USB driver to usbcore
- * @name: The driver name should be unique among USB drivers,
- * and should normally be the same as the module name.
- * @probe: Called to see if the driver is willing to manage a particular
- * interface on a device. If it is, probe returns zero and uses
- * dev_set_drvdata() to associate driver-specific data with the
- * interface. It may also use usb_set_interface() to specify the
- * appropriate altsetting. If unwilling to manage the interface,
- * return a negative errno value.
- * @disconnect: Called when the interface is no longer accessible, usually
- * because its device has been (or is being) disconnected or the
- * driver module is being unloaded.
- * @ioctl: Used for drivers that want to talk to userspace through
- * the "usbfs" filesystem. This lets devices provide ways to
- * expose information to user space regardless of where they
- * do (or don't) show up otherwise in the filesystem.
- * @suspend: Called when the device is going to be suspended by the system.
- * @resume: Called when the device is being resumed by the system.
- * @pre_reset: Called by usb_reset_composite_device() when the device
- * is about to be reset.
- * @post_reset: Called by usb_reset_composite_device() after the device
- * has been reset.
- * @id_table: USB drivers use ID table to support hotplugging.
- * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set
- * or your driver's probe function will never get called.
- * @dynids: used internally to hold the list of dynamically added device
- * ids for this driver.
- * @driver: the driver model core driver structure.
- * @no_dynamic_id: if set to 1, the USB core will not allow dynamic ids to be
- * added to this driver by preventing the sysfs file from being created.
- *
- * USB drivers must provide a name, probe() and disconnect() methods,
- * and an id_table. Other driver fields are optional.
- *
- * The id_table is used in hotplugging. It holds a set of descriptors,
- * and specialized data may be associated with each entry. That table
- * is used by both user and kernel mode hotplugging support.
- *
- * The probe() and disconnect() methods are called in a context where
- * they can sleep, but they should avoid abusing the privilege. Most
- * work to connect to a device should be done when the device is opened,
- * and undone at the last close. The disconnect code needs to address
- * concurrency issues with respect to open() and close() methods, as
- * well as forcing all pending I/O requests to complete (by unlinking
- * them as necessary, and blocking until the unlinks complete).
- */
-struct usb_driver {
- const char *name;
-
- int (*probe) (struct usb_interface *intf,
- const struct usb_device_id *id);
-
- void (*disconnect) (struct usb_interface *intf);
-
- int (*ioctl) (struct usb_interface *intf, unsigned int code,
- void *buf);
-
- int (*suspend) (struct usb_interface *intf, pm_message_t message);
- int (*resume) (struct usb_interface *intf);
-
- void (*pre_reset) (struct usb_interface *intf);
- void (*post_reset) (struct usb_interface *intf);
-
- const struct usb_device_id *id_table;
-
- struct usb_dynids dynids;
- struct device_driver driver;
- unsigned int no_dynamic_id:1;
-};
-#define to_usb_driver(d) container_of(d, struct usb_driver, driver)
-
-extern struct bus_type usb_bus_type;
-
-/**
- * struct usb_class_driver - identifies a USB driver that wants to use the USB major number
- * @name: the usb class device name for this driver. Will show up in sysfs.
- * @fops: pointer to the struct file_operations of this driver.
- * @minor_base: the start of the minor range for this driver.
- *
- * This structure is used for the usb_register_dev() and
- * usb_unregister_dev() functions, to consolidate a number of the
- * parameters used for them.
- */
-struct usb_class_driver {
- char *name;
- const struct file_operations *fops;
- int minor_base;
-};
-
-/*
- * use these in module_init()/module_exit()
- * and don't forget MODULE_DEVICE_TABLE(usb, ...)
- */
-int usb_register_driver(struct usb_driver *, struct module *);
-static inline int usb_register(struct usb_driver *driver)
-{
- return usb_register_driver(driver, THIS_MODULE);
-}
-extern void usb_deregister(struct usb_driver *);
-
-extern int usb_register_dev(struct usb_interface *intf,
- struct usb_class_driver *class_driver);
-extern void usb_deregister_dev(struct usb_interface *intf,
- struct usb_class_driver *class_driver);
-
-extern int usb_disabled(void);
-
-/* ----------------------------------------------------------------------- */
-
-/*
- * URB support, for asynchronous request completions
- */
-
-/*
- * urb->transfer_flags:
- */
-#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */
-#define URB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame
- * ignored */
-#define URB_NO_TRANSFER_DMA_MAP 0x0004 /* urb->transfer_dma valid on submit */
-#define URB_NO_SETUP_DMA_MAP 0x0008 /* urb->setup_dma valid on submit */
-#define URB_NO_FSBR 0x0020 /* UHCI-specific */
-#define URB_ZERO_PACKET 0x0040 /* Finish bulk OUT with short packet */
-#define URB_NO_INTERRUPT 0x0080 /* HINT: no non-error interrupt
- * needed */
-
-struct usb_iso_packet_descriptor {
- unsigned int offset;
- unsigned int length; /* expected length */
- unsigned int actual_length;
- unsigned int status;
-};
-
-struct urb;
-struct pt_regs;
-
-typedef void (*usb_complete_t)(struct urb *, struct pt_regs *);
-
-/**
- * struct urb - USB Request Block
- * @urb_list: For use by current owner of the URB.
- * @pipe: Holds endpoint number, direction, type, and more.
- * Create these values with the eight macros available;
- * usb_{snd,rcv}TYPEpipe(dev,endpoint), where the TYPE is "ctrl"
- * (control), "bulk", "int" (interrupt), or "iso" (isochronous).
- * For example usb_sndbulkpipe() or usb_rcvintpipe(). Endpoint
- * numbers range from zero to fifteen. Note that "in" endpoint two
- * is a different endpoint (and pipe) from "out" endpoint two.
- * The current configuration controls the existence, type, and
- * maximum packet size of any given endpoint.
- * @dev: Identifies the USB device to perform the request.
- * @status: This is read in non-iso completion functions to get the
- * status of the particular request. ISO requests only use it
- * to tell whether the URB was unlinked; detailed status for
- * each frame is in the fields of the iso_frame-desc.
- * @transfer_flags: A variety of flags may be used to affect how URB
- * submission, unlinking, or operation are handled. Different
- * kinds of URB can use different flags.
- * @transfer_buffer: This identifies the buffer to (or from) which
- * the I/O request will be performed (unless URB_NO_TRANSFER_DMA_MAP
- * is set). This buffer must be suitable for DMA; allocate it with
- * kmalloc() or equivalent. For transfers to "in" endpoints, contents
- * of this buffer will be modified. This buffer is used for the data
- * stage of control transfers.
- * @transfer_dma: When transfer_flags includes URB_NO_TRANSFER_DMA_MAP,
- * the device driver is saying that it provided this DMA address,
- * which the host controller driver should use in preference to the
- * transfer_buffer.
- * @transfer_buffer_length: How big is transfer_buffer. The transfer may
- * be broken up into chunks according to the current maximum packet
- * size for the endpoint, which is a function of the configuration
- * and is encoded in the pipe. When the length is zero, neither
- * transfer_buffer nor transfer_dma is used.
- * @actual_length: This is read in non-iso completion functions, and
- * it tells how many bytes (out of transfer_buffer_length) were
- * transferred. It will normally be the same as requested, unless
- * either an error was reported or a short read was performed.
- * The URB_SHORT_NOT_OK transfer flag may be used to make such
- * short reads be reported as errors.
- * @setup_packet: Only used for control transfers, this points to eight bytes
- * of setup data. Control transfers always start by sending this data
- * to the device. Then transfer_buffer is read or written, if needed.
- * @setup_dma: For control transfers with URB_NO_SETUP_DMA_MAP set, the
- * device driver has provided this DMA address for the setup packet.
- * The host controller driver should use this in preference to
- * setup_packet.
- * @start_frame: Returns the initial frame for isochronous transfers.
- * @number_of_packets: Lists the number of ISO transfer buffers.
- * @interval: Specifies the polling interval for interrupt or isochronous
- * transfers. The units are frames (milliseconds) for for full and low
- * speed devices, and microframes (1/8 millisecond) for highspeed ones.
- * @error_count: Returns the number of ISO transfers that reported errors.
- * @context: For use in completion functions. This normally points to
- * request-specific driver context.
- * @complete: Completion handler. This URB is passed as the parameter to the
- * completion function. The completion function may then do what
- * it likes with the URB, including resubmitting or freeing it.
- * @iso_frame_desc: Used to provide arrays of ISO transfer buffers and to
- * collect the transfer status for each buffer.
- *
- * This structure identifies USB transfer requests. URBs must be allocated by
- * calling usb_alloc_urb() and freed with a call to usb_free_urb().
- * Initialization may be done using various usb_fill_*_urb() functions. URBs
- * are submitted using usb_submit_urb(), and pending requests may be canceled
- * using usb_unlink_urb() or usb_kill_urb().
- *
- * Data Transfer Buffers:
- *
- * Normally drivers provide I/O buffers allocated with kmalloc() or otherwise
- * taken from the general page pool. That is provided by transfer_buffer
- * (control requests also use setup_packet), and host controller drivers
- * perform a dma mapping (and unmapping) for each buffer transferred. Those
- * mapping operations can be expensive on some platforms (perhaps using a dma
- * bounce buffer or talking to an IOMMU),
- * although they're cheap on commodity x86 and ppc hardware.
- *
- * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags,
- * which tell the host controller driver that no such mapping is needed since
- * the device driver is DMA-aware. For example, a device driver might
- * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map().
- * When these transfer flags are provided, host controller drivers will
- * attempt to use the dma addresses found in the transfer_dma and/or
- * setup_dma fields rather than determining a dma address themselves. (Note
- * that transfer_buffer and setup_packet must still be set because not all
- * host controllers use DMA, nor do virtual root hubs).
- *
- * Initialization:
- *
- * All URBs submitted must initialize the dev, pipe, transfer_flags (may be
- * zero), and complete fields. All URBs must also initialize
- * transfer_buffer and transfer_buffer_length. They may provide the
- * URB_SHORT_NOT_OK transfer flag, indicating that short reads are
- * to be treated as errors; that flag is invalid for write requests.
- *
- * Bulk URBs may
- * use the URB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
- * should always terminate with a short packet, even if it means adding an
- * extra zero length packet.
- *
- * Control URBs must provide a setup_packet. The setup_packet and
- * transfer_buffer may each be mapped for DMA or not, independently of
- * the other. The transfer_flags bits URB_NO_TRANSFER_DMA_MAP and
- * URB_NO_SETUP_DMA_MAP indicate which buffers have already been mapped.
- * URB_NO_SETUP_DMA_MAP is ignored for non-control URBs.
- *
- * Interrupt URBs must provide an interval, saying how often (in milliseconds
- * or, for highspeed devices, 125 microsecond units)
- * to poll for transfers. After the URB has been submitted, the interval
- * field reflects how the transfer was actually scheduled.
- * The polling interval may be more frequent than requested.
- * For example, some controllers have a maximum interval of 32 milliseconds,
- * while others support intervals of up to 1024 milliseconds.
- * Isochronous URBs also have transfer intervals. (Note that for isochronous
- * endpoints, as well as high speed interrupt endpoints, the encoding of
- * the transfer interval in the endpoint descriptor is logarithmic.
- * Device drivers must convert that value to linear units themselves.)
- *
- * Isochronous URBs normally use the URB_ISO_ASAP transfer flag, telling
- * the host controller to schedule the transfer as soon as bandwidth
- * utilization allows, and then set start_frame to reflect the actual frame
- * selected during submission. Otherwise drivers must specify the start_frame
- * and handle the case where the transfer can't begin then. However, drivers
- * won't know how bandwidth is currently allocated, and while they can
- * find the current frame using usb_get_current_frame_number () they can't
- * know the range for that frame number. (Ranges for frame counter values
- * are HC-specific, and can go from 256 to 65536 frames from "now".)
- *
- * Isochronous URBs have a different data transfer model, in part because
- * the quality of service is only "best effort". Callers provide specially
- * allocated URBs, with number_of_packets worth of iso_frame_desc structures
- * at the end. Each such packet is an individual ISO transfer. Isochronous
- * URBs are normally queued, submitted by drivers to arrange that
- * transfers are at least double buffered, and then explicitly resubmitted
- * in completion handlers, so
- * that data (such as audio or video) streams at as constant a rate as the
- * host controller scheduler can support.
- *
- * Completion Callbacks:
- *
- * The completion callback is made in_interrupt(), and one of the first
- * things that a completion handler should do is check the status field.
- * The status field is provided for all URBs. It is used to report
- * unlinked URBs, and status for all non-ISO transfers. It should not
- * be examined before the URB is returned to the completion handler.
- *
- * The context field is normally used to link URBs back to the relevant
- * driver or request state.
- *
- * When the completion callback is invoked for non-isochronous URBs, the
- * actual_length field tells how many bytes were transferred. This field
- * is updated even when the URB terminated with an error or was unlinked.
- *
- * ISO transfer status is reported in the status and actual_length fields
- * of the iso_frame_desc array, and the number of errors is reported in
- * error_count. Completion callbacks for ISO transfers will normally
- * (re)submit URBs to ensure a constant transfer rate.
- *
- * Note that even fields marked "public" should not be touched by the driver
- * when the urb is owned by the hcd, that is, since the call to
- * usb_submit_urb() till the entry into the completion routine.
- */
-struct urb
-{
- /* private: usb core and host controller only fields in the urb */
- struct kref kref; /* reference count of the URB */
- spinlock_t lock; /* lock for the URB */
- void *hcpriv; /* private data for host controller */
- int bandwidth; /* bandwidth for INT/ISO request */
- atomic_t use_count; /* concurrent submissions counter */
- u8 reject; /* submissions will fail */
-
- /* public: documented fields in the urb that can be used by drivers */
- struct list_head urb_list; /* list head for use by the urb's
- * current owner */
- struct usb_device *dev; /* (in) pointer to associated device */
- unsigned int pipe; /* (in) pipe information */
- int status; /* (return) non-ISO status */
- unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/
- void *transfer_buffer; /* (in) associated data buffer */
- dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
- int transfer_buffer_length; /* (in) data buffer length */
- int actual_length; /* (return) actual transfer length */
- unsigned char *setup_packet; /* (in) setup packet (control only) */
- dma_addr_t setup_dma; /* (in) dma addr for setup_packet */
- int start_frame; /* (modify) start frame (ISO) */
- int number_of_packets; /* (in) number of ISO packets */
- int interval; /* (modify) transfer interval
- * (INT/ISO) */
- int error_count; /* (return) number of ISO errors */
- void *context; /* (in) context for completion */
- usb_complete_t complete; /* (in) completion routine */
- struct usb_iso_packet_descriptor iso_frame_desc[0];
- /* (in) ISO ONLY */
-};
-
-/* ----------------------------------------------------------------------- */
-
-/**
- * usb_fill_control_urb - initializes a control urb
- * @urb: pointer to the urb to initialize.
- * @dev: pointer to the struct usb_device for this urb.
- * @pipe: the endpoint pipe
- * @setup_packet: pointer to the setup_packet buffer
- * @transfer_buffer: pointer to the transfer buffer
- * @buffer_length: length of the transfer buffer
- * @complete: pointer to the usb_complete_t function
- * @context: what to set the urb context to.
- *
- * Initializes a control urb with the proper information needed to submit
- * it to a device.
- */
-static inline void usb_fill_control_urb (struct urb *urb,
- struct usb_device *dev,
- unsigned int pipe,
- unsigned char *setup_packet,
- void *transfer_buffer,
- int buffer_length,
- usb_complete_t complete,
- void *context)
-{
- spin_lock_init(&urb->lock);
- urb->dev = dev;
- urb->pipe = pipe;
- urb->setup_packet = setup_packet;
- urb->transfer_buffer = transfer_buffer;
- urb->transfer_buffer_length = buffer_length;
- urb->complete = complete;
- urb->context = context;
-}
-
-/**
- * usb_fill_bulk_urb - macro to help initialize a bulk urb
- * @urb: pointer to the urb to initialize.
- * @dev: pointer to the struct usb_device for this urb.
- * @pipe: the endpoint pipe
- * @transfer_buffer: pointer to the transfer buffer
- * @buffer_length: length of the transfer buffer
- * @complete: pointer to the usb_complete_t function
- * @context: what to set the urb context to.
- *
- * Initializes a bulk urb with the proper information needed to submit it
- * to a device.
- */
-static inline void usb_fill_bulk_urb (struct urb *urb,
- struct usb_device *dev,
- unsigned int pipe,
- void *transfer_buffer,
- int buffer_length,
- usb_complete_t complete,
- void *context)
-{
- spin_lock_init(&urb->lock);
- urb->dev = dev;
- urb->pipe = pipe;
- urb->transfer_buffer = transfer_buffer;
- urb->transfer_buffer_length = buffer_length;
- urb->complete = complete;
- urb->context = context;
-}
-
-/**
- * usb_fill_int_urb - macro to help initialize a interrupt urb
- * @urb: pointer to the urb to initialize.
- * @dev: pointer to the struct usb_device for this urb.
- * @pipe: the endpoint pipe
- * @transfer_buffer: pointer to the transfer buffer
- * @buffer_length: length of the transfer buffer
- * @complete: pointer to the usb_complete_t function
- * @context: what to set the urb context to.
- * @interval: what to set the urb interval to, encoded like
- * the endpoint descriptor's bInterval value.
- *
- * Initializes a interrupt urb with the proper information needed to submit
- * it to a device.
- * Note that high speed interrupt endpoints use a logarithmic encoding of
- * the endpoint interval, and express polling intervals in microframes
- * (eight per millisecond) rather than in frames (one per millisecond).
- */
-static inline void usb_fill_int_urb (struct urb *urb,
- struct usb_device *dev,
- unsigned int pipe,
- void *transfer_buffer,
- int buffer_length,
- usb_complete_t complete,
- void *context,
- int interval)
-{
- spin_lock_init(&urb->lock);
- urb->dev = dev;
- urb->pipe = pipe;
- urb->transfer_buffer = transfer_buffer;
- urb->transfer_buffer_length = buffer_length;
- urb->complete = complete;
- urb->context = context;
- if (dev->speed == USB_SPEED_HIGH)
- urb->interval = 1 << (interval - 1);
- else
- urb->interval = interval;
- urb->start_frame = -1;
-}
-
-extern void usb_init_urb(struct urb *urb);
-extern struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags);
-extern void usb_free_urb(struct urb *urb);
-#define usb_put_urb usb_free_urb
-extern struct urb *usb_get_urb(struct urb *urb);
-extern int usb_submit_urb(struct urb *urb, gfp_t mem_flags);
-extern int usb_unlink_urb(struct urb *urb);
-extern void usb_kill_urb(struct urb *urb);
-
-#define HAVE_USB_BUFFERS
-void *usb_buffer_alloc (struct usb_device *dev, size_t size,
- gfp_t mem_flags, dma_addr_t *dma);
-void usb_buffer_free (struct usb_device *dev, size_t size,
- void *addr, dma_addr_t dma);
-
-#if 0
-struct urb *usb_buffer_map (struct urb *urb);
-void usb_buffer_dmasync (struct urb *urb);
-void usb_buffer_unmap (struct urb *urb);
-#endif
-
-struct scatterlist;
-int usb_buffer_map_sg (struct usb_device *dev, unsigned pipe,
- struct scatterlist *sg, int nents);
-#if 0
-void usb_buffer_dmasync_sg (struct usb_device *dev, unsigned pipe,
- struct scatterlist *sg, int n_hw_ents);
-#endif
-void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe,
- struct scatterlist *sg, int n_hw_ents);
-
-/*-------------------------------------------------------------------*
- * SYNCHRONOUS CALL SUPPORT *
- *-------------------------------------------------------------------*/
-
-extern int usb_control_msg(struct usb_device *dev, unsigned int pipe,
- __u8 request, __u8 requesttype, __u16 value, __u16 index,
- void *data, __u16 size, int timeout);
-extern int usb_interrupt_msg(struct usb_device *usb_dev, unsigned int pipe,
- void *data, int len, int *actual_length, int timeout);
-extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe,
- void *data, int len, int *actual_length,
- int timeout);
-
-/* wrappers around usb_control_msg() for the most common standard requests */
-extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype,
- unsigned char descindex, void *buf, int size);
-extern int usb_get_status(struct usb_device *dev,
- int type, int target, void *data);
-extern int usb_string(struct usb_device *dev, int index,
- char *buf, size_t size);
-
-/* wrappers that also update important state inside usbcore */
-extern int usb_clear_halt(struct usb_device *dev, int pipe);
-extern int usb_reset_configuration(struct usb_device *dev);
-extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate);
-
-/*
- * timeouts, in milliseconds, used for sending/receiving control messages
- * they typically complete within a few frames (msec) after they're issued
- * USB identifies 5 second timeouts, maybe more in a few cases, and a few
- * slow devices (like some MGE Ellipse UPSes) actually push that limit.
- */
-#define USB_CTRL_GET_TIMEOUT 5000
-#define USB_CTRL_SET_TIMEOUT 5000
-
-
-/**
- * struct usb_sg_request - support for scatter/gather I/O
- * @status: zero indicates success, else negative errno
- * @bytes: counts bytes transferred.
- *
- * These requests are initialized using usb_sg_init(), and then are used
- * as request handles passed to usb_sg_wait() or usb_sg_cancel(). Most
- * members of the request object aren't for driver access.
- *
- * The status and bytecount values are valid only after usb_sg_wait()
- * returns. If the status is zero, then the bytecount matches the total
- * from the request.
- *
- * After an error completion, drivers may need to clear a halt condition
- * on the endpoint.
- */
-struct usb_sg_request {
- int status;
- size_t bytes;
-
- /*
- * members below are private: to usbcore,
- * and are not provided for driver access!
- */
- spinlock_t lock;
-
- struct usb_device *dev;
- int pipe;
- struct scatterlist *sg;
- int nents;
-
- int entries;
- struct urb **urbs;
-
- int count;
- struct completion complete;
-};
-
-int usb_sg_init (
- struct usb_sg_request *io,
- struct usb_device *dev,
- unsigned pipe,
- unsigned period,
- struct scatterlist *sg,
- int nents,
- size_t length,
- gfp_t mem_flags
-);
-void usb_sg_cancel (struct usb_sg_request *io);
-void usb_sg_wait (struct usb_sg_request *io);
-
-
-/* ----------------------------------------------------------------------- */
-
-/*
- * For various legacy reasons, Linux has a small cookie that's paired with
- * a struct usb_device to identify an endpoint queue. Queue characteristics
- * are defined by the endpoint's descriptor. This cookie is called a "pipe",
- * an unsigned int encoded as:
- *
- * - direction: bit 7 (0 = Host-to-Device [Out],
- * 1 = Device-to-Host [In] ...
- * like endpoint bEndpointAddress)
- * - device address: bits 8-14 ... bit positions known to uhci-hcd
- * - endpoint: bits 15-18 ... bit positions known to uhci-hcd
- * - pipe type: bits 30-31 (00 = isochronous, 01 = interrupt,
- * 10 = control, 11 = bulk)
- *
- * Given the device address and endpoint descriptor, pipes are redundant.
- */
-
-/* NOTE: these are not the standard USB_ENDPOINT_XFER_* values!! */
-/* (yet ... they're the values used by usbfs) */
-#define PIPE_ISOCHRONOUS 0
-#define PIPE_INTERRUPT 1
-#define PIPE_CONTROL 2
-#define PIPE_BULK 3
-
-#define usb_pipein(pipe) ((pipe) & USB_DIR_IN)
-#define usb_pipeout(pipe) (!usb_pipein(pipe))
-
-#define usb_pipedevice(pipe) (((pipe) >> 8) & 0x7f)
-#define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf)
-
-#define usb_pipetype(pipe) (((pipe) >> 30) & 3)
-#define usb_pipeisoc(pipe) (usb_pipetype((pipe)) == PIPE_ISOCHRONOUS)
-#define usb_pipeint(pipe) (usb_pipetype((pipe)) == PIPE_INTERRUPT)
-#define usb_pipecontrol(pipe) (usb_pipetype((pipe)) == PIPE_CONTROL)
-#define usb_pipebulk(pipe) (usb_pipetype((pipe)) == PIPE_BULK)
-
-/* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */
-#define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1)
-#define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep)))
-#define usb_settoggle(dev, ep, out, bit) \
- ((dev)->toggle[out] = ((dev)->toggle[out] & ~(1 << (ep))) | \
- ((bit) << (ep)))
-
-
-static inline unsigned int __create_pipe(struct usb_device *dev,
- unsigned int endpoint)
-{
- return (dev->devnum << 8) | (endpoint << 15);
-}
-
-/* Create various pipes... */
-#define usb_sndctrlpipe(dev,endpoint) \
- ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvctrlpipe(dev,endpoint) \
- ((PIPE_CONTROL << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-#define usb_sndisocpipe(dev,endpoint) \
- ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvisocpipe(dev,endpoint) \
- ((PIPE_ISOCHRONOUS << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-#define usb_sndbulkpipe(dev,endpoint) \
- ((PIPE_BULK << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvbulkpipe(dev,endpoint) \
- ((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-#define usb_sndintpipe(dev,endpoint) \
- ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint))
-#define usb_rcvintpipe(dev,endpoint) \
- ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN)
-
-/*-------------------------------------------------------------------------*/
-
-static inline __u16
-usb_maxpacket(struct usb_device *udev, int pipe, int is_out)
-{
- struct usb_host_endpoint *ep;
- unsigned epnum = usb_pipeendpoint(pipe);
-
- if (is_out) {
- WARN_ON(usb_pipein(pipe));
- ep = udev->ep_out[epnum];
- } else {
- WARN_ON(usb_pipeout(pipe));
- ep = udev->ep_in[epnum];
- }
- if (!ep)
- return 0;
-
- /* NOTE: only 0x07ff bits are for packet size... */
- return le16_to_cpu(ep->desc.wMaxPacketSize);
-}
-
-/* ----------------------------------------------------------------------- */
-
-/* Events from the usb core */
-#define USB_DEVICE_ADD 0x0001
-#define USB_DEVICE_REMOVE 0x0002
-#define USB_BUS_ADD 0x0003
-#define USB_BUS_REMOVE 0x0004
-extern void usb_register_notify(struct notifier_block *nb);
-extern void usb_unregister_notify(struct notifier_block *nb);
-
-#ifdef DEBUG
-#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \
- __FILE__ , ## arg)
-#else
-#define dbg(format, arg...) do {} while (0)
-#endif
-
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n" , \
- __FILE__ , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n" , \
- __FILE__ , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n" , \
- __FILE__ , ## arg)
-
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/usb/ch9.h b/original/linux/usb/ch9.h
deleted file mode 100644
index 7119a9f..0000000
--- a/original/linux/usb/ch9.h
+++ /dev/null
@@ -1,942 +0,0 @@
-/*
- * This file holds USB constants and structures that are needed for
- * USB device APIs. These are used by the USB device model, which is
- * defined in chapter 9 of the USB 2.0 specification and in the
- * Wireless USB 1.0 (spread around). Linux has several APIs in C that
- * need these:
- *
- * - the master/host side Linux-USB kernel driver API;
- * - the "usbfs" user space API; and
- * - the Linux "gadget" slave/device/peripheral side driver API.
- *
- * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems
- * act either as a USB master/host or as a USB slave/device. That means
- * the master and slave side APIs benefit from working well together.
- *
- * There's also "Wireless USB", using low power short range radios for
- * peripheral interconnection but otherwise building on the USB framework.
- *
- * Note all descriptors are declared '__attribute__((packed))' so that:
- *
- * [a] they never get padded, either internally (USB spec writers
- * probably handled that) or externally;
- *
- * [b] so that accessing bigger-than-a-bytes fields will never
- * generate bus errors on any platform, even when the location of
- * its descriptor inside a bundle isn't "naturally aligned", and
- *
- * [c] for consistency, removing all doubt even when it appears to
- * someone that the two other points are non-issues for that
- * particular descriptor type.
- */
-
-#ifndef __LINUX_USB_CH9_H
-#define __LINUX_USB_CH9_H
-
-#include <linux/types.h> /* __u8 etc */
-#include <asm/byteorder.h> /* le16_to_cpu */
-
-/*-------------------------------------------------------------------------*/
-
-/* CONTROL REQUEST SUPPORT */
-
-/*
- * USB directions
- *
- * This bit flag is used in endpoint descriptors' bEndpointAddress field.
- * It's also one of three fields in control requests bRequestType.
- */
-#define USB_DIR_OUT 0 /* to device */
-#define USB_DIR_IN 0x80 /* to host */
-
-/*
- * USB types, the second of three bRequestType fields
- */
-#define USB_TYPE_MASK (0x03 << 5)
-#define USB_TYPE_STANDARD (0x00 << 5)
-#define USB_TYPE_CLASS (0x01 << 5)
-#define USB_TYPE_VENDOR (0x02 << 5)
-#define USB_TYPE_RESERVED (0x03 << 5)
-
-/*
- * USB recipients, the third of three bRequestType fields
- */
-#define USB_RECIP_MASK 0x1f
-#define USB_RECIP_DEVICE 0x00
-#define USB_RECIP_INTERFACE 0x01
-#define USB_RECIP_ENDPOINT 0x02
-#define USB_RECIP_OTHER 0x03
-/* From Wireless USB 1.0 */
-#define USB_RECIP_PORT 0x04
-#define USB_RECIP_RPIPE 0x05
-
-/*
- * Standard requests, for the bRequest field of a SETUP packet.
- *
- * These are qualified by the bRequestType field, so that for example
- * TYPE_CLASS or TYPE_VENDOR specific feature flags could be retrieved
- * by a GET_STATUS request.
- */
-#define USB_REQ_GET_STATUS 0x00
-#define USB_REQ_CLEAR_FEATURE 0x01
-#define USB_REQ_SET_FEATURE 0x03
-#define USB_REQ_SET_ADDRESS 0x05
-#define USB_REQ_GET_DESCRIPTOR 0x06
-#define USB_REQ_SET_DESCRIPTOR 0x07
-#define USB_REQ_GET_CONFIGURATION 0x08
-#define USB_REQ_SET_CONFIGURATION 0x09
-#define USB_REQ_GET_INTERFACE 0x0A
-#define USB_REQ_SET_INTERFACE 0x0B
-#define USB_REQ_SYNCH_FRAME 0x0C
-#define USB_REQ_SET_SEL 0x30
-
-#define USB_REQ_SET_ENCRYPTION 0x0D /* Wireless USB */
-#define USB_REQ_GET_ENCRYPTION 0x0E
-#define USB_REQ_RPIPE_ABORT 0x0E
-#define USB_REQ_SET_HANDSHAKE 0x0F
-#define USB_REQ_RPIPE_RESET 0x0F
-#define USB_REQ_GET_HANDSHAKE 0x10
-#define USB_REQ_SET_CONNECTION 0x11
-#define USB_REQ_SET_SECURITY_DATA 0x12
-#define USB_REQ_GET_SECURITY_DATA 0x13
-#define USB_REQ_SET_WUSB_DATA 0x14
-#define USB_REQ_LOOPBACK_DATA_WRITE 0x15
-#define USB_REQ_LOOPBACK_DATA_READ 0x16
-#define USB_REQ_SET_INTERFACE_DS 0x17
-
-/* The Link Power Management (LPM) ECN defines USB_REQ_TEST_AND_SET command,
- * used by hubs to put ports into a new L1 suspend state, except that it
- * forgot to define its number ...
- */
-
-/*
- * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and
- * are read as a bit array returned by USB_REQ_GET_STATUS. (So there
- * are at most sixteen features of each type.) Hubs may also support a
- * new USB_REQ_TEST_AND_SET_FEATURE to put ports into L1 suspend.
- */
-#define USB_DEVICE_SELF_POWERED 0 /* (read only) */
-#define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */
-#define USB_DEVICE_TEST_MODE 2 /* (wired high speed only) */
-#define USB_DEVICE_BATTERY 2 /* (wireless) */
-#define USB_DEVICE_B_HNP_ENABLE 3 /* (otg) dev may initiate HNP */
-#define USB_DEVICE_WUSB_DEVICE 3 /* (wireless)*/
-#define USB_DEVICE_A_HNP_SUPPORT 4 /* (otg) RH port supports HNP */
-#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */
-#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
-
-/*
- * Test Mode Selectors
- * See USB 2.0 spec Table 9-7
- */
-#define TEST_J 1
-#define TEST_K 2
-#define TEST_SE0_NAK 3
-#define TEST_PACKET 4
-#define TEST_FORCE_EN 5
-
-/*
- * New Feature Selectors as added by USB 3.0
- * See USB 3.0 spec Table 9-6
- */
-#define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */
-#define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */
-#define USB_DEVICE_LTM_ENABLE 50 /* dev may send LTM */
-#define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */
-
-#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
-/*
- * Suspend Options, Table 9-7 USB 3.0 spec
- */
-#define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0))
-#define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1))
-
-#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
-
-/* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
-#define USB_DEV_STAT_U1_ENABLED 2 /* transition into U1 state */
-#define USB_DEV_STAT_U2_ENABLED 3 /* transition into U2 state */
-#define USB_DEV_STAT_LTM_ENABLED 4 /* Latency tolerance messages */
-
-/**
- * struct usb_ctrlrequest - SETUP data for a USB device control request
- * @bRequestType: matches the USB bmRequestType field
- * @bRequest: matches the USB bRequest field
- * @wValue: matches the USB wValue field (le16 byte order)
- * @wIndex: matches the USB wIndex field (le16 byte order)
- * @wLength: matches the USB wLength field (le16 byte order)
- *
- * This structure is used to send control requests to a USB device. It matches
- * the different fields of the USB 2.0 Spec section 9.3, table 9-2. See the
- * USB spec for a fuller description of the different fields, and what they are
- * used for.
- *
- * Note that the driver for any interface can issue control requests.
- * For most devices, interfaces don't coordinate with each other, so
- * such requests may be made at any time.
- */
-struct usb_ctrlrequest {
- __u8 bRequestType;
- __u8 bRequest;
- __le16 wValue;
- __le16 wIndex;
- __le16 wLength;
-} __attribute__ ((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/*
- * STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or
- * (rarely) accepted by SET_DESCRIPTOR.
- *
- * Note that all multi-byte values here are encoded in little endian
- * byte order "on the wire". Within the kernel and when exposed
- * through the Linux-USB APIs, they are not converted to cpu byte
- * order; it is the responsibility of the client code to do this.
- * The single exception is when device and configuration descriptors (but
- * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
- * in this case the fields are converted to host endianness by the kernel.
- */
-
-/*
- * Descriptor types ... USB 2.0 spec table 9.5
- */
-#define USB_DT_DEVICE 0x01
-#define USB_DT_CONFIG 0x02
-#define USB_DT_STRING 0x03
-#define USB_DT_INTERFACE 0x04
-#define USB_DT_ENDPOINT 0x05
-#define USB_DT_DEVICE_QUALIFIER 0x06
-#define USB_DT_OTHER_SPEED_CONFIG 0x07
-#define USB_DT_INTERFACE_POWER 0x08
-/* these are from a minor usb 2.0 revision (ECN) */
-#define USB_DT_OTG 0x09
-#define USB_DT_DEBUG 0x0a
-#define USB_DT_INTERFACE_ASSOCIATION 0x0b
-/* these are from the Wireless USB spec */
-#define USB_DT_SECURITY 0x0c
-#define USB_DT_KEY 0x0d
-#define USB_DT_ENCRYPTION_TYPE 0x0e
-#define USB_DT_BOS 0x0f
-#define USB_DT_DEVICE_CAPABILITY 0x10
-#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
-#define USB_DT_WIRE_ADAPTER 0x21
-#define USB_DT_RPIPE 0x22
-#define USB_DT_CS_RADIO_CONTROL 0x23
-/* From the T10 UAS specification */
-#define USB_DT_PIPE_USAGE 0x24
-/* From the USB 3.0 spec */
-#define USB_DT_SS_ENDPOINT_COMP 0x30
-
-/* Conventional codes for class-specific descriptors. The convention is
- * defined in the USB "Common Class" Spec (3.11). Individual class specs
- * are authoritative for their usage, not the "common class" writeup.
- */
-#define USB_DT_CS_DEVICE (USB_TYPE_CLASS | USB_DT_DEVICE)
-#define USB_DT_CS_CONFIG (USB_TYPE_CLASS | USB_DT_CONFIG)
-#define USB_DT_CS_STRING (USB_TYPE_CLASS | USB_DT_STRING)
-#define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE)
-#define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT)
-
-/* All standard descriptors have these 2 fields at the beginning */
-struct usb_descriptor_header {
- __u8 bLength;
- __u8 bDescriptorType;
-} __attribute__ ((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE: Device descriptor */
-struct usb_device_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 bcdUSB;
- __u8 bDeviceClass;
- __u8 bDeviceSubClass;
- __u8 bDeviceProtocol;
- __u8 bMaxPacketSize0;
- __le16 idVendor;
- __le16 idProduct;
- __le16 bcdDevice;
- __u8 iManufacturer;
- __u8 iProduct;
- __u8 iSerialNumber;
- __u8 bNumConfigurations;
-} __attribute__ ((packed));
-
-#define USB_DT_DEVICE_SIZE 18
-
-
-/*
- * Device and/or Interface Class codes
- * as found in bDeviceClass or bInterfaceClass
- * and defined by www.usb.org documents
- */
-#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
-#define USB_CLASS_AUDIO 1
-#define USB_CLASS_COMM 2
-#define USB_CLASS_HID 3
-#define USB_CLASS_PHYSICAL 5
-#define USB_CLASS_STILL_IMAGE 6
-#define USB_CLASS_PRINTER 7
-#define USB_CLASS_MASS_STORAGE 8
-#define USB_CLASS_HUB 9
-#define USB_CLASS_CDC_DATA 0x0a
-#define USB_CLASS_CSCID 0x0b /* chip+ smart card */
-#define USB_CLASS_CONTENT_SEC 0x0d /* content security */
-#define USB_CLASS_VIDEO 0x0e
-#define USB_CLASS_WIRELESS_CONTROLLER 0xe0
-#define USB_CLASS_MISC 0xef
-#define USB_CLASS_APP_SPEC 0xfe
-#define USB_CLASS_VENDOR_SPEC 0xff
-
-#define USB_SUBCLASS_VENDOR_SPEC 0xff
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_CONFIG: Configuration descriptor information.
- *
- * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the
- * descriptor type is different. Highspeed-capable devices can look
- * different depending on what speed they're currently running. Only
- * devices with a USB_DT_DEVICE_QUALIFIER have any OTHER_SPEED_CONFIG
- * descriptors.
- */
-struct usb_config_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wTotalLength;
- __u8 bNumInterfaces;
- __u8 bConfigurationValue;
- __u8 iConfiguration;
- __u8 bmAttributes;
- __u8 bMaxPower;
-} __attribute__ ((packed));
-
-#define USB_DT_CONFIG_SIZE 9
-
-/* from config descriptor bmAttributes */
-#define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */
-#define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */
-#define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */
-#define USB_CONFIG_ATT_BATTERY (1 << 4) /* battery powered */
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_STRING: String descriptor */
-struct usb_string_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wData[1]; /* UTF-16LE encoded */
-} __attribute__ ((packed));
-
-/* note that "string" zero is special, it holds language codes that
- * the device supports, not Unicode characters.
- */
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_INTERFACE: Interface descriptor */
-struct usb_interface_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bInterfaceNumber;
- __u8 bAlternateSetting;
- __u8 bNumEndpoints;
- __u8 bInterfaceClass;
- __u8 bInterfaceSubClass;
- __u8 bInterfaceProtocol;
- __u8 iInterface;
-} __attribute__ ((packed));
-
-#define USB_DT_INTERFACE_SIZE 9
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_ENDPOINT: Endpoint descriptor */
-struct usb_endpoint_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bEndpointAddress;
- __u8 bmAttributes;
- __le16 wMaxPacketSize;
- __u8 bInterval;
-
- /* NOTE: these two are _only_ in audio endpoints. */
- /* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */
- __u8 bRefresh;
- __u8 bSynchAddress;
-} __attribute__ ((packed));
-
-#define USB_DT_ENDPOINT_SIZE 7
-#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */
-
-
-/*
- * Endpoints
- */
-#define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */
-#define USB_ENDPOINT_DIR_MASK 0x80
-
-#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */
-#define USB_ENDPOINT_XFER_CONTROL 0
-#define USB_ENDPOINT_XFER_ISOC 1
-#define USB_ENDPOINT_XFER_BULK 2
-#define USB_ENDPOINT_XFER_INT 3
-#define USB_ENDPOINT_MAX_ADJUSTABLE 0x80
-
-#define USB_ENDPOINT_SYNCTYPE 0x0c
-#define USB_ENDPOINT_SYNC_NONE (0 << 2)
-#define USB_ENDPOINT_SYNC_ASYNC (1 << 2)
-#define USB_ENDPOINT_SYNC_ADAPTIVE (2 << 2)
-#define USB_ENDPOINT_SYNC_SYNC (3 << 2)
-
-#define USB_ENDPOINT_USAGE_MASK 0x30
-#define USB_ENDPOINT_USAGE_DATA 0x00
-#define USB_ENDPOINT_USAGE_FEEDBACK 0x10
-#define USB_ENDPOINT_USAGE_IMPLICIT_FB 0x20 /* Implicit feedback Data endpoint */
-
-/*-------------------------------------------------------------------------*/
-
-/**
- * usb_endpoint_num - get the endpoint's number
- * @epd: endpoint to be checked
- *
- * Returns @epd's number: 0 to 15.
- */
-static inline int usb_endpoint_num(const struct usb_endpoint_descriptor *epd)
-{
- return epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
-}
-
-/**
- * usb_endpoint_type - get the endpoint's transfer type
- * @epd: endpoint to be checked
- *
- * Returns one of USB_ENDPOINT_XFER_{CONTROL, ISOC, BULK, INT} according
- * to @epd's transfer type.
- */
-static inline int usb_endpoint_type(const struct usb_endpoint_descriptor *epd)
-{
- return epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
-}
-
-/**
- * usb_endpoint_dir_in - check if the endpoint has IN direction
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint is of type IN, otherwise it returns false.
- */
-static inline int usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN);
-}
-
-/**
- * usb_endpoint_dir_out - check if the endpoint has OUT direction
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint is of type OUT, otherwise it returns false.
- */
-static inline int usb_endpoint_dir_out(
- const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT);
-}
-
-/**
- * usb_endpoint_xfer_bulk - check if the endpoint has bulk transfer type
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint is of type bulk, otherwise it returns false.
- */
-static inline int usb_endpoint_xfer_bulk(
- const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
- USB_ENDPOINT_XFER_BULK);
-}
-
-/**
- * usb_endpoint_xfer_control - check if the endpoint has control transfer type
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint is of type control, otherwise it returns false.
- */
-static inline int usb_endpoint_xfer_control(
- const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
- USB_ENDPOINT_XFER_CONTROL);
-}
-
-/**
- * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint is of type interrupt, otherwise it returns
- * false.
- */
-static inline int usb_endpoint_xfer_int(
- const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
- USB_ENDPOINT_XFER_INT);
-}
-
-/**
- * usb_endpoint_xfer_isoc - check if the endpoint has isochronous transfer type
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint is of type isochronous, otherwise it returns
- * false.
- */
-static inline int usb_endpoint_xfer_isoc(
- const struct usb_endpoint_descriptor *epd)
-{
- return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
- USB_ENDPOINT_XFER_ISOC);
-}
-
-/**
- * usb_endpoint_is_bulk_in - check if the endpoint is bulk IN
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint has bulk transfer type and IN direction,
- * otherwise it returns false.
- */
-static inline int usb_endpoint_is_bulk_in(
- const struct usb_endpoint_descriptor *epd)
-{
- return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_in(epd);
-}
-
-/**
- * usb_endpoint_is_bulk_out - check if the endpoint is bulk OUT
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint has bulk transfer type and OUT direction,
- * otherwise it returns false.
- */
-static inline int usb_endpoint_is_bulk_out(
- const struct usb_endpoint_descriptor *epd)
-{
- return usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd);
-}
-
-/**
- * usb_endpoint_is_int_in - check if the endpoint is interrupt IN
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint has interrupt transfer type and IN direction,
- * otherwise it returns false.
- */
-static inline int usb_endpoint_is_int_in(
- const struct usb_endpoint_descriptor *epd)
-{
- return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd);
-}
-
-/**
- * usb_endpoint_is_int_out - check if the endpoint is interrupt OUT
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint has interrupt transfer type and OUT direction,
- * otherwise it returns false.
- */
-static inline int usb_endpoint_is_int_out(
- const struct usb_endpoint_descriptor *epd)
-{
- return usb_endpoint_xfer_int(epd) && usb_endpoint_dir_out(epd);
-}
-
-/**
- * usb_endpoint_is_isoc_in - check if the endpoint is isochronous IN
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint has isochronous transfer type and IN direction,
- * otherwise it returns false.
- */
-static inline int usb_endpoint_is_isoc_in(
- const struct usb_endpoint_descriptor *epd)
-{
- return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_in(epd);
-}
-
-/**
- * usb_endpoint_is_isoc_out - check if the endpoint is isochronous OUT
- * @epd: endpoint to be checked
- *
- * Returns true if the endpoint has isochronous transfer type and OUT direction,
- * otherwise it returns false.
- */
-static inline int usb_endpoint_is_isoc_out(
- const struct usb_endpoint_descriptor *epd)
-{
- return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd);
-}
-
-/**
- * usb_endpoint_maxp - get endpoint's max packet size
- * @epd: endpoint to be checked
- *
- * Returns @epd's max packet
- */
-static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
-{
- return __le16_to_cpu(epd->wMaxPacketSize);
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */
-struct usb_ss_ep_comp_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bMaxBurst;
- __u8 bmAttributes;
- __le16 wBytesPerInterval;
-} __attribute__ ((packed));
-
-#define USB_DT_SS_EP_COMP_SIZE 6
-
-/* Bits 4:0 of bmAttributes if this is a bulk endpoint */
-static inline int
-usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp)
-{
- int max_streams;
-
- if (!comp)
- return 0;
-
- max_streams = comp->bmAttributes & 0x1f;
-
- if (!max_streams)
- return 0;
-
- max_streams = 1 << max_streams;
-
- return max_streams;
-}
-
-/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
-#define USB_SS_MULT(p) (1 + ((p) & 0x3))
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */
-struct usb_qualifier_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 bcdUSB;
- __u8 bDeviceClass;
- __u8 bDeviceSubClass;
- __u8 bDeviceProtocol;
- __u8 bMaxPacketSize0;
- __u8 bNumConfigurations;
- __u8 bRESERVED;
-} __attribute__ ((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_OTG (from OTG 1.0a supplement) */
-struct usb_otg_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bmAttributes; /* support for HNP, SRP, etc */
-} __attribute__ ((packed));
-
-/* from usb_otg_descriptor.bmAttributes */
-#define USB_OTG_SRP (1 << 0)
-#define USB_OTG_HNP (1 << 1) /* swap host/device roles */
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEBUG: for special highspeed devices, replacing serial console */
-struct usb_debug_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- /* bulk endpoints with 8 byte maxpacket */
- __u8 bDebugInEndpoint;
- __u8 bDebugOutEndpoint;
-} __attribute__((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_INTERFACE_ASSOCIATION: groups interfaces */
-struct usb_interface_assoc_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bFirstInterface;
- __u8 bInterfaceCount;
- __u8 bFunctionClass;
- __u8 bFunctionSubClass;
- __u8 bFunctionProtocol;
- __u8 iFunction;
-} __attribute__ ((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_SECURITY: group of wireless security descriptors, including
- * encryption types available for setting up a CC/association.
- */
-struct usb_security_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wTotalLength;
- __u8 bNumEncryptionTypes;
-} __attribute__((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_KEY: used with {GET,SET}_SECURITY_DATA; only public keys
- * may be retrieved.
- */
-struct usb_key_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 tTKID[3];
- __u8 bReserved;
- __u8 bKeyData[0];
-} __attribute__((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_ENCRYPTION_TYPE: bundled in DT_SECURITY groups */
-struct usb_encryption_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bEncryptionType;
-#define USB_ENC_TYPE_UNSECURE 0
-#define USB_ENC_TYPE_WIRED 1 /* non-wireless mode */
-#define USB_ENC_TYPE_CCM_1 2 /* aes128/cbc session */
-#define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */
- __u8 bEncryptionValue; /* use in SET_ENCRYPTION */
- __u8 bAuthKeyIndex;
-} __attribute__((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_BOS: group of device-level capabilities */
-struct usb_bos_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wTotalLength;
- __u8 bNumDeviceCaps;
-} __attribute__((packed));
-
-#define USB_DT_BOS_SIZE 5
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE_CAPABILITY: grouped with BOS */
-struct usb_dev_cap_header {
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
-} __attribute__((packed));
-
-#define USB_CAP_TYPE_WIRELESS_USB 1
-
-struct usb_wireless_cap_descriptor { /* Ultra Wide Band */
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
-
- __u8 bmAttributes;
-#define USB_WIRELESS_P2P_DRD (1 << 1)
-#define USB_WIRELESS_BEACON_MASK (3 << 2)
-#define USB_WIRELESS_BEACON_SELF (1 << 2)
-#define USB_WIRELESS_BEACON_DIRECTED (2 << 2)
-#define USB_WIRELESS_BEACON_NONE (3 << 2)
- __le16 wPHYRates; /* bit rates, Mbps */
-#define USB_WIRELESS_PHY_53 (1 << 0) /* always set */
-#define USB_WIRELESS_PHY_80 (1 << 1)
-#define USB_WIRELESS_PHY_107 (1 << 2) /* always set */
-#define USB_WIRELESS_PHY_160 (1 << 3)
-#define USB_WIRELESS_PHY_200 (1 << 4) /* always set */
-#define USB_WIRELESS_PHY_320 (1 << 5)
-#define USB_WIRELESS_PHY_400 (1 << 6)
-#define USB_WIRELESS_PHY_480 (1 << 7)
- __u8 bmTFITXPowerInfo; /* TFI power levels */
- __u8 bmFFITXPowerInfo; /* FFI power levels */
- __le16 bmBandGroup;
- __u8 bReserved;
-} __attribute__((packed));
-
-/* USB 2.0 Extension descriptor */
-#define USB_CAP_TYPE_EXT 2
-
-struct usb_ext_cap_descriptor { /* Link Power Management */
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
- __le32 bmAttributes;
-#define USB_LPM_SUPPORT (1 << 1) /* supports LPM */
-} __attribute__((packed));
-
-#define USB_DT_USB_EXT_CAP_SIZE 7
-
-/*
- * SuperSpeed USB Capability descriptor: Defines the set of SuperSpeed USB
- * specific device level capabilities
- */
-#define USB_SS_CAP_TYPE 3
-struct usb_ss_cap_descriptor { /* Link Power Management */
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
- __u8 bmAttributes;
-#define USB_LTM_SUPPORT (1 << 1) /* supports LTM */
- __le16 wSpeedSupported;
-#define USB_LOW_SPEED_OPERATION (1) /* Low speed operation */
-#define USB_FULL_SPEED_OPERATION (1 << 1) /* Full speed operation */
-#define USB_HIGH_SPEED_OPERATION (1 << 2) /* High speed operation */
-#define USB_5GBPS_OPERATION (1 << 3) /* Operation at 5Gbps */
- __u8 bFunctionalitySupport;
- __u8 bU1devExitLat;
- __le16 bU2DevExitLat;
-} __attribute__((packed));
-
-#define USB_DT_USB_SS_CAP_SIZE 10
-
-/*
- * Container ID Capability descriptor: Defines the instance unique ID used to
- * identify the instance across all operating modes
- */
-#define CONTAINER_ID_TYPE 4
-struct usb_ss_container_id_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
- __u8 bReserved;
- __u8 ContainerID[16]; /* 128-bit number */
-} __attribute__((packed));
-
-#define USB_DT_USB_SS_CONTN_ID_SIZE 20
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with
- * each endpoint descriptor for a wireless device
- */
-struct usb_wireless_ep_comp_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bMaxBurst;
- __u8 bMaxSequence;
- __le16 wMaxStreamDelay;
- __le16 wOverTheAirPacketSize;
- __u8 bOverTheAirInterval;
- __u8 bmCompAttributes;
-#define USB_ENDPOINT_SWITCH_MASK 0x03 /* in bmCompAttributes */
-#define USB_ENDPOINT_SWITCH_NO 0
-#define USB_ENDPOINT_SWITCH_SWITCH 1
-#define USB_ENDPOINT_SWITCH_SCALE 2
-} __attribute__((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_REQ_SET_HANDSHAKE is a four-way handshake used between a wireless
- * host and a device for connection set up, mutual authentication, and
- * exchanging short lived session keys. The handshake depends on a CC.
- */
-struct usb_handshake {
- __u8 bMessageNumber;
- __u8 bStatus;
- __u8 tTKID[3];
- __u8 bReserved;
- __u8 CDID[16];
- __u8 nonce[16];
- __u8 MIC[8];
-} __attribute__((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_REQ_SET_CONNECTION modifies or revokes a connection context (CC).
- * A CC may also be set up using non-wireless secure channels (including
- * wired USB!), and some devices may support CCs with multiple hosts.
- */
-struct usb_connection_context {
- __u8 CHID[16]; /* persistent host id */
- __u8 CDID[16]; /* device id (unique w/in host context) */
- __u8 CK[16]; /* connection key */
-} __attribute__((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/* USB 2.0 defines three speeds, here's how Linux identifies them */
-
-enum usb_device_speed {
- USB_SPEED_UNKNOWN = 0, /* enumerating */
- USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
- USB_SPEED_HIGH, /* usb 2.0 */
- USB_SPEED_WIRELESS, /* wireless (usb 2.5) */
- USB_SPEED_SUPER, /* usb 3.0 */
-};
-
-#ifdef __KERNEL__
-
-/**
- * usb_speed_string() - Returns human readable-name of the speed.
- * @speed: The speed to return human-readable name for. If it's not
- * any of the speeds defined in usb_device_speed enum, string for
- * USB_SPEED_UNKNOWN will be returned.
- */
-extern const char *usb_speed_string(enum usb_device_speed speed);
-
-#endif
-
-enum usb_device_state {
- /* NOTATTACHED isn't in the USB spec, and this state acts
- * the same as ATTACHED ... but it's clearer this way.
- */
- USB_STATE_NOTATTACHED = 0,
-
- /* chapter 9 and authentication (wireless) device states */
- USB_STATE_ATTACHED,
- USB_STATE_POWERED, /* wired */
- USB_STATE_RECONNECTING, /* auth */
- USB_STATE_UNAUTHENTICATED, /* auth */
- USB_STATE_DEFAULT, /* limited function */
- USB_STATE_ADDRESS,
- USB_STATE_CONFIGURED, /* most functions */
-
- USB_STATE_SUSPENDED
-
- /* NOTE: there are actually four different SUSPENDED
- * states, returning to POWERED, DEFAULT, ADDRESS, or
- * CONFIGURED respectively when SOF tokens flow again.
- * At this level there's no difference between L1 and L2
- * suspend states. (L2 being original USB 1.1 suspend.)
- */
-};
-
-/*-------------------------------------------------------------------------*/
-
-/*
- * As per USB compliance update, a device that is actively drawing
- * more than 100mA from USB must report itself as bus-powered in
- * the GetStatus(DEVICE) call.
- * http://compliance.usb.org/index.asp?UpdateFile=Electrical&Format=Standard#34
- */
-#define USB_SELF_POWER_VBUS_MAX_DRAW 100
-
-#endif /* __LINUX_USB_CH9_H */
diff --git a/original/linux/usb/f_accessory.h b/original/linux/usb/f_accessory.h
deleted file mode 100644
index 312f4ba..0000000
--- a/original/linux/usb/f_accessory.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Gadget Function Driver for Android USB accessories
- *
- * Copyright (C) 2011 Google, Inc.
- * Author: Mike Lockwood <lockwood@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_USB_F_ACCESSORY_H
-#define __LINUX_USB_F_ACCESSORY_H
-
-/* Use Google Vendor ID when in accessory mode */
-#define USB_ACCESSORY_VENDOR_ID 0x18D1
-
-
-/* Product ID to use when in accessory mode */
-#define USB_ACCESSORY_PRODUCT_ID 0x2D00
-
-/* Product ID to use when in accessory mode and adb is enabled */
-#define USB_ACCESSORY_ADB_PRODUCT_ID 0x2D01
-
-/* Indexes for strings sent by the host via ACCESSORY_SEND_STRING */
-#define ACCESSORY_STRING_MANUFACTURER 0
-#define ACCESSORY_STRING_MODEL 1
-#define ACCESSORY_STRING_DESCRIPTION 2
-#define ACCESSORY_STRING_VERSION 3
-#define ACCESSORY_STRING_URI 4
-#define ACCESSORY_STRING_SERIAL 5
-
-/* Control request for retrieving device's protocol version
- *
- * requestType: USB_DIR_IN | USB_TYPE_VENDOR
- * request: ACCESSORY_GET_PROTOCOL
- * value: 0
- * index: 0
- * data version number (16 bits little endian)
- * 1 for original accessory support
- * 2 adds audio and HID support
- */
-#define ACCESSORY_GET_PROTOCOL 51
-
-/* Control request for host to send a string to the device
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_SEND_STRING
- * value: 0
- * index: string ID
- * data zero terminated UTF8 string
- *
- * The device can later retrieve these strings via the
- * ACCESSORY_GET_STRING_* ioctls
- */
-#define ACCESSORY_SEND_STRING 52
-
-/* Control request for starting device in accessory mode.
- * The host sends this after setting all its strings to the device.
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_START
- * value: 0
- * index: 0
- * data none
- */
-#define ACCESSORY_START 53
-
-/* Control request for registering a HID device.
- * Upon registering, a unique ID is sent by the accessory in the
- * value parameter. This ID will be used for future commands for
- * the device
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_REGISTER_HID_DEVICE
- * value: Accessory assigned ID for the HID device
- * index: total length of the HID report descriptor
- * data none
- */
-#define ACCESSORY_REGISTER_HID 54
-
-/* Control request for unregistering a HID device.
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_REGISTER_HID
- * value: Accessory assigned ID for the HID device
- * index: 0
- * data none
- */
-#define ACCESSORY_UNREGISTER_HID 55
-
-/* Control request for sending the HID report descriptor.
- * If the HID descriptor is longer than the endpoint zero max packet size,
- * the descriptor will be sent in multiple ACCESSORY_SET_HID_REPORT_DESC
- * commands. The data for the descriptor must be sent sequentially
- * if multiple packets are needed.
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_SET_HID_REPORT_DESC
- * value: Accessory assigned ID for the HID device
- * index: offset of data in descriptor
- * (needed when HID descriptor is too big for one packet)
- * data the HID report descriptor
- */
-#define ACCESSORY_SET_HID_REPORT_DESC 56
-
-/* Control request for sending HID events.
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_SEND_HID_EVENT
- * value: Accessory assigned ID for the HID device
- * index: 0
- * data the HID report for the event
- */
-#define ACCESSORY_SEND_HID_EVENT 57
-
-/* Control request for setting the audio mode.
- *
- * requestType: USB_DIR_OUT | USB_TYPE_VENDOR
- * request: ACCESSORY_SET_AUDIO_MODE
- * value: 0 - no audio
- * 1 - device to host, 44100 16-bit stereo PCM
- * index: 0
- * data the HID report for the event
- */
-#define ACCESSORY_SET_AUDIO_MODE 58
-
-
-
-/* ioctls for retrieving strings set by the host */
-#define ACCESSORY_GET_STRING_MANUFACTURER _IOW('M', 1, char[256])
-#define ACCESSORY_GET_STRING_MODEL _IOW('M', 2, char[256])
-#define ACCESSORY_GET_STRING_DESCRIPTION _IOW('M', 3, char[256])
-#define ACCESSORY_GET_STRING_VERSION _IOW('M', 4, char[256])
-#define ACCESSORY_GET_STRING_URI _IOW('M', 5, char[256])
-#define ACCESSORY_GET_STRING_SERIAL _IOW('M', 6, char[256])
-/* returns 1 if there is a start request pending */
-#define ACCESSORY_IS_START_REQUESTED _IO('M', 7)
-/* returns audio mode (set via the ACCESSORY_SET_AUDIO_MODE control request) */
-#define ACCESSORY_GET_AUDIO_MODE _IO('M', 8)
-
-#endif /* __LINUX_USB_F_ACCESSORY_H */
diff --git a/original/linux/usb/f_mtp.h b/original/linux/usb/f_mtp.h
deleted file mode 100644
index c19cf02..0000000
--- a/original/linux/usb/f_mtp.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Gadget Function Driver for MTP
- *
- * Copyright (C) 2010 Google, Inc.
- * Author: Mike Lockwood <lockwood@android.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __LINUX_USB_F_MTP_H
-#define __LINUX_USB_F_MTP_H
-
-#ifdef __KERNEL__
-
-struct mtp_data_header {
- /* length of packet, including this header */
- uint32_t length;
- /* container type (2 for data packet) */
- uint16_t type;
- /* MTP command code */
- uint16_t command;
- /* MTP transaction ID */
- uint32_t transaction_id;
-};
-
-#endif /* __KERNEL__ */
-
-struct mtp_file_range {
- /* file descriptor for file to transfer */
- int fd;
- /* offset in file for start of transfer */
- loff_t offset;
- /* number of bytes to transfer */
- int64_t length;
- /* MTP command ID for data header,
- * used only for MTP_SEND_FILE_WITH_HEADER
- */
- uint16_t command;
- /* MTP transaction ID for data header,
- * used only for MTP_SEND_FILE_WITH_HEADER
- */
- uint32_t transaction_id;
-};
-
-struct mtp_event {
- /* size of the event */
- size_t length;
- /* event data to send */
- void *data;
-};
-
-/* Sends the specified file range to the host */
-#define MTP_SEND_FILE _IOW('M', 0, struct mtp_file_range)
-/* Receives data from the host and writes it to a file.
- * The file is created if it does not exist.
- */
-#define MTP_RECEIVE_FILE _IOW('M', 1, struct mtp_file_range)
-/* Sends an event to the host via the interrupt endpoint */
-#define MTP_SEND_EVENT _IOW('M', 3, struct mtp_event)
-/* Sends the specified file range to the host,
- * with a 12 byte MTP data packet header at the beginning.
- */
-#define MTP_SEND_FILE_WITH_HEADER _IOW('M', 4, struct mtp_file_range)
-
-#endif /* __LINUX_USB_F_MTP_H */
diff --git a/original/linux/usb/functionfs.h b/original/linux/usb/functionfs.h
deleted file mode 100644
index 7587ef9..0000000
--- a/original/linux/usb/functionfs.h
+++ /dev/null
@@ -1,199 +0,0 @@
-#ifndef __LINUX_FUNCTIONFS_H__
-#define __LINUX_FUNCTIONFS_H__ 1
-
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#include <linux/usb/ch9.h>
-
-
-enum {
- FUNCTIONFS_DESCRIPTORS_MAGIC = 1,
- FUNCTIONFS_STRINGS_MAGIC = 2
-};
-
-
-#ifndef __KERNEL__
-
-/* Descriptor of an non-audio endpoint */
-struct usb_endpoint_descriptor_no_audio {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bEndpointAddress;
- __u8 bmAttributes;
- __le16 wMaxPacketSize;
- __u8 bInterval;
-} __attribute__((packed));
-
-
-/*
- * All numbers must be in little endian order.
- */
-
-struct usb_functionfs_descs_head {
- __le32 magic;
- __le32 length;
- __le32 fs_count;
- __le32 hs_count;
-} __attribute__((packed));
-
-/*
- * Descriptors format:
- *
- * | off | name | type | description |
- * |-----+-----------+--------------+--------------------------------------|
- * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC |
- * | 4 | length | LE32 | length of the whole data chunk |
- * | 8 | fs_count | LE32 | number of full-speed descriptors |
- * | 12 | hs_count | LE32 | number of high-speed descriptors |
- * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors |
- * | | hs_descrs | Descriptor[] | list of high-speed descriptors |
- *
- * descs are just valid USB descriptors and have the following format:
- *
- * | off | name | type | description |
- * |-----+-----------------+------+--------------------------|
- * | 0 | bLength | U8 | length of the descriptor |
- * | 1 | bDescriptorType | U8 | descriptor type |
- * | 2 | payload | | descriptor's payload |
- */
-
-struct usb_functionfs_strings_head {
- __le32 magic;
- __le32 length;
- __le32 str_count;
- __le32 lang_count;
-} __attribute__((packed));
-
-/*
- * Strings format:
- *
- * | off | name | type | description |
- * |-----+------------+-----------------------+----------------------------|
- * | 0 | magic | LE32 | FUNCTIONFS_STRINGS_MAGIC |
- * | 4 | length | LE32 | length of the data chunk |
- * | 8 | str_count | LE32 | number of strings |
- * | 12 | lang_count | LE32 | number of languages |
- * | 16 | stringtab | StringTab[lang_count] | table of strings per lang |
- *
- * For each language there is one stringtab entry (ie. there are lang_count
- * stringtab entires). Each StringTab has following format:
- *
- * | off | name | type | description |
- * |-----+---------+-------------------+------------------------------------|
- * | 0 | lang | LE16 | language code |
- * | 2 | strings | String[str_count] | array of strings in given language |
- *
- * For each string there is one strings entry (ie. there are str_count
- * string entries). Each String is a NUL terminated string encoded in
- * UTF-8.
- */
-
-#endif
-
-
-/*
- * Events are delivered on the ep0 file descriptor, when the user mode driver
- * reads from this file descriptor after writing the descriptors. Don't
- * stop polling this descriptor.
- */
-
-enum usb_functionfs_event_type {
- FUNCTIONFS_BIND,
- FUNCTIONFS_UNBIND,
-
- FUNCTIONFS_ENABLE,
- FUNCTIONFS_DISABLE,
-
- FUNCTIONFS_SETUP,
-
- FUNCTIONFS_SUSPEND,
- FUNCTIONFS_RESUME
-};
-
-/* NOTE: this structure must stay the same size and layout on
- * both 32-bit and 64-bit kernels.
- */
-struct usb_functionfs_event {
- union {
- /* SETUP: packet; DATA phase i/o precedes next event
- *(setup.bmRequestType & USB_DIR_IN) flags direction */
- struct usb_ctrlrequest setup;
- } __attribute__((packed)) u;
-
- /* enum usb_functionfs_event_type */
- __u8 type;
- __u8 _pad[3];
-} __attribute__((packed));
-
-
-/* Endpoint ioctls */
-/* The same as in gadgetfs */
-
-/* IN transfers may be reported to the gadget driver as complete
- * when the fifo is loaded, before the host reads the data;
- * OUT transfers may be reported to the host's "client" driver as
- * complete when they're sitting in the FIFO unread.
- * THIS returns how many bytes are "unclaimed" in the endpoint fifo
- * (needed for precise fault handling, when the hardware allows it)
- */
-#define FUNCTIONFS_FIFO_STATUS _IO('g', 1)
-
-/* discards any unclaimed data in the fifo. */
-#define FUNCTIONFS_FIFO_FLUSH _IO('g', 2)
-
-/* resets endpoint halt+toggle; used to implement set_interface.
- * some hardware (like pxa2xx) can't support this.
- */
-#define FUNCTIONFS_CLEAR_HALT _IO('g', 3)
-
-/* Specific for functionfs */
-
-/*
- * Returns reverse mapping of an interface. Called on EP0. If there
- * is no such interface returns -EDOM. If function is not active
- * returns -ENODEV.
- */
-#define FUNCTIONFS_INTERFACE_REVMAP _IO('g', 128)
-
-/*
- * Returns real bEndpointAddress of an endpoint. If function is not
- * active returns -ENODEV.
- */
-#define FUNCTIONFS_ENDPOINT_REVMAP _IO('g', 129)
-
-
-#ifdef __KERNEL__
-
-struct ffs_data;
-struct usb_composite_dev;
-struct usb_configuration;
-
-
-static int functionfs_init(void) __attribute__((warn_unused_result));
-static void functionfs_cleanup(void);
-
-static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev)
- __attribute__((warn_unused_result, nonnull));
-static void functionfs_unbind(struct ffs_data *ffs)
- __attribute__((nonnull));
-
-static int functionfs_bind_config(struct usb_composite_dev *cdev,
- struct usb_configuration *c,
- struct ffs_data *ffs)
- __attribute__((warn_unused_result, nonnull));
-
-
-static int functionfs_ready_callback(struct ffs_data *ffs)
- __attribute__((warn_unused_result, nonnull));
-static void functionfs_closed_callback(struct ffs_data *ffs)
- __attribute__((nonnull));
-static int functionfs_check_dev_callback(const char *dev_name)
- __attribute__((warn_unused_result, nonnull));
-
-
-#endif
-
-#endif
diff --git a/original/linux/usb_ch9.h b/original/linux/usb_ch9.h
deleted file mode 100644
index c720d10..0000000
--- a/original/linux/usb_ch9.h
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * This file holds USB constants and structures that are needed for USB
- * device APIs. These are used by the USB device model, which is defined
- * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C
- * that need these:
- *
- * - the master/host side Linux-USB kernel driver API;
- * - the "usbfs" user space API; and
- * - the Linux "gadget" slave/device/peripheral side driver API.
- *
- * USB 2.0 adds an additional "On The Go" (OTG) mode, which lets systems
- * act either as a USB master/host or as a USB slave/device. That means
- * the master and slave side APIs benefit from working well together.
- *
- * There's also "Wireless USB", using low power short range radios for
- * peripheral interconnection but otherwise building on the USB framework.
- */
-
-#ifndef __LINUX_USB_CH9_H
-#define __LINUX_USB_CH9_H
-
-#include <linux/types.h> /* __u8 etc */
-
-/*-------------------------------------------------------------------------*/
-
-/* CONTROL REQUEST SUPPORT */
-
-/*
- * USB directions
- *
- * This bit flag is used in endpoint descriptors' bEndpointAddress field.
- * It's also one of three fields in control requests bRequestType.
- */
-#define USB_DIR_OUT 0 /* to device */
-#define USB_DIR_IN 0x80 /* to host */
-
-/*
- * USB types, the second of three bRequestType fields
- */
-#define USB_TYPE_MASK (0x03 << 5)
-#define USB_TYPE_STANDARD (0x00 << 5)
-#define USB_TYPE_CLASS (0x01 << 5)
-#define USB_TYPE_VENDOR (0x02 << 5)
-#define USB_TYPE_RESERVED (0x03 << 5)
-
-/*
- * USB recipients, the third of three bRequestType fields
- */
-#define USB_RECIP_MASK 0x1f
-#define USB_RECIP_DEVICE 0x00
-#define USB_RECIP_INTERFACE 0x01
-#define USB_RECIP_ENDPOINT 0x02
-#define USB_RECIP_OTHER 0x03
-/* From Wireless USB 1.0 */
-#define USB_RECIP_PORT 0x04
-#define USB_RECIP_RPIPE 0x05
-
-/*
- * Standard requests, for the bRequest field of a SETUP packet.
- *
- * These are qualified by the bRequestType field, so that for example
- * TYPE_CLASS or TYPE_VENDOR specific feature flags could be retrieved
- * by a GET_STATUS request.
- */
-#define USB_REQ_GET_STATUS 0x00
-#define USB_REQ_CLEAR_FEATURE 0x01
-#define USB_REQ_SET_FEATURE 0x03
-#define USB_REQ_SET_ADDRESS 0x05
-#define USB_REQ_GET_DESCRIPTOR 0x06
-#define USB_REQ_SET_DESCRIPTOR 0x07
-#define USB_REQ_GET_CONFIGURATION 0x08
-#define USB_REQ_SET_CONFIGURATION 0x09
-#define USB_REQ_GET_INTERFACE 0x0A
-#define USB_REQ_SET_INTERFACE 0x0B
-#define USB_REQ_SYNCH_FRAME 0x0C
-
-#define USB_REQ_SET_ENCRYPTION 0x0D /* Wireless USB */
-#define USB_REQ_GET_ENCRYPTION 0x0E
-#define USB_REQ_RPIPE_ABORT 0x0E
-#define USB_REQ_SET_HANDSHAKE 0x0F
-#define USB_REQ_RPIPE_RESET 0x0F
-#define USB_REQ_GET_HANDSHAKE 0x10
-#define USB_REQ_SET_CONNECTION 0x11
-#define USB_REQ_SET_SECURITY_DATA 0x12
-#define USB_REQ_GET_SECURITY_DATA 0x13
-#define USB_REQ_SET_WUSB_DATA 0x14
-#define USB_REQ_LOOPBACK_DATA_WRITE 0x15
-#define USB_REQ_LOOPBACK_DATA_READ 0x16
-#define USB_REQ_SET_INTERFACE_DS 0x17
-
-/*
- * USB feature flags are written using USB_REQ_{CLEAR,SET}_FEATURE, and
- * are read as a bit array returned by USB_REQ_GET_STATUS. (So there
- * are at most sixteen features of each type.)
- */
-#define USB_DEVICE_SELF_POWERED 0 /* (read only) */
-#define USB_DEVICE_REMOTE_WAKEUP 1 /* dev may initiate wakeup */
-#define USB_DEVICE_TEST_MODE 2 /* (wired high speed only) */
-#define USB_DEVICE_BATTERY 2 /* (wireless) */
-#define USB_DEVICE_B_HNP_ENABLE 3 /* (otg) dev may initiate HNP */
-#define USB_DEVICE_WUSB_DEVICE 3 /* (wireless)*/
-#define USB_DEVICE_A_HNP_SUPPORT 4 /* (otg) RH port supports HNP */
-#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */
-#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
-
-#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
-
-
-/**
- * struct usb_ctrlrequest - SETUP data for a USB device control request
- * @bRequestType: matches the USB bmRequestType field
- * @bRequest: matches the USB bRequest field
- * @wValue: matches the USB wValue field (le16 byte order)
- * @wIndex: matches the USB wIndex field (le16 byte order)
- * @wLength: matches the USB wLength field (le16 byte order)
- *
- * This structure is used to send control requests to a USB device. It matches
- * the different fields of the USB 2.0 Spec section 9.3, table 9-2. See the
- * USB spec for a fuller description of the different fields, and what they are
- * used for.
- *
- * Note that the driver for any interface can issue control requests.
- * For most devices, interfaces don't coordinate with each other, so
- * such requests may be made at any time.
- */
-struct usb_ctrlrequest {
- __u8 bRequestType;
- __u8 bRequest;
- __le16 wValue;
- __le16 wIndex;
- __le16 wLength;
-} __attribute__ ((packed));
-
-/*-------------------------------------------------------------------------*/
-
-/*
- * STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or
- * (rarely) accepted by SET_DESCRIPTOR.
- *
- * Note that all multi-byte values here are encoded in little endian
- * byte order "on the wire". But when exposed through Linux-USB APIs,
- * they've been converted to cpu byte order.
- */
-
-/*
- * Descriptor types ... USB 2.0 spec table 9.5
- */
-#define USB_DT_DEVICE 0x01
-#define USB_DT_CONFIG 0x02
-#define USB_DT_STRING 0x03
-#define USB_DT_INTERFACE 0x04
-#define USB_DT_ENDPOINT 0x05
-#define USB_DT_DEVICE_QUALIFIER 0x06
-#define USB_DT_OTHER_SPEED_CONFIG 0x07
-#define USB_DT_INTERFACE_POWER 0x08
-/* these are from a minor usb 2.0 revision (ECN) */
-#define USB_DT_OTG 0x09
-#define USB_DT_DEBUG 0x0a
-#define USB_DT_INTERFACE_ASSOCIATION 0x0b
-/* these are from the Wireless USB spec */
-#define USB_DT_SECURITY 0x0c
-#define USB_DT_KEY 0x0d
-#define USB_DT_ENCRYPTION_TYPE 0x0e
-#define USB_DT_BOS 0x0f
-#define USB_DT_DEVICE_CAPABILITY 0x10
-#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
-#define USB_DT_WIRE_ADAPTER 0x21
-#define USB_DT_RPIPE 0x22
-
-/* conventional codes for class-specific descriptors */
-#define USB_DT_CS_DEVICE 0x21
-#define USB_DT_CS_CONFIG 0x22
-#define USB_DT_CS_STRING 0x23
-#define USB_DT_CS_INTERFACE 0x24
-#define USB_DT_CS_ENDPOINT 0x25
-
-/* All standard descriptors have these 2 fields at the beginning */
-struct usb_descriptor_header {
- __u8 bLength;
- __u8 bDescriptorType;
-} __attribute__ ((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE: Device descriptor */
-struct usb_device_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 bcdUSB;
- __u8 bDeviceClass;
- __u8 bDeviceSubClass;
- __u8 bDeviceProtocol;
- __u8 bMaxPacketSize0;
- __le16 idVendor;
- __le16 idProduct;
- __le16 bcdDevice;
- __u8 iManufacturer;
- __u8 iProduct;
- __u8 iSerialNumber;
- __u8 bNumConfigurations;
-} __attribute__ ((packed));
-
-#define USB_DT_DEVICE_SIZE 18
-
-
-/*
- * Device and/or Interface Class codes
- * as found in bDeviceClass or bInterfaceClass
- * and defined by www.usb.org documents
- */
-#define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
-#define USB_CLASS_AUDIO 1
-#define USB_CLASS_COMM 2
-#define USB_CLASS_HID 3
-#define USB_CLASS_PHYSICAL 5
-#define USB_CLASS_STILL_IMAGE 6
-#define USB_CLASS_PRINTER 7
-#define USB_CLASS_MASS_STORAGE 8
-#define USB_CLASS_HUB 9
-#define USB_CLASS_CDC_DATA 0x0a
-#define USB_CLASS_CSCID 0x0b /* chip+ smart card */
-#define USB_CLASS_CONTENT_SEC 0x0d /* content security */
-#define USB_CLASS_VIDEO 0x0e
-#define USB_CLASS_WIRELESS_CONTROLLER 0xe0
-#define USB_CLASS_APP_SPEC 0xfe
-#define USB_CLASS_VENDOR_SPEC 0xff
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_CONFIG: Configuration descriptor information.
- *
- * USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the
- * descriptor type is different. Highspeed-capable devices can look
- * different depending on what speed they're currently running. Only
- * devices with a USB_DT_DEVICE_QUALIFIER have any OTHER_SPEED_CONFIG
- * descriptors.
- */
-struct usb_config_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wTotalLength;
- __u8 bNumInterfaces;
- __u8 bConfigurationValue;
- __u8 iConfiguration;
- __u8 bmAttributes;
- __u8 bMaxPower;
-} __attribute__ ((packed));
-
-#define USB_DT_CONFIG_SIZE 9
-
-/* from config descriptor bmAttributes */
-#define USB_CONFIG_ATT_ONE (1 << 7) /* must be set */
-#define USB_CONFIG_ATT_SELFPOWER (1 << 6) /* self powered */
-#define USB_CONFIG_ATT_WAKEUP (1 << 5) /* can wakeup */
-#define USB_CONFIG_ATT_BATTERY (1 << 4) /* battery powered */
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_STRING: String descriptor */
-struct usb_string_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wData[1]; /* UTF-16LE encoded */
-} __attribute__ ((packed));
-
-/* note that "string" zero is special, it holds language codes that
- * the device supports, not Unicode characters.
- */
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_INTERFACE: Interface descriptor */
-struct usb_interface_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bInterfaceNumber;
- __u8 bAlternateSetting;
- __u8 bNumEndpoints;
- __u8 bInterfaceClass;
- __u8 bInterfaceSubClass;
- __u8 bInterfaceProtocol;
- __u8 iInterface;
-} __attribute__ ((packed));
-
-#define USB_DT_INTERFACE_SIZE 9
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_ENDPOINT: Endpoint descriptor */
-struct usb_endpoint_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bEndpointAddress;
- __u8 bmAttributes;
- __le16 wMaxPacketSize;
- __u8 bInterval;
-
- /* NOTE: these two are _only_ in audio endpoints. */
- /* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */
- __u8 bRefresh;
- __u8 bSynchAddress;
-} __attribute__ ((packed));
-
-#define USB_DT_ENDPOINT_SIZE 7
-#define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */
-
-
-/*
- * Endpoints
- */
-#define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */
-#define USB_ENDPOINT_DIR_MASK 0x80
-
-#define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */
-#define USB_ENDPOINT_XFER_CONTROL 0
-#define USB_ENDPOINT_XFER_ISOC 1
-#define USB_ENDPOINT_XFER_BULK 2
-#define USB_ENDPOINT_XFER_INT 3
-#define USB_ENDPOINT_MAX_ADJUSTABLE 0x80
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE_QUALIFIER: Device Qualifier descriptor */
-struct usb_qualifier_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 bcdUSB;
- __u8 bDeviceClass;
- __u8 bDeviceSubClass;
- __u8 bDeviceProtocol;
- __u8 bMaxPacketSize0;
- __u8 bNumConfigurations;
- __u8 bRESERVED;
-} __attribute__ ((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_OTG (from OTG 1.0a supplement) */
-struct usb_otg_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bmAttributes; /* support for HNP, SRP, etc */
-} __attribute__ ((packed));
-
-/* from usb_otg_descriptor.bmAttributes */
-#define USB_OTG_SRP (1 << 0)
-#define USB_OTG_HNP (1 << 1) /* swap host/device roles */
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEBUG: for special highspeed devices, replacing serial console */
-struct usb_debug_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- /* bulk endpoints with 8 byte maxpacket */
- __u8 bDebugInEndpoint;
- __u8 bDebugOutEndpoint;
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_INTERFACE_ASSOCIATION: groups interfaces */
-struct usb_interface_assoc_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bFirstInterface;
- __u8 bInterfaceCount;
- __u8 bFunctionClass;
- __u8 bFunctionSubClass;
- __u8 bFunctionProtocol;
- __u8 iFunction;
-} __attribute__ ((packed));
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_SECURITY: group of wireless security descriptors, including
- * encryption types available for setting up a CC/association.
- */
-struct usb_security_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wTotalLength;
- __u8 bNumEncryptionTypes;
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_KEY: used with {GET,SET}_SECURITY_DATA; only public keys
- * may be retrieved.
- */
-struct usb_key_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 tTKID[3];
- __u8 bReserved;
- __u8 bKeyData[0];
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_ENCRYPTION_TYPE: bundled in DT_SECURITY groups */
-struct usb_encryption_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bEncryptionType;
-#define USB_ENC_TYPE_UNSECURE 0
-#define USB_ENC_TYPE_WIRED 1 /* non-wireless mode */
-#define USB_ENC_TYPE_CCM_1 2 /* aes128/cbc session */
-#define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */
- __u8 bEncryptionValue; /* use in SET_ENCRYPTION */
- __u8 bAuthKeyIndex;
-};
-
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_BOS: group of wireless capabilities */
-struct usb_bos_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __le16 wTotalLength;
- __u8 bNumDeviceCaps;
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_DEVICE_CAPABILITY: grouped with BOS */
-struct usb_dev_cap_header {
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
-};
-
-#define USB_CAP_TYPE_WIRELESS_USB 1
-
-struct usb_wireless_cap_descriptor { /* Ultra Wide Band */
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDevCapabilityType;
-
- __u8 bmAttributes;
-#define USB_WIRELESS_P2P_DRD (1 << 1)
-#define USB_WIRELESS_BEACON_MASK (3 << 2)
-#define USB_WIRELESS_BEACON_SELF (1 << 2)
-#define USB_WIRELESS_BEACON_DIRECTED (2 << 2)
-#define USB_WIRELESS_BEACON_NONE (3 << 2)
- __le16 wPHYRates; /* bit rates, Mbps */
-#define USB_WIRELESS_PHY_53 (1 << 0) /* always set */
-#define USB_WIRELESS_PHY_80 (1 << 1)
-#define USB_WIRELESS_PHY_107 (1 << 2) /* always set */
-#define USB_WIRELESS_PHY_160 (1 << 3)
-#define USB_WIRELESS_PHY_200 (1 << 4) /* always set */
-#define USB_WIRELESS_PHY_320 (1 << 5)
-#define USB_WIRELESS_PHY_400 (1 << 6)
-#define USB_WIRELESS_PHY_480 (1 << 7)
- __u8 bmTFITXPowerInfo; /* TFI power levels */
- __u8 bmFFITXPowerInfo; /* FFI power levels */
- __le16 bmBandGroup;
- __u8 bReserved;
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with
- * each endpoint descriptor for a wireless device
- */
-struct usb_wireless_ep_comp_descriptor {
- __u8 bLength;
- __u8 bDescriptorType;
-
- __u8 bMaxBurst;
- __u8 bMaxSequence;
- __le16 wMaxStreamDelay;
- __le16 wOverTheAirPacketSize;
- __u8 bOverTheAirInterval;
- __u8 bmCompAttributes;
-#define USB_ENDPOINT_SWITCH_MASK 0x03 /* in bmCompAttributes */
-#define USB_ENDPOINT_SWITCH_NO 0
-#define USB_ENDPOINT_SWITCH_SWITCH 1
-#define USB_ENDPOINT_SWITCH_SCALE 2
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_REQ_SET_HANDSHAKE is a four-way handshake used between a wireless
- * host and a device for connection set up, mutual authentication, and
- * exchanging short lived session keys. The handshake depends on a CC.
- */
-struct usb_handshake {
- __u8 bMessageNumber;
- __u8 bStatus;
- __u8 tTKID[3];
- __u8 bReserved;
- __u8 CDID[16];
- __u8 nonce[16];
- __u8 MIC[8];
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB_REQ_SET_CONNECTION modifies or revokes a connection context (CC).
- * A CC may also be set up using non-wireless secure channels (including
- * wired USB!), and some devices may support CCs with multiple hosts.
- */
-struct usb_connection_context {
- __u8 CHID[16]; /* persistent host id */
- __u8 CDID[16]; /* device id (unique w/in host context) */
- __u8 CK[16]; /* connection key */
-};
-
-/*-------------------------------------------------------------------------*/
-
-/* USB 2.0 defines three speeds, here's how Linux identifies them */
-
-enum usb_device_speed {
- USB_SPEED_UNKNOWN = 0, /* enumerating */
- USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */
- USB_SPEED_HIGH, /* usb 2.0 */
- USB_SPEED_VARIABLE, /* wireless (usb 2.5) */
-};
-
-enum usb_device_state {
- /* NOTATTACHED isn't in the USB spec, and this state acts
- * the same as ATTACHED ... but it's clearer this way.
- */
- USB_STATE_NOTATTACHED = 0,
-
- /* chapter 9 and authentication (wireless) device states */
- USB_STATE_ATTACHED,
- USB_STATE_POWERED, /* wired */
- USB_STATE_UNAUTHENTICATED, /* auth */
- USB_STATE_RECONNECTING, /* auth */
- USB_STATE_DEFAULT, /* limited function */
- USB_STATE_ADDRESS,
- USB_STATE_CONFIGURED, /* most functions */
-
- USB_STATE_SUSPENDED
-
- /* NOTE: there are actually four different SUSPENDED
- * states, returning to POWERED, DEFAULT, ADDRESS, or
- * CONFIGURED respectively when SOF tokens flow again.
- */
-};
-
-#endif /* __LINUX_USB_CH9_H */
diff --git a/original/linux/usbdevice_fs.h b/original/linux/usbdevice_fs.h
deleted file mode 100644
index 7b7aadb..0000000
--- a/original/linux/usbdevice_fs.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*****************************************************************************/
-
-/*
- * usbdevice_fs.h -- USB device file system.
- *
- * Copyright (C) 2000
- * Thomas Sailer (sailer@ife.ee.ethz.ch)
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * History:
- * 0.1 04.01.2000 Created
- *
- * $Id: usbdevice_fs.h,v 1.1 2000/01/06 18:40:41 tom Exp $
- */
-
-/*****************************************************************************/
-
-#ifndef _LINUX_USBDEVICE_FS_H
-#define _LINUX_USBDEVICE_FS_H
-
-#include <linux/types.h>
-
-/* --------------------------------------------------------------------- */
-
-#define USBDEVICE_SUPER_MAGIC 0x9fa2
-
-/* usbdevfs ioctl codes */
-
-struct usbdevfs_ctrltransfer {
- __u8 bRequestType;
- __u8 bRequest;
- __u16 wValue;
- __u16 wIndex;
- __u16 wLength;
- __u32 timeout; /* in milliseconds */
- void __user *data;
-};
-
-struct usbdevfs_bulktransfer {
- unsigned int ep;
- unsigned int len;
- unsigned int timeout; /* in milliseconds */
- void __user *data;
-};
-
-struct usbdevfs_setinterface {
- unsigned int interface;
- unsigned int altsetting;
-};
-
-struct usbdevfs_disconnectsignal {
- unsigned int signr;
- void __user *context;
-};
-
-#define USBDEVFS_MAXDRIVERNAME 255
-
-struct usbdevfs_getdriver {
- unsigned int interface;
- char driver[USBDEVFS_MAXDRIVERNAME + 1];
-};
-
-struct usbdevfs_connectinfo {
- unsigned int devnum;
- unsigned char slow;
-};
-
-#define USBDEVFS_URB_SHORT_NOT_OK 1
-#define USBDEVFS_URB_ISO_ASAP 2
-
-#define USBDEVFS_URB_TYPE_ISO 0
-#define USBDEVFS_URB_TYPE_INTERRUPT 1
-#define USBDEVFS_URB_TYPE_CONTROL 2
-#define USBDEVFS_URB_TYPE_BULK 3
-
-struct usbdevfs_iso_packet_desc {
- unsigned int length;
- unsigned int actual_length;
- unsigned int status;
-};
-
-struct usbdevfs_urb {
- unsigned char type;
- unsigned char endpoint;
- int status;
- unsigned int flags;
- void __user *buffer;
- int buffer_length;
- int actual_length;
- int start_frame;
- int number_of_packets;
- int error_count;
- unsigned int signr; /* signal to be sent on error, -1 if none should be sent */
- void *usercontext;
- struct usbdevfs_iso_packet_desc iso_frame_desc[0];
-};
-
-/* ioctls for talking directly to drivers */
-struct usbdevfs_ioctl {
- int ifno; /* interface 0..N ; negative numbers reserved */
- int ioctl_code; /* MUST encode size + direction of data so the
- * macros in <asm/ioctl.h> give correct values */
- void __user *data; /* param buffer (in, or out) */
-};
-
-/* You can do most things with hubs just through control messages,
- * except find out what device connects to what port. */
-struct usbdevfs_hub_portinfo {
- char nports; /* number of downstream ports in this hub */
- char port [127]; /* e.g. port 3 connects to device 27 */
-};
-
-#ifdef __KERNEL__
-#ifdef CONFIG_COMPAT
-#include <linux/compat.h>
-struct usbdevfs_urb32 {
- unsigned char type;
- unsigned char endpoint;
- compat_int_t status;
- compat_uint_t flags;
- compat_caddr_t buffer;
- compat_int_t buffer_length;
- compat_int_t actual_length;
- compat_int_t start_frame;
- compat_int_t number_of_packets;
- compat_int_t error_count;
- compat_uint_t signr;
- compat_caddr_t usercontext; /* unused */
- struct usbdevfs_iso_packet_desc iso_frame_desc[0];
-};
-
-struct usbdevfs_ioctl32 {
- s32 ifno;
- s32 ioctl_code;
- compat_caddr_t data;
-};
-#endif
-#endif /* __KERNEL__ */
-
-#define USBDEVFS_CONTROL _IOWR('U', 0, struct usbdevfs_ctrltransfer)
-#define USBDEVFS_BULK _IOWR('U', 2, struct usbdevfs_bulktransfer)
-#define USBDEVFS_RESETEP _IOR('U', 3, unsigned int)
-#define USBDEVFS_SETINTERFACE _IOR('U', 4, struct usbdevfs_setinterface)
-#define USBDEVFS_SETCONFIGURATION _IOR('U', 5, unsigned int)
-#define USBDEVFS_GETDRIVER _IOW('U', 8, struct usbdevfs_getdriver)
-#define USBDEVFS_SUBMITURB _IOR('U', 10, struct usbdevfs_urb)
-#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32)
-#define USBDEVFS_DISCARDURB _IO('U', 11)
-#define USBDEVFS_REAPURB _IOW('U', 12, void *)
-#define USBDEVFS_REAPURB32 _IOW('U', 12, u32)
-#define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *)
-#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32)
-#define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal)
-#define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int)
-#define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int)
-#define USBDEVFS_CONNECTINFO _IOW('U', 17, struct usbdevfs_connectinfo)
-#define USBDEVFS_IOCTL _IOWR('U', 18, struct usbdevfs_ioctl)
-#define USBDEVFS_IOCTL32 _IOWR('U', 18, struct usbdevfs_ioctl32)
-#define USBDEVFS_HUB_PORTINFO _IOR('U', 19, struct usbdevfs_hub_portinfo)
-#define USBDEVFS_RESET _IO('U', 20)
-#define USBDEVFS_CLEAR_HALT _IOR('U', 21, unsigned int)
-#define USBDEVFS_DISCONNECT _IO('U', 22)
-#define USBDEVFS_CONNECT _IO('U', 23)
-#endif /* _LINUX_USBDEVICE_FS_H */
diff --git a/original/linux/user.h b/original/linux/user.h
deleted file mode 100644
index 68daf84..0000000
--- a/original/linux/user.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm/user.h>
diff --git a/original/linux/utime.h b/original/linux/utime.h
deleted file mode 100644
index c6bf27b..0000000
--- a/original/linux/utime.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _LINUX_UTIME_H
-#define _LINUX_UTIME_H
-
-struct utimbuf {
- time_t actime;
- time_t modtime;
-};
-
-#endif
diff --git a/original/linux/utsname.h b/original/linux/utsname.h
deleted file mode 100644
index 13e1da0..0000000
--- a/original/linux/utsname.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef _LINUX_UTSNAME_H
-#define _LINUX_UTSNAME_H
-
-#define __OLD_UTS_LEN 8
-
-struct oldold_utsname {
- char sysname[9];
- char nodename[9];
- char release[9];
- char version[9];
- char machine[9];
-};
-
-#define __NEW_UTS_LEN 64
-
-struct old_utsname {
- char sysname[65];
- char nodename[65];
- char release[65];
- char version[65];
- char machine[65];
-};
-
-struct new_utsname {
- char sysname[65];
- char nodename[65];
- char release[65];
- char version[65];
- char machine[65];
- char domainname[65];
-};
-
-extern struct new_utsname system_utsname;
-
-extern struct rw_semaphore uts_sem;
-#endif
diff --git a/original/linux/v4l2-mediabus.h b/original/linux/v4l2-mediabus.h
deleted file mode 100644
index 5ea7f75..0000000
--- a/original/linux/v4l2-mediabus.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Media Bus API header
- *
- * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
- *
- * 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.
- */
-
-#ifndef __LINUX_V4L2_MEDIABUS_H
-#define __LINUX_V4L2_MEDIABUS_H
-
-#include <linux/types.h>
-#include <linux/videodev2.h>
-
-/*
- * These pixel codes uniquely identify data formats on the media bus. Mostly
- * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is
- * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the
- * data format is fixed. Additionally, "2X8" means that one pixel is transferred
- * in two 8-bit samples, "BE" or "LE" specify in which order those samples are
- * transferred over the bus: "LE" means that the least significant bits are
- * transferred first, "BE" means that the most significant bits are transferred
- * first, and "PADHI" and "PADLO" define which bits - low or high, in the
- * incomplete high byte, are filled with padding bits.
- *
- * The pixel codes are grouped by type, bus_width, bits per component, samples
- * per pixel and order of subsamples. Numerical values are sorted using generic
- * numerical sort order (8 thus comes before 10).
- *
- * As their value can't change when a new pixel code is inserted in the
- * enumeration, the pixel codes are explicitly given a numerical value. The next
- * free values for each category are listed below, update them when inserting
- * new pixel codes.
- */
-enum v4l2_mbus_pixelcode {
- V4L2_MBUS_FMT_FIXED = 0x0001,
-
- /* RGB - next is 0x1009 */
- V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001,
- V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002,
- V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003,
- V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004,
- V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005,
- V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006,
- V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007,
- V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008,
-
- /* YUV (including grey) - next is 0x2014 */
- V4L2_MBUS_FMT_Y8_1X8 = 0x2001,
- V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002,
- V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003,
- V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004,
- V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005,
- V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006,
- V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007,
- V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008,
- V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009,
- V4L2_MBUS_FMT_Y10_1X10 = 0x200a,
- V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b,
- V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c,
- V4L2_MBUS_FMT_Y12_1X12 = 0x2013,
- V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f,
- V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010,
- V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011,
- V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012,
- V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d,
- V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e,
-
- /* Bayer - next is 0x3015 */
- V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001,
- V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013,
- V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002,
- V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014,
- V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b,
- V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c,
- V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009,
- V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d,
- V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003,
- V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004,
- V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005,
- V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006,
- V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007,
- V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e,
- V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a,
- V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f,
- V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008,
- V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010,
- V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011,
- V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012,
-
- /* JPEG compressed formats - next is 0x4002 */
- V4L2_MBUS_FMT_JPEG_1X8 = 0x4001,
-};
-
-/**
- * struct v4l2_mbus_framefmt - frame format on the media bus
- * @width: frame width
- * @height: frame height
- * @code: data format code (from enum v4l2_mbus_pixelcode)
- * @field: used interlacing type (from enum v4l2_field)
- * @colorspace: colorspace of the data (from enum v4l2_colorspace)
- */
-struct v4l2_mbus_framefmt {
- __u32 width;
- __u32 height;
- __u32 code;
- __u32 field;
- __u32 colorspace;
- __u32 reserved[7];
-};
-
-#endif
diff --git a/original/linux/version.h b/original/linux/version.h
deleted file mode 100644
index 3ce6c8a..0000000
--- a/original/linux/version.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LINUX_VERSION_CODE 132626
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/original/linux/vfs.h b/original/linux/vfs.h
deleted file mode 100644
index e701d05..0000000
--- a/original/linux/vfs.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _LINUX_VFS_H
-#define _LINUX_VFS_H
-
-#include <linux/statfs.h>
-
-#endif
diff --git a/original/linux/videodev.h b/original/linux/videodev.h
deleted file mode 100644
index 837f392..0000000
--- a/original/linux/videodev.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Video for Linux version 1 - OBSOLETE
- *
- * Header file for v4l1 drivers and applications, for
- * Linux kernels 2.2.x or 2.4.x.
- *
- * Provides header for legacy drivers and applications
- *
- * See http://linuxtv.org for more info
- *
- */
-#ifndef __LINUX_VIDEODEV_H
-#define __LINUX_VIDEODEV_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-#include <linux/videodev2.h>
-
-#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__)
-
-#define VID_TYPE_CAPTURE 1 /* Can capture */
-#define VID_TYPE_TUNER 2 /* Can tune */
-#define VID_TYPE_TELETEXT 4 /* Does teletext */
-#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
-#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
-#define VID_TYPE_CLIPPING 32 /* Can clip */
-#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
-#define VID_TYPE_SCALES 128 /* Scalable */
-#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
-#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
-#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
-#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
-#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
-#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
-
-struct video_capability
-{
- char name[32];
- int type;
- int channels; /* Num channels */
- int audios; /* Num audio devices */
- int maxwidth; /* Supported width */
- int maxheight; /* And height */
- int minwidth; /* Supported width */
- int minheight; /* And height */
-};
-
-
-struct video_channel
-{
- int channel;
- char name[32];
- int tuners;
- __u32 flags;
-#define VIDEO_VC_TUNER 1 /* Channel has a tuner */
-#define VIDEO_VC_AUDIO 2 /* Channel has audio */
- __u16 type;
-#define VIDEO_TYPE_TV 1
-#define VIDEO_TYPE_CAMERA 2
- __u16 norm; /* Norm set by channel */
-};
-
-struct video_tuner
-{
- int tuner;
- char name[32];
- unsigned long rangelow, rangehigh; /* Tuner range */
- __u32 flags;
-#define VIDEO_TUNER_PAL 1
-#define VIDEO_TUNER_NTSC 2
-#define VIDEO_TUNER_SECAM 4
-#define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */
-#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */
-#define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */
-#define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */
-#define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */
- __u16 mode; /* PAL/NTSC/SECAM/OTHER */
-#define VIDEO_MODE_PAL 0
-#define VIDEO_MODE_NTSC 1
-#define VIDEO_MODE_SECAM 2
-#define VIDEO_MODE_AUTO 3
- __u16 signal; /* Signal strength 16bit scale */
-};
-
-struct video_picture
-{
- __u16 brightness;
- __u16 hue;
- __u16 colour;
- __u16 contrast;
- __u16 whiteness; /* Black and white only */
- __u16 depth; /* Capture depth */
- __u16 palette; /* Palette in use */
-#define VIDEO_PALETTE_GREY 1 /* Linear greyscale */
-#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
-#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
-#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
-#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
-#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
-#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
-#define VIDEO_PALETTE_YUYV 8
-#define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */
-#define VIDEO_PALETTE_YUV420 10
-#define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */
-#define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */
-#define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */
-#define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */
-#define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */
-#define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */
-#define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */
-#define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */
-};
-
-struct video_audio
-{
- int audio; /* Audio channel */
- __u16 volume; /* If settable */
- __u16 bass, treble;
- __u32 flags;
-#define VIDEO_AUDIO_MUTE 1
-#define VIDEO_AUDIO_MUTABLE 2
-#define VIDEO_AUDIO_VOLUME 4
-#define VIDEO_AUDIO_BASS 8
-#define VIDEO_AUDIO_TREBLE 16
-#define VIDEO_AUDIO_BALANCE 32
- char name[16];
-#define VIDEO_SOUND_MONO 1
-#define VIDEO_SOUND_STEREO 2
-#define VIDEO_SOUND_LANG1 4
-#define VIDEO_SOUND_LANG2 8
- __u16 mode;
- __u16 balance; /* Stereo balance */
- __u16 step; /* Step actual volume uses */
-};
-
-struct video_clip
-{
- __s32 x,y;
- __s32 width, height;
- struct video_clip *next; /* For user use/driver use only */
-};
-
-struct video_window
-{
- __u32 x,y; /* Position of window */
- __u32 width,height; /* Its size */
- __u32 chromakey;
- __u32 flags;
- struct video_clip __user *clips; /* Set only */
- int clipcount;
-#define VIDEO_WINDOW_INTERLACE 1
-#define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */
-#define VIDEO_CLIP_BITMAP -1
-/* bitmap is 1024x625, a '1' bit represents a clipped pixel */
-#define VIDEO_CLIPMAP_SIZE (128 * 625)
-};
-
-struct video_capture
-{
- __u32 x,y; /* Offsets into image */
- __u32 width, height; /* Area to capture */
- __u16 decimation; /* Decimation divider */
- __u16 flags; /* Flags for capture */
-#define VIDEO_CAPTURE_ODD 0 /* Temporal */
-#define VIDEO_CAPTURE_EVEN 1
-};
-
-struct video_buffer
-{
- void *base;
- int height,width;
- int depth;
- int bytesperline;
-};
-
-struct video_mmap
-{
- unsigned int frame; /* Frame (0 - n) for double buffer */
- int height,width;
- unsigned int format; /* should be VIDEO_PALETTE_* */
-};
-
-struct video_key
-{
- __u8 key[8];
- __u32 flags;
-};
-
-struct video_mbuf
-{
- int size; /* Total memory to map */
- int frames; /* Frames */
- int offsets[VIDEO_MAX_FRAME];
-};
-
-#define VIDEO_NO_UNIT (-1)
-
-struct video_unit
-{
- int video; /* Video minor */
- int vbi; /* VBI minor */
- int radio; /* Radio minor */
- int audio; /* Audio minor */
- int teletext; /* Teletext minor */
-};
-
-struct vbi_format {
- __u32 sampling_rate; /* in Hz */
- __u32 samples_per_line;
- __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */
- __s32 start[2]; /* starting line for each frame */
- __u32 count[2]; /* count of lines for each frame */
- __u32 flags;
-#define VBI_UNSYNC 1 /* can distingues between top/bottom field */
-#define VBI_INTERLACED 2 /* lines are interlaced */
-};
-
-/* video_info is biased towards hardware mpeg encode/decode */
-/* but it could apply generically to any hardware compressor/decompressor */
-struct video_info
-{
- __u32 frame_count; /* frames output since decode/encode began */
- __u32 h_size; /* current unscaled horizontal size */
- __u32 v_size; /* current unscaled veritcal size */
- __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */
- __u32 picture_type; /* current picture type */
- __u32 temporal_reference; /* current temporal reference */
- __u8 user_data[256]; /* user data last found in compressed stream */
- /* user_data[0] contains user data flags, user_data[1] has count */
-};
-
-/* generic structure for setting playback modes */
-struct video_play_mode
-{
- int mode;
- int p1;
- int p2;
-};
-
-/* for loading microcode / fpga programming */
-struct video_code
-{
- char loadwhat[16]; /* name or tag of file being passed */
- int datasize;
- __u8 *data;
-};
-
-#define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */
-#define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */
-#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */
-#define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */
-#define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */
-#define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */
-#define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */
-#define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */
-#define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */
-#define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
-#define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */
-#define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */
-#define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */
-#define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */
-#define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */
-#define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */
-#define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */
-#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */
-#define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */
-#define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */
-#define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */
-#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */
-#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */
-#define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */
-#define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */
-#define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */
-#define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */
-#define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */
-#define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */
-
-
-#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
-
-/* VIDIOCSWRITEMODE */
-#define VID_WRITE_MPEG_AUD 0
-#define VID_WRITE_MPEG_VID 1
-#define VID_WRITE_OSD 2
-#define VID_WRITE_TTX 3
-#define VID_WRITE_CC 4
-#define VID_WRITE_MJPEG 5
-
-/* VIDIOCSPLAYMODE */
-#define VID_PLAY_VID_OUT_MODE 0
- /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
-#define VID_PLAY_GENLOCK 1
- /* p1: 0 = OFF, 1 = ON */
- /* p2: GENLOCK FINE DELAY value */
-#define VID_PLAY_NORMAL 2
-#define VID_PLAY_PAUSE 3
-#define VID_PLAY_SINGLE_FRAME 4
-#define VID_PLAY_FAST_FORWARD 5
-#define VID_PLAY_SLOW_MOTION 6
-#define VID_PLAY_IMMEDIATE_NORMAL 7
-#define VID_PLAY_SWITCH_CHANNELS 8
-#define VID_PLAY_FREEZE_FRAME 9
-#define VID_PLAY_STILL_MODE 10
-#define VID_PLAY_MASTER_MODE 11
- /* p1: see below */
-#define VID_PLAY_MASTER_NONE 1
-#define VID_PLAY_MASTER_VIDEO 2
-#define VID_PLAY_MASTER_AUDIO 3
-#define VID_PLAY_ACTIVE_SCANLINES 12
- /* p1 = first active; p2 = last active */
-#define VID_PLAY_RESET 13
-#define VID_PLAY_END_MARK 14
-
-#endif /* CONFIG_VIDEO_V4L1_COMPAT */
-
-#endif /* __LINUX_VIDEODEV_H */
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
diff --git a/original/linux/videodev2.h b/original/linux/videodev2.h
deleted file mode 100644
index 66b68d0..0000000
--- a/original/linux/videodev2.h
+++ /dev/null
@@ -1,2573 +0,0 @@
-/*
- * Video for Linux Two header file
- *
- * Copyright (C) 1999-2007 the contributors
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * Alternatively you can redistribute this file under the terms of the
- * BSD license as stated below:
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. The names of its contributors may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Header file for v4l or V4L2 drivers and applications
- * with public API.
- * All kernel-specific stuff were moved to media/v4l2-dev.h, so
- * no #if __KERNEL tests are allowed here
- *
- * See http://linuxtv.org for more info
- *
- * Author: Bill Dirks <bill@thedirks.org>
- * Justin Schoeman
- * Hans Verkuil <hverkuil@xs4all.nl>
- * et al.
- */
-#ifndef __LINUX_VIDEODEV2_H
-#define __LINUX_VIDEODEV2_H
-
-#ifdef __KERNEL__
-#include <linux/time.h> /* need struct timeval */
-#else
-#include <sys/time.h>
-#endif
-#include <linux/compiler.h>
-#include <linux/ioctl.h>
-#include <linux/types.h>
-
-/*
- * Common stuff for both V4L1 and V4L2
- * Moved from videodev.h
- */
-#define VIDEO_MAX_FRAME 32
-#define VIDEO_MAX_PLANES 8
-
-#ifndef __KERNEL__
-
-/* These defines are V4L1 specific and should not be used with the V4L2 API!
- They will be removed from this header in the future. */
-
-#define VID_TYPE_CAPTURE 1 /* Can capture */
-#define VID_TYPE_TUNER 2 /* Can tune */
-#define VID_TYPE_TELETEXT 4 /* Does teletext */
-#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
-#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
-#define VID_TYPE_CLIPPING 32 /* Can clip */
-#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
-#define VID_TYPE_SCALES 128 /* Scalable */
-#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
-#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
-#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
-#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
-#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
-#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
-#endif
-
-/*
- * M I S C E L L A N E O U S
- */
-
-/* Four-character-code (FOURCC) */
-#define v4l2_fourcc(a, b, c, d)\
- ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
-
-/*
- * E N U M S
- */
-enum v4l2_field {
- V4L2_FIELD_ANY = 0, /* driver can choose from none,
- top, bottom, interlaced
- depending on whatever it thinks
- is approximate ... */
- V4L2_FIELD_NONE = 1, /* this device has no fields ... */
- V4L2_FIELD_TOP = 2, /* top field only */
- V4L2_FIELD_BOTTOM = 3, /* bottom field only */
- V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
- V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
- buffer, top-bottom order */
- V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
- V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
- separate buffers */
- V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
- first and the top field is
- transmitted first */
- V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
- first and the bottom field is
- transmitted first */
-};
-#define V4L2_FIELD_HAS_TOP(field) \
- ((field) == V4L2_FIELD_TOP ||\
- (field) == V4L2_FIELD_INTERLACED ||\
- (field) == V4L2_FIELD_INTERLACED_TB ||\
- (field) == V4L2_FIELD_INTERLACED_BT ||\
- (field) == V4L2_FIELD_SEQ_TB ||\
- (field) == V4L2_FIELD_SEQ_BT)
-#define V4L2_FIELD_HAS_BOTTOM(field) \
- ((field) == V4L2_FIELD_BOTTOM ||\
- (field) == V4L2_FIELD_INTERLACED ||\
- (field) == V4L2_FIELD_INTERLACED_TB ||\
- (field) == V4L2_FIELD_INTERLACED_BT ||\
- (field) == V4L2_FIELD_SEQ_TB ||\
- (field) == V4L2_FIELD_SEQ_BT)
-#define V4L2_FIELD_HAS_BOTH(field) \
- ((field) == V4L2_FIELD_INTERLACED ||\
- (field) == V4L2_FIELD_INTERLACED_TB ||\
- (field) == V4L2_FIELD_INTERLACED_BT ||\
- (field) == V4L2_FIELD_SEQ_TB ||\
- (field) == V4L2_FIELD_SEQ_BT)
-
-enum v4l2_buf_type {
- V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
- V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
- V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
- V4L2_BUF_TYPE_VBI_CAPTURE = 4,
- V4L2_BUF_TYPE_VBI_OUTPUT = 5,
- V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
- V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
-#if 1
- /* Experimental */
- V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
-#endif
- V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
- V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
- V4L2_BUF_TYPE_PRIVATE = 0x80,
-};
-
-#define V4L2_TYPE_IS_MULTIPLANAR(type) \
- ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
- || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
-
-#define V4L2_TYPE_IS_OUTPUT(type) \
- ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \
- || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \
- || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \
- || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \
- || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \
- || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT)
-
-enum v4l2_tuner_type {
- V4L2_TUNER_RADIO = 1,
- V4L2_TUNER_ANALOG_TV = 2,
- V4L2_TUNER_DIGITAL_TV = 3,
-};
-
-enum v4l2_memory {
- V4L2_MEMORY_MMAP = 1,
- V4L2_MEMORY_USERPTR = 2,
- V4L2_MEMORY_OVERLAY = 3,
-};
-
-/* see also http://vektor.theorem.ca/graphics/ycbcr/ */
-enum v4l2_colorspace {
- /* ITU-R 601 -- broadcast NTSC/PAL */
- V4L2_COLORSPACE_SMPTE170M = 1,
-
- /* 1125-Line (US) HDTV */
- V4L2_COLORSPACE_SMPTE240M = 2,
-
- /* HD and modern captures. */
- V4L2_COLORSPACE_REC709 = 3,
-
- /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */
- V4L2_COLORSPACE_BT878 = 4,
-
- /* These should be useful. Assume 601 extents. */
- V4L2_COLORSPACE_470_SYSTEM_M = 5,
- V4L2_COLORSPACE_470_SYSTEM_BG = 6,
-
- /* I know there will be cameras that send this. So, this is
- * unspecified chromaticities and full 0-255 on each of the
- * Y'CbCr components
- */
- V4L2_COLORSPACE_JPEG = 7,
-
- /* For RGB colourspaces, this is probably a good start. */
- V4L2_COLORSPACE_SRGB = 8,
-};
-
-enum v4l2_priority {
- V4L2_PRIORITY_UNSET = 0, /* not initialized */
- V4L2_PRIORITY_BACKGROUND = 1,
- V4L2_PRIORITY_INTERACTIVE = 2,
- V4L2_PRIORITY_RECORD = 3,
- V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
-};
-
-struct v4l2_rect {
- __s32 left;
- __s32 top;
- __s32 width;
- __s32 height;
-};
-
-struct v4l2_fract {
- __u32 numerator;
- __u32 denominator;
-};
-
-/**
- * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP
- *
- * @driver: name of the driver module (e.g. "bttv")
- * @card: name of the card (e.g. "Hauppauge WinTV")
- * @bus_info: name of the bus (e.g. "PCI:" + pci_name(pci_dev) )
- * @version: KERNEL_VERSION
- * @capabilities: capabilities of the physical device as a whole
- * @device_caps: capabilities accessed via this particular device (node)
- * @reserved: reserved fields for future extensions
- */
-struct v4l2_capability {
- __u8 driver[16];
- __u8 card[32];
- __u8 bus_info[32];
- __u32 version;
- __u32 capabilities;
- __u32 device_caps;
- __u32 reserved[3];
-};
-
-/* Values for 'capabilities' field */
-#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
-#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */
-#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */
-#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */
-#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */
-#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
-#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
-#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
-#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */
-#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
-#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
-
-/* Is a video capture device that supports multiplanar formats */
-#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000
-/* Is a video output device that supports multiplanar formats */
-#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000
-
-#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
-#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
-#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
-#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
-
-#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
-#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
-#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
-
-#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
-
-/*
- * V I D E O I M A G E F O R M A T
- */
-struct v4l2_pix_format {
- __u32 width;
- __u32 height;
- __u32 pixelformat;
- enum v4l2_field field;
- __u32 bytesperline; /* for padding, zero if unused */
- __u32 sizeimage;
- enum v4l2_colorspace colorspace;
- __u32 priv; /* private data, depends on pixelformat */
-};
-
-/* Pixel format FOURCC depth Description */
-
-/* RGB formats */
-#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
-#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
-#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
-#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
-#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
-#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
-#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */
-#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
-#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
-#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
-#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
-
-/* Grey formats */
-#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
-#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */
-#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */
-#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
-#define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */
-#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
-
-/* Grey bit-packed formats */
-#define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */
-
-/* Palette formats */
-#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
-
-/* Luminance+Chrominance formats */
-#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */
-#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */
-#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */
-#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
-#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
-#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */
-#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
-#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */
-#define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16 YVU411 planar */
-#define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */
-#define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */
-#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
-#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
-#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
-#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
-#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
-#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
-#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
-#define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv interleaved */
-
-/* two planes -- one Y, one Cr + Cb interleaved */
-#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
-#define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */
-#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
-#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
-#define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */
-#define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */
-
-/* two non contiguous planes - one Y, one Cr + Cb interleaved */
-#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
-#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
-
-/* three non contiguous planes - Y, Cb, Cr */
-#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
-
-/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
-#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
-#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
-#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
-#define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */
-#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */
-#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
-#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
-#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
-#define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */
-#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
-#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
-#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
- /* 10bit raw bayer DPCM compressed to 8 bits */
-#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
- /*
- * 10bit raw bayer, expanded to 16 bits
- * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
- */
-#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
-
-/* compressed formats */
-#define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */
-#define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */
-#define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */
-#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
-#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
-#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
-#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
-#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
-#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
-#define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 ES */
-#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
-#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
-#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
-#define V4L2_PIX_FMT_DIVX_311 v4l2_fourcc('D', 'I', 'V', '3') /* DIVX311 */
-#define V4L2_PIX_FMT_DIVX v4l2_fourcc('D', 'I', 'V', 'X') /* DIVX */
-#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* ON2 VP8 stream */
-
-/* Vendor-specific formats */
-#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
-#define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
-#define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
-#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */
-#define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */
-#define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */
-#define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */
-#define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') /* YUYV per line */
-#define V4L2_PIX_FMT_SPCA505 v4l2_fourcc('S', '5', '0', '5') /* YYUV per line */
-#define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */
-#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
-#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
-#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
-#define V4L2_PIX_FMT_JL2005BCD v4l2_fourcc('J', 'L', '2', '0') /* compressed RGGB bayer */
-#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */
-#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
-#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
-#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
-#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
-#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
-#define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
-#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */
-#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
-#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
-/* se401 janggu compressed rgb */
-#define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1')
-/* Composite stats */
-#define V4L2_PIX_FMT_STATS_COMB v4l2_fourcc('S', 'T', 'C', 'M')
-/* AEC stats */
-#define V4L2_PIX_FMT_STATS_AE v4l2_fourcc('S', 'T', 'A', 'E')
-/* AF stats */
-#define V4L2_PIX_FMT_STATS_AF v4l2_fourcc('S', 'T', 'A', 'F')
-/* AWB stats */
-#define V4L2_PIX_FMT_STATS_AWB v4l2_fourcc('S', 'T', 'W', 'B')
-/* IHIST stats */
-#define V4L2_PIX_FMT_STATS_IHST v4l2_fourcc('I', 'H', 'S', 'T')
-/* Column count stats */
-#define V4L2_PIX_FMT_STATS_CS v4l2_fourcc('S', 'T', 'C', 'S')
-/* Row count stats */
-#define V4L2_PIX_FMT_STATS_RS v4l2_fourcc('S', 'T', 'R', 'S')
-/* Bayer Grid stats */
-#define V4L2_PIX_FMT_STATS_BG v4l2_fourcc('S', 'T', 'B', 'G')
-/* Bayer focus stats */
-#define V4L2_PIX_FMT_STATS_BF v4l2_fourcc('S', 'T', 'B', 'F')
-/* Bayer hist stats */
-#define V4L2_PIX_FMT_STATS_BHST v4l2_fourcc('B', 'H', 'S', 'T')
-
-/*
- * F O R M A T E N U M E R A T I O N
- */
-struct v4l2_fmtdesc {
- __u32 index; /* Format number */
- enum v4l2_buf_type type; /* buffer type */
- __u32 flags;
- __u8 description[32]; /* Description string */
- __u32 pixelformat; /* Format fourcc */
- __u32 reserved[4];
-};
-
-#define V4L2_FMT_FLAG_COMPRESSED 0x0001
-#define V4L2_FMT_FLAG_EMULATED 0x0002
-
-#if 1
- /* Experimental Frame Size and frame rate enumeration */
-/*
- * F R A M E S I Z E E N U M E R A T I O N
- */
-enum v4l2_frmsizetypes {
- V4L2_FRMSIZE_TYPE_DISCRETE = 1,
- V4L2_FRMSIZE_TYPE_CONTINUOUS = 2,
- V4L2_FRMSIZE_TYPE_STEPWISE = 3,
-};
-
-struct v4l2_frmsize_discrete {
- __u32 width; /* Frame width [pixel] */
- __u32 height; /* Frame height [pixel] */
-};
-
-struct v4l2_frmsize_stepwise {
- __u32 min_width; /* Minimum frame width [pixel] */
- __u32 max_width; /* Maximum frame width [pixel] */
- __u32 step_width; /* Frame width step size [pixel] */
- __u32 min_height; /* Minimum frame height [pixel] */
- __u32 max_height; /* Maximum frame height [pixel] */
- __u32 step_height; /* Frame height step size [pixel] */
-};
-
-struct v4l2_frmsizeenum {
- __u32 index; /* Frame size number */
- __u32 pixel_format; /* Pixel format */
- __u32 type; /* Frame size type the device supports. */
-
- union { /* Frame size */
- struct v4l2_frmsize_discrete discrete;
- struct v4l2_frmsize_stepwise stepwise;
- };
-
- __u32 reserved[2]; /* Reserved space for future use */
-};
-
-/*
- * F R A M E R A T E E N U M E R A T I O N
- */
-enum v4l2_frmivaltypes {
- V4L2_FRMIVAL_TYPE_DISCRETE = 1,
- V4L2_FRMIVAL_TYPE_CONTINUOUS = 2,
- V4L2_FRMIVAL_TYPE_STEPWISE = 3,
-};
-
-struct v4l2_frmival_stepwise {
- struct v4l2_fract min; /* Minimum frame interval [s] */
- struct v4l2_fract max; /* Maximum frame interval [s] */
- struct v4l2_fract step; /* Frame interval step size [s] */
-};
-
-struct v4l2_frmivalenum {
- __u32 index; /* Frame format index */
- __u32 pixel_format; /* Pixel format */
- __u32 width; /* Frame width */
- __u32 height; /* Frame height */
- __u32 type; /* Frame interval type the device supports. */
-
- union { /* Frame interval */
- struct v4l2_fract discrete;
- struct v4l2_frmival_stepwise stepwise;
- };
-
- __u32 reserved[2]; /* Reserved space for future use */
-};
-#endif
-
-/*
- * T I M E C O D E
- */
-struct v4l2_timecode {
- __u32 type;
- __u32 flags;
- __u8 frames;
- __u8 seconds;
- __u8 minutes;
- __u8 hours;
- __u8 userbits[4];
-};
-
-/* Type */
-#define V4L2_TC_TYPE_24FPS 1
-#define V4L2_TC_TYPE_25FPS 2
-#define V4L2_TC_TYPE_30FPS 3
-#define V4L2_TC_TYPE_50FPS 4
-#define V4L2_TC_TYPE_60FPS 5
-
-/* Flags */
-#define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */
-#define V4L2_TC_FLAG_COLORFRAME 0x0002
-#define V4L2_TC_USERBITS_field 0x000C
-#define V4L2_TC_USERBITS_USERDEFINED 0x0000
-#define V4L2_TC_USERBITS_8BITCHARS 0x0008
-/* The above is based on SMPTE timecodes */
-
-struct v4l2_jpegcompression {
- int quality;
-
- int APPn; /* Number of APP segment to be written,
- * must be 0..15 */
- int APP_len; /* Length of data in JPEG APPn segment */
- char APP_data[60]; /* Data in the JPEG APPn segment. */
-
- int COM_len; /* Length of data in JPEG COM segment */
- char COM_data[60]; /* Data in JPEG COM segment */
-
- __u32 jpeg_markers; /* Which markers should go into the JPEG
- * output. Unless you exactly know what
- * you do, leave them untouched.
- * Inluding less markers will make the
- * resulting code smaller, but there will
- * be fewer applications which can read it.
- * The presence of the APP and COM marker
- * is influenced by APP_len and COM_len
- * ONLY, not by this property! */
-
-#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
-#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
-#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
-#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */
-#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will
- * allways use APP0 */
-};
-
-/*
- * M E M O R Y - M A P P I N G B U F F E R S
- */
-struct v4l2_requestbuffers {
- __u32 count;
- enum v4l2_buf_type type;
- enum v4l2_memory memory;
- __u32 reserved[2];
-};
-
-/**
- * struct v4l2_plane - plane info for multi-planar buffers
- * @bytesused: number of bytes occupied by data in the plane (payload)
- * @length: size of this plane (NOT the payload) in bytes
- * @mem_offset: when memory in the associated struct v4l2_buffer is
- * V4L2_MEMORY_MMAP, equals the offset from the start of
- * the device memory for this plane (or is a "cookie" that
- * should be passed to mmap() called on the video node)
- * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer
- * pointing to this plane
- * @data_offset: offset in the plane to the start of data; usually 0,
- * unless there is a header in front of the data
- *
- * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
- * with two planes can have one plane for Y, and another for interleaved CbCr
- * components. Each plane can reside in a separate memory buffer, or even in
- * a completely separate memory node (e.g. in embedded devices).
- */
-struct v4l2_plane {
- __u32 bytesused;
- __u32 length;
- union {
- __u32 mem_offset;
- unsigned long userptr;
- } m;
- __u32 data_offset;
- __u32 reserved[11];
-};
-
-/**
- * struct v4l2_buffer - video buffer info
- * @index: id number of the buffer
- * @type: buffer type (type == *_MPLANE for multiplanar buffers)
- * @bytesused: number of bytes occupied by data in the buffer (payload);
- * unused (set to 0) for multiplanar buffers
- * @flags: buffer informational flags
- * @field: field order of the image in the buffer
- * @timestamp: frame timestamp
- * @timecode: frame timecode
- * @sequence: sequence count of this frame
- * @memory: the method, in which the actual video data is passed
- * @offset: for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;
- * offset from the start of the device memory for this plane,
- * (or a "cookie" that should be passed to mmap() as offset)
- * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
- * a userspace pointer pointing to this buffer
- * @planes: for multiplanar buffers; userspace pointer to the array of plane
- * info structs for this buffer
- * @length: size in bytes of the buffer (NOT its payload) for single-plane
- * buffers (when type != *_MPLANE); number of elements in the
- * planes array for multi-plane buffers
- * @input: input number from which the video data has has been captured
- *
- * Contains data exchanged by application and driver using one of the Streaming
- * I/O methods.
- */
-struct v4l2_buffer {
- __u32 index;
- enum v4l2_buf_type type;
- __u32 bytesused;
- __u32 flags;
- enum v4l2_field field;
- struct timeval timestamp;
- struct v4l2_timecode timecode;
- __u32 sequence;
-
- /* memory location */
- enum v4l2_memory memory;
- union {
- __u32 offset;
- unsigned long userptr;
- struct v4l2_plane *planes;
- } m;
- __u32 length;
- __u32 input;
- __u32 reserved;
-};
-
-/* Flags for 'flags' field */
-#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */
-#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */
-#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */
-#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */
-#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */
-#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */
-/* Buffer is ready, but the data contained within is corrupted. */
-#define V4L2_BUF_FLAG_ERROR 0x0040
-#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */
-#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */
-#define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */
-/* Cache handling flags */
-#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800
-#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000
-#define V4L2_BUF_FLAG_EOS 0x2000
-
-/*
- * O V E R L A Y P R E V I E W
- */
-struct v4l2_framebuffer {
- __u32 capability;
- __u32 flags;
-/* FIXME: in theory we should pass something like PCI device + memory
- * region + offset instead of some physical address */
- void *base;
- struct v4l2_pix_format fmt;
-};
-/* Flags for the 'capability' field. Read only */
-#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
-#define V4L2_FBUF_CAP_CHROMAKEY 0x0002
-#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
-#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
-#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
-#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
-#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040
-#define V4L2_FBUF_CAP_SRC_CHROMAKEY 0x0080
-/* Flags for the 'flags' field. */
-#define V4L2_FBUF_FLAG_PRIMARY 0x0001
-#define V4L2_FBUF_FLAG_OVERLAY 0x0002
-#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
-#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
-#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
-#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
-#define V4L2_FBUF_FLAG_SRC_CHROMAKEY 0x0040
-
-struct v4l2_clip {
- struct v4l2_rect c;
- struct v4l2_clip __user *next;
-};
-
-struct v4l2_window {
- struct v4l2_rect w;
- enum v4l2_field field;
- __u32 chromakey;
- struct v4l2_clip __user *clips;
- __u32 clipcount;
- void __user *bitmap;
- __u8 global_alpha;
-};
-
-/*
- * C A P T U R E P A R A M E T E R S
- */
-struct v4l2_captureparm {
- __u32 capability; /* Supported modes */
- __u32 capturemode; /* Current mode */
- struct v4l2_fract timeperframe; /* Time per frame in .1us units */
- __u32 extendedmode; /* Driver-specific extensions */
- __u32 readbuffers; /* # of buffers for read */
- __u32 reserved[4];
-};
-
-/* Flags for 'capability' and 'capturemode' fields */
-#define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */
-#define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */
-#define V4L2_CAP_QCOM_FRAMESKIP 0x2000 /* frame skipping is supported */
-
-struct v4l2_qcom_frameskip {
- __u64 maxframeinterval;
-};
-
-struct v4l2_outputparm {
- __u32 capability; /* Supported modes */
- __u32 outputmode; /* Current mode */
- struct v4l2_fract timeperframe; /* Time per frame in seconds */
- __u32 extendedmode; /* Driver-specific extensions */
- __u32 writebuffers; /* # of buffers for write */
- __u32 reserved[4];
-};
-
-/*
- * I N P U T I M A G E C R O P P I N G
- */
-struct v4l2_cropcap {
- enum v4l2_buf_type type;
- struct v4l2_rect bounds;
- struct v4l2_rect defrect;
- struct v4l2_fract pixelaspect;
-};
-
-struct v4l2_crop {
- enum v4l2_buf_type type;
- struct v4l2_rect c;
-};
-
-/* Hints for adjustments of selection rectangle */
-#define V4L2_SEL_FLAG_GE 0x00000001
-#define V4L2_SEL_FLAG_LE 0x00000002
-
-/* Selection targets */
-
-/* Current cropping area */
-#define V4L2_SEL_TGT_CROP_ACTIVE 0x0000
-/* Default cropping area */
-#define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
-/* Cropping bounds */
-#define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
-/* Current composing area */
-#define V4L2_SEL_TGT_COMPOSE_ACTIVE 0x0100
-/* Default composing area */
-#define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
-/* Composing bounds */
-#define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102
-/* Current composing area plus all padding pixels */
-#define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
-
-/**
- * struct v4l2_selection - selection info
- * @type: buffer type (do not use *_MPLANE types)
- * @target: selection target, used to choose one of possible rectangles
- * @flags: constraints flags
- * @r: coordinates of selection window
- * @reserved: for future use, rounds structure size to 64 bytes, set to zero
- *
- * Hardware may use multiple helper windows to process a video stream.
- * The structure is used to exchange this selection areas between
- * an application and a driver.
- */
-struct v4l2_selection {
- __u32 type;
- __u32 target;
- __u32 flags;
- struct v4l2_rect r;
- __u32 reserved[9];
-};
-
-
-/*
- * A N A L O G V I D E O S T A N D A R D
- */
-
-typedef __u64 v4l2_std_id;
-
-/* one bit for each */
-#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
-#define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
-#define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
-#define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
-#define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
-#define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
-#define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
-#define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
-
-#define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
-#define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
-#define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
-#define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
-
-#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) /* BTSC */
-#define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) /* EIA-J */
-#define V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
-#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) /* FM A2 */
-
-#define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
-#define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
-#define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
-#define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
-#define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
-#define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
-#define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
-#define V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
-
-/* ATSC/HDTV */
-#define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
-#define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
-
-/* FIXME:
- Although std_id is 64 bits, there is an issue on PPC32 architecture that
- makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
- this value to 32 bits.
- As, currently, the max value is for V4L2_STD_ATSC_16_VSB (30 bits wide),
- it should work fine. However, if needed to add more than two standards,
- v4l2-common.c should be fixed.
- */
-
-/*
- * Some macros to merge video standards in order to make live easier for the
- * drivers and V4L2 applications
- */
-
-/*
- * "Common" NTSC/M - It should be noticed that V4L2_STD_NTSC_443 is
- * Missing here.
- */
-#define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\
- V4L2_STD_NTSC_M_JP |\
- V4L2_STD_NTSC_M_KR)
-/* Secam macros */
-#define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\
- V4L2_STD_SECAM_K |\
- V4L2_STD_SECAM_K1)
-/* All Secam Standards */
-#define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\
- V4L2_STD_SECAM_G |\
- V4L2_STD_SECAM_H |\
- V4L2_STD_SECAM_DK |\
- V4L2_STD_SECAM_L |\
- V4L2_STD_SECAM_LC)
-/* PAL macros */
-#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\
- V4L2_STD_PAL_B1 |\
- V4L2_STD_PAL_G)
-#define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\
- V4L2_STD_PAL_D1 |\
- V4L2_STD_PAL_K)
-/*
- * "Common" PAL - This macro is there to be compatible with the old
- * V4L1 concept of "PAL": /BGDKHI.
- * Several PAL standards are mising here: /M, /N and /Nc
- */
-#define V4L2_STD_PAL (V4L2_STD_PAL_BG |\
- V4L2_STD_PAL_DK |\
- V4L2_STD_PAL_H |\
- V4L2_STD_PAL_I)
-/* Chroma "agnostic" standards */
-#define V4L2_STD_B (V4L2_STD_PAL_B |\
- V4L2_STD_PAL_B1 |\
- V4L2_STD_SECAM_B)
-#define V4L2_STD_G (V4L2_STD_PAL_G |\
- V4L2_STD_SECAM_G)
-#define V4L2_STD_H (V4L2_STD_PAL_H |\
- V4L2_STD_SECAM_H)
-#define V4L2_STD_L (V4L2_STD_SECAM_L |\
- V4L2_STD_SECAM_LC)
-#define V4L2_STD_GH (V4L2_STD_G |\
- V4L2_STD_H)
-#define V4L2_STD_DK (V4L2_STD_PAL_DK |\
- V4L2_STD_SECAM_DK)
-#define V4L2_STD_BG (V4L2_STD_B |\
- V4L2_STD_G)
-#define V4L2_STD_MN (V4L2_STD_PAL_M |\
- V4L2_STD_PAL_N |\
- V4L2_STD_PAL_Nc |\
- V4L2_STD_NTSC)
-
-/* Standards where MTS/BTSC stereo could be found */
-#define V4L2_STD_MTS (V4L2_STD_NTSC_M |\
- V4L2_STD_PAL_M |\
- V4L2_STD_PAL_N |\
- V4L2_STD_PAL_Nc)
-
-/* Standards for Countries with 60Hz Line frequency */
-#define V4L2_STD_525_60 (V4L2_STD_PAL_M |\
- V4L2_STD_PAL_60 |\
- V4L2_STD_NTSC |\
- V4L2_STD_NTSC_443)
-/* Standards for Countries with 50Hz Line frequency */
-#define V4L2_STD_625_50 (V4L2_STD_PAL |\
- V4L2_STD_PAL_N |\
- V4L2_STD_PAL_Nc |\
- V4L2_STD_SECAM)
-
-#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\
- V4L2_STD_ATSC_16_VSB)
-/* Macros with none and all analog standards */
-#define V4L2_STD_UNKNOWN 0
-#define V4L2_STD_ALL (V4L2_STD_525_60 |\
- V4L2_STD_625_50)
-
-struct v4l2_standard {
- __u32 index;
- v4l2_std_id id;
- __u8 name[24];
- struct v4l2_fract frameperiod; /* Frames, not fields */
- __u32 framelines;
- __u32 reserved[4];
-};
-
-/*
- * V I D E O T I M I N G S D V P R E S E T
- */
-struct v4l2_dv_preset {
- __u32 preset;
- __u32 reserved[4];
-};
-
-/*
- * D V P R E S E T S E N U M E R A T I O N
- */
-struct v4l2_dv_enum_preset {
- __u32 index;
- __u32 preset;
- __u8 name[32]; /* Name of the preset timing */
- __u32 width;
- __u32 height;
- __u32 reserved[4];
-};
-
-/*
- * D V P R E S E T V A L U E S
- */
-#define V4L2_DV_INVALID 0
-#define V4L2_DV_480P59_94 1 /* BT.1362 */
-#define V4L2_DV_576P50 2 /* BT.1362 */
-#define V4L2_DV_720P24 3 /* SMPTE 296M */
-#define V4L2_DV_720P25 4 /* SMPTE 296M */
-#define V4L2_DV_720P30 5 /* SMPTE 296M */
-#define V4L2_DV_720P50 6 /* SMPTE 296M */
-#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
-#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
-#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
-#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
-#define V4L2_DV_1080I25 11 /* BT.1120 */
-#define V4L2_DV_1080I50 12 /* SMPTE 296M */
-#define V4L2_DV_1080I60 13 /* SMPTE 296M */
-#define V4L2_DV_1080P24 14 /* SMPTE 296M */
-#define V4L2_DV_1080P25 15 /* SMPTE 296M */
-#define V4L2_DV_1080P30 16 /* SMPTE 296M */
-#define V4L2_DV_1080P50 17 /* BT.1120 */
-#define V4L2_DV_1080P60 18 /* BT.1120 */
-
-/*
- * D V B T T I M I N G S
- */
-
-/* BT.656/BT.1120 timing data */
-struct v4l2_bt_timings {
- __u32 width; /* width in pixels */
- __u32 height; /* height in lines */
- __u32 interlaced; /* Interlaced or progressive */
- __u32 polarities; /* Positive or negative polarity */
- __u64 pixelclock; /* Pixel clock in HZ. Ex. 74.25MHz->74250000 */
- __u32 hfrontporch; /* Horizpontal front porch in pixels */
- __u32 hsync; /* Horizontal Sync length in pixels */
- __u32 hbackporch; /* Horizontal back porch in pixels */
- __u32 vfrontporch; /* Vertical front porch in pixels */
- __u32 vsync; /* Vertical Sync length in lines */
- __u32 vbackporch; /* Vertical back porch in lines */
- __u32 il_vfrontporch; /* Vertical front porch for bottom field of
- * interlaced field formats
- */
- __u32 il_vsync; /* Vertical sync length for bottom field of
- * interlaced field formats
- */
- __u32 il_vbackporch; /* Vertical back porch for bottom field of
- * interlaced field formats
- */
- __u32 reserved[16];
-} __attribute__ ((packed));
-
-/* Interlaced or progressive format */
-#define V4L2_DV_PROGRESSIVE 0
-#define V4L2_DV_INTERLACED 1
-
-/* Polarities. If bit is not set, it is assumed to be negative polarity */
-#define V4L2_DV_VSYNC_POS_POL 0x00000001
-#define V4L2_DV_HSYNC_POS_POL 0x00000002
-
-
-/* DV timings */
-struct v4l2_dv_timings {
- __u32 type;
- union {
- struct v4l2_bt_timings bt;
- __u32 reserved[32];
- };
-} __attribute__ ((packed));
-
-/* Values for the type field */
-#define V4L2_DV_BT_656_1120 0 /* BT.656/1120 timing type */
-
-/*
- * V I D E O I N P U T S
- */
-struct v4l2_input {
- __u32 index; /* Which input */
- __u8 name[32]; /* Label */
- __u32 type; /* Type of input */
- __u32 audioset; /* Associated audios (bitfield) */
- __u32 tuner; /* Associated tuner */
- v4l2_std_id std;
- __u32 status;
- __u32 capabilities;
- __u32 reserved[3];
-};
-
-/* Values for the 'type' field */
-#define V4L2_INPUT_TYPE_TUNER 1
-#define V4L2_INPUT_TYPE_CAMERA 2
-
-/* field 'status' - general */
-#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */
-#define V4L2_IN_ST_NO_SIGNAL 0x00000002
-#define V4L2_IN_ST_NO_COLOR 0x00000004
-
-/* field 'status' - sensor orientation */
-/* If sensor is mounted upside down set both bits */
-#define V4L2_IN_ST_HFLIP 0x00000010 /* Frames are flipped horizontally */
-#define V4L2_IN_ST_VFLIP 0x00000020 /* Frames are flipped vertically */
-
-/* field 'status' - analog */
-#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */
-#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */
-
-/* field 'status' - digital */
-#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */
-#define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */
-#define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */
-
-/* field 'status' - VCR and set-top box */
-#define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */
-#define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */
-#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */
-
-/* capabilities flags */
-#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
-#define V4L2_IN_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
-#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
-
-/*
- * V I D E O O U T P U T S
- */
-struct v4l2_output {
- __u32 index; /* Which output */
- __u8 name[32]; /* Label */
- __u32 type; /* Type of output */
- __u32 audioset; /* Associated audios (bitfield) */
- __u32 modulator; /* Associated modulator */
- v4l2_std_id std;
- __u32 capabilities;
- __u32 reserved[3];
-};
-/* Values for the 'type' field */
-#define V4L2_OUTPUT_TYPE_MODULATOR 1
-#define V4L2_OUTPUT_TYPE_ANALOG 2
-#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
-
-/* capabilities flags */
-#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
-#define V4L2_OUT_CAP_CUSTOM_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
-#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
-
-/*
- * C O N T R O L S
- */
-struct v4l2_control {
- __u32 id;
- __s32 value;
-};
-
-struct v4l2_ext_control {
- __u32 id;
- __u32 size;
- __u32 reserved2[1];
- union {
- __s32 value;
- __s64 value64;
- char *string;
- };
-} __attribute__ ((packed));
-
-struct v4l2_ext_controls {
- __u32 ctrl_class;
- __u32 count;
- __u32 error_idx;
- __u32 reserved[2];
- struct v4l2_ext_control *controls;
-};
-
-/* Values for ctrl_class field */
-#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
-#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
-#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
-#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
-#define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */
-#define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */
-
-#define V4L2_CTRL_ID_MASK (0x0fffffff)
-#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
-#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
-
-enum v4l2_ctrl_type {
- V4L2_CTRL_TYPE_INTEGER = 1,
- V4L2_CTRL_TYPE_BOOLEAN = 2,
- V4L2_CTRL_TYPE_MENU = 3,
- V4L2_CTRL_TYPE_BUTTON = 4,
- V4L2_CTRL_TYPE_INTEGER64 = 5,
- V4L2_CTRL_TYPE_CTRL_CLASS = 6,
- V4L2_CTRL_TYPE_STRING = 7,
- V4L2_CTRL_TYPE_BITMASK = 8,
-};
-
-/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
-struct v4l2_queryctrl {
- __u32 id;
- enum v4l2_ctrl_type type;
- __u8 name[32]; /* Whatever */
- __s32 minimum; /* Note signedness */
- __s32 maximum;
- __s32 step;
- __s32 default_value;
- __u32 flags;
- __u32 reserved[2];
-};
-
-/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
-struct v4l2_querymenu {
- __u32 id;
- __u32 index;
- __u8 name[32]; /* Whatever */
- __u32 reserved;
-};
-
-/* Control flags */
-#define V4L2_CTRL_FLAG_DISABLED 0x0001
-#define V4L2_CTRL_FLAG_GRABBED 0x0002
-#define V4L2_CTRL_FLAG_READ_ONLY 0x0004
-#define V4L2_CTRL_FLAG_UPDATE 0x0008
-#define V4L2_CTRL_FLAG_INACTIVE 0x0010
-#define V4L2_CTRL_FLAG_SLIDER 0x0020
-#define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040
-#define V4L2_CTRL_FLAG_VOLATILE 0x0080
-
-/* Query flag, to be ORed with the control ID */
-#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
-
-/* User-class control IDs defined by V4L2 */
-#define V4L2_CID_MAX_CTRLS 1024
-#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
-#define V4L2_CID_USER_BASE V4L2_CID_BASE
-/* IDs reserved for driver specific controls */
-#define V4L2_CID_PRIVATE_BASE 0x08000000
-
-#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1)
-#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0)
-#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1)
-#define V4L2_CID_SATURATION (V4L2_CID_BASE+2)
-#define V4L2_CID_HUE (V4L2_CID_BASE+3)
-#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5)
-#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6)
-#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7)
-#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)
-#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)
-#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10)
-#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */
-#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)
-#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)
-#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)
-#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)
-#define V4L2_CID_GAMMA (V4L2_CID_BASE+16)
-#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */
-#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)
-#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)
-#define V4L2_CID_GAIN (V4L2_CID_BASE+19)
-#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)
-#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)
-
-/* Deprecated; use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
-#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)
-#define V4L2_CID_VCENTER (V4L2_CID_BASE+23)
-
-#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24)
-enum v4l2_power_line_frequency {
- V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0,
- V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1,
- V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2,
- V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3,
-};
-#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
-#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
-#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
-#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
-#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
-#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
-#define V4L2_CID_COLORFX (V4L2_CID_BASE+31)
-enum v4l2_colorfx {
- V4L2_COLORFX_NONE = 0,
- V4L2_COLORFX_BW = 1,
- V4L2_COLORFX_SEPIA = 2,
- V4L2_COLORFX_NEGATIVE = 3,
- V4L2_COLORFX_EMBOSS = 4,
- V4L2_COLORFX_SKETCH = 5,
- V4L2_COLORFX_SKY_BLUE = 6,
- V4L2_COLORFX_GRASS_GREEN = 7,
- V4L2_COLORFX_SKIN_WHITEN = 8,
- V4L2_COLORFX_VIVID = 9,
-};
-#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
-#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
-
-#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
-#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
-
-#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
-
-#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37)
-#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38)
-
-#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39)
-#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40)
-
-#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
-
-/* last CID + 1 */
-#define V4L2_CID_LASTP1 (V4L2_CID_BASE+42)
-#define V4L2_CID_SPECIAL_EFFECT (V4L2_CID_BASE+43)
-/* Minimum number of buffer neede by the device */
-
-/* MPEG-class control IDs defined by V4L2 */
-#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
-#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1)
-
-/* MPEG streams, specific to multiplexed streams */
-#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0)
-enum v4l2_mpeg_stream_type {
- V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */
- V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */
- V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */
- V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */
- V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */
- V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */
-};
-#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1)
-#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2)
-#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3)
-#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
-#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
-#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
-#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
-enum v4l2_mpeg_stream_vbi_fmt {
- V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */
- V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */
-};
-
-/* MPEG audio controls specific to multiplexed streams */
-#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)
-enum v4l2_mpeg_audio_sampling_freq {
- V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0,
- V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1,
- V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2,
-};
-#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101)
-enum v4l2_mpeg_audio_encoding {
- V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0,
- V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1,
- V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2,
- V4L2_MPEG_AUDIO_ENCODING_AAC = 3,
- V4L2_MPEG_AUDIO_ENCODING_AC3 = 4,
-};
-#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102)
-enum v4l2_mpeg_audio_l1_bitrate {
- V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0,
- V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1,
- V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2,
- V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3,
- V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4,
- V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5,
- V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6,
- V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7,
- V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8,
- V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9,
- V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10,
- V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11,
- V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12,
- V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13,
-};
-#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103)
-enum v4l2_mpeg_audio_l2_bitrate {
- V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0,
- V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1,
- V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2,
- V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3,
- V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4,
- V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5,
- V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6,
- V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7,
- V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8,
- V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9,
- V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10,
- V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11,
- V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12,
- V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13,
-};
-#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104)
-enum v4l2_mpeg_audio_l3_bitrate {
- V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0,
- V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1,
- V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2,
- V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3,
- V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4,
- V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5,
- V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6,
- V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7,
- V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8,
- V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9,
- V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10,
- V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11,
- V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12,
- V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13,
-};
-#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105)
-enum v4l2_mpeg_audio_mode {
- V4L2_MPEG_AUDIO_MODE_STEREO = 0,
- V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1,
- V4L2_MPEG_AUDIO_MODE_DUAL = 2,
- V4L2_MPEG_AUDIO_MODE_MONO = 3,
-};
-#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106)
-enum v4l2_mpeg_audio_mode_extension {
- V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0,
- V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1,
- V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2,
- V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3,
-};
-#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107)
-enum v4l2_mpeg_audio_emphasis {
- V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0,
- V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1,
- V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2,
-};
-#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108)
-enum v4l2_mpeg_audio_crc {
- V4L2_MPEG_AUDIO_CRC_NONE = 0,
- V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
-};
-#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
-#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110)
-#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111)
-enum v4l2_mpeg_audio_ac3_bitrate {
- V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0,
- V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1,
- V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2,
- V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3,
- V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4,
- V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5,
- V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6,
- V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7,
- V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8,
- V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9,
- V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10,
- V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11,
- V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12,
- V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13,
- V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14,
- V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15,
- V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16,
- V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17,
- V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18,
-};
-#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112)
-enum v4l2_mpeg_audio_dec_playback {
- V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0,
- V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1,
- V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2,
- V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3,
- V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4,
- V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5,
-};
-#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113)
-
-/* MPEG video controls specific to multiplexed streams */
-#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
-enum v4l2_mpeg_video_encoding {
- V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0,
- V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1,
- V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201)
-enum v4l2_mpeg_video_aspect {
- V4L2_MPEG_VIDEO_ASPECT_1x1 = 0,
- V4L2_MPEG_VIDEO_ASPECT_4x3 = 1,
- V4L2_MPEG_VIDEO_ASPECT_16x9 = 2,
- V4L2_MPEG_VIDEO_ASPECT_221x100 = 3,
-};
-#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202)
-#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203)
-#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204)
-#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205)
-#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206)
-enum v4l2_mpeg_video_bitrate_mode {
- V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0,
- V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1,
-};
-#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
-#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
-#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
-#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
-#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
-#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212)
-#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213)
-#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214)
-#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215)
-#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216)
-enum v4l2_mpeg_video_header_mode {
- V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0,
- V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1,
- V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_I_FRAME = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217)
-#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220)
-#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221)
-enum v4l2_mpeg_video_multi_slice_mode {
- V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0,
- V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1,
- V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222)
-#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
-#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
-
-#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
-#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
-#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302)
-#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303)
-#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304)
-#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350)
-#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351)
-#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352)
-#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353)
-#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354)
-#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355)
-#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356)
-#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357)
-enum v4l2_mpeg_video_h264_entropy_mode {
- V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0,
- V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358)
-#define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359)
-enum v4l2_mpeg_video_h264_level {
- V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0,
- V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1,
- V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2,
- V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3,
- V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4,
- V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5,
- V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6,
- V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7,
- V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8,
- V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9,
- V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10,
- V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11,
- V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12,
- V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13,
- V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14,
- V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360)
-#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361)
-#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362)
-enum v4l2_mpeg_video_h264_loop_filter_mode {
- V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0,
- V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1,
- V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363)
-enum v4l2_mpeg_video_h264_profile {
- V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0,
- V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1,
- V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2,
- V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9,
- V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10,
- V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11,
- V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12,
- V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13,
- V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14,
- V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15,
- V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16,
-};
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364)
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365)
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366)
-#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367)
-enum v4l2_mpeg_video_h264_vui_sar_idc {
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16,
- V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17,
-};
-#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404)
-#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405)
-
-enum v4l2_mpeg_video_mpeg4_level {
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6,
- V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7,
-};
-#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406)
-enum v4l2_mpeg_video_mpeg4_profile {
- V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0,
- V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1,
- V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2,
- V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3,
- V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4,
-};
-#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407)
-
-/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
-#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0)
-enum v4l2_mpeg_cx2341x_video_spatial_filter_mode {
- V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0,
- V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2)
-enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type {
- V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0,
- V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
- V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2,
- V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3,
- V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3)
-enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type {
- V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0,
- V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4)
-enum v4l2_mpeg_cx2341x_video_temporal_filter_mode {
- V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0,
- V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6)
-enum v4l2_mpeg_cx2341x_video_median_filter_type {
- V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0,
- V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1,
- V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2,
- V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3,
- V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4,
-};
-#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
-#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
-#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
-
-/* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */
-#define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100)
-#define V4L2_CID_MPEG_QCOM_BASE (V4L2_CTRL_CLASS_MPEG | 0x2100)
-
-#define V4L2_CID_MPEG_QCOM_SET_PERF_LEVEL (V4L2_CID_MPEG_QCOM_BASE + 0)
-enum v3l2_mpeg_qcom_perf_level {
- V4L2_CID_MPEG_QCOM_PERF_LEVEL_PERFORMANCE = 0,
- V4L2_CID_MPEG_QCOM_PERF_LEVEL_TURBO = 1,
-};
-
-#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0)
-#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1)
-#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2)
-enum v4l2_mpeg_mfc51_video_frame_skip_mode {
- V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0,
- V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1,
- V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2,
-};
-#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3)
-enum v4l2_mpeg_mfc51_video_force_frame_type {
- V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0,
- V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1,
- V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2,
-};
-#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4)
-#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5)
-#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6)
-#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53)
-#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54)
-
-/* MPEG-class control IDs specific to the msm_vidc driver */
-#define V4L2_CID_MPEG_MSM_VIDC_BASE (V4L2_CTRL_CLASS_MPEG | 0x2000)
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_ENABLE_PICTURE_TYPE \
- (V4L2_CID_MPEG_MSM_VIDC_BASE+0)
-#define V4L2_CID_MPEG_VIDC_VIDEO_KEEP_ASPECT_RATIO \
- (V4L2_CID_MPEG_MSM_VIDC_BASE+1)
-#define V4L2_CID_MPEG_VIDC_VIDEO_POST_LOOP_DEBLOCKER_MODE \
- (V4L2_CID_MPEG_MSM_VIDC_BASE+2)
-#define V4L2_CID_MPEG_VIDC_VIDEO_DIVX_FORMAT \
- (V4L2_CID_MPEG_MSM_VIDC_BASE+3)
-enum v4l2_mpeg_vidc_video_divx_format_type {
- V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_4 = 0,
- V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_5 = 1,
- V4L2_MPEG_VIDC_VIDEO_DIVX_FORMAT_6 = 2,
-};
-#define V4L2_CID_MPEG_VIDC_VIDEO_MB_ERROR_MAP_REPORTING \
- (V4L2_CID_MPEG_MSM_VIDC_BASE+4)
-#define V4L2_CID_MPEG_VIDC_VIDEO_CONTINUE_DATA_TRANSFER \
- (V4L2_CID_MPEG_MSM_VIDC_BASE+5)
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_STREAM_FORMAT (V4L2_CID_MPEG_MSM_VIDC_BASE+6)
-enum v4l2_mpeg_vidc_video_stream_format {
- V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_STARTCODES = 0,
- V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_ONE_NAL_PER_BUFFER = 1,
- V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_ONE_BYTE_LENGTH = 2,
- V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_TWO_BYTE_LENGTH = 3,
- V4L2_MPEG_VIDC_VIDEO_NAL_FORMAT_FOUR_BYTE_LENGTH = 4,
-};
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_OUTPUT_ORDER (V4L2_CID_MPEG_MSM_VIDC_BASE+7)
-enum v4l2_mpeg_vidc_video_output_order {
- V4L2_MPEG_VIDC_VIDEO_OUTPUT_ORDER_DISPLAY = 0,
- V4L2_MPEG_VIDC_VIDEO_OUTPUT_ORDER_DECODE = 1,
-};
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE (V4L2_CID_MPEG_MSM_VIDC_BASE+8)
-#define V4L2_CID_MPEG_VIDC_VIDEO_IDR_PERIOD (V4L2_CID_MPEG_MSM_VIDC_BASE+9)
-#define V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES (V4L2_CID_MPEG_MSM_VIDC_BASE+10)
-#define V4L2_CID_MPEG_VIDC_VIDEO_NUM_B_FRAMES (V4L2_CID_MPEG_MSM_VIDC_BASE+11)
-#define V4L2_CID_MPEG_VIDC_VIDEO_REQUEST_IFRAME (V4L2_CID_MPEG_MSM_VIDC_BASE+12)
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL (V4L2_CID_MPEG_MSM_VIDC_BASE+13)
-enum v4l2_mpeg_vidc_video_rate_control {
- V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_OFF = 0,
- V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_VFR = 1,
- V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_VBR_CFR = 2,
- V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CBR_VFR = 3,
- V4L2_CID_MPEG_VIDC_VIDEO_RATE_CONTROL_CBR_CFR = 4,
-};
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_ROTATION (V4L2_CID_MPEG_MSM_VIDC_BASE+14)
-enum v4l2_mpeg_vidc_video_rotation {
- V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_NONE = 0,
- V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_90 = 1,
- V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_180 = 2,
- V4L2_CID_MPEG_VIDC_VIDEO_ROTATION_270 = 3,
-};
-#define MSM_VIDC_BASE V4L2_CID_MPEG_MSM_VIDC_BASE
-#define V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL (MSM_VIDC_BASE+15)
-enum v4l2_mpeg_vidc_h264_cabac_model {
- V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_0 = 0,
- V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_1 = 1,
- V4L2_CID_MPEG_VIDC_VIDEO_H264_CABAC_MODEL_2 = 2,
-};
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_MODE (MSM_VIDC_BASE+16)
-enum v4l2_mpeg_vidc_video_intra_refresh_mode {
- V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_NONE = 0,
- V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_CYCLIC = 1,
- V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_ADAPTIVE = 2,
- V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_CYCLIC_ADAPTIVE = 3,
- V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_RANDOM = 4,
-};
-#define V4L2_CID_MPEG_VIDC_VIDEO_AIR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE+17)
-#define V4L2_CID_MPEG_VIDC_VIDEO_AIR_REF (V4L2_CID_MPEG_MSM_VIDC_BASE+18)
-#define V4L2_CID_MPEG_VIDC_VIDEO_CIR_MBS (V4L2_CID_MPEG_MSM_VIDC_BASE+19)
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_H263_PROFILE (V4L2_CID_MPEG_MSM_VIDC_BASE+20)
-enum v4l2_mpeg_vidc_video_h263_profile {
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_BASELINE = 0,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_H320CODING = 1,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_BACKWARDCOMPATIBLE = 2,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_ISWV2 = 3,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_ISWV3 = 4,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_HIGHCOMPRESSION = 5,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_INTERNET = 6,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_INTERLACE = 7,
- V4L2_MPEG_VIDC_VIDEO_H263_PROFILE_HIGHLATENCY = 8,
-};
-
-#define V4L2_CID_MPEG_VIDC_VIDEO_H263_LEVEL (V4L2_CID_MPEG_MSM_VIDC_BASE+21)
-enum v4l2_mpeg_vidc_video_h263_level {
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_1_0 = 0,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_2_0 = 1,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_3_0 = 2,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_0 = 3,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_4_5 = 4,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_5_0 = 5,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_6_0 = 6,
- V4L2_MPEG_VIDC_VIDEO_H263_LEVEL_7_0 = 7,
-};
-
-/* Camera class control IDs */
-#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900)
-#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1)
-
-#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1)
-enum v4l2_exposure_auto_type {
- V4L2_EXPOSURE_AUTO = 0,
- V4L2_EXPOSURE_MANUAL = 1,
- V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
- V4L2_EXPOSURE_APERTURE_PRIORITY = 3
-};
-#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2)
-#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3)
-
-#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4)
-#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5)
-#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6)
-#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7)
-
-#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8)
-#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9)
-
-#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10)
-#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11)
-#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12)
-
-#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13)
-#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14)
-#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15)
-
-#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
-
-#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
-#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
-
-/* FM Modulator class control IDs */
-#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
-#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
-
-#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
-#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
-#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
-#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
-#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
-
-#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
-#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
-#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
-
-#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
-#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
-#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
-#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
-#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
-
-#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
-#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
-#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
-
-#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
-enum v4l2_preemphasis {
- V4L2_PREEMPHASIS_DISABLED = 0,
- V4L2_PREEMPHASIS_50_uS = 1,
- V4L2_PREEMPHASIS_75_uS = 2,
-};
-#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
-#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
-
-/* Flash and privacy (indicator) light controls */
-#define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900)
-#define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1)
-
-#define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1)
-enum v4l2_flash_led_mode {
- V4L2_FLASH_LED_MODE_NONE,
- V4L2_FLASH_LED_MODE_FLASH,
- V4L2_FLASH_LED_MODE_TORCH,
-};
-
-#define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2)
-enum v4l2_flash_strobe_source {
- V4L2_FLASH_STROBE_SOURCE_SOFTWARE,
- V4L2_FLASH_STROBE_SOURCE_EXTERNAL,
-};
-
-#define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3)
-#define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4)
-#define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5)
-
-#define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6)
-#define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7)
-#define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8)
-#define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9)
-
-#define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10)
-#define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0)
-#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1)
-#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2)
-#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3)
-#define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4)
-#define V4L2_FLASH_FAULT_INDICATOR (1 << 5)
-
-#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
-#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
-
-/* JPEG-class control IDs defined by V4L2 */
-#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900)
-#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1)
-
-#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1)
-enum v4l2_jpeg_chroma_subsampling {
- V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0,
- V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1,
- V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2,
- V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3,
- V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4,
- V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5,
-};
-#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2)
-#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3)
-
-#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4)
-#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0)
-#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1)
-#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16)
-#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17)
-#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18)
-
-/*
- * T U N I N G
- */
-struct v4l2_tuner {
- __u32 index;
- __u8 name[32];
- enum v4l2_tuner_type type;
- __u32 capability;
- __u32 rangelow;
- __u32 rangehigh;
- __u32 rxsubchans;
- __u32 audmode;
- __s32 signal;
- __s32 afc;
- __u32 reserved[4];
-};
-
-struct v4l2_modulator {
- __u32 index;
- __u8 name[32];
- __u32 capability;
- __u32 rangelow;
- __u32 rangehigh;
- __u32 txsubchans;
- __u32 reserved[4];
-};
-
-/* Flags for the 'capability' field */
-#define V4L2_TUNER_CAP_LOW 0x0001
-#define V4L2_TUNER_CAP_NORM 0x0002
-#define V4L2_TUNER_CAP_STEREO 0x0010
-#define V4L2_TUNER_CAP_LANG2 0x0020
-#define V4L2_TUNER_CAP_SAP 0x0020
-#define V4L2_TUNER_CAP_LANG1 0x0040
-#define V4L2_TUNER_CAP_RDS 0x0080
-#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
-#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
-
-/* Flags for the 'rxsubchans' field */
-#define V4L2_TUNER_SUB_MONO 0x0001
-#define V4L2_TUNER_SUB_STEREO 0x0002
-#define V4L2_TUNER_SUB_LANG2 0x0004
-#define V4L2_TUNER_SUB_SAP 0x0004
-#define V4L2_TUNER_SUB_LANG1 0x0008
-#define V4L2_TUNER_SUB_RDS 0x0010
-
-/* Values for the 'audmode' field */
-#define V4L2_TUNER_MODE_MONO 0x0000
-#define V4L2_TUNER_MODE_STEREO 0x0001
-#define V4L2_TUNER_MODE_LANG2 0x0002
-#define V4L2_TUNER_MODE_SAP 0x0002
-#define V4L2_TUNER_MODE_LANG1 0x0003
-#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
-
-struct v4l2_frequency {
- __u32 tuner;
- enum v4l2_tuner_type type;
- __u32 frequency;
- __u32 reserved[8];
-};
-
-struct v4l2_hw_freq_seek {
- __u32 tuner;
- enum v4l2_tuner_type type;
- __u32 seek_upward;
- __u32 wrap_around;
- __u32 spacing;
- __u32 reserved[7];
-};
-
-/*
- * R D S
- */
-
-struct v4l2_rds_data {
- __u8 lsb;
- __u8 msb;
- __u8 block;
-} __attribute__ ((packed));
-
-#define V4L2_RDS_BLOCK_MSK 0x7
-#define V4L2_RDS_BLOCK_A 0
-#define V4L2_RDS_BLOCK_B 1
-#define V4L2_RDS_BLOCK_C 2
-#define V4L2_RDS_BLOCK_D 3
-#define V4L2_RDS_BLOCK_C_ALT 4
-#define V4L2_RDS_BLOCK_INVALID 7
-
-#define V4L2_RDS_BLOCK_CORRECTED 0x40
-#define V4L2_RDS_BLOCK_ERROR 0x80
-
-/*
- * A U D I O
- */
-struct v4l2_audio {
- __u32 index;
- __u8 name[32];
- __u32 capability;
- __u32 mode;
- __u32 reserved[2];
-};
-
-/* Flags for the 'capability' field */
-#define V4L2_AUDCAP_STEREO 0x00001
-#define V4L2_AUDCAP_AVL 0x00002
-
-/* Flags for the 'mode' field */
-#define V4L2_AUDMODE_AVL 0x00001
-
-struct v4l2_audioout {
- __u32 index;
- __u8 name[32];
- __u32 capability;
- __u32 mode;
- __u32 reserved[2];
-};
-
-/*
- * M P E G S E R V I C E S
- *
- * NOTE: EXPERIMENTAL API
- */
-#if 1
-#define V4L2_ENC_IDX_FRAME_I (0)
-#define V4L2_ENC_IDX_FRAME_P (1)
-#define V4L2_ENC_IDX_FRAME_B (2)
-#define V4L2_ENC_IDX_FRAME_MASK (0xf)
-
-struct v4l2_enc_idx_entry {
- __u64 offset;
- __u64 pts;
- __u32 length;
- __u32 flags;
- __u32 reserved[2];
-};
-
-#define V4L2_ENC_IDX_ENTRIES (64)
-struct v4l2_enc_idx {
- __u32 entries;
- __u32 entries_cap;
- __u32 reserved[4];
- struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
-};
-
-
-#define V4L2_ENC_CMD_START (0)
-#define V4L2_ENC_CMD_STOP (1)
-#define V4L2_ENC_CMD_PAUSE (2)
-#define V4L2_ENC_CMD_RESUME (3)
-
-/* Flags for V4L2_ENC_CMD_STOP */
-#define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0)
-
-struct v4l2_encoder_cmd {
- __u32 cmd;
- __u32 flags;
- union {
- struct {
- __u32 data[8];
- } raw;
- };
-};
-
-/* Decoder commands */
-#define V4L2_DEC_CMD_START (0)
-#define V4L2_DEC_CMD_STOP (1)
-#define V4L2_DEC_CMD_PAUSE (2)
-#define V4L2_DEC_CMD_RESUME (3)
-#define V4L2_DEC_QCOM_CMD_FLUSH (4)
-
-/* Flags for V4L2_DEC_CMD_START */
-#define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0)
-
-/* Flags for V4L2_DEC_CMD_PAUSE */
-#define V4L2_DEC_CMD_PAUSE_TO_BLACK (1 << 0)
-
-/* Flags for V4L2_DEC_CMD_STOP */
-#define V4L2_DEC_CMD_STOP_TO_BLACK (1 << 0)
-#define V4L2_DEC_CMD_STOP_IMMEDIATELY (1 << 1)
-
-/* Flags for V4L2_DEC_QCOM_CMD_FLUSH */
-#define V4L2_DEC_QCOM_CMD_FLUSH_OUTPUT (1 << 0)
-#define V4L2_DEC_QCOM_CMD_FLUSH_CAPTURE (1 << 1)
-
-/* Play format requirements (returned by the driver): */
-
-/* The decoder has no special format requirements */
-#define V4L2_DEC_START_FMT_NONE (0)
-/* The decoder requires full GOPs */
-#define V4L2_DEC_START_FMT_GOP (1)
-
-/* The structure must be zeroed before use by the application
- This ensures it can be extended safely in the future. */
-struct v4l2_decoder_cmd {
- __u32 cmd;
- __u32 flags;
- union {
- struct {
- __u64 pts;
- } stop;
-
- struct {
- /* 0 or 1000 specifies normal speed,
- 1 specifies forward single stepping,
- -1 specifies backward single stepping,
- >1: playback at speed/1000 of the normal speed,
- <-1: reverse playback at (-speed/1000) of the normal speed. */
- __s32 speed;
- __u32 format;
- } start;
-
- struct {
- __u32 data[16];
- } raw;
- };
-};
-#endif
-
-
-/*
- * D A T A S E R V I C E S ( V B I )
- *
- * Data services API by Michael Schimek
- */
-
-/* Raw VBI */
-struct v4l2_vbi_format {
- __u32 sampling_rate; /* in 1 Hz */
- __u32 offset;
- __u32 samples_per_line;
- __u32 sample_format; /* V4L2_PIX_FMT_* */
- __s32 start[2];
- __u32 count[2];
- __u32 flags; /* V4L2_VBI_* */
- __u32 reserved[2]; /* must be zero */
-};
-
-/* VBI flags */
-#define V4L2_VBI_UNSYNC (1 << 0)
-#define V4L2_VBI_INTERLACED (1 << 1)
-
-/* Sliced VBI
- *
- * This implements is a proposal V4L2 API to allow SLICED VBI
- * required for some hardware encoders. It should change without
- * notice in the definitive implementation.
- */
-
-struct v4l2_sliced_vbi_format {
- __u16 service_set;
- /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
- service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
- (equals frame lines 313-336 for 625 line video
- standards, 263-286 for 525 line standards) */
- __u16 service_lines[2][24];
- __u32 io_size;
- __u32 reserved[2]; /* must be zero */
-};
-
-/* Teletext World System Teletext
- (WST), defined on ITU-R BT.653-2 */
-#define V4L2_SLICED_TELETEXT_B (0x0001)
-/* Video Program System, defined on ETS 300 231*/
-#define V4L2_SLICED_VPS (0x0400)
-/* Closed Caption, defined on EIA-608 */
-#define V4L2_SLICED_CAPTION_525 (0x1000)
-/* Wide Screen System, defined on ITU-R BT1119.1 */
-#define V4L2_SLICED_WSS_625 (0x4000)
-
-#define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525)
-#define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625)
-
-struct v4l2_sliced_vbi_cap {
- __u16 service_set;
- /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
- service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
- (equals frame lines 313-336 for 625 line video
- standards, 263-286 for 525 line standards) */
- __u16 service_lines[2][24];
- enum v4l2_buf_type type;
- __u32 reserved[3]; /* must be 0 */
-};
-
-struct v4l2_sliced_vbi_data {
- __u32 id;
- __u32 field; /* 0: first field, 1: second field */
- __u32 line; /* 1-23 */
- __u32 reserved; /* must be 0 */
- __u8 data[48];
-};
-
-/*
- * Sliced VBI data inserted into MPEG Streams
- */
-
-/*
- * V4L2_MPEG_STREAM_VBI_FMT_IVTV:
- *
- * Structure of payload contained in an MPEG 2 Private Stream 1 PES Packet in an
- * MPEG-2 Program Pack that contains V4L2_MPEG_STREAM_VBI_FMT_IVTV Sliced VBI
- * data
- *
- * Note, the MPEG-2 Program Pack and Private Stream 1 PES packet header
- * definitions are not included here. See the MPEG-2 specifications for details
- * on these headers.
- */
-
-/* Line type IDs */
-#define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1)
-#define V4L2_MPEG_VBI_IVTV_CAPTION_525 (4)
-#define V4L2_MPEG_VBI_IVTV_WSS_625 (5)
-#define V4L2_MPEG_VBI_IVTV_VPS (7)
-
-struct v4l2_mpeg_vbi_itv0_line {
- __u8 id; /* One of V4L2_MPEG_VBI_IVTV_* above */
- __u8 data[42]; /* Sliced VBI data for the line */
-} __attribute__ ((packed));
-
-struct v4l2_mpeg_vbi_itv0 {
- __le32 linemask[2]; /* Bitmasks of VBI service lines present */
- struct v4l2_mpeg_vbi_itv0_line line[35];
-} __attribute__ ((packed));
-
-struct v4l2_mpeg_vbi_ITV0 {
- struct v4l2_mpeg_vbi_itv0_line line[36];
-} __attribute__ ((packed));
-
-#define V4L2_MPEG_VBI_IVTV_MAGIC0 "itv0"
-#define V4L2_MPEG_VBI_IVTV_MAGIC1 "ITV0"
-
-struct v4l2_mpeg_vbi_fmt_ivtv {
- __u8 magic[4];
- union {
- struct v4l2_mpeg_vbi_itv0 itv0;
- struct v4l2_mpeg_vbi_ITV0 ITV0;
- };
-} __attribute__ ((packed));
-
-/*
- * A G G R E G A T E S T R U C T U R E S
- */
-
-/**
- * struct v4l2_plane_pix_format - additional, per-plane format definition
- * @sizeimage: maximum size in bytes required for data, for which
- * this plane will be used
- * @bytesperline: distance in bytes between the leftmost pixels in two
- * adjacent lines
- */
-struct v4l2_plane_pix_format {
- __u32 sizeimage;
- __u16 bytesperline;
- __u16 reserved[7];
-} __attribute__ ((packed));
-
-/**
- * struct v4l2_pix_format_mplane - multiplanar format definition
- * @width: image width in pixels
- * @height: image height in pixels
- * @pixelformat: little endian four character code (fourcc)
- * @field: field order (for interlaced video)
- * @colorspace: supplemental to pixelformat
- * @plane_fmt: per-plane information
- * @num_planes: number of planes for this format
- */
-struct v4l2_pix_format_mplane {
- __u32 width;
- __u32 height;
- __u32 pixelformat;
- enum v4l2_field field;
- enum v4l2_colorspace colorspace;
-
- struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
- __u8 num_planes;
- __u8 reserved[11];
-} __attribute__ ((packed));
-
-/**
- * struct v4l2_format - stream data format
- * @type: type of the data stream
- * @pix: definition of an image format
- * @pix_mp: definition of a multiplanar image format
- * @win: definition of an overlaid image
- * @vbi: raw VBI capture or output parameters
- * @sliced: sliced VBI capture or output parameters
- * @raw_data: placeholder for future extensions and custom formats
- */
-struct v4l2_format {
- enum v4l2_buf_type type;
- union {
- struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */
- struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */
- struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */
- struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
- struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
- __u8 raw_data[200]; /* user-defined */
- } fmt;
-};
-
-/* Stream type-dependent parameters
- */
-struct v4l2_streamparm {
- enum v4l2_buf_type type;
- union {
- struct v4l2_captureparm capture;
- struct v4l2_outputparm output;
- __u8 raw_data[200]; /* user-defined */
- } parm;
-};
-
-/*
- * E V E N T S
- */
-
-#define V4L2_EVENT_ALL 0
-#define V4L2_EVENT_VSYNC 1
-#define V4L2_EVENT_EOS 2
-#define V4L2_EVENT_CTRL 3
-#define V4L2_EVENT_FRAME_SYNC 4
-#define V4L2_EVENT_PRIVATE_START 0x08000000
-
-#define V4L2_EVENT_MSM_VIDC_START (V4L2_EVENT_PRIVATE_START + 0x00001000)
-#define V4L2_EVENT_MSM_VIDC_FLUSH_DONE (V4L2_EVENT_MSM_VIDC_START + 1)
-#define V4L2_EVENT_MSM_VIDC_PORT_SETTINGS_CHANGED_SUFFICIENT \
- (V4L2_EVENT_MSM_VIDC_START + 2)
-#define V4L2_EVENT_MSM_VIDC_PORT_SETTINGS_CHANGED_INSUFFICIENT \
- (V4L2_EVENT_MSM_VIDC_START + 3)
-#define V4L2_EVENT_MSM_VIDC_CLOSE_DONE (V4L2_EVENT_MSM_VIDC_START + 4)
-
-
-/* Payload for V4L2_EVENT_VSYNC */
-struct v4l2_event_vsync {
- /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
- __u8 field;
-} __attribute__ ((packed));
-
-/* Payload for V4L2_EVENT_CTRL */
-#define V4L2_EVENT_CTRL_CH_VALUE (1 << 0)
-#define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1)
-
-struct v4l2_event_ctrl {
- __u32 changes;
- __u32 type;
- union {
- __s32 value;
- __s64 value64;
- };
- __u32 flags;
- __s32 minimum;
- __s32 maximum;
- __s32 step;
- __s32 default_value;
-};
-
-struct v4l2_event_frame_sync {
- __u32 frame_sequence;
-};
-
-struct v4l2_event {
- __u32 type;
- union {
- struct v4l2_event_vsync vsync;
- struct v4l2_event_ctrl ctrl;
- struct v4l2_event_frame_sync frame_sync;
- __u8 data[64];
- } u;
- __u32 pending;
- __u32 sequence;
- struct timespec timestamp;
- __u32 id;
- __u32 reserved[8];
-};
-
-#define V4L2_EVENT_SUB_FL_SEND_INITIAL (1 << 0)
-#define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK (1 << 1)
-
-struct v4l2_event_subscription {
- __u32 type;
- __u32 id;
- __u32 flags;
- __u32 reserved[5];
-};
-
-/*
- * A D V A N C E D D E B U G G I N G
- *
- * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS!
- * FOR DEBUGGING, TESTING AND INTERNAL USE ONLY!
- */
-
-/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
-
-#define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */
-#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */
-#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
-#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */
-
-struct v4l2_dbg_match {
- __u32 type; /* Match type */
- union { /* Match this chip, meaning determined by type */
- __u32 addr;
- char name[32];
- };
-} __attribute__ ((packed));
-
-struct v4l2_dbg_register {
- struct v4l2_dbg_match match;
- __u32 size; /* register size in bytes */
- __u64 reg;
- __u64 val;
-} __attribute__ ((packed));
-
-/* VIDIOC_DBG_G_CHIP_IDENT */
-struct v4l2_dbg_chip_ident {
- struct v4l2_dbg_match match;
- __u32 ident; /* chip identifier as specified in <media/v4l2-chip-ident.h> */
- __u32 revision; /* chip revision, chip specific */
-} __attribute__ ((packed));
-
-/**
- * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument
- * @index: on return, index of the first created buffer
- * @count: entry: number of requested buffers,
- * return: number of created buffers
- * @memory: buffer memory type
- * @format: frame format, for which buffers are requested
- * @reserved: future extensions
- */
-struct v4l2_create_buffers {
- __u32 index;
- __u32 count;
- enum v4l2_memory memory;
- struct v4l2_format format;
- __u32 reserved[8];
-};
-
-/*
- * I O C T L C O D E S F O R V I D E O D E V I C E S
- *
- */
-#define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability)
-#define VIDIOC_RESERVED _IO('V', 1)
-#define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc)
-#define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format)
-#define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format)
-#define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers)
-#define VIDIOC_QUERYBUF _IOWR('V', 9, struct v4l2_buffer)
-#define VIDIOC_G_FBUF _IOR('V', 10, struct v4l2_framebuffer)
-#define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer)
-#define VIDIOC_OVERLAY _IOW('V', 14, int)
-#define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer)
-#define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer)
-#define VIDIOC_STREAMON _IOW('V', 18, int)
-#define VIDIOC_STREAMOFF _IOW('V', 19, int)
-#define VIDIOC_G_PARM _IOWR('V', 21, struct v4l2_streamparm)
-#define VIDIOC_S_PARM _IOWR('V', 22, struct v4l2_streamparm)
-#define VIDIOC_G_STD _IOR('V', 23, v4l2_std_id)
-#define VIDIOC_S_STD _IOW('V', 24, v4l2_std_id)
-#define VIDIOC_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
-#define VIDIOC_ENUMINPUT _IOWR('V', 26, struct v4l2_input)
-#define VIDIOC_G_CTRL _IOWR('V', 27, struct v4l2_control)
-#define VIDIOC_S_CTRL _IOWR('V', 28, struct v4l2_control)
-#define VIDIOC_G_TUNER _IOWR('V', 29, struct v4l2_tuner)
-#define VIDIOC_S_TUNER _IOW('V', 30, struct v4l2_tuner)
-#define VIDIOC_G_AUDIO _IOR('V', 33, struct v4l2_audio)
-#define VIDIOC_S_AUDIO _IOW('V', 34, struct v4l2_audio)
-#define VIDIOC_QUERYCTRL _IOWR('V', 36, struct v4l2_queryctrl)
-#define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu)
-#define VIDIOC_G_INPUT _IOR('V', 38, int)
-#define VIDIOC_S_INPUT _IOWR('V', 39, int)
-#define VIDIOC_G_OUTPUT _IOR('V', 46, int)
-#define VIDIOC_S_OUTPUT _IOWR('V', 47, int)
-#define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output)
-#define VIDIOC_G_AUDOUT _IOR('V', 49, struct v4l2_audioout)
-#define VIDIOC_S_AUDOUT _IOW('V', 50, struct v4l2_audioout)
-#define VIDIOC_G_MODULATOR _IOWR('V', 54, struct v4l2_modulator)
-#define VIDIOC_S_MODULATOR _IOW('V', 55, struct v4l2_modulator)
-#define VIDIOC_G_FREQUENCY _IOWR('V', 56, struct v4l2_frequency)
-#define VIDIOC_S_FREQUENCY _IOW('V', 57, struct v4l2_frequency)
-#define VIDIOC_CROPCAP _IOWR('V', 58, struct v4l2_cropcap)
-#define VIDIOC_G_CROP _IOWR('V', 59, struct v4l2_crop)
-#define VIDIOC_S_CROP _IOW('V', 60, struct v4l2_crop)
-#define VIDIOC_G_JPEGCOMP _IOR('V', 61, struct v4l2_jpegcompression)
-#define VIDIOC_S_JPEGCOMP _IOW('V', 62, struct v4l2_jpegcompression)
-#define VIDIOC_QUERYSTD _IOR('V', 63, v4l2_std_id)
-#define VIDIOC_TRY_FMT _IOWR('V', 64, struct v4l2_format)
-#define VIDIOC_ENUMAUDIO _IOWR('V', 65, struct v4l2_audio)
-#define VIDIOC_ENUMAUDOUT _IOWR('V', 66, struct v4l2_audioout)
-#define VIDIOC_G_PRIORITY _IOR('V', 67, enum v4l2_priority)
-#define VIDIOC_S_PRIORITY _IOW('V', 68, enum v4l2_priority)
-#define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap)
-#define VIDIOC_LOG_STATUS _IO('V', 70)
-#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls)
-#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls)
-#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls)
-#if 1
-#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum)
-#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum)
-#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx)
-#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd)
-#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd)
-#endif
-
-#if 1
-/* Experimental, meant for debugging, testing and internal use.
- Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
- You must be root to use these ioctls. Never use these in applications! */
-#define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)
-#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
-
-/* Experimental, meant for debugging, testing and internal use.
- Never use this ioctl in applications! */
-#define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
-#endif
-
-#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
-#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct v4l2_dv_enum_preset)
-#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct v4l2_dv_preset)
-#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct v4l2_dv_preset)
-#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset)
-#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
-#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
-#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
-#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
-#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
-
-/* Experimental, the below two ioctls may change over the next couple of kernel
- versions */
-#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)
-#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)
-
-/* Experimental selection API */
-#define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection)
-#define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection)
-
-/* Experimental, these two ioctls may change over the next couple of kernel
- versions. */
-#define VIDIOC_DECODER_CMD _IOWR('V', 96, struct v4l2_decoder_cmd)
-#define VIDIOC_TRY_DECODER_CMD _IOWR('V', 97, struct v4l2_decoder_cmd)
-
-/* Reminder: when adding new ioctls please add support for them to
- drivers/media/video/v4l2-compat-ioctl32.c as well! */
-
-#define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */
-
-#endif /* __LINUX_VIDEODEV2_H */
diff --git a/original/linux/vmalloc.h b/original/linux/vmalloc.h
deleted file mode 100644
index 71b6363..0000000
--- a/original/linux/vmalloc.h
+++ /dev/null
@@ -1,78 +0,0 @@
-#ifndef _LINUX_VMALLOC_H
-#define _LINUX_VMALLOC_H
-
-#include <linux/spinlock.h>
-#include <asm/page.h> /* pgprot_t */
-
-struct vm_area_struct;
-
-/* bits in vm_struct->flags */
-#define VM_IOREMAP 0x00000001 /* ioremap() and friends */
-#define VM_ALLOC 0x00000002 /* vmalloc() */
-#define VM_MAP 0x00000004 /* vmap()ed pages */
-#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
-#define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */
-/* bits [20..32] reserved for arch specific ioremap internals */
-
-/*
- * Maximum alignment for ioremap() regions.
- * Can be overriden by arch-specific value.
- */
-#ifndef IOREMAP_MAX_ORDER
-#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */
-#endif
-
-struct vm_struct {
- void *addr;
- unsigned long size;
- unsigned long flags;
- struct page **pages;
- unsigned int nr_pages;
- unsigned long phys_addr;
- struct vm_struct *next;
-};
-
-/*
- * Highlevel APIs for driver use
- */
-extern void *vmalloc(unsigned long size);
-extern void *vmalloc_user(unsigned long size);
-extern void *vmalloc_node(unsigned long size, int node);
-extern void *vmalloc_exec(unsigned long size);
-extern void *vmalloc_32(unsigned long size);
-extern void *vmalloc_32_user(unsigned long size);
-extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
-extern void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask,
- pgprot_t prot);
-extern void *__vmalloc_node(unsigned long size, gfp_t gfp_mask,
- pgprot_t prot, int node);
-extern void vfree(void *addr);
-
-extern void *vmap(struct page **pages, unsigned int count,
- unsigned long flags, pgprot_t prot);
-extern void vunmap(void *addr);
-
-extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr,
- unsigned long pgoff);
-
-/*
- * Lowlevel-APIs (not for driver use!)
- */
-extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
-extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
- unsigned long start, unsigned long end);
-extern struct vm_struct *get_vm_area_node(unsigned long size,
- unsigned long flags, int node);
-extern struct vm_struct *remove_vm_area(void *addr);
-extern struct vm_struct *__remove_vm_area(void *addr);
-extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
- struct page ***pages);
-extern void unmap_vm_area(struct vm_struct *area);
-
-/*
- * Internals. Dont't use..
- */
-extern rwlock_t vmlist_lock;
-extern struct vm_struct *vmlist;
-
-#endif /* _LINUX_VMALLOC_H */
diff --git a/original/linux/vt.h b/original/linux/vt.h
deleted file mode 100644
index ba806e8..0000000
--- a/original/linux/vt.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _LINUX_VT_H
-#define _LINUX_VT_H
-
-/*
- * These constants are also useful for user-level apps (e.g., VC
- * resizing).
- */
-#define MIN_NR_CONSOLES 1 /* must be at least 1 */
-#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
-#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
- /* Note: the ioctl VT_GETSTATE does not work for
- consoles 16 and higher (since it returns a short) */
-
-/* 0x56 is 'V', to avoid collision with termios and kd */
-
-#define VT_OPENQRY 0x5600 /* find available vt */
-
-struct vt_mode {
- char mode; /* vt mode */
- char waitv; /* if set, hang on writes if not active */
- short relsig; /* signal to raise on release req */
- short acqsig; /* signal to raise on acquisition */
- short frsig; /* unused (set to 0) */
-};
-#define VT_GETMODE 0x5601 /* get mode of active vt */
-#define VT_SETMODE 0x5602 /* set mode of active vt */
-#define VT_AUTO 0x00 /* auto vt switching */
-#define VT_PROCESS 0x01 /* process controls switching */
-#define VT_ACKACQ 0x02 /* acknowledge switch */
-
-struct vt_stat {
- unsigned short v_active; /* active vt */
- unsigned short v_signal; /* signal to send */
- unsigned short v_state; /* vt bitmask */
-};
-#define VT_GETSTATE 0x5603 /* get global vt state info */
-#define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */
-
-#define VT_RELDISP 0x5605 /* release display */
-
-#define VT_ACTIVATE 0x5606 /* make vt active */
-#define VT_WAITACTIVE 0x5607 /* wait for vt active */
-#define VT_DISALLOCATE 0x5608 /* free memory associated to vt */
-
-struct vt_sizes {
- unsigned short v_rows; /* number of rows */
- unsigned short v_cols; /* number of columns */
- unsigned short v_scrollsize; /* number of lines of scrollback */
-};
-#define VT_RESIZE 0x5609 /* set kernel's idea of screensize */
-
-struct vt_consize {
- unsigned short v_rows; /* number of rows */
- unsigned short v_cols; /* number of columns */
- unsigned short v_vlin; /* number of pixel rows on screen */
- unsigned short v_clin; /* number of pixel rows per character */
- unsigned short v_vcol; /* number of pixel columns on screen */
- unsigned short v_ccol; /* number of pixel columns per character */
-};
-#define VT_RESIZEX 0x560A /* set kernel's idea of screensize + more */
-#define VT_LOCKSWITCH 0x560B /* disallow vt switching */
-#define VT_UNLOCKSWITCH 0x560C /* allow vt switching */
-#define VT_GETHIFONTMASK 0x560D /* return hi font mask */
-
-#endif /* _LINUX_VT_H */
diff --git a/original/linux/vt_buffer.h b/original/linux/vt_buffer.h
deleted file mode 100644
index 057db7d..0000000
--- a/original/linux/vt_buffer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * include/linux/vt_buffer.h -- Access to VT screen buffer
- *
- * (c) 1998 Martin Mares <mj@ucw.cz>
- *
- * This is a set of macros and functions which are used in the
- * console driver and related code to access the screen buffer.
- * In most cases the console works with simple in-memory buffer,
- * but when handling hardware text mode consoles, we store
- * the foreground console directly in video memory.
- */
-
-#ifndef _LINUX_VT_BUFFER_H_
-#define _LINUX_VT_BUFFER_H_
-
-
-#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
-#include <asm/vga.h>
-#endif
-
-#ifndef VT_BUF_HAVE_RW
-#define scr_writew(val, addr) (*(addr) = (val))
-#define scr_readw(addr) (*(addr))
-#define scr_memcpyw(d, s, c) memcpy(d, s, c)
-#define scr_memmovew(d, s, c) memmove(d, s, c)
-#define VT_BUF_HAVE_MEMCPYW
-#define VT_BUF_HAVE_MEMMOVEW
-#endif
-
-#ifndef VT_BUF_HAVE_MEMSETW
-static inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
-{
- count /= 2;
- while (count--)
- scr_writew(c, s++);
-}
-#endif
-
-#ifndef VT_BUF_HAVE_MEMCPYW
-static inline void scr_memcpyw(u16 *d, const u16 *s, unsigned int count)
-{
- count /= 2;
- while (count--)
- scr_writew(scr_readw(s++), d++);
-}
-#endif
-
-#ifndef VT_BUF_HAVE_MEMMOVEW
-static inline void scr_memmovew(u16 *d, const u16 *s, unsigned int count)
-{
- if (d < s)
- scr_memcpyw(d, s, count);
- else {
- count /= 2;
- d += count;
- s += count;
- while (count--)
- scr_writew(scr_readw(--s), --d);
- }
-}
-#endif
-
-#endif
diff --git a/original/linux/wait.h b/original/linux/wait.h
deleted file mode 100644
index b3b9048..0000000
--- a/original/linux/wait.h
+++ /dev/null
@@ -1,454 +0,0 @@
-#ifndef _LINUX_WAIT_H
-#define _LINUX_WAIT_H
-
-#define WNOHANG 0x00000001
-#define WUNTRACED 0x00000002
-#define WSTOPPED WUNTRACED
-#define WEXITED 0x00000004
-#define WCONTINUED 0x00000008
-#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
-
-#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */
-#define __WALL 0x40000000 /* Wait on all children, regardless of type */
-#define __WCLONE 0x80000000 /* Wait only on non-SIGCHLD children */
-
-/* First argument to waitid: */
-#define P_ALL 0
-#define P_PID 1
-#define P_PGID 2
-
-#ifdef __KERNEL__
-
-#include <linux/list.h>
-#include <linux/stddef.h>
-#include <linux/spinlock.h>
-#include <asm/system.h>
-#include <asm/current.h>
-
-typedef struct __wait_queue wait_queue_t;
-typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync, void *key);
-int default_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
-
-struct __wait_queue {
- unsigned int flags;
-#define WQ_FLAG_EXCLUSIVE 0x01
- void *private;
- wait_queue_func_t func;
- struct list_head task_list;
-};
-
-struct wait_bit_key {
- void *flags;
- int bit_nr;
-};
-
-struct wait_bit_queue {
- struct wait_bit_key key;
- wait_queue_t wait;
-};
-
-struct __wait_queue_head {
- spinlock_t lock;
- struct list_head task_list;
-};
-typedef struct __wait_queue_head wait_queue_head_t;
-
-struct task_struct;
-
-/*
- * Macros for declaration and initialisaton of the datatypes
- */
-
-#define __WAITQUEUE_INITIALIZER(name, tsk) { \
- .private = tsk, \
- .func = default_wake_function, \
- .task_list = { NULL, NULL } }
-
-#define DECLARE_WAITQUEUE(name, tsk) \
- wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk)
-
-#define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \
- .lock = __SPIN_LOCK_UNLOCKED(name.lock), \
- .task_list = { &(name).task_list, &(name).task_list } }
-
-#define DECLARE_WAIT_QUEUE_HEAD(name) \
- wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name)
-
-#define __WAIT_BIT_KEY_INITIALIZER(word, bit) \
- { .flags = word, .bit_nr = bit, }
-
-extern void init_waitqueue_head(wait_queue_head_t *q);
-
-static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
-{
- q->flags = 0;
- q->private = p;
- q->func = default_wake_function;
-}
-
-static inline void init_waitqueue_func_entry(wait_queue_t *q,
- wait_queue_func_t func)
-{
- q->flags = 0;
- q->private = NULL;
- q->func = func;
-}
-
-static inline int waitqueue_active(wait_queue_head_t *q)
-{
- return !list_empty(&q->task_list);
-}
-
-/*
- * Used to distinguish between sync and async io wait context:
- * sync i/o typically specifies a NULL wait queue entry or a wait
- * queue entry bound to a task (current task) to wake up.
- * aio specifies a wait queue entry with an async notification
- * callback routine, not associated with any task.
- */
-#define is_sync_wait(wait) (!(wait) || ((wait)->private))
-
-extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
-extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait));
-extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));
-
-static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
-{
- list_add(&new->task_list, &head->task_list);
-}
-
-/*
- * Used for wake-one threads:
- */
-static inline void __add_wait_queue_tail(wait_queue_head_t *head,
- wait_queue_t *new)
-{
- list_add_tail(&new->task_list, &head->task_list);
-}
-
-static inline void __remove_wait_queue(wait_queue_head_t *head,
- wait_queue_t *old)
-{
- list_del(&old->task_list);
-}
-
-void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key));
-extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode));
-extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr));
-void FASTCALL(__wake_up_bit(wait_queue_head_t *, void *, int));
-int FASTCALL(__wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned));
-int FASTCALL(__wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned));
-void FASTCALL(wake_up_bit(void *, int));
-int FASTCALL(out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned));
-int FASTCALL(out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned));
-wait_queue_head_t *FASTCALL(bit_waitqueue(void *, int));
-
-#define wake_up(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1, NULL)
-#define wake_up_nr(x, nr) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, nr, NULL)
-#define wake_up_all(x) __wake_up(x, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 0, NULL)
-#define wake_up_interruptible(x) __wake_up(x, TASK_INTERRUPTIBLE, 1, NULL)
-#define wake_up_interruptible_nr(x, nr) __wake_up(x, TASK_INTERRUPTIBLE, nr, NULL)
-#define wake_up_interruptible_all(x) __wake_up(x, TASK_INTERRUPTIBLE, 0, NULL)
-#define wake_up_locked(x) __wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
-#define wake_up_interruptible_sync(x) __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
-
-#define __wait_event(wq, condition) \
-do { \
- DEFINE_WAIT(__wait); \
- \
- for (;;) { \
- prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \
- if (condition) \
- break; \
- schedule(); \
- } \
- finish_wait(&wq, &__wait); \
-} while (0)
-
-/**
- * wait_event - sleep until a condition gets true
- * @wq: the waitqueue to wait on
- * @condition: a C expression for the event to wait for
- *
- * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
- * @condition evaluates to true. The @condition is checked each time
- * the waitqueue @wq is woken up.
- *
- * wake_up() has to be called after changing any variable that could
- * change the result of the wait condition.
- */
-#define wait_event(wq, condition) \
-do { \
- if (condition) \
- break; \
- __wait_event(wq, condition); \
-} while (0)
-
-#define __wait_event_timeout(wq, condition, ret) \
-do { \
- DEFINE_WAIT(__wait); \
- \
- for (;;) { \
- prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \
- if (condition) \
- break; \
- ret = schedule_timeout(ret); \
- if (!ret) \
- break; \
- } \
- finish_wait(&wq, &__wait); \
-} while (0)
-
-/**
- * wait_event_timeout - sleep until a condition gets true or a timeout elapses
- * @wq: the waitqueue to wait on
- * @condition: a C expression for the event to wait for
- * @timeout: timeout, in jiffies
- *
- * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the
- * @condition evaluates to true. The @condition is checked each time
- * the waitqueue @wq is woken up.
- *
- * wake_up() has to be called after changing any variable that could
- * change the result of the wait condition.
- *
- * The function returns 0 if the @timeout elapsed, and the remaining
- * jiffies if the condition evaluated to true before the timeout elapsed.
- */
-#define wait_event_timeout(wq, condition, timeout) \
-({ \
- long __ret = timeout; \
- if (!(condition)) \
- __wait_event_timeout(wq, condition, __ret); \
- __ret; \
-})
-
-#define __wait_event_interruptible(wq, condition, ret) \
-do { \
- DEFINE_WAIT(__wait); \
- \
- for (;;) { \
- prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
- if (condition) \
- break; \
- if (!signal_pending(current)) { \
- schedule(); \
- continue; \
- } \
- ret = -ERESTARTSYS; \
- break; \
- } \
- finish_wait(&wq, &__wait); \
-} while (0)
-
-/**
- * wait_event_interruptible - sleep until a condition gets true
- * @wq: the waitqueue to wait on
- * @condition: a C expression for the event to wait for
- *
- * The process is put to sleep (TASK_INTERRUPTIBLE) until the
- * @condition evaluates to true or a signal is received.
- * The @condition is checked each time the waitqueue @wq is woken up.
- *
- * wake_up() has to be called after changing any variable that could
- * change the result of the wait condition.
- *
- * The function will return -ERESTARTSYS if it was interrupted by a
- * signal and 0 if @condition evaluated to true.
- */
-#define wait_event_interruptible(wq, condition) \
-({ \
- int __ret = 0; \
- if (!(condition)) \
- __wait_event_interruptible(wq, condition, __ret); \
- __ret; \
-})
-
-#define __wait_event_interruptible_timeout(wq, condition, ret) \
-do { \
- DEFINE_WAIT(__wait); \
- \
- for (;;) { \
- prepare_to_wait(&wq, &__wait, TASK_INTERRUPTIBLE); \
- if (condition) \
- break; \
- if (!signal_pending(current)) { \
- ret = schedule_timeout(ret); \
- if (!ret) \
- break; \
- continue; \
- } \
- ret = -ERESTARTSYS; \
- break; \
- } \
- finish_wait(&wq, &__wait); \
-} while (0)
-
-/**
- * wait_event_interruptible_timeout - sleep until a condition gets true or a timeout elapses
- * @wq: the waitqueue to wait on
- * @condition: a C expression for the event to wait for
- * @timeout: timeout, in jiffies
- *
- * The process is put to sleep (TASK_INTERRUPTIBLE) until the
- * @condition evaluates to true or a signal is received.
- * The @condition is checked each time the waitqueue @wq is woken up.
- *
- * wake_up() has to be called after changing any variable that could
- * change the result of the wait condition.
- *
- * The function returns 0 if the @timeout elapsed, -ERESTARTSYS if it
- * was interrupted by a signal, and the remaining jiffies otherwise
- * if the condition evaluated to true before the timeout elapsed.
- */
-#define wait_event_interruptible_timeout(wq, condition, timeout) \
-({ \
- long __ret = timeout; \
- if (!(condition)) \
- __wait_event_interruptible_timeout(wq, condition, __ret); \
- __ret; \
-})
-
-#define __wait_event_interruptible_exclusive(wq, condition, ret) \
-do { \
- DEFINE_WAIT(__wait); \
- \
- for (;;) { \
- prepare_to_wait_exclusive(&wq, &__wait, \
- TASK_INTERRUPTIBLE); \
- if (condition) \
- break; \
- if (!signal_pending(current)) { \
- schedule(); \
- continue; \
- } \
- ret = -ERESTARTSYS; \
- break; \
- } \
- finish_wait(&wq, &__wait); \
-} while (0)
-
-#define wait_event_interruptible_exclusive(wq, condition) \
-({ \
- int __ret = 0; \
- if (!(condition)) \
- __wait_event_interruptible_exclusive(wq, condition, __ret);\
- __ret; \
-})
-
-/*
- * Must be called with the spinlock in the wait_queue_head_t held.
- */
-static inline void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
- wait_queue_t * wait)
-{
- wait->flags |= WQ_FLAG_EXCLUSIVE;
- __add_wait_queue_tail(q, wait);
-}
-
-/*
- * Must be called with the spinlock in the wait_queue_head_t held.
- */
-static inline void remove_wait_queue_locked(wait_queue_head_t *q,
- wait_queue_t * wait)
-{
- __remove_wait_queue(q, wait);
-}
-
-/*
- * These are the old interfaces to sleep waiting for an event.
- * They are racy. DO NOT use them, use the wait_event* interfaces above.
- * We plan to remove these interfaces during 2.7.
- */
-extern void FASTCALL(sleep_on(wait_queue_head_t *q));
-extern long FASTCALL(sleep_on_timeout(wait_queue_head_t *q,
- signed long timeout));
-extern void FASTCALL(interruptible_sleep_on(wait_queue_head_t *q));
-extern long FASTCALL(interruptible_sleep_on_timeout(wait_queue_head_t *q,
- signed long timeout));
-
-/*
- * Waitqueues which are removed from the waitqueue_head at wakeup time
- */
-void FASTCALL(prepare_to_wait(wait_queue_head_t *q,
- wait_queue_t *wait, int state));
-void FASTCALL(prepare_to_wait_exclusive(wait_queue_head_t *q,
- wait_queue_t *wait, int state));
-void FASTCALL(finish_wait(wait_queue_head_t *q, wait_queue_t *wait));
-int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
-int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
-
-#define DEFINE_WAIT(name) \
- wait_queue_t name = { \
- .private = current, \
- .func = autoremove_wake_function, \
- .task_list = LIST_HEAD_INIT((name).task_list), \
- }
-
-#define DEFINE_WAIT_BIT(name, word, bit) \
- struct wait_bit_queue name = { \
- .key = __WAIT_BIT_KEY_INITIALIZER(word, bit), \
- .wait = { \
- .private = current, \
- .func = wake_bit_function, \
- .task_list = \
- LIST_HEAD_INIT((name).wait.task_list), \
- }, \
- }
-
-#define init_wait(wait) \
- do { \
- (wait)->private = current; \
- (wait)->func = autoremove_wake_function; \
- INIT_LIST_HEAD(&(wait)->task_list); \
- } while (0)
-
-/**
- * wait_on_bit - wait for a bit to be cleared
- * @word: the word being waited on, a kernel virtual address
- * @bit: the bit of the word being waited on
- * @action: the function used to sleep, which may take special actions
- * @mode: the task state to sleep in
- *
- * There is a standard hashed waitqueue table for generic use. This
- * is the part of the hashtable's accessor API that waits on a bit.
- * For instance, if one were to have waiters on a bitflag, one would
- * call wait_on_bit() in threads waiting for the bit to clear.
- * One uses wait_on_bit() where one is waiting for the bit to clear,
- * but has no intention of setting it.
- */
-static inline int wait_on_bit(void *word, int bit,
- int (*action)(void *), unsigned mode)
-{
- if (!test_bit(bit, word))
- return 0;
- return out_of_line_wait_on_bit(word, bit, action, mode);
-}
-
-/**
- * wait_on_bit_lock - wait for a bit to be cleared, when wanting to set it
- * @word: the word being waited on, a kernel virtual address
- * @bit: the bit of the word being waited on
- * @action: the function used to sleep, which may take special actions
- * @mode: the task state to sleep in
- *
- * There is a standard hashed waitqueue table for generic use. This
- * is the part of the hashtable's accessor API that waits on a bit
- * when one intends to set it, for instance, trying to lock bitflags.
- * For instance, if one were to have waiters trying to set bitflag
- * and waiting for it to clear before setting it, one would call
- * wait_on_bit() in threads waiting to be able to set the bit.
- * One uses wait_on_bit_lock() where one is waiting for the bit to
- * clear with the intention of setting it, and when done, clearing it.
- */
-static inline int wait_on_bit_lock(void *word, int bit,
- int (*action)(void *), unsigned mode)
-{
- if (!test_and_set_bit(bit, word))
- return 0;
- return out_of_line_wait_on_bit_lock(word, bit, action, mode);
-}
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/original/linux/wanrouter.h b/original/linux/wanrouter.h
deleted file mode 100644
index 2cd0501..0000000
--- a/original/linux/wanrouter.h
+++ /dev/null
@@ -1,540 +0,0 @@
-/*****************************************************************************
-* wanrouter.h Definitions for the WAN Multiprotocol Router Module.
-* This module provides API and common services for WAN Link
-* Drivers and is completely hardware-independent.
-*
-* Author: Nenad Corbic <ncorbic@sangoma.com>
-* Gideon Hack
-* Additions: Arnaldo Melo
-*
-* Copyright: (c) 1995-2000 Sangoma Technologies 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.
-* ============================================================================
-* Jul 21, 2000 Nenad Corbic Added WAN_FT1_READY State
-* Feb 24, 2000 Nenad Corbic Added support for socket based x25api
-* Jan 28, 2000 Nenad Corbic Added support for the ASYNC protocol.
-* Oct 04, 1999 Nenad Corbic Updated for 2.1.0 release
-* Jun 02, 1999 Gideon Hack Added support for the S514 adapter.
-* May 23, 1999 Arnaldo Melo Added local_addr to wanif_conf_t
-* WAN_DISCONNECTING state added
-* Jul 20, 1998 David Fong Added Inverse ARP options to 'wanif_conf_t'
-* Jun 12, 1998 David Fong Added Cisco HDLC support.
-* Dec 16, 1997 Jaspreet Singh Moved 'enable_IPX' and 'network_number' to
-* 'wanif_conf_t'
-* Dec 05, 1997 Jaspreet Singh Added 'pap', 'chap' to 'wanif_conf_t'
-* Added 'authenticator' to 'wan_ppp_conf_t'
-* Nov 06, 1997 Jaspreet Singh Changed Router Driver version to 1.1 from 1.0
-* Oct 20, 1997 Jaspreet Singh Added 'cir','bc','be' and 'mc' to 'wanif_conf_t'
-* Added 'enable_IPX' and 'network_number' to
-* 'wan_device_t'. Also added defines for
-* UDP PACKET TYPE, Interrupt test, critical values
-* for RACE conditions.
-* Oct 05, 1997 Jaspreet Singh Added 'dlci_num' and 'dlci[100]' to
-* 'wan_fr_conf_t' to configure a list of dlci(s)
-* for a NODE
-* Jul 07, 1997 Jaspreet Singh Added 'ttl' to 'wandev_conf_t' & 'wan_device_t'
-* May 29, 1997 Jaspreet Singh Added 'tx_int_enabled' to 'wan_device_t'
-* May 21, 1997 Jaspreet Singh Added 'udp_port' to 'wan_device_t'
-* Apr 25, 1997 Farhan Thawar Added 'udp_port' to 'wandev_conf_t'
-* Jan 16, 1997 Gene Kozin router_devlist made public
-* Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h).
-*****************************************************************************/
-
-#ifndef _ROUTER_H
-#define _ROUTER_H
-
-#define ROUTER_NAME "wanrouter" /* in case we ever change it */
-#define ROUTER_VERSION 1 /* version number */
-#define ROUTER_RELEASE 1 /* release (minor version) number */
-#define ROUTER_IOCTL 'W' /* for IOCTL calls */
-#define ROUTER_MAGIC 0x524D4157L /* signature: 'WANR' reversed */
-
-/* IOCTL codes for /proc/router/<device> entries (up to 255) */
-enum router_ioctls
-{
- ROUTER_SETUP = ROUTER_IOCTL<<8, /* configure device */
- ROUTER_DOWN, /* shut down device */
- ROUTER_STAT, /* get device status */
- ROUTER_IFNEW, /* add interface */
- ROUTER_IFDEL, /* delete interface */
- ROUTER_IFSTAT, /* get interface status */
- ROUTER_USER = (ROUTER_IOCTL<<8)+16, /* driver-specific calls */
- ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31
-};
-
-/* identifiers for displaying proc file data for dual port adapters */
-#define PROC_DATA_PORT_0 0x8000 /* the data is for port 0 */
-#define PROC_DATA_PORT_1 0x8001 /* the data is for port 1 */
-
-/* NLPID for packet encapsulation (ISO/IEC TR 9577) */
-#define NLPID_IP 0xCC /* Internet Protocol Datagram */
-#define NLPID_SNAP 0x80 /* IEEE Subnetwork Access Protocol */
-#define NLPID_CLNP 0x81 /* ISO/IEC 8473 */
-#define NLPID_ESIS 0x82 /* ISO/IEC 9542 */
-#define NLPID_ISIS 0x83 /* ISO/IEC ISIS */
-#define NLPID_Q933 0x08 /* CCITT Q.933 */
-
-/* Miscellaneous */
-#define WAN_IFNAME_SZ 15 /* max length of the interface name */
-#define WAN_DRVNAME_SZ 15 /* max length of the link driver name */
-#define WAN_ADDRESS_SZ 31 /* max length of the WAN media address */
-#define USED_BY_FIELD 8 /* max length of the used by field */
-
-/* Defines for UDP PACKET TYPE */
-#define UDP_PTPIPE_TYPE 0x01
-#define UDP_FPIPE_TYPE 0x02
-#define UDP_CPIPE_TYPE 0x03
-#define UDP_DRVSTATS_TYPE 0x04
-#define UDP_INVALID_TYPE 0x05
-
-/* Command return code */
-#define CMD_OK 0 /* normal firmware return code */
-#define CMD_TIMEOUT 0xFF /* firmware command timed out */
-
-/* UDP Packet Management */
-#define UDP_PKT_FRM_STACK 0x00
-#define UDP_PKT_FRM_NETWORK 0x01
-
-/* Maximum interrupt test counter */
-#define MAX_INTR_TEST_COUNTER 100
-
-/* Critical Values for RACE conditions*/
-#define CRITICAL_IN_ISR 0xA1
-#define CRITICAL_INTR_HANDLED 0xB1
-
-/****** Data Types **********************************************************/
-
-/*----------------------------------------------------------------------------
- * X.25-specific link-level configuration.
- */
-typedef struct wan_x25_conf
-{
- unsigned lo_pvc; /* lowest permanent circuit number */
- unsigned hi_pvc; /* highest permanent circuit number */
- unsigned lo_svc; /* lowest switched circuit number */
- unsigned hi_svc; /* highest switched circuit number */
- unsigned hdlc_window; /* HDLC window size (1..7) */
- unsigned pkt_window; /* X.25 packet window size (1..7) */
- unsigned t1; /* HDLC timer T1, sec (1..30) */
- unsigned t2; /* HDLC timer T2, sec (0..29) */
- unsigned t4; /* HDLC supervisory frame timer = T4 * T1 */
- unsigned n2; /* HDLC retransmission limit (1..30) */
- unsigned t10_t20; /* X.25 RESTART timeout, sec (1..255) */
- unsigned t11_t21; /* X.25 CALL timeout, sec (1..255) */
- unsigned t12_t22; /* X.25 RESET timeout, sec (1..255) */
- unsigned t13_t23; /* X.25 CLEAR timeout, sec (1..255) */
- unsigned t16_t26; /* X.25 INTERRUPT timeout, sec (1..255) */
- unsigned t28; /* X.25 REGISTRATION timeout, sec (1..255) */
- unsigned r10_r20; /* RESTART retransmission limit (0..250) */
- unsigned r12_r22; /* RESET retransmission limit (0..250) */
- unsigned r13_r23; /* CLEAR retransmission limit (0..250) */
- unsigned ccitt_compat; /* compatibility mode: 1988/1984/1980 */
- unsigned x25_conf_opt; /* User defined x25 config optoins */
- unsigned char LAPB_hdlc_only; /* Run in HDLC only mode */
- unsigned char logging; /* Control connection logging */
- unsigned char oob_on_modem; /* Whether to send modem status to the user app */
-} wan_x25_conf_t;
-
-/*----------------------------------------------------------------------------
- * Frame relay specific link-level configuration.
- */
-typedef struct wan_fr_conf
-{
- unsigned signalling; /* local in-channel signalling type */
- unsigned t391; /* link integrity verification timer */
- unsigned t392; /* polling verification timer */
- unsigned n391; /* full status polling cycle counter */
- unsigned n392; /* error threshold counter */
- unsigned n393; /* monitored events counter */
- unsigned dlci_num; /* number of DLCs (access node) */
- unsigned dlci[100]; /* List of all DLCIs */
-} wan_fr_conf_t;
-
-/*----------------------------------------------------------------------------
- * PPP-specific link-level configuration.
- */
-typedef struct wan_ppp_conf
-{
- unsigned restart_tmr; /* restart timer */
- unsigned auth_rsrt_tmr; /* authentication timer */
- unsigned auth_wait_tmr; /* authentication timer */
- unsigned mdm_fail_tmr; /* modem failure timer */
- unsigned dtr_drop_tmr; /* DTR drop timer */
- unsigned connect_tmout; /* connection timeout */
- unsigned conf_retry; /* max. retry */
- unsigned term_retry; /* max. retry */
- unsigned fail_retry; /* max. retry */
- unsigned auth_retry; /* max. retry */
- unsigned auth_options; /* authentication opt. */
- unsigned ip_options; /* IP options */
- char authenticator; /* AUTHENTICATOR or not */
- char ip_mode; /* Static/Host/Peer */
-} wan_ppp_conf_t;
-
-/*----------------------------------------------------------------------------
- * CHDLC-specific link-level configuration.
- */
-typedef struct wan_chdlc_conf
-{
- unsigned char ignore_dcd; /* Protocol options: */
- unsigned char ignore_cts; /* Ignore these to determine */
- unsigned char ignore_keepalive; /* link status (Yes or No) */
- unsigned char hdlc_streaming; /* hdlc_streaming mode (Y/N) */
- unsigned char receive_only; /* no transmit buffering (Y/N) */
- unsigned keepalive_tx_tmr; /* transmit keepalive timer */
- unsigned keepalive_rx_tmr; /* receive keepalive timer */
- unsigned keepalive_err_margin; /* keepalive_error_tolerance */
- unsigned slarp_timer; /* SLARP request timer */
-} wan_chdlc_conf_t;
-
-
-/*----------------------------------------------------------------------------
- * WAN device configuration. Passed to ROUTER_SETUP IOCTL.
- */
-typedef struct wandev_conf
-{
- unsigned magic; /* magic number (for verification) */
- unsigned config_id; /* configuration structure identifier */
- /****** hardware configuration ******/
- unsigned ioport; /* adapter I/O port base */
- unsigned long maddr; /* dual-port memory address */
- unsigned msize; /* dual-port memory size */
- int irq; /* interrupt request level */
- int dma; /* DMA request level */
- char S514_CPU_no[1]; /* S514 PCI adapter CPU number ('A' or 'B') */
- unsigned PCI_slot_no; /* S514 PCI adapter slot number */
- char auto_pci_cfg; /* S515 PCI automatic slot detection */
- char comm_port; /* Communication Port (PRI=0, SEC=1) */
- unsigned bps; /* data transfer rate */
- unsigned mtu; /* maximum transmit unit size */
- unsigned udp_port; /* UDP port for management */
- unsigned char ttl; /* Time To Live for UDP security */
- unsigned char ft1; /* FT1 Configurator Option */
- char interface; /* RS-232/V.35, etc. */
- char clocking; /* external/internal */
- char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */
- char station; /* DTE/DCE, primary/secondary, etc. */
- char connection; /* permanent/switched/on-demand */
- char read_mode; /* read mode: Polling or interrupt */
- char receive_only; /* disable tx buffers */
- char tty; /* Create a fake tty device */
- unsigned tty_major; /* Major number for wanpipe tty device */
- unsigned tty_minor; /* Minor number for wanpipe tty device */
- unsigned tty_mode; /* TTY operation mode SYNC or ASYNC */
- char backup; /* Backup Mode */
- unsigned hw_opt[4]; /* other hardware options */
- unsigned reserved[4];
- /****** arbitrary data ***************/
- unsigned data_size; /* data buffer size */
- void* data; /* data buffer, e.g. firmware */
- union /****** protocol-specific ************/
- {
- wan_x25_conf_t x25; /* X.25 configuration */
- wan_ppp_conf_t ppp; /* PPP configuration */
- wan_fr_conf_t fr; /* frame relay configuration */
- wan_chdlc_conf_t chdlc; /* Cisco HDLC configuration */
- } u;
-} wandev_conf_t;
-
-/* 'config_id' definitions */
-#define WANCONFIG_X25 101 /* X.25 link */
-#define WANCONFIG_FR 102 /* frame relay link */
-#define WANCONFIG_PPP 103 /* synchronous PPP link */
-#define WANCONFIG_CHDLC 104 /* Cisco HDLC Link */
-#define WANCONFIG_BSC 105 /* BiSync Streaming */
-#define WANCONFIG_HDLC 106 /* HDLC Support */
-#define WANCONFIG_MPPP 107 /* Multi Port PPP over RAW CHDLC */
-
-/*
- * Configuration options defines.
- */
-/* general options */
-#define WANOPT_OFF 0
-#define WANOPT_ON 1
-#define WANOPT_NO 0
-#define WANOPT_YES 1
-
-/* intercace options */
-#define WANOPT_RS232 0
-#define WANOPT_V35 1
-
-/* data encoding options */
-#define WANOPT_NRZ 0
-#define WANOPT_NRZI 1
-#define WANOPT_FM0 2
-#define WANOPT_FM1 3
-
-/* link type options */
-#define WANOPT_POINTTOPOINT 0 /* RTS always active */
-#define WANOPT_MULTIDROP 1 /* RTS is active when transmitting */
-
-/* clocking options */
-#define WANOPT_EXTERNAL 0
-#define WANOPT_INTERNAL 1
-
-/* station options */
-#define WANOPT_DTE 0
-#define WANOPT_DCE 1
-#define WANOPT_CPE 0
-#define WANOPT_NODE 1
-#define WANOPT_SECONDARY 0
-#define WANOPT_PRIMARY 1
-
-/* connection options */
-#define WANOPT_PERMANENT 0 /* DTR always active */
-#define WANOPT_SWITCHED 1 /* use DTR to setup link (dial-up) */
-#define WANOPT_ONDEMAND 2 /* activate DTR only before sending */
-
-/* frame relay in-channel signalling */
-#define WANOPT_FR_ANSI 1 /* ANSI T1.617 Annex D */
-#define WANOPT_FR_Q933 2 /* ITU Q.933A */
-#define WANOPT_FR_LMI 3 /* LMI */
-
-/* PPP IP Mode Options */
-#define WANOPT_PPP_STATIC 0
-#define WANOPT_PPP_HOST 1
-#define WANOPT_PPP_PEER 2
-
-/* ASY Mode Options */
-#define WANOPT_ONE 1
-#define WANOPT_TWO 2
-#define WANOPT_ONE_AND_HALF 3
-
-#define WANOPT_NONE 0
-#define WANOPT_ODD 1
-#define WANOPT_EVEN 2
-
-/* CHDLC Protocol Options */
-/* DF Commmented out for now.
-
-#define WANOPT_CHDLC_NO_DCD IGNORE_DCD_FOR_LINK_STAT
-#define WANOPT_CHDLC_NO_CTS IGNORE_CTS_FOR_LINK_STAT
-#define WANOPT_CHDLC_NO_KEEPALIVE IGNORE_KPALV_FOR_LINK_STAT
-*/
-
-/* Port options */
-#define WANOPT_PRI 0
-#define WANOPT_SEC 1
-/* read mode */
-#define WANOPT_INTR 0
-#define WANOPT_POLL 1
-
-
-#define WANOPT_TTY_SYNC 0
-#define WANOPT_TTY_ASYNC 1
-/*----------------------------------------------------------------------------
- * WAN Link Status Info (for ROUTER_STAT IOCTL).
- */
-typedef struct wandev_stat
-{
- unsigned state; /* link state */
- unsigned ndev; /* number of configured interfaces */
-
- /* link/interface configuration */
- unsigned connection; /* permanent/switched/on-demand */
- unsigned media_type; /* Frame relay/PPP/X.25/SDLC, etc. */
- unsigned mtu; /* max. transmit unit for this device */
-
- /* physical level statistics */
- unsigned modem_status; /* modem status */
- unsigned rx_frames; /* received frames count */
- unsigned rx_overruns; /* receiver overrun error count */
- unsigned rx_crc_err; /* receive CRC error count */
- unsigned rx_aborts; /* received aborted frames count */
- unsigned rx_bad_length; /* unexpetedly long/short frames count */
- unsigned rx_dropped; /* frames discarded at device level */
- unsigned tx_frames; /* transmitted frames count */
- unsigned tx_underruns; /* aborted transmissions (underruns) count */
- unsigned tx_timeouts; /* transmission timeouts */
- unsigned tx_rejects; /* other transmit errors */
-
- /* media level statistics */
- unsigned rx_bad_format; /* frames with invalid format */
- unsigned rx_bad_addr; /* frames with invalid media address */
- unsigned tx_retries; /* frames re-transmitted */
- unsigned reserved[16]; /* reserved for future use */
-} wandev_stat_t;
-
-/* 'state' defines */
-enum wan_states
-{
- WAN_UNCONFIGURED, /* link/channel is not configured */
- WAN_DISCONNECTED, /* link/channel is disconnected */
- WAN_CONNECTING, /* connection is in progress */
- WAN_CONNECTED, /* link/channel is operational */
- WAN_LIMIT, /* for verification only */
- WAN_DUALPORT, /* for Dual Port cards */
- WAN_DISCONNECTING,
- WAN_FT1_READY /* FT1 Configurator Ready */
-};
-
-enum {
- WAN_LOCAL_IP,
- WAN_POINTOPOINT_IP,
- WAN_NETMASK_IP,
- WAN_BROADCAST_IP
-};
-
-/* 'modem_status' masks */
-#define WAN_MODEM_CTS 0x0001 /* CTS line active */
-#define WAN_MODEM_DCD 0x0002 /* DCD line active */
-#define WAN_MODEM_DTR 0x0010 /* DTR line active */
-#define WAN_MODEM_RTS 0x0020 /* RTS line active */
-
-/*----------------------------------------------------------------------------
- * WAN interface (logical channel) configuration (for ROUTER_IFNEW IOCTL).
- */
-typedef struct wanif_conf
-{
- unsigned magic; /* magic number */
- unsigned config_id; /* configuration identifier */
- char name[WAN_IFNAME_SZ+1]; /* interface name, ASCIIZ */
- char addr[WAN_ADDRESS_SZ+1]; /* media address, ASCIIZ */
- char usedby[USED_BY_FIELD]; /* used by API or WANPIPE */
- unsigned idle_timeout; /* sec, before disconnecting */
- unsigned hold_timeout; /* sec, before re-connecting */
- unsigned cir; /* Committed Information Rate fwd,bwd*/
- unsigned bc; /* Committed Burst Size fwd, bwd */
- unsigned be; /* Excess Burst Size fwd, bwd */
- unsigned char enable_IPX; /* Enable or Disable IPX */
- unsigned char inarp; /* Send Inverse ARP requests Y/N */
- unsigned inarp_interval; /* sec, between InARP requests */
- unsigned long network_number; /* Network Number for IPX */
- char mc; /* Multicast on or off */
- char local_addr[WAN_ADDRESS_SZ+1];/* local media address, ASCIIZ */
- unsigned char port; /* board port */
- unsigned char protocol; /* prococol used in this channel (TCPOX25 or X25) */
- char pap; /* PAP enabled or disabled */
- char chap; /* CHAP enabled or disabled */
- unsigned char userid[511]; /* List of User Id */
- unsigned char passwd[511]; /* List of passwords */
- unsigned char sysname[31]; /* Name of the system */
- unsigned char ignore_dcd; /* Protocol options: */
- unsigned char ignore_cts; /* Ignore these to determine */
- unsigned char ignore_keepalive; /* link status (Yes or No) */
- unsigned char hdlc_streaming; /* Hdlc streaming mode (Y/N) */
- unsigned keepalive_tx_tmr; /* transmit keepalive timer */
- unsigned keepalive_rx_tmr; /* receive keepalive timer */
- unsigned keepalive_err_margin; /* keepalive_error_tolerance */
- unsigned slarp_timer; /* SLARP request timer */
- unsigned char ttl; /* Time To Live for UDP security */
- char interface; /* RS-232/V.35, etc. */
- char clocking; /* external/internal */
- unsigned bps; /* data transfer rate */
- unsigned mtu; /* maximum transmit unit size */
- unsigned char if_down; /* brind down interface when disconnected */
- unsigned char gateway; /* Is this interface a gateway */
- unsigned char true_if_encoding; /* Set the dev->type to true board protocol */
-
- unsigned char asy_data_trans; /* async API options */
- unsigned char rts_hs_for_receive; /* async Protocol options */
- unsigned char xon_xoff_hs_for_receive;
- unsigned char xon_xoff_hs_for_transmit;
- unsigned char dcd_hs_for_transmit;
- unsigned char cts_hs_for_transmit;
- unsigned char async_mode;
- unsigned tx_bits_per_char;
- unsigned rx_bits_per_char;
- unsigned stop_bits;
- unsigned char parity;
- unsigned break_timer;
- unsigned inter_char_timer;
- unsigned rx_complete_length;
- unsigned xon_char;
- unsigned xoff_char;
- unsigned char receive_only; /* no transmit buffering (Y/N) */
-} wanif_conf_t;
-
-#ifdef __KERNEL__
-/****** Kernel Interface ****************************************************/
-
-#include <linux/fs.h> /* support for device drivers */
-#include <linux/proc_fs.h> /* proc filesystem pragmatics */
-#include <linux/netdevice.h> /* support for network drivers */
-#include <linux/spinlock.h> /* Support for SMP Locking */
-
-/*----------------------------------------------------------------------------
- * WAN device data space.
- */
-struct wan_device {
- unsigned magic; /* magic number */
- char* name; /* -> WAN device name (ASCIIZ) */
- void* private; /* -> driver private data */
- unsigned config_id; /* Configuration ID */
- /****** hardware configuration ******/
- unsigned ioport; /* adapter I/O port base #1 */
- char S514_cpu_no[1]; /* PCI CPU Number */
- unsigned char S514_slot_no; /* PCI Slot Number */
- unsigned long maddr; /* dual-port memory address */
- unsigned msize; /* dual-port memory size */
- int irq; /* interrupt request level */
- int dma; /* DMA request level */
- unsigned bps; /* data transfer rate */
- unsigned mtu; /* max physical transmit unit size */
- unsigned udp_port; /* UDP port for management */
- unsigned char ttl; /* Time To Live for UDP security */
- unsigned enable_tx_int; /* Transmit Interrupt enabled or not */
- char interface; /* RS-232/V.35, etc. */
- char clocking; /* external/internal */
- char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */
- char station; /* DTE/DCE, primary/secondary, etc. */
- char connection; /* permanent/switched/on-demand */
- char signalling; /* Signalling RS232 or V35 */
- char read_mode; /* read mode: Polling or interrupt */
- char new_if_cnt; /* Number of interfaces per wanpipe */
- char del_if_cnt; /* Number of times del_if() gets called */
- unsigned char piggyback; /* Piggibacking a port */
- unsigned hw_opt[4]; /* other hardware options */
- /****** status and statistics *******/
- char state; /* device state */
- char api_status; /* device api status */
- struct net_device_stats stats; /* interface statistics */
- unsigned reserved[16]; /* reserved for future use */
- unsigned long critical; /* critical section flag */
- spinlock_t lock; /* Support for SMP Locking */
-
- /****** device management methods ***/
- int (*setup) (struct wan_device *wandev, wandev_conf_t *conf);
- int (*shutdown) (struct wan_device *wandev);
- int (*update) (struct wan_device *wandev);
- int (*ioctl) (struct wan_device *wandev, unsigned cmd,
- unsigned long arg);
- int (*new_if)(struct wan_device *wandev, struct net_device *dev,
- wanif_conf_t *conf);
- int (*del_if)(struct wan_device *wandev, struct net_device *dev);
- /****** maintained by the router ****/
- struct wan_device* next; /* -> next device */
- struct net_device* dev; /* list of network interfaces */
- unsigned ndev; /* number of interfaces */
- struct proc_dir_entry *dent; /* proc filesystem entry */
-};
-
-/* Public functions available for device drivers */
-extern int register_wan_device(struct wan_device *wandev);
-extern int unregister_wan_device(char *name);
-__be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev);
-int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev,
- unsigned short type);
-
-/* Proc interface functions. These must not be called by the drivers! */
-extern int wanrouter_proc_init(void);
-extern void wanrouter_proc_cleanup(void);
-extern int wanrouter_proc_add(struct wan_device *wandev);
-extern int wanrouter_proc_delete(struct wan_device *wandev);
-extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
-
-extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
-extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
-
-
-
-/* Public Data */
-/* list of registered devices */
-extern struct wan_device *wanrouter_router_devlist;
-
-#endif /* __KERNEL__ */
-#endif /* _ROUTER_H */
diff --git a/original/linux/watchdog.h b/original/linux/watchdog.h
deleted file mode 100644
index ac40716..0000000
--- a/original/linux/watchdog.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Generic watchdog defines. Derived from..
- *
- * Berkshire PC Watchdog Defines
- * by Ken Hollis <khollis@bitgate.com>
- *
- */
-
-#ifndef _LINUX_WATCHDOG_H
-#define _LINUX_WATCHDOG_H
-
-#include <linux/ioctl.h>
-#include <linux/types.h>
-
-#define WATCHDOG_IOCTL_BASE 'W'
-
-struct watchdog_info {
- __u32 options; /* Options the card/driver supports */
- __u32 firmware_version; /* Firmware version of the card */
- __u8 identity[32]; /* Identity of the board */
-};
-
-#define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info)
-#define WDIOC_GETSTATUS _IOR(WATCHDOG_IOCTL_BASE, 1, int)
-#define WDIOC_GETBOOTSTATUS _IOR(WATCHDOG_IOCTL_BASE, 2, int)
-#define WDIOC_GETTEMP _IOR(WATCHDOG_IOCTL_BASE, 3, int)
-#define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int)
-#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int)
-#define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int)
-#define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int)
-#define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int)
-#define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int)
-#define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int)
-
-#define WDIOF_UNKNOWN -1 /* Unknown flag error */
-#define WDIOS_UNKNOWN -1 /* Unknown status error */
-
-#define WDIOF_OVERHEAT 0x0001 /* Reset due to CPU overheat */
-#define WDIOF_FANFAULT 0x0002 /* Fan failed */
-#define WDIOF_EXTERN1 0x0004 /* External relay 1 */
-#define WDIOF_EXTERN2 0x0008 /* External relay 2 */
-#define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */
-#define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */
-#define WDIOF_POWEROVER 0x0040 /* Power over voltage */
-#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */
-#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */
-#define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */
-#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */
-
-#define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */
-#define WDIOS_ENABLECARD 0x0002 /* Turn on the watchdog timer */
-#define WDIOS_TEMPPANIC 0x0004 /* Kernel panic on temperature trip */
-
-#ifdef __KERNEL__
-
-#include <linux/bitops.h>
-
-struct watchdog_ops;
-struct watchdog_device;
-
-/** struct watchdog_ops - The watchdog-devices operations
- *
- * @owner: The module owner.
- * @start: The routine for starting the watchdog device.
- * @stop: The routine for stopping the watchdog device.
- * @ping: The routine that sends a keepalive ping to the watchdog device.
- * @status: The routine that shows the status of the watchdog device.
- * @set_timeout:The routine for setting the watchdog devices timeout value.
- * @get_timeleft:The routine that get's the time that's left before a reset.
- * @ioctl: The routines that handles extra ioctl calls.
- *
- * The watchdog_ops structure contains a list of low-level operations
- * that control a watchdog device. It also contains the module that owns
- * these operations. The start and stop function are mandatory, all other
- * functions are optonal.
- */
-struct watchdog_ops {
- struct module *owner;
- /* mandatory operations */
- int (*start)(struct watchdog_device *);
- int (*stop)(struct watchdog_device *);
- /* optional operations */
- int (*ping)(struct watchdog_device *);
- unsigned int (*status)(struct watchdog_device *);
- int (*set_timeout)(struct watchdog_device *, unsigned int);
- unsigned int (*get_timeleft)(struct watchdog_device *);
- long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long);
-};
-
-/** struct watchdog_device - The structure that defines a watchdog device
- *
- * @info: Pointer to a watchdog_info structure.
- * @ops: Pointer to the list of watchdog operations.
- * @bootstatus: Status of the watchdog device at boot.
- * @timeout: The watchdog devices timeout value.
- * @min_timeout:The watchdog devices minimum timeout value.
- * @max_timeout:The watchdog devices maximum timeout value.
- * @driver-data:Pointer to the drivers private data.
- * @status: Field that contains the devices internal status bits.
- *
- * The watchdog_device structure contains all information about a
- * watchdog timer device.
- *
- * The driver-data field may not be accessed directly. It must be accessed
- * via the watchdog_set_drvdata and watchdog_get_drvdata helpers.
- */
-struct watchdog_device {
- const struct watchdog_info *info;
- const struct watchdog_ops *ops;
- unsigned int bootstatus;
- unsigned int timeout;
- unsigned int min_timeout;
- unsigned int max_timeout;
- void *driver_data;
- unsigned long status;
-/* Bit numbers for status flags */
-#define WDOG_ACTIVE 0 /* Is the watchdog running/active */
-#define WDOG_DEV_OPEN 1 /* Opened via /dev/watchdog ? */
-#define WDOG_ALLOW_RELEASE 2 /* Did we receive the magic char ? */
-#define WDOG_NO_WAY_OUT 3 /* Is 'nowayout' feature set ? */
-};
-
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
-#define WATCHDOG_NOWAYOUT 1
-#define WATCHDOG_NOWAYOUT_INIT_STATUS (1 << WDOG_NO_WAY_OUT)
-#else
-#define WATCHDOG_NOWAYOUT 0
-#define WATCHDOG_NOWAYOUT_INIT_STATUS 0
-#endif
-
-/* Use the following function to set the nowayout feature */
-static inline void watchdog_set_nowayout(struct watchdog_device *wdd, bool nowayout)
-{
- if (nowayout)
- set_bit(WDOG_NO_WAY_OUT, &wdd->status);
-}
-
-/* Use the following functions to manipulate watchdog driver specific data */
-static inline void watchdog_set_drvdata(struct watchdog_device *wdd, void *data)
-{
- wdd->driver_data = data;
-}
-
-static inline void *watchdog_get_drvdata(struct watchdog_device *wdd)
-{
- return wdd->driver_data;
-}
-
-/* drivers/watchdog/core/watchdog_core.c */
-extern int watchdog_register_device(struct watchdog_device *);
-extern void watchdog_unregister_device(struct watchdog_device *);
-
-#endif /* __KERNEL__ */
-
-#endif /* ifndef _LINUX_WATCHDOG_H */
diff --git a/original/linux/wireless.h b/original/linux/wireless.h
deleted file mode 100644
index 1358856..0000000
--- a/original/linux/wireless.h
+++ /dev/null
@@ -1,1070 +0,0 @@
-/*
- * This file define a set of standard wireless extensions
- *
- * Version : 20 17.2.06
- *
- * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
- * Copyright (c) 1997-2006 Jean Tourrilhes, All Rights Reserved.
- */
-
-#ifndef _LINUX_WIRELESS_H
-#define _LINUX_WIRELESS_H
-
-/************************** DOCUMENTATION **************************/
-/*
- * Initial APIs (1996 -> onward) :
- * -----------------------------
- * Basically, the wireless extensions are for now a set of standard ioctl
- * call + /proc/net/wireless
- *
- * The entry /proc/net/wireless give statistics and information on the
- * driver.
- * This is better than having each driver having its entry because
- * its centralised and we may remove the driver module safely.
- *
- * Ioctl are used to configure the driver and issue commands. This is
- * better than command line options of insmod because we may want to
- * change dynamically (while the driver is running) some parameters.
- *
- * The ioctl mechanimsm are copied from standard devices ioctl.
- * We have the list of command plus a structure descibing the
- * data exchanged...
- * Note that to add these ioctl, I was obliged to modify :
- * # net/core/dev.c (two place + add include)
- * # net/ipv4/af_inet.c (one place + add include)
- *
- * /proc/net/wireless is a copy of /proc/net/dev.
- * We have a structure for data passed from the driver to /proc/net/wireless
- * Too add this, I've modified :
- * # net/core/dev.c (two other places)
- * # include/linux/netdevice.h (one place)
- * # include/linux/proc_fs.h (one place)
- *
- * New driver API (2002 -> onward) :
- * -------------------------------
- * This file is only concerned with the user space API and common definitions.
- * The new driver API is defined and documented in :
- * # include/net/iw_handler.h
- *
- * Note as well that /proc/net/wireless implementation has now moved in :
- * # net/core/wireless.c
- *
- * Wireless Events (2002 -> onward) :
- * --------------------------------
- * Events are defined at the end of this file, and implemented in :
- * # net/core/wireless.c
- *
- * Other comments :
- * --------------
- * Do not add here things that are redundant with other mechanisms
- * (drivers init, ifconfig, /proc/net/dev, ...) and with are not
- * wireless specific.
- *
- * These wireless extensions are not magic : each driver has to provide
- * support for them...
- *
- * IMPORTANT NOTE : As everything in the kernel, this is very much a
- * work in progress. Contact me if you have ideas of improvements...
- */
-
-/***************************** INCLUDES *****************************/
-
-#include <linux/types.h> /* for "caddr_t" et al */
-#include <linux/socket.h> /* for "struct sockaddr" et al */
-#include <linux/if.h> /* for IFNAMSIZ and co... */
-
-/***************************** VERSION *****************************/
-/*
- * This constant is used to know the availability of the wireless
- * extensions and to know which version of wireless extensions it is
- * (there is some stuff that will be added in the future...)
- * I just plan to increment with each new version.
- */
-#define WIRELESS_EXT 20
-
-/*
- * Changes :
- *
- * V2 to V3
- * --------
- * Alan Cox start some incompatibles changes. I've integrated a bit more.
- * - Encryption renamed to Encode to avoid US regulation problems
- * - Frequency changed from float to struct to avoid problems on old 386
- *
- * V3 to V4
- * --------
- * - Add sensitivity
- *
- * V4 to V5
- * --------
- * - Missing encoding definitions in range
- * - Access points stuff
- *
- * V5 to V6
- * --------
- * - 802.11 support (ESSID ioctls)
- *
- * V6 to V7
- * --------
- * - define IW_ESSID_MAX_SIZE and IW_MAX_AP
- *
- * V7 to V8
- * --------
- * - Changed my e-mail address
- * - More 802.11 support (nickname, rate, rts, frag)
- * - List index in frequencies
- *
- * V8 to V9
- * --------
- * - Support for 'mode of operation' (ad-hoc, managed...)
- * - Support for unicast and multicast power saving
- * - Change encoding to support larger tokens (>64 bits)
- * - Updated iw_params (disable, flags) and use it for NWID
- * - Extracted iw_point from iwreq for clarity
- *
- * V9 to V10
- * ---------
- * - Add PM capability to range structure
- * - Add PM modifier : MAX/MIN/RELATIVE
- * - Add encoding option : IW_ENCODE_NOKEY
- * - Add TxPower ioctls (work like TxRate)
- *
- * V10 to V11
- * ----------
- * - Add WE version in range (help backward/forward compatibility)
- * - Add retry ioctls (work like PM)
- *
- * V11 to V12
- * ----------
- * - Add SIOCSIWSTATS to get /proc/net/wireless programatically
- * - Add DEV PRIVATE IOCTL to avoid collisions in SIOCDEVPRIVATE space
- * - Add new statistics (frag, retry, beacon)
- * - Add average quality (for user space calibration)
- *
- * V12 to V13
- * ----------
- * - Document creation of new driver API.
- * - Extract union iwreq_data from struct iwreq (for new driver API).
- * - Rename SIOCSIWNAME as SIOCSIWCOMMIT
- *
- * V13 to V14
- * ----------
- * - Wireless Events support : define struct iw_event
- * - Define additional specific event numbers
- * - Add "addr" and "param" fields in union iwreq_data
- * - AP scanning stuff (SIOCSIWSCAN and friends)
- *
- * V14 to V15
- * ----------
- * - Add IW_PRIV_TYPE_ADDR for struct sockaddr private arg
- * - Make struct iw_freq signed (both m & e), add explicit padding
- * - Add IWEVCUSTOM for driver specific event/scanning token
- * - Add IW_MAX_GET_SPY for driver returning a lot of addresses
- * - Add IW_TXPOW_RANGE for range of Tx Powers
- * - Add IWEVREGISTERED & IWEVEXPIRED events for Access Points
- * - Add IW_MODE_MONITOR for passive monitor
- *
- * V15 to V16
- * ----------
- * - Increase the number of bitrates in iw_range to 32 (for 802.11g)
- * - Increase the number of frequencies in iw_range to 32 (for 802.11b+a)
- * - Reshuffle struct iw_range for increases, add filler
- * - Increase IW_MAX_AP to 64 for driver returning a lot of addresses
- * - Remove IW_MAX_GET_SPY because conflict with enhanced spy support
- * - Add SIOCSIWTHRSPY/SIOCGIWTHRSPY and "struct iw_thrspy"
- * - Add IW_ENCODE_TEMP and iw_range->encoding_login_index
- *
- * V16 to V17
- * ----------
- * - Add flags to frequency -> auto/fixed
- * - Document (struct iw_quality *)->updated, add new flags (INVALID)
- * - Wireless Event capability in struct iw_range
- * - Add support for relative TxPower (yick !)
- *
- * V17 to V18 (From Jouni Malinen <jkmaline@cc.hut.fi>)
- * ----------
- * - Add support for WPA/WPA2
- * - Add extended encoding configuration (SIOCSIWENCODEEXT and
- * SIOCGIWENCODEEXT)
- * - Add SIOCSIWGENIE/SIOCGIWGENIE
- * - Add SIOCSIWMLME
- * - Add SIOCSIWPMKSA
- * - Add struct iw_range bit field for supported encoding capabilities
- * - Add optional scan request parameters for SIOCSIWSCAN
- * - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
- * related parameters (extensible up to 4096 parameter values)
- * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE,
- * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND
- *
- * V18 to V19
- * ----------
- * - Remove (struct iw_point *)->pointer from events and streams
- * - Remove header includes to help user space
- * - Increase IW_ENCODING_TOKEN_MAX from 32 to 64
- * - Add IW_QUAL_ALL_UPDATED and IW_QUAL_ALL_INVALID macros
- * - Add explicit flag to tell stats are in dBm : IW_QUAL_DBM
- * - Add IW_IOCTL_IDX() and IW_EVENT_IDX() macros
- *
- * V19 to V20
- * ----------
- * - RtNetlink requests support (SET/GET)
- */
-
-/**************************** CONSTANTS ****************************/
-
-/* -------------------------- IOCTL LIST -------------------------- */
-
-/* Wireless Identification */
-#define SIOCSIWCOMMIT 0x8B00 /* Commit pending changes to driver */
-#define SIOCGIWNAME 0x8B01 /* get name == wireless protocol */
-/* SIOCGIWNAME is used to verify the presence of Wireless Extensions.
- * Common values : "IEEE 802.11-DS", "IEEE 802.11-FH", "IEEE 802.11b"...
- * Don't put the name of your driver there, it's useless. */
-
-/* Basic operations */
-#define SIOCSIWNWID 0x8B02 /* set network id (pre-802.11) */
-#define SIOCGIWNWID 0x8B03 /* get network id (the cell) */
-#define SIOCSIWFREQ 0x8B04 /* set channel/frequency (Hz) */
-#define SIOCGIWFREQ 0x8B05 /* get channel/frequency (Hz) */
-#define SIOCSIWMODE 0x8B06 /* set operation mode */
-#define SIOCGIWMODE 0x8B07 /* get operation mode */
-#define SIOCSIWSENS 0x8B08 /* set sensitivity (dBm) */
-#define SIOCGIWSENS 0x8B09 /* get sensitivity (dBm) */
-
-/* Informative stuff */
-#define SIOCSIWRANGE 0x8B0A /* Unused */
-#define SIOCGIWRANGE 0x8B0B /* Get range of parameters */
-#define SIOCSIWPRIV 0x8B0C /* Unused */
-#define SIOCGIWPRIV 0x8B0D /* get private ioctl interface info */
-#define SIOCSIWSTATS 0x8B0E /* Unused */
-#define SIOCGIWSTATS 0x8B0F /* Get /proc/net/wireless stats */
-/* SIOCGIWSTATS is strictly used between user space and the kernel, and
- * is never passed to the driver (i.e. the driver will never see it). */
-
-/* Spy support (statistics per MAC address - used for Mobile IP support) */
-#define SIOCSIWSPY 0x8B10 /* set spy addresses */
-#define SIOCGIWSPY 0x8B11 /* get spy info (quality of link) */
-#define SIOCSIWTHRSPY 0x8B12 /* set spy threshold (spy event) */
-#define SIOCGIWTHRSPY 0x8B13 /* get spy threshold */
-
-/* Access Point manipulation */
-#define SIOCSIWAP 0x8B14 /* set access point MAC addresses */
-#define SIOCGIWAP 0x8B15 /* get access point MAC addresses */
-#define SIOCGIWAPLIST 0x8B17 /* Deprecated in favor of scanning */
-#define SIOCSIWSCAN 0x8B18 /* trigger scanning (list cells) */
-#define SIOCGIWSCAN 0x8B19 /* get scanning results */
-
-/* 802.11 specific support */
-#define SIOCSIWESSID 0x8B1A /* set ESSID (network name) */
-#define SIOCGIWESSID 0x8B1B /* get ESSID */
-#define SIOCSIWNICKN 0x8B1C /* set node name/nickname */
-#define SIOCGIWNICKN 0x8B1D /* get node name/nickname */
-/* As the ESSID and NICKN are strings up to 32 bytes long, it doesn't fit
- * within the 'iwreq' structure, so we need to use the 'data' member to
- * point to a string in user space, like it is done for RANGE... */
-
-/* Other parameters useful in 802.11 and some other devices */
-#define SIOCSIWRATE 0x8B20 /* set default bit rate (bps) */
-#define SIOCGIWRATE 0x8B21 /* get default bit rate (bps) */
-#define SIOCSIWRTS 0x8B22 /* set RTS/CTS threshold (bytes) */
-#define SIOCGIWRTS 0x8B23 /* get RTS/CTS threshold (bytes) */
-#define SIOCSIWFRAG 0x8B24 /* set fragmentation thr (bytes) */
-#define SIOCGIWFRAG 0x8B25 /* get fragmentation thr (bytes) */
-#define SIOCSIWTXPOW 0x8B26 /* set transmit power (dBm) */
-#define SIOCGIWTXPOW 0x8B27 /* get transmit power (dBm) */
-#define SIOCSIWRETRY 0x8B28 /* set retry limits and lifetime */
-#define SIOCGIWRETRY 0x8B29 /* get retry limits and lifetime */
-
-/* Encoding stuff (scrambling, hardware security, WEP...) */
-#define SIOCSIWENCODE 0x8B2A /* set encoding token & mode */
-#define SIOCGIWENCODE 0x8B2B /* get encoding token & mode */
-/* Power saving stuff (power management, unicast and multicast) */
-#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
-#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
-
-/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
- * This ioctl uses struct iw_point and data buffer that includes IE id and len
- * fields. More than one IE may be included in the request. Setting the generic
- * IE to empty buffer (len=0) removes the generic IE from the driver. Drivers
- * are allowed to generate their own WPA/RSN IEs, but in these cases, drivers
- * are required to report the used IE as a wireless event, e.g., when
- * associating with an AP. */
-#define SIOCSIWGENIE 0x8B30 /* set generic IE */
-#define SIOCGIWGENIE 0x8B31 /* get generic IE */
-
-/* WPA : IEEE 802.11 MLME requests */
-#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses
- * struct iw_mlme */
-/* WPA : Authentication mode parameters */
-#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */
-#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */
-
-/* WPA : Extended version of encoding configuration */
-#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
-#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
-
-/* WPA2 : PMKSA cache management */
-#define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */
-
-/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
-
-/* These 32 ioctl are wireless device private, for 16 commands.
- * Each driver is free to use them for whatever purpose it chooses,
- * however the driver *must* export the description of those ioctls
- * with SIOCGIWPRIV and *must* use arguments as defined below.
- * If you don't follow those rules, DaveM is going to hate you (reason :
- * it make mixed 32/64bit operation impossible).
- */
-#define SIOCIWFIRSTPRIV 0x8BE0
-#define SIOCIWLASTPRIV 0x8BFF
-/* Previously, we were using SIOCDEVPRIVATE, but we now have our
- * separate range because of collisions with other tools such as
- * 'mii-tool'.
- * We now have 32 commands, so a bit more space ;-).
- * Also, all 'odd' commands are only usable by root and don't return the
- * content of ifr/iwr to user (but you are not obliged to use the set/get
- * convention, just use every other two command). More details in iwpriv.c.
- * And I repeat : you are not forced to use them with iwpriv, but you
- * must be compliant with it.
- */
-
-/* ------------------------- IOCTL STUFF ------------------------- */
-
-/* The first and the last (range) */
-#define SIOCIWFIRST 0x8B00
-#define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */
-#define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST)
-
-/* Even : get (world access), odd : set (root access) */
-#define IW_IS_SET(cmd) (!((cmd) & 0x1))
-#define IW_IS_GET(cmd) ((cmd) & 0x1)
-
-/* ----------------------- WIRELESS EVENTS ----------------------- */
-/* Those are *NOT* ioctls, do not issue request on them !!! */
-/* Most events use the same identifier as ioctl requests */
-
-#define IWEVTXDROP 0x8C00 /* Packet dropped to excessive retry */
-#define IWEVQUAL 0x8C01 /* Quality part of statistics (scan) */
-#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
-#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
-#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
-#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
- * (scan results); This includes id and
- * length fields. One IWEVGENIE may
- * contain more than one IE. Scan
- * results may contain one or more
- * IWEVGENIE events. */
-#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
- * (struct iw_michaelmicfailure)
- */
-#define IWEVASSOCREQIE 0x8C07 /* IEs used in (Re)Association Request.
- * The data includes id and length
- * fields and may contain more than one
- * IE. This event is required in
- * Managed mode if the driver
- * generates its own WPA/RSN IE. This
- * should be sent just before
- * IWEVREGISTERED event for the
- * association. */
-#define IWEVASSOCRESPIE 0x8C08 /* IEs used in (Re)Association
- * Response. The data includes id and
- * length fields and may contain more
- * than one IE. This may be sent
- * between IWEVASSOCREQIE and
- * IWEVREGISTERED events for the
- * association. */
-#define IWEVPMKIDCAND 0x8C09 /* PMKID candidate for RSN
- * pre-authentication
- * (struct iw_pmkid_cand) */
-
-#define IWEVFIRST 0x8C00
-#define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST)
-
-/* ------------------------- PRIVATE INFO ------------------------- */
-/*
- * The following is used with SIOCGIWPRIV. It allow a driver to define
- * the interface (name, type of data) for its private ioctl.
- * Privates ioctl are SIOCIWFIRSTPRIV -> SIOCIWLASTPRIV
- */
-
-#define IW_PRIV_TYPE_MASK 0x7000 /* Type of arguments */
-#define IW_PRIV_TYPE_NONE 0x0000
-#define IW_PRIV_TYPE_BYTE 0x1000 /* Char as number */
-#define IW_PRIV_TYPE_CHAR 0x2000 /* Char as character */
-#define IW_PRIV_TYPE_INT 0x4000 /* 32 bits int */
-#define IW_PRIV_TYPE_FLOAT 0x5000 /* struct iw_freq */
-#define IW_PRIV_TYPE_ADDR 0x6000 /* struct sockaddr */
-
-#define IW_PRIV_SIZE_FIXED 0x0800 /* Variable or fixed number of args */
-
-#define IW_PRIV_SIZE_MASK 0x07FF /* Max number of those args */
-
-/*
- * Note : if the number of args is fixed and the size < 16 octets,
- * instead of passing a pointer we will put args in the iwreq struct...
- */
-
-/* ----------------------- OTHER CONSTANTS ----------------------- */
-
-/* Maximum frequencies in the range struct */
-#define IW_MAX_FREQUENCIES 32
-/* Note : if you have something like 80 frequencies,
- * don't increase this constant and don't fill the frequency list.
- * The user will be able to set by channel anyway... */
-
-/* Maximum bit rates in the range struct */
-#define IW_MAX_BITRATES 32
-
-/* Maximum tx powers in the range struct */
-#define IW_MAX_TXPOWER 8
-/* Note : if you more than 8 TXPowers, just set the max and min or
- * a few of them in the struct iw_range. */
-
-/* Maximum of address that you may set with SPY */
-#define IW_MAX_SPY 8
-
-/* Maximum of address that you may get in the
- list of access points in range */
-#define IW_MAX_AP 64
-
-/* Maximum size of the ESSID and NICKN strings */
-#define IW_ESSID_MAX_SIZE 32
-
-/* Modes of operation */
-#define IW_MODE_AUTO 0 /* Let the driver decides */
-#define IW_MODE_ADHOC 1 /* Single cell network */
-#define IW_MODE_INFRA 2 /* Multi cell network, roaming, ... */
-#define IW_MODE_MASTER 3 /* Synchronisation master or Access Point */
-#define IW_MODE_REPEAT 4 /* Wireless Repeater (forwarder) */
-#define IW_MODE_SECOND 5 /* Secondary master/repeater (backup) */
-#define IW_MODE_MONITOR 6 /* Passive monitor (listen only) */
-
-/* Statistics flags (bitmask in updated) */
-#define IW_QUAL_QUAL_UPDATED 0x01 /* Value was updated since last read */
-#define IW_QUAL_LEVEL_UPDATED 0x02
-#define IW_QUAL_NOISE_UPDATED 0x04
-#define IW_QUAL_ALL_UPDATED 0x07
-#define IW_QUAL_DBM 0x08 /* Level + Noise are dBm */
-#define IW_QUAL_QUAL_INVALID 0x10 /* Driver doesn't provide value */
-#define IW_QUAL_LEVEL_INVALID 0x20
-#define IW_QUAL_NOISE_INVALID 0x40
-#define IW_QUAL_ALL_INVALID 0x70
-
-/* Frequency flags */
-#define IW_FREQ_AUTO 0x00 /* Let the driver decides */
-#define IW_FREQ_FIXED 0x01 /* Force a specific value */
-
-/* Maximum number of size of encoding token available
- * they are listed in the range structure */
-#define IW_MAX_ENCODING_SIZES 8
-
-/* Maximum size of the encoding token in bytes */
-#define IW_ENCODING_TOKEN_MAX 64 /* 512 bits (for now) */
-
-/* Flags for encoding (along with the token) */
-#define IW_ENCODE_INDEX 0x00FF /* Token index (if needed) */
-#define IW_ENCODE_FLAGS 0xFF00 /* Flags defined below */
-#define IW_ENCODE_MODE 0xF000 /* Modes defined below */
-#define IW_ENCODE_DISABLED 0x8000 /* Encoding disabled */
-#define IW_ENCODE_ENABLED 0x0000 /* Encoding enabled */
-#define IW_ENCODE_RESTRICTED 0x4000 /* Refuse non-encoded packets */
-#define IW_ENCODE_OPEN 0x2000 /* Accept non-encoded packets */
-#define IW_ENCODE_NOKEY 0x0800 /* Key is write only, so not present */
-#define IW_ENCODE_TEMP 0x0400 /* Temporary key */
-
-/* Power management flags available (along with the value, if any) */
-#define IW_POWER_ON 0x0000 /* No details... */
-#define IW_POWER_TYPE 0xF000 /* Type of parameter */
-#define IW_POWER_PERIOD 0x1000 /* Value is a period/duration of */
-#define IW_POWER_TIMEOUT 0x2000 /* Value is a timeout (to go asleep) */
-#define IW_POWER_MODE 0x0F00 /* Power Management mode */
-#define IW_POWER_UNICAST_R 0x0100 /* Receive only unicast messages */
-#define IW_POWER_MULTICAST_R 0x0200 /* Receive only multicast messages */
-#define IW_POWER_ALL_R 0x0300 /* Receive all messages though PM */
-#define IW_POWER_FORCE_S 0x0400 /* Force PM procedure for sending unicast */
-#define IW_POWER_REPEATER 0x0800 /* Repeat broadcast messages in PM period */
-#define IW_POWER_MODIFIER 0x000F /* Modify a parameter */
-#define IW_POWER_MIN 0x0001 /* Value is a minimum */
-#define IW_POWER_MAX 0x0002 /* Value is a maximum */
-#define IW_POWER_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
-
-/* Transmit Power flags available */
-#define IW_TXPOW_TYPE 0x00FF /* Type of value */
-#define IW_TXPOW_DBM 0x0000 /* Value is in dBm */
-#define IW_TXPOW_MWATT 0x0001 /* Value is in mW */
-#define IW_TXPOW_RELATIVE 0x0002 /* Value is in arbitrary units */
-#define IW_TXPOW_RANGE 0x1000 /* Range of value between min/max */
-
-/* Retry limits and lifetime flags available */
-#define IW_RETRY_ON 0x0000 /* No details... */
-#define IW_RETRY_TYPE 0xF000 /* Type of parameter */
-#define IW_RETRY_LIMIT 0x1000 /* Maximum number of retries*/
-#define IW_RETRY_LIFETIME 0x2000 /* Maximum duration of retries in us */
-#define IW_RETRY_MODIFIER 0x000F /* Modify a parameter */
-#define IW_RETRY_MIN 0x0001 /* Value is a minimum */
-#define IW_RETRY_MAX 0x0002 /* Value is a maximum */
-#define IW_RETRY_RELATIVE 0x0004 /* Value is not in seconds/ms/us */
-
-/* Scanning request flags */
-#define IW_SCAN_DEFAULT 0x0000 /* Default scan of the driver */
-#define IW_SCAN_ALL_ESSID 0x0001 /* Scan all ESSIDs */
-#define IW_SCAN_THIS_ESSID 0x0002 /* Scan only this ESSID */
-#define IW_SCAN_ALL_FREQ 0x0004 /* Scan all Frequencies */
-#define IW_SCAN_THIS_FREQ 0x0008 /* Scan only this Frequency */
-#define IW_SCAN_ALL_MODE 0x0010 /* Scan all Modes */
-#define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */
-#define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */
-#define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */
-/* struct iw_scan_req scan_type */
-#define IW_SCAN_TYPE_ACTIVE 0
-#define IW_SCAN_TYPE_PASSIVE 1
-/* Maximum size of returned data */
-#define IW_SCAN_MAX_DATA 4096 /* In bytes */
-
-/* Max number of char in custom event - use multiple of them if needed */
-#define IW_CUSTOM_MAX 256 /* In bytes */
-
-/* Generic information element */
-#define IW_GENERIC_IE_MAX 1024
-
-/* MLME requests (SIOCSIWMLME / struct iw_mlme) */
-#define IW_MLME_DEAUTH 0
-#define IW_MLME_DISASSOC 1
-
-/* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */
-#define IW_AUTH_INDEX 0x0FFF
-#define IW_AUTH_FLAGS 0xF000
-/* SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095)
- * (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the
- * parameter that is being set/get to; value will be read/written to
- * struct iw_param value field) */
-#define IW_AUTH_WPA_VERSION 0
-#define IW_AUTH_CIPHER_PAIRWISE 1
-#define IW_AUTH_CIPHER_GROUP 2
-#define IW_AUTH_KEY_MGMT 3
-#define IW_AUTH_TKIP_COUNTERMEASURES 4
-#define IW_AUTH_DROP_UNENCRYPTED 5
-#define IW_AUTH_80211_AUTH_ALG 6
-#define IW_AUTH_WPA_ENABLED 7
-#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
-#define IW_AUTH_ROAMING_CONTROL 9
-#define IW_AUTH_PRIVACY_INVOKED 10
-
-/* IW_AUTH_WPA_VERSION values (bit field) */
-#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
-#define IW_AUTH_WPA_VERSION_WPA 0x00000002
-#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
-
-/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
-#define IW_AUTH_CIPHER_NONE 0x00000001
-#define IW_AUTH_CIPHER_WEP40 0x00000002
-#define IW_AUTH_CIPHER_TKIP 0x00000004
-#define IW_AUTH_CIPHER_CCMP 0x00000008
-#define IW_AUTH_CIPHER_WEP104 0x00000010
-
-/* IW_AUTH_KEY_MGMT values (bit field) */
-#define IW_AUTH_KEY_MGMT_802_1X 1
-#define IW_AUTH_KEY_MGMT_PSK 2
-
-/* IW_AUTH_80211_AUTH_ALG values (bit field) */
-#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
-#define IW_AUTH_ALG_SHARED_KEY 0x00000002
-#define IW_AUTH_ALG_LEAP 0x00000004
-
-/* IW_AUTH_ROAMING_CONTROL values */
-#define IW_AUTH_ROAMING_ENABLE 0 /* driver/firmware based roaming */
-#define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming
- * control */
-
-/* SIOCSIWENCODEEXT definitions */
-#define IW_ENCODE_SEQ_MAX_SIZE 8
-/* struct iw_encode_ext ->alg */
-#define IW_ENCODE_ALG_NONE 0
-#define IW_ENCODE_ALG_WEP 1
-#define IW_ENCODE_ALG_TKIP 2
-#define IW_ENCODE_ALG_CCMP 3
-/* struct iw_encode_ext ->ext_flags */
-#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
-#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
-#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
-#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
-
-/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */
-#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */
-#define IW_MICFAILURE_GROUP 0x00000004
-#define IW_MICFAILURE_PAIRWISE 0x00000008
-#define IW_MICFAILURE_STAKEY 0x00000010
-#define IW_MICFAILURE_COUNT 0x00000060 /* 1 or 2 (0 = count not supported)
- */
-
-/* Bit field values for enc_capa in struct iw_range */
-#define IW_ENC_CAPA_WPA 0x00000001
-#define IW_ENC_CAPA_WPA2 0x00000002
-#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
-#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
-
-/* Event capability macros - in (struct iw_range *)->event_capa
- * Because we have more than 32 possible events, we use an array of
- * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */
-#define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \
- (cmd - SIOCIWFIRSTPRIV + 0x60) : \
- (cmd - SIOCSIWCOMMIT))
-#define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5)
-#define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F))
-/* Event capability constants - event autogenerated by the kernel
- * This list is valid for most 802.11 devices, customise as needed... */
-#define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | \
- IW_EVENT_CAPA_MASK(0x8B06) | \
- IW_EVENT_CAPA_MASK(0x8B1A))
-#define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A))
-/* "Easy" macro to set events in iw_range (less efficient) */
-#define IW_EVENT_CAPA_SET(event_capa, cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd))
-#define IW_EVENT_CAPA_SET_KERNEL(event_capa) {event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; }
-
-
-/****************************** TYPES ******************************/
-
-/* --------------------------- SUBTYPES --------------------------- */
-/*
- * Generic format for most parameters that fit in an int
- */
-struct iw_param
-{
- __s32 value; /* The value of the parameter itself */
- __u8 fixed; /* Hardware should not use auto select */
- __u8 disabled; /* Disable the feature */
- __u16 flags; /* Various specifc flags (if any) */
-};
-
-/*
- * For all data larger than 16 octets, we need to use a
- * pointer to memory allocated in user space.
- */
-struct iw_point
-{
- void __user *pointer; /* Pointer to the data (in user space) */
- __u16 length; /* number of fields or size in bytes */
- __u16 flags; /* Optional params */
-};
-
-/*
- * A frequency
- * For numbers lower than 10^9, we encode the number in 'm' and
- * set 'e' to 0
- * For number greater than 10^9, we divide it by the lowest power
- * of 10 to get 'm' lower than 10^9, with 'm'= f / (10^'e')...
- * The power of 10 is in 'e', the result of the division is in 'm'.
- */
-struct iw_freq
-{
- __s32 m; /* Mantissa */
- __s16 e; /* Exponent */
- __u8 i; /* List index (when in range struct) */
- __u8 flags; /* Flags (fixed/auto) */
-};
-
-/*
- * Quality of the link
- */
-struct iw_quality
-{
- __u8 qual; /* link quality (%retries, SNR,
- %missed beacons or better...) */
- __u8 level; /* signal level (dBm) */
- __u8 noise; /* noise level (dBm) */
- __u8 updated; /* Flags to know if updated */
-};
-
-/*
- * Packet discarded in the wireless adapter due to
- * "wireless" specific problems...
- * Note : the list of counter and statistics in net_device_stats
- * is already pretty exhaustive, and you should use that first.
- * This is only additional stats...
- */
-struct iw_discarded
-{
- __u32 nwid; /* Rx : Wrong nwid/essid */
- __u32 code; /* Rx : Unable to code/decode (WEP) */
- __u32 fragment; /* Rx : Can't perform MAC reassembly */
- __u32 retries; /* Tx : Max MAC retries num reached */
- __u32 misc; /* Others cases */
-};
-
-/*
- * Packet/Time period missed in the wireless adapter due to
- * "wireless" specific problems...
- */
-struct iw_missed
-{
- __u32 beacon; /* Missed beacons/superframe */
-};
-
-/*
- * Quality range (for spy threshold)
- */
-struct iw_thrspy
-{
- struct sockaddr addr; /* Source address (hw/mac) */
- struct iw_quality qual; /* Quality of the link */
- struct iw_quality low; /* Low threshold */
- struct iw_quality high; /* High threshold */
-};
-
-/*
- * Optional data for scan request
- *
- * Note: these optional parameters are controlling parameters for the
- * scanning behavior, these do not apply to getting scan results
- * (SIOCGIWSCAN). Drivers are expected to keep a local BSS table and
- * provide a merged results with all BSSes even if the previous scan
- * request limited scanning to a subset, e.g., by specifying an SSID.
- * Especially, scan results are required to include an entry for the
- * current BSS if the driver is in Managed mode and associated with an AP.
- */
-struct iw_scan_req
-{
- __u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */
- __u8 essid_len;
- __u8 num_channels; /* num entries in channel_list;
- * 0 = scan all allowed channels */
- __u8 flags; /* reserved as padding; use zero, this may
- * be used in the future for adding flags
- * to request different scan behavior */
- struct sockaddr bssid; /* ff:ff:ff:ff:ff:ff for broadcast BSSID or
- * individual address of a specific BSS */
-
- /*
- * Use this ESSID if IW_SCAN_THIS_ESSID flag is used instead of using
- * the current ESSID. This allows scan requests for specific ESSID
- * without having to change the current ESSID and potentially breaking
- * the current association.
- */
- __u8 essid[IW_ESSID_MAX_SIZE];
-
- /*
- * Optional parameters for changing the default scanning behavior.
- * These are based on the MLME-SCAN.request from IEEE Std 802.11.
- * TU is 1.024 ms. If these are set to 0, driver is expected to use
- * reasonable default values. min_channel_time defines the time that
- * will be used to wait for the first reply on each channel. If no
- * replies are received, next channel will be scanned after this. If
- * replies are received, total time waited on the channel is defined by
- * max_channel_time.
- */
- __u32 min_channel_time; /* in TU */
- __u32 max_channel_time; /* in TU */
-
- struct iw_freq channel_list[IW_MAX_FREQUENCIES];
-};
-
-/* ------------------------- WPA SUPPORT ------------------------- */
-
-/*
- * Extended data structure for get/set encoding (this is used with
- * SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and IW_ENCODE_*
- * flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and
- * only the data contents changes (key data -> this structure, including
- * key data).
- *
- * If the new key is the first group key, it will be set as the default
- * TX key. Otherwise, default TX key index is only changed if
- * IW_ENCODE_EXT_SET_TX_KEY flag is set.
- *
- * Key will be changed with SIOCSIWENCODEEXT in all cases except for
- * special "change TX key index" operation which is indicated by setting
- * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY.
- *
- * tx_seq/rx_seq are only used when respective
- * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal
- * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start
- * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally
- * used only by an Authenticator (AP or an IBSS station) to get the
- * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and
- * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
- * debugging/testing.
- */
-struct iw_encode_ext
-{
- __u32 ext_flags; /* IW_ENCODE_EXT_* */
- __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
- __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
- struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast
- * (group) keys or unicast address for
- * individual keys */
- __u16 alg; /* IW_ENCODE_ALG_* */
- __u16 key_len;
- __u8 key[0];
-};
-
-/* SIOCSIWMLME data */
-struct iw_mlme
-{
- __u16 cmd; /* IW_MLME_* */
- __u16 reason_code;
- struct sockaddr addr;
-};
-
-/* SIOCSIWPMKSA data */
-#define IW_PMKSA_ADD 1
-#define IW_PMKSA_REMOVE 2
-#define IW_PMKSA_FLUSH 3
-
-#define IW_PMKID_LEN 16
-
-struct iw_pmksa
-{
- __u32 cmd; /* IW_PMKSA_* */
- struct sockaddr bssid;
- __u8 pmkid[IW_PMKID_LEN];
-};
-
-/* IWEVMICHAELMICFAILURE data */
-struct iw_michaelmicfailure
-{
- __u32 flags;
- struct sockaddr src_addr;
- __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
-};
-
-/* IWEVPMKIDCAND data */
-#define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled */
-struct iw_pmkid_cand
-{
- __u32 flags; /* IW_PMKID_CAND_* */
- __u32 index; /* the smaller the index, the higher the
- * priority */
- struct sockaddr bssid;
-};
-
-/* ------------------------ WIRELESS STATS ------------------------ */
-/*
- * Wireless statistics (used for /proc/net/wireless)
- */
-struct iw_statistics
-{
- __u16 status; /* Status
- * - device dependent for now */
-
- struct iw_quality qual; /* Quality of the link
- * (instant/mean/max) */
- struct iw_discarded discard; /* Packet discarded counts */
- struct iw_missed miss; /* Packet missed counts */
-};
-
-/* ------------------------ IOCTL REQUEST ------------------------ */
-/*
- * This structure defines the payload of an ioctl, and is used
- * below.
- *
- * Note that this structure should fit on the memory footprint
- * of iwreq (which is the same as ifreq), which mean a max size of
- * 16 octets = 128 bits. Warning, pointers might be 64 bits wide...
- * You should check this when increasing the structures defined
- * above in this file...
- */
-union iwreq_data
-{
- /* Config - generic */
- char name[IFNAMSIZ];
- /* Name : used to verify the presence of wireless extensions.
- * Name of the protocol/provider... */
-
- struct iw_point essid; /* Extended network name */
- struct iw_param nwid; /* network id (or domain - the cell) */
- struct iw_freq freq; /* frequency or channel :
- * 0-1000 = channel
- * > 1000 = frequency in Hz */
-
- struct iw_param sens; /* signal level threshold */
- struct iw_param bitrate; /* default bit rate */
- struct iw_param txpower; /* default transmit power */
- struct iw_param rts; /* RTS threshold threshold */
- struct iw_param frag; /* Fragmentation threshold */
- __u32 mode; /* Operation mode */
- struct iw_param retry; /* Retry limits & lifetime */
-
- struct iw_point encoding; /* Encoding stuff : tokens */
- struct iw_param power; /* PM duration/timeout */
- struct iw_quality qual; /* Quality part of statistics */
-
- struct sockaddr ap_addr; /* Access point address */
- struct sockaddr addr; /* Destination address (hw/mac) */
-
- struct iw_param param; /* Other small parameters */
- struct iw_point data; /* Other large parameters */
-};
-
-/*
- * The structure to exchange data for ioctl.
- * This structure is the same as 'struct ifreq', but (re)defined for
- * convenience...
- * Do I need to remind you about structure size (32 octets) ?
- */
-struct iwreq
-{
- union
- {
- char ifrn_name[IFNAMSIZ]; /* if name, e.g. "eth0" */
- } ifr_ifrn;
-
- /* Data part (defined just above) */
- union iwreq_data u;
-};
-
-/* -------------------------- IOCTL DATA -------------------------- */
-/*
- * For those ioctl which want to exchange mode data that what could
- * fit in the above structure...
- */
-
-/*
- * Range of parameters
- */
-
-struct iw_range
-{
- /* Informative stuff (to choose between different interface) */
- __u32 throughput; /* To give an idea... */
- /* In theory this value should be the maximum benchmarked
- * TCP/IP throughput, because with most of these devices the
- * bit rate is meaningless (overhead an co) to estimate how
- * fast the connection will go and pick the fastest one.
- * I suggest people to play with Netperf or any benchmark...
- */
-
- /* NWID (or domain id) */
- __u32 min_nwid; /* Minimal NWID we are able to set */
- __u32 max_nwid; /* Maximal NWID we are able to set */
-
- /* Old Frequency (backward compat - moved lower ) */
- __u16 old_num_channels;
- __u8 old_num_frequency;
-
- /* Wireless event capability bitmasks */
- __u32 event_capa[6];
-
- /* signal level threshold range */
- __s32 sensitivity;
-
- /* Quality of link & SNR stuff */
- /* Quality range (link, level, noise)
- * If the quality is absolute, it will be in the range [0 ; max_qual],
- * if the quality is dBm, it will be in the range [max_qual ; 0].
- * Don't forget that we use 8 bit arithmetics... */
- struct iw_quality max_qual; /* Quality of the link */
- /* This should contain the average/typical values of the quality
- * indicator. This should be the threshold between a "good" and
- * a "bad" link (example : monitor going from green to orange).
- * Currently, user space apps like quality monitors don't have any
- * way to calibrate the measurement. With this, they can split
- * the range between 0 and max_qual in different quality level
- * (using a geometric subdivision centered on the average).
- * I expect that people doing the user space apps will feedback
- * us on which value we need to put in each driver... */
- struct iw_quality avg_qual; /* Quality of the link */
-
- /* Rates */
- __u8 num_bitrates; /* Number of entries in the list */
- __s32 bitrate[IW_MAX_BITRATES]; /* list, in bps */
-
- /* RTS threshold */
- __s32 min_rts; /* Minimal RTS threshold */
- __s32 max_rts; /* Maximal RTS threshold */
-
- /* Frag threshold */
- __s32 min_frag; /* Minimal frag threshold */
- __s32 max_frag; /* Maximal frag threshold */
-
- /* Power Management duration & timeout */
- __s32 min_pmp; /* Minimal PM period */
- __s32 max_pmp; /* Maximal PM period */
- __s32 min_pmt; /* Minimal PM timeout */
- __s32 max_pmt; /* Maximal PM timeout */
- __u16 pmp_flags; /* How to decode max/min PM period */
- __u16 pmt_flags; /* How to decode max/min PM timeout */
- __u16 pm_capa; /* What PM options are supported */
-
- /* Encoder stuff */
- __u16 encoding_size[IW_MAX_ENCODING_SIZES]; /* Different token sizes */
- __u8 num_encoding_sizes; /* Number of entry in the list */
- __u8 max_encoding_tokens; /* Max number of tokens */
- /* For drivers that need a "login/passwd" form */
- __u8 encoding_login_index; /* token index for login token */
-
- /* Transmit power */
- __u16 txpower_capa; /* What options are supported */
- __u8 num_txpower; /* Number of entries in the list */
- __s32 txpower[IW_MAX_TXPOWER]; /* list, in bps */
-
- /* Wireless Extension version info */
- __u8 we_version_compiled; /* Must be WIRELESS_EXT */
- __u8 we_version_source; /* Last update of source */
-
- /* Retry limits and lifetime */
- __u16 retry_capa; /* What retry options are supported */
- __u16 retry_flags; /* How to decode max/min retry limit */
- __u16 r_time_flags; /* How to decode max/min retry life */
- __s32 min_retry; /* Minimal number of retries */
- __s32 max_retry; /* Maximal number of retries */
- __s32 min_r_time; /* Minimal retry lifetime */
- __s32 max_r_time; /* Maximal retry lifetime */
-
- /* Frequency */
- __u16 num_channels; /* Number of channels [0; num - 1] */
- __u8 num_frequency; /* Number of entry in the list */
- struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */
- /* Note : this frequency list doesn't need to fit channel numbers,
- * because each entry contain its channel index */
-
- __u32 enc_capa; /* IW_ENC_CAPA_* bit field */
-};
-
-/*
- * Private ioctl interface information
- */
-
-struct iw_priv_args
-{
- __u32 cmd; /* Number of the ioctl to issue */
- __u16 set_args; /* Type and number of args */
- __u16 get_args; /* Type and number of args */
- char name[IFNAMSIZ]; /* Name of the extension */
-};
-
-/* ----------------------- WIRELESS EVENTS ----------------------- */
-/*
- * Wireless events are carried through the rtnetlink socket to user
- * space. They are encapsulated in the IFLA_WIRELESS field of
- * a RTM_NEWLINK message.
- */
-
-/*
- * A Wireless Event. Contains basically the same data as the ioctl...
- */
-struct iw_event
-{
- __u16 len; /* Real lenght of this stuff */
- __u16 cmd; /* Wireless IOCTL */
- union iwreq_data u; /* IOCTL fixed payload */
-};
-
-/* Size of the Event prefix (including padding and alignement junk) */
-#define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data))
-/* Size of the various events */
-#define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ)
-#define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32))
-#define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq))
-#define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param))
-#define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr))
-#define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality))
-
-/* iw_point events are special. First, the payload (extra data) come at
- * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second,
- * we omit the pointer, so start at an offset. */
-#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \
- (char *) NULL)
-#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
- IW_EV_POINT_OFF)
-
-#endif /* _LINUX_WIRELESS_H */
diff --git a/original/linux/workqueue.h b/original/linux/workqueue.h
deleted file mode 100644
index 9bca353..0000000
--- a/original/linux/workqueue.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * workqueue.h --- work queue handling for Linux.
- */
-
-#ifndef _LINUX_WORKQUEUE_H
-#define _LINUX_WORKQUEUE_H
-
-#include <linux/timer.h>
-#include <linux/linkage.h>
-#include <linux/bitops.h>
-
-struct workqueue_struct;
-
-struct work_struct {
- unsigned long pending;
- struct list_head entry;
- void (*func)(void *);
- void *data;
- void *wq_data;
- struct timer_list timer;
-};
-
-struct execute_work {
- struct work_struct work;
-};
-
-#define __WORK_INITIALIZER(n, f, d) { \
- .entry = { &(n).entry, &(n).entry }, \
- .func = (f), \
- .data = (d), \
- .timer = TIMER_INITIALIZER(NULL, 0, 0), \
- }
-
-#define DECLARE_WORK(n, f, d) \
- struct work_struct n = __WORK_INITIALIZER(n, f, d)
-
-/*
- * initialize a work-struct's func and data pointers:
- */
-#define PREPARE_WORK(_work, _func, _data) \
- do { \
- (_work)->func = _func; \
- (_work)->data = _data; \
- } while (0)
-
-/*
- * initialize all of a work-struct:
- */
-#define INIT_WORK(_work, _func, _data) \
- do { \
- INIT_LIST_HEAD(&(_work)->entry); \
- (_work)->pending = 0; \
- PREPARE_WORK((_work), (_func), (_data)); \
- init_timer(&(_work)->timer); \
- } while (0)
-
-extern struct workqueue_struct *__create_workqueue(const char *name,
- int singlethread);
-#define create_workqueue(name) __create_workqueue((name), 0)
-#define create_singlethread_workqueue(name) __create_workqueue((name), 1)
-
-extern void destroy_workqueue(struct workqueue_struct *wq);
-
-extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work));
-extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay));
-extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
- struct work_struct *work, unsigned long delay);
-extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq));
-
-extern int FASTCALL(schedule_work(struct work_struct *work));
-extern int FASTCALL(schedule_delayed_work(struct work_struct *work, unsigned long delay));
-
-extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay);
-extern int schedule_on_each_cpu(void (*func)(void *info), void *info);
-extern void flush_scheduled_work(void);
-extern int current_is_keventd(void);
-extern int keventd_up(void);
-
-extern void init_workqueues(void);
-void cancel_rearming_delayed_work(struct work_struct *work);
-void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
- struct work_struct *);
-int execute_in_process_context(void (*fn)(void *), void *,
- struct execute_work *);
-
-/*
- * Kill off a pending schedule_delayed_work(). Note that the work callback
- * function may still be running on return from cancel_delayed_work(). Run
- * flush_scheduled_work() to wait on it.
- */
-static inline int cancel_delayed_work(struct work_struct *work)
-{
- int ret;
-
- ret = del_timer_sync(&work->timer);
- if (ret)
- clear_bit(0, &work->pending);
- return ret;
-}
-
-#endif
diff --git a/original/linux/xattr.h b/original/linux/xattr.h
deleted file mode 100644
index ac62537..0000000
--- a/original/linux/xattr.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- File: linux/xattr.h
-
- Extended attributes handling.
-
- Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
- Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
- Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
-*/
-#ifndef _LINUX_XATTR_H
-#define _LINUX_XATTR_H
-
-#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
-#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
-
-/* Namespaces */
-#define XATTR_OS2_PREFIX "os2."
-#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
-
-#define XATTR_SECURITY_PREFIX "security."
-#define XATTR_SECURITY_PREFIX_LEN (sizeof (XATTR_SECURITY_PREFIX) - 1)
-
-#define XATTR_SYSTEM_PREFIX "system."
-#define XATTR_SYSTEM_PREFIX_LEN (sizeof (XATTR_SYSTEM_PREFIX) - 1)
-
-#define XATTR_TRUSTED_PREFIX "trusted."
-#define XATTR_TRUSTED_PREFIX_LEN (sizeof (XATTR_TRUSTED_PREFIX) - 1)
-
-#define XATTR_USER_PREFIX "user."
-#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
-
-/* Security namespace */
-#define XATTR_EVM_SUFFIX "evm"
-#define XATTR_NAME_EVM XATTR_SECURITY_PREFIX XATTR_EVM_SUFFIX
-
-#define XATTR_SELINUX_SUFFIX "selinux"
-#define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX
-
-#define XATTR_SMACK_SUFFIX "SMACK64"
-#define XATTR_SMACK_IPIN "SMACK64IPIN"
-#define XATTR_SMACK_IPOUT "SMACK64IPOUT"
-#define XATTR_SMACK_EXEC "SMACK64EXEC"
-#define XATTR_SMACK_TRANSMUTE "SMACK64TRANSMUTE"
-#define XATTR_SMACK_MMAP "SMACK64MMAP"
-#define XATTR_NAME_SMACK XATTR_SECURITY_PREFIX XATTR_SMACK_SUFFIX
-#define XATTR_NAME_SMACKIPIN XATTR_SECURITY_PREFIX XATTR_SMACK_IPIN
-#define XATTR_NAME_SMACKIPOUT XATTR_SECURITY_PREFIX XATTR_SMACK_IPOUT
-#define XATTR_NAME_SMACKEXEC XATTR_SECURITY_PREFIX XATTR_SMACK_EXEC
-#define XATTR_NAME_SMACKTRANSMUTE XATTR_SECURITY_PREFIX XATTR_SMACK_TRANSMUTE
-#define XATTR_NAME_SMACKMMAP XATTR_SECURITY_PREFIX XATTR_SMACK_MMAP
-
-#define XATTR_CAPS_SUFFIX "capability"
-#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX
-
-#define XATTR_POSIX_ACL_ACCESS "posix_acl_access"
-#define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS
-#define XATTR_POSIX_ACL_DEFAULT "posix_acl_default"
-#define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_DEFAULT
-
-
-#endif /* _LINUX_XATTR_H */
diff --git a/original/linux/zconf.h b/original/linux/zconf.h
deleted file mode 100644
index 0beb75e..0000000
--- a/original/linux/zconf.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-/* The memory requirements for deflate are (in bytes):
- (1 << (windowBits+2)) + (1 << (memLevel+9))
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# define MAX_MEM_LEVEL 8
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-
-/* default memLevel */
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-
- /* Type declarations */
-
-typedef unsigned char Byte; /* 8 bits */
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-typedef void *voidp;
-
-#endif /* _ZCONF_H */
diff --git a/original/linux/zlib.h b/original/linux/zlib.h
deleted file mode 100644
index 9e3192a..0000000
--- a/original/linux/zlib.h
+++ /dev/null
@@ -1,702 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-
- Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- jloup@gzip.org madler@alumni.caltech.edu
-
-
- The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-#include <linux/zconf.h>
-
-/* zlib deflate based on ZLIB_VERSION "1.1.3" */
-/* zlib inflate based on ZLIB_VERSION "1.2.3" */
-
-/*
- This is a modified version of zlib for use inside the Linux kernel.
- The main changes are to perform all memory allocation in advance.
-
- Inflation Changes:
- * Z_PACKET_FLUSH is added and used by ppp_deflate. Before returning
- this checks there is no more input data available and the next data
- is a STORED block. It also resets the mode to be read for the next
- data, all as per PPP requirements.
- * Addition of zlib_inflateIncomp which copies incompressible data into
- the history window and adjusts the accoutning without calling
- zlib_inflate itself to inflate the data.
-*/
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms will be added later and will have the same
- stream interface.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-
- The compressed data format used by default by the in-memory functions is
- the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
- around a deflate stream, which is itself documented in RFC 1951.
-
- The library also supports reading and writing files in gzip (.gz) format
- with an interface similar to that of stdio.
-
- The zlib format was designed to be compact and fast for use in memory
- and on communications channels. The gzip format was designed for single-
- file compression on file systems, has a larger header than zlib to maintain
- directory information, and uses a different, slower check method than zlib.
-
- The library does not install any signal handler. The decoder checks
- the consistency of the compressed data, so the library should never
- crash even in case of corrupted input.
-*/
-
-struct internal_state;
-
-typedef struct z_stream_s {
- Byte *next_in; /* next input byte */
- uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
-
- Byte *next_out; /* next output byte should be put there */
- uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
-
- char *msg; /* last error message, NULL if no error */
- struct internal_state *state; /* not visible by applications */
-
- void *workspace; /* memory allocated for this stream */
-
- int data_type; /* best guess about the data type: ascii or binary */
- uLong adler; /* adler32 value of the uncompressed data */
- uLong reserved; /* reserved for future use */
-} z_stream;
-
-typedef z_stream *z_streamp;
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return NULL if there is not enough memory for the object.
- If zlib is used in a multi-threaded application, zalloc and zfree must be
- thread safe.
-
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_PACKET_FLUSH 2
-#define Z_SYNC_FLUSH 3
-#define Z_FULL_FLUSH 4
-#define Z_FINISH 5
-#define Z_BLOCK 6 /* Only for inflate at present */
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_ASCII 1
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
- /* basic functions */
-
-extern int zlib_deflate_workspacesize (void);
-/*
- Returns the number of bytes that needs to be allocated for a per-
- stream workspace. A pointer to this number of bytes should be
- returned in stream->workspace before calling zlib_deflateInit().
-*/
-
-/*
-extern int deflateInit (z_streamp strm, int level);
-
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to NULL, deflateInit updates them to
- use default allocation functions.
-
- The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
-
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
- Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
-*/
-
-
-extern int zlib_deflate (z_streamp strm, int flush);
-/*
- deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
- output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. deflate performs one or both of the
- following actions:
-
- - Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in and avail_in are updated and
- processing will resume at this point for the next call of deflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
- Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
-
- If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
- flushed to the output buffer and the output is aligned on a byte boundary, so
- that the decompressor can get all input data available so far. (In particular
- avail_in is zero after the call if enough output space has been provided
- before the call.) Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
-
- If flush is set to Z_FULL_FLUSH, all output is flushed as with
- Z_SYNC_FLUSH, and the compression state is reset so that decompression can
- restart from this point if previous compressed data has been damaged or if
- random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
- the compression.
-
- If deflate returns with avail_out == 0, this function must be called again
- with the same value of the flush parameter and more output space (updated
- avail_out), until the flush is complete (deflate returns with non-zero
- avail_out).
-
- If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
-
- Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- 0.1% larger than avail_in plus 12 bytes. If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
-
- deflate() sets strm->adler to the adler32 checksum of all input read
- so far (that is, total_in bytes).
-
- deflate() may update data_type if it can make a good guess about
- the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
-
- deflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if all input has been
- consumed and all output has been produced (only when flush is set to
- Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero).
-*/
-
-
-extern int zlib_deflateEnd (z_streamp strm);
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
- stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
- deallocated).
-*/
-
-
-extern int zlib_inflate_workspacesize (void);
-/*
- Returns the number of bytes that needs to be allocated for a per-
- stream workspace. A pointer to this number of bytes should be
- returned in stream->workspace before calling zlib_inflateInit().
-*/
-
-/*
-extern int zlib_inflateInit (z_streamp strm);
-
- Initializes the internal stream state for decompression. The fields
- next_in, avail_in, and workspace must be initialized before by
- the caller. If next_in is not NULL and avail_in is large enough (the exact
- value depends on the compression method), inflateInit determines the
- compression method from the zlib header and allocates all data structures
- accordingly; otherwise the allocation will be deferred to the first call of
- inflate. If zalloc and zfree are set to NULL, inflateInit updates them to
- use default allocation functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
- version assumed by the caller. msg is set to null if there is no error
- message. inflateInit does not perform any decompression apart from reading
- the zlib header if present: this will be done by inflate(). (So next_in and
- avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-extern int zlib_inflate (z_streamp strm, int flush);
-/*
- inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce
- some output latency (reading input without producing any output) except when
- forced to flush.
-
- The detailed semantics are as follows. inflate performs one or both of the
- following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
- Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
- output as possible to the output buffer. Z_BLOCK requests that inflate() stop
- if and when it gets to the next deflate block boundary. When decoding the
- zlib or gzip format, this will cause inflate() to return immediately after
- the header and before the first block. When doing a raw inflate, inflate()
- will go ahead and process the first block, and will return when it gets to
- the end of that block, or when it runs out of data.
-
- The Z_BLOCK option assists in appending to or combining deflate streams.
- Also to assist in this, on return inflate() will set strm->data_type to the
- number of unused bits in the last byte taken from strm->next_in, plus 64
- if inflate() is currently decoding the last block in the deflate stream,
- plus 128 if inflate() returned immediately after decoding an end-of-block
- code or decoding the complete header up to just before the first byte of the
- deflate stream. The end-of-block will not be indicated until all of the
- uncompressed data from that block has been written to strm->next_out. The
- number of unused bits may in general be greater than seven, except when
- bit 7 of data_type is set, in which case the number of unused bits will be
- less than eight.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster approach
- may be used for the single inflate() call.
-
- In this implementation, inflate() always flushes as much output as
- possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
- is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK is used.
-
- If a preset dictionary is needed after this call (see inflateSetDictionary
- below), inflate sets strm->adler to the adler32 checksum of the dictionary
- chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
- strm->adler to the adler32 checksum of all output produced so far (that is,
- total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
- below. At the end of the stream, inflate() checks that its computed adler32
- checksum is equal to that saved by the compressor and returns Z_STREAM_END
- only if the checksum is correct.
-
- inflate() will decompress and check either zlib-wrapped or gzip-wrapped
- deflate data. The header type is detected automatically. Any information
- contained in the gzip header is not retained, so applications that need that
- information should instead use raw inflate, see inflateInit2() below, or
- inflateBack() and perform their own processing of the gzip header and
- trailer.
-
- inflate() returns Z_OK if some progress has been made (more input processed
- or more output produced), Z_STREAM_END if the end of the compressed data has
- been reached and all uncompressed output has been produced, Z_NEED_DICT if a
- preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
- corrupted (input stream not conforming to the zlib format or incorrect check
- value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
- if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
- Z_BUF_ERROR if no progress is possible or if there was not enough room in the
- output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
- inflate() can be called again with more input and more output space to
- continue decompressing. If Z_DATA_ERROR is returned, the application may then
- call inflateSync() to look for a good compression block if a partial recovery
- of the data is desired.
-*/
-
-
-extern int zlib_inflateEnd (z_streamp strm);
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* Advanced functions */
-
-/*
- The following functions are needed only in some special applications.
-*/
-
-/*
-extern int deflateInit2 (z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy);
-
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The method parameter is the compression method. It must be Z_DEFLATED in
- this version of the library.
-
- The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library. Larger values of this parameter result in better
- compression at the expense of memory usage. The default value is 15 if
- deflateInit is used instead.
-
- The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
-
- The strategy parameter is used to tune the compression algorithm. Use the
- value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
- filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
- string match). Filtered data consists mostly of small values with a
- somewhat random distribution. In this case, the compression algorithm is
- tuned to compress them better. The effect of Z_FILTERED is to force more
- Huffman coding and less string matching; it is somewhat intermediate
- between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
- the compression ratio but not the correctness of the compressed output even
- if it is not set appropriately.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
- method). msg is set to null if there is no error message. deflateInit2 does
- not perform any compression: this will be done by deflate().
-*/
-
-#if 0
-extern int zlib_deflateSetDictionary (z_streamp strm,
- const Byte *dictionary,
- uInt dictLength);
-#endif
-/*
- Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any
- call of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
-
- The dictionary should consist of strings (byte sequences) that are likely
- to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
- dictionary is most useful when the data to be compressed is short and can be
- predicted with good accuracy; the data can then be compressed better than
- with the default empty dictionary.
-
- Depending on the size of the compression data structures selected by
- deflateInit or deflateInit2, a part of the dictionary may in effect be
- discarded, for example if the dictionary is larger than the window size in
- deflate or deflate2. Thus the strings most likely to be useful should be
- put at the end of the dictionary, not at the front.
-
- Upon return of this function, strm->adler is set to the Adler32 value
- of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The Adler32 value
- applies to the whole dictionary even if only a subset of the dictionary is
- actually used by the compressor.)
-
- deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
- perform any compression: this will be done by deflate().
-*/
-
-#if 0
-extern int zlib_deflateCopy (z_streamp dest, z_streamp source);
-#endif
-
-/*
- Sets the destination stream as a complete copy of the source stream.
-
- This function can be useful when several compression strategies will be
- tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
- by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
-
- deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-extern int zlib_deflateReset (z_streamp strm);
-/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
-
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-static inline unsigned long deflateBound(unsigned long s)
-{
- return s + ((s + 7) >> 3) + ((s + 63) >> 6) + 11;
-}
-
-#if 0
-extern int zlib_deflateParams (z_streamp strm, int level, int strategy);
-#endif
-/*
- Dynamically update the compression level and compression strategy. The
- interpretation of level and strategy is as in deflateInit2. This can be
- used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different
- strategy. If the compression level is changed, the input available so far
- is compressed with the old level (and may be flushed); the new level will
- take effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
-*/
-
-/*
-extern int inflateInit2 (z_streamp strm, int windowBits);
-
- This is another version of inflateInit with an extra parameter. The
- fields next_in, avail_in, zalloc, zfree and opaque must be initialized
- before by the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library. The default value is 15 if inflateInit is used
- instead. windowBits must be greater than or equal to the windowBits value
- provided to deflateInit2() while compressing, or it must be equal to 15 if
- deflateInit2() was not used. If a compressed stream with a larger window
- size is given as input, inflate() will return with the error code
- Z_DATA_ERROR instead of trying to allocate a larger window.
-
- windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
- determines the window size. inflate() will then process raw deflate data,
- not looking for a zlib or gzip header, not generating a check value, and not
- looking for any check values for comparison at the end of the stream. This
- is for use with other formats that use the deflate compressed data format
- such as zip. Those formats provide their own check values. If a custom
- format is developed using the raw deflate format for compressed data, it is
- recommended that a check value such as an adler32 or a crc32 be applied to
- the uncompressed data as is done in the zlib, gzip, and zip formats. For
- most applications, the zlib format should be used as is. Note that comments
- above on the use in deflateInit2() applies to the magnitude of windowBits.
-
- windowBits can also be greater than 15 for optional gzip decoding. Add
- 32 to windowBits to enable zlib and gzip decoding with automatic header
- detection, or add 16 to decode only the gzip format (the zlib format will
- return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
- a crc32 instead of an adler32.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
- is set to null if there is no error message. inflateInit2 does not perform
- any decompression apart from reading the zlib header if present: this will
- be done by inflate(). (So next_in and avail_in may be modified, but next_out
- and avail_out are unchanged.)
-*/
-
-extern int zlib_inflateSetDictionary (z_streamp strm,
- const Byte *dictionary,
- uInt dictLength);
-/*
- Initializes the decompression dictionary from the given uncompressed byte
- sequence. This function must be called immediately after a call of inflate,
- if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
- can be determined from the adler32 value returned by that call of inflate.
- The compressor and decompressor must use exactly the same dictionary (see
- deflateSetDictionary). For raw inflate, this function can be called
- immediately after inflateInit2() or inflateReset() and before any call of
- inflate() to set the dictionary. The application must insure that the
- dictionary that was used for compression is provided.
-
- inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect adler32 value). inflateSetDictionary does not
- perform any decompression: this will be done by subsequent calls of
- inflate().
-*/
-
-#if 0
-extern int zlib_inflateSync (z_streamp strm);
-#endif
-/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
- available input is skipped. No output is provided.
-
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
-*/
-
-extern int zlib_inflateReset (z_streamp strm);
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-extern int zlib_inflateIncomp (z_stream *strm);
-/*
- This function adds the data at next_in (avail_in bytes) to the output
- history without performing any output. There must be no pending output,
- and the decompressor must be expecting to see the start of a block.
- Calling this function is equivalent to decompressing a stored block
- containing the data at next_in (except that the data is not output).
-*/
-
-#define zlib_deflateInit(strm, level) \
- zlib_deflateInit2((strm), (level), Z_DEFLATED, MAX_WBITS, \
- DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY)
-#define zlib_inflateInit(strm) \
- zlib_inflateInit2((strm), DEF_WBITS)
-
-extern int zlib_deflateInit2(z_streamp strm, int level, int method,
- int windowBits, int memLevel,
- int strategy);
-extern int zlib_inflateInit2(z_streamp strm, int windowBits);
-
-#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-#endif /* _ZLIB_H */
diff --git a/original/linux/zorro_ids.h b/original/linux/zorro_ids.h
deleted file mode 100644
index 7e74908..0000000
--- a/original/linux/zorro_ids.h
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * Zorro board IDs
- *
- * Please keep sorted.
- */
-
-
-#define ZORRO_MANUF_PACIFIC_PERIPHERALS 0x00D3
-#define ZORRO_PROD_PACIFIC_PERIPHERALS_SE_2000_A500 ZORRO_ID(PACIFIC_PERIPHERALS, 0x00, 0)
-#define ZORRO_PROD_PACIFIC_PERIPHERALS_SCSI ZORRO_ID(PACIFIC_PERIPHERALS, 0x0A, 0)
-
-#define ZORRO_MANUF_MACROSYSTEMS_USA_2 0x0100
-#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE ZORRO_ID(MACROSYSTEMS_USA_2, 0x13, 0)
-
-#define ZORRO_MANUF_KUPKE_1 0x00DD
-#define ZORRO_PROD_KUPKE_GOLEM_RAM_BOX_2MB ZORRO_ID(KUPKE_1, 0x00, 0)
-
-#define ZORRO_MANUF_MEMPHIS 0x0100
-#define ZORRO_PROD_MEMPHIS_STORMBRINGER ZORRO_ID(MEMPHIS, 0x00, 0)
-
-#define ZORRO_MANUF_3_STATE 0x0200
-#define ZORRO_PROD_3_STATE_MEGAMIX_2000 ZORRO_ID(3_STATE, 0x02, 0)
-
-#define ZORRO_MANUF_COMMODORE_BRAUNSCHWEIG 0x0201
-#define ZORRO_PROD_CBM_A2088_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x01, 0)
-#define ZORRO_PROD_CBM_A2286 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x02, 0)
-#define ZORRO_PROD_CBM_A4091_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x54, 0)
-#define ZORRO_PROD_CBM_A2386SX_1 ZORRO_ID(COMMODORE_BRAUNSCHWEIG, 0x67, 0)
-
-#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_1 0x0202
-#define ZORRO_PROD_CBM_A2090A ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x01, 0)
-#define ZORRO_PROD_CBM_A590_A2091_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x02, 0)
-#define ZORRO_PROD_CBM_A590_A2091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x03, 0)
-#define ZORRO_PROD_CBM_A2090B ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x04, 0)
-#define ZORRO_PROD_CBM_A2060 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x09, 0)
-#define ZORRO_PROD_CBM_A590_A2052_A2058_A2091 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x0A, 0)
-#define ZORRO_PROD_CBM_A560_RAM ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x20, 0)
-#define ZORRO_PROD_CBM_A2232_PROTOTYPE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x45, 0)
-#define ZORRO_PROD_CBM_A2232 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x46, 0)
-#define ZORRO_PROD_CBM_A2620 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x50, 0)
-#define ZORRO_PROD_CBM_A2630 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x51, 0)
-#define ZORRO_PROD_CBM_A4091_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x54, 0)
-#define ZORRO_PROD_CBM_A2065_1 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x5A, 0)
-#define ZORRO_PROD_CBM_ROMULATOR ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x60, 0)
-#define ZORRO_PROD_CBM_A3000_TEST_FIXTURE ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x61, 0)
-#define ZORRO_PROD_CBM_A2386SX_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x67, 0)
-#define ZORRO_PROD_CBM_A2065_2 ZORRO_ID(COMMODORE_WEST_CHESTER_1, 0x70, 0)
-
-#define ZORRO_MANUF_COMMODORE_WEST_CHESTER_2 0x0203
-#define ZORRO_PROD_CBM_A2090A_CM ZORRO_ID(COMMODORE_WEST_CHESTER_2, 0x03, 0)
-
-#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2 0x02F4
-#define ZORRO_PROD_PPS_EXP8000 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS_2, 0x02, 0)
-
-#define ZORRO_MANUF_KOLFF_COMPUTER_SUPPLIES 0x02FF
-#define ZORRO_PROD_KCS_POWER_PC_BOARD ZORRO_ID(KOLFF_COMPUTER_SUPPLIES, 0x00, 0)
-
-#define ZORRO_MANUF_CARDCO_1 0x03EC
-#define ZORRO_PROD_CARDCO_KRONOS_2000_1 ZORRO_ID(CARDCO_1, 0x04, 0)
-#define ZORRO_PROD_CARDCO_A1000_1 ZORRO_ID(CARDCO_1, 0x0C, 0)
-#define ZORRO_PROD_CARDCO_ESCORT ZORRO_ID(CARDCO_1, 0x0E, 0)
-#define ZORRO_PROD_CARDCO_A2410 ZORRO_ID(CARDCO_1, 0xF5, 0)
-
-#define ZORRO_MANUF_A_SQUARED 0x03ED
-#define ZORRO_PROD_A_SQUARED_LIVE_2000 ZORRO_ID(A_SQUARED, 0x01, 0)
-
-#define ZORRO_MANUF_COMSPEC_COMMUNICATIONS 0x03EE
-#define ZORRO_PROD_COMSPEC_COMMUNICATIONS_AX2000 ZORRO_ID(COMSPEC_COMMUNICATIONS, 0x01, 0)
-
-#define ZORRO_MANUF_ANAKIN_RESEARCH 0x03F1
-#define ZORRO_PROD_ANAKIN_RESEARCH_EASYL ZORRO_ID(ANAKIN_RESEARCH, 0x01, 0)
-
-#define ZORRO_MANUF_MICROBOTICS 0x03F2
-#define ZORRO_PROD_MICROBOTICS_STARBOARD_II ZORRO_ID(MICROBOTICS, 0x00, 0)
-#define ZORRO_PROD_MICROBOTICS_STARDRIVE ZORRO_ID(MICROBOTICS, 0x02, 0)
-#define ZORRO_PROD_MICROBOTICS_8_UP_A ZORRO_ID(MICROBOTICS, 0x03, 0)
-#define ZORRO_PROD_MICROBOTICS_8_UP_Z ZORRO_ID(MICROBOTICS, 0x04, 0)
-#define ZORRO_PROD_MICROBOTICS_DELTA_RAM ZORRO_ID(MICROBOTICS, 0x20, 0)
-#define ZORRO_PROD_MICROBOTICS_8_STAR_RAM ZORRO_ID(MICROBOTICS, 0x40, 0)
-#define ZORRO_PROD_MICROBOTICS_8_STAR ZORRO_ID(MICROBOTICS, 0x41, 0)
-#define ZORRO_PROD_MICROBOTICS_VXL_RAM_32 ZORRO_ID(MICROBOTICS, 0x44, 0)
-#define ZORRO_PROD_MICROBOTICS_VXL_68030 ZORRO_ID(MICROBOTICS, 0x45, 0)
-#define ZORRO_PROD_MICROBOTICS_DELTA ZORRO_ID(MICROBOTICS, 0x60, 0)
-#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z_RAM ZORRO_ID(MICROBOTICS, 0x81, 0)
-#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_1 ZORRO_ID(MICROBOTICS, 0x96, 0)
-#define ZORRO_PROD_MICROBOTICS_HARDFRAME_2000_2 ZORRO_ID(MICROBOTICS, 0x9E, 0)
-#define ZORRO_PROD_MICROBOTICS_MBX_1200_1200Z ZORRO_ID(MICROBOTICS, 0xC1, 0)
-
-#define ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA 0x03F4
-
-#define ZORRO_MANUF_EXPANSION_TECHNOLOGIES 0x03F6
-
-#define ZORRO_MANUF_ASDG 0x03FF
-#define ZORRO_PROD_ASDG_MEMORY_1 ZORRO_ID(ASDG, 0x01, 0)
-#define ZORRO_PROD_ASDG_MEMORY_2 ZORRO_ID(ASDG, 0x02, 0)
-#define ZORRO_PROD_ASDG_EB920_LAN_ROVER ZORRO_ID(ASDG, 0xFE, 0)
-#define ZORRO_PROD_ASDG_GPIB_DUALIEEE488_TWIN_X ZORRO_ID(ASDG, 0xFF, 0)
-
-#define ZORRO_MANUF_IMTRONICS_1 0x0404
-#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_1 ZORRO_ID(IMTRONICS_1, 0x39, 0)
-#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_2 ZORRO_ID(IMTRONICS_1, 0x57, 0)
-
-#define ZORRO_MANUF_CBM_UNIVERSITY_OF_LOWELL 0x0406
-#define ZORRO_PROD_CBM_A2410 ZORRO_ID(CBM_UNIVERSITY_OF_LOWELL, 0x00, 0)
-
-#define ZORRO_MANUF_AMERISTAR 0x041D
-#define ZORRO_PROD_AMERISTAR_A2065 ZORRO_ID(AMERISTAR, 0x01, 0)
-#define ZORRO_PROD_AMERISTAR_A560 ZORRO_ID(AMERISTAR, 0x09, 0)
-#define ZORRO_PROD_AMERISTAR_A4066 ZORRO_ID(AMERISTAR, 0x0A, 0)
-
-#define ZORRO_MANUF_SUPRA 0x0420
-#define ZORRO_PROD_SUPRA_SUPRADRIVE_4x4 ZORRO_ID(SUPRA, 0x01, 0)
-#define ZORRO_PROD_SUPRA_1000_RAM ZORRO_ID(SUPRA, 0x02, 0)
-#define ZORRO_PROD_SUPRA_2000_DMA ZORRO_ID(SUPRA, 0x03, 0)
-#define ZORRO_PROD_SUPRA_500 ZORRO_ID(SUPRA, 0x05, 0)
-#define ZORRO_PROD_SUPRA_500_SCSI ZORRO_ID(SUPRA, 0x08, 0)
-#define ZORRO_PROD_SUPRA_500XP_2000_RAM ZORRO_ID(SUPRA, 0x09, 0)
-#define ZORRO_PROD_SUPRA_500RX_2000_RAM ZORRO_ID(SUPRA, 0x0A, 0)
-#define ZORRO_PROD_SUPRA_2400ZI ZORRO_ID(SUPRA, 0x0B, 0)
-#define ZORRO_PROD_SUPRA_500XP_SUPRADRIVE_WORDSYNC ZORRO_ID(SUPRA, 0x0C, 0)
-#define ZORRO_PROD_SUPRA_SUPRADRIVE_WORDSYNC_II ZORRO_ID(SUPRA, 0x0D, 0)
-#define ZORRO_PROD_SUPRA_2400ZIPLUS ZORRO_ID(SUPRA, 0x10, 0)
-
-#define ZORRO_MANUF_COMPUTER_SYSTEMS_ASSOCIATES 0x0422
-#define ZORRO_PROD_CSA_MAGNUM ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x11, 0)
-#define ZORRO_PROD_CSA_12_GAUGE ZORRO_ID(COMPUTER_SYSTEMS_ASSOCIATES, 0x15, 0)
-
-#define ZORRO_MANUF_MARC_MICHAEL_GROTH 0x0439
-
-#define ZORRO_MANUF_M_TECH 0x0502
-#define ZORRO_PROD_MTEC_AT500_1 ZORRO_ID(M_TECH, 0x03, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1 0x06E1
-#define ZORRO_PROD_GVP_IMPACT_SERIES_I ZORRO_ID(GREAT_VALLEY_PRODUCTS_1, 0x08, 0)
-
-#define ZORRO_MANUF_BYTEBOX 0x07DA
-#define ZORRO_PROD_BYTEBOX_A500 ZORRO_ID(BYTEBOX, 0x00, 0)
-
-#define ZORRO_MANUF_DKB_POWER_COMPUTING 0x07DC
-#define ZORRO_PROD_DKB_POWER_COMPUTING_SECUREKEY ZORRO_ID(DKB_POWER_COMPUTING, 0x09, 0)
-#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_3128 ZORRO_ID(DKB_POWER_COMPUTING, 0x0E, 0)
-#define ZORRO_PROD_DKB_POWER_COMPUTING_RAPID_FIRE ZORRO_ID(DKB_POWER_COMPUTING, 0x0F, 0)
-#define ZORRO_PROD_DKB_POWER_COMPUTING_DKM_1202 ZORRO_ID(DKB_POWER_COMPUTING, 0x10, 0)
-#define ZORRO_PROD_DKB_POWER_COMPUTING_COBRA_VIPER_II_68EC030 ZORRO_ID(DKB_POWER_COMPUTING, 0x12, 0)
-#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_1 ZORRO_ID(DKB_POWER_COMPUTING, 0x17, 0)
-#define ZORRO_PROD_DKB_POWER_COMPUTING_WILDFIRE_060_2 ZORRO_ID(DKB_POWER_COMPUTING, 0xFF, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_2 0x07E1
-#define ZORRO_PROD_GVP_IMPACT_SERIES_I_4K ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x01, 0)
-#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x02, 0)
-#define ZORRO_PROD_GVP_IMPACT_SERIES_I_16K_3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x03, 0)
-#define ZORRO_PROD_GVP_IMPACT_3001_IDE_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x08, 0)
-#define ZORRO_PROD_GVP_IMPACT_3001_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x09, 0)
-#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0A, 0)
-#define ZORRO_PROD_GVP_EPC_BASE ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0)
-#define ZORRO_PROD_GVP_GFORCE_040_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x20)
-#define ZORRO_PROD_GVP_GFORCE_040_SCSI_1 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x30)
-#define ZORRO_PROD_GVP_A1291 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x40)
-#define ZORRO_PROD_GVP_COMBO_030_R4 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x60)
-#define ZORRO_PROD_GVP_COMBO_030_R4_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x70)
-#define ZORRO_PROD_GVP_PHONEPAK ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x78)
-#define ZORRO_PROD_GVP_IO_EXTENDER ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0x98)
-#define ZORRO_PROD_GVP_GFORCE_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xa0)
-#define ZORRO_PROD_GVP_GFORCE_030_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xb0)
-#define ZORRO_PROD_GVP_A530 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xc0)
-#define ZORRO_PROD_GVP_A530_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xd0)
-#define ZORRO_PROD_GVP_COMBO_030_R3 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xe0)
-#define ZORRO_PROD_GVP_COMBO_030_R3_SCSI ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf0)
-#define ZORRO_PROD_GVP_SERIES_II ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0B, 0xf8)
-#define ZORRO_PROD_GVP_IMPACT_3001_IDE_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)
-/*#define ZORRO_PROD_GVP_A2000_030 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/
-/*#define ZORRO_PROD_GVP_GFORCE_040_SCSI_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x0D, 0)*/
-#define ZORRO_PROD_GVP_GFORCE_040_060 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x16, 0)
-#define ZORRO_PROD_GVP_IMPACT_VISION_24 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0x20, 0)
-#define ZORRO_PROD_GVP_GFORCE_040_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_2, 0xFF, 0)
-
-#define ZORRO_MANUF_CALIFORNIA_ACCESS_SYNERGY 0x07E5
-#define ZORRO_PROD_CALIFORNIA_ACCESS_SYNERGY_MALIBU ZORRO_ID(CALIFORNIA_ACCESS_SYNERGY, 0x01, 0)
-
-#define ZORRO_MANUF_XETEC 0x07E6
-#define ZORRO_PROD_XETEC_FASTCARD ZORRO_ID(XETEC, 0x01, 0)
-#define ZORRO_PROD_XETEC_FASTCARD_RAM ZORRO_ID(XETEC, 0x02, 0)
-#define ZORRO_PROD_XETEC_FASTCARD_PLUS ZORRO_ID(XETEC, 0x03, 0)
-
-#define ZORRO_MANUF_PROGRESSIVE_PERIPHERALS_AND_SYSTEMS 0x07EA
-#define ZORRO_PROD_PPS_MERCURY ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x00, 0)
-#define ZORRO_PROD_PPS_A3000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x01, 0)
-#define ZORRO_PROD_PPS_A2000_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x69, 0)
-#define ZORRO_PROD_PPS_ZEUS ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0x96, 0)
-#define ZORRO_PROD_PPS_A500_68040 ZORRO_ID(PROGRESSIVE_PERIPHERALS_AND_SYSTEMS, 0xBB, 0)
-
-#define ZORRO_MANUF_XEBEC 0x07EC
-
-#define ZORRO_MANUF_SPIRIT_TECHNOLOGY 0x07F2
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN1000 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x01, 0)
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INSIDER_IN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x02, 0)
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_SIN500 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x03, 0)
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_HDA_506 ZORRO_ID(SPIRIT_TECHNOLOGY, 0x04, 0)
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_AX_S ZORRO_ID(SPIRIT_TECHNOLOGY, 0x05, 0)
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_OCTABYTE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x06, 0)
-#define ZORRO_PROD_SPIRIT_TECHNOLOGY_INMATE ZORRO_ID(SPIRIT_TECHNOLOGY, 0x08, 0)
-
-#define ZORRO_MANUF_SPIRIT_TECHNOLOGY_2 0x07F3
-
-#define ZORRO_MANUF_BSC_ALFADATA_1 0x07FE
-#define ZORRO_PROD_BSC_ALF_3_1 ZORRO_ID(BSC_ALFADATA_1, 0x03, 0)
-
-#define ZORRO_MANUF_BSC_ALFADATA_2 0x0801
-#define ZORRO_PROD_BSC_ALF_2_1 ZORRO_ID(BSC_ALFADATA_2, 0x01, 0)
-#define ZORRO_PROD_BSC_ALF_2_2 ZORRO_ID(BSC_ALFADATA_2, 0x02, 0)
-#define ZORRO_PROD_BSC_ALF_3_2 ZORRO_ID(BSC_ALFADATA_2, 0x03, 0)
-
-#define ZORRO_MANUF_CARDCO_2 0x0802
-#define ZORRO_PROD_CARDCO_KRONOS_2000_2 ZORRO_ID(CARDCO_2, 0x04, 0)
-#define ZORRO_PROD_CARDCO_A1000_2 ZORRO_ID(CARDCO_2, 0x0C, 0)
-
-#define ZORRO_MANUF_JOCHHEIM 0x0804
-#define ZORRO_PROD_JOCHHEIM_RAM ZORRO_ID(JOCHHEIM, 0x01, 0)
-
-#define ZORRO_MANUF_CHECKPOINT_TECHNOLOGIES 0x0807
-#define ZORRO_PROD_CHECKPOINT_TECHNOLOGIES_SERIAL_SOLUTION ZORRO_ID(CHECKPOINT_TECHNOLOGIES, 0x00, 0)
-
-#define ZORRO_MANUF_EDOTRONIK 0x0810
-#define ZORRO_PROD_EDOTRONIK_IEEE_488 ZORRO_ID(EDOTRONIK, 0x01, 0)
-#define ZORRO_PROD_EDOTRONIK_8032 ZORRO_ID(EDOTRONIK, 0x02, 0)
-#define ZORRO_PROD_EDOTRONIK_MULTISERIAL ZORRO_ID(EDOTRONIK, 0x03, 0)
-#define ZORRO_PROD_EDOTRONIK_VIDEODIGITIZER ZORRO_ID(EDOTRONIK, 0x04, 0)
-#define ZORRO_PROD_EDOTRONIK_PARALLEL_IO ZORRO_ID(EDOTRONIK, 0x05, 0)
-#define ZORRO_PROD_EDOTRONIK_PIC_PROTOYPING ZORRO_ID(EDOTRONIK, 0x06, 0)
-#define ZORRO_PROD_EDOTRONIK_ADC ZORRO_ID(EDOTRONIK, 0x07, 0)
-#define ZORRO_PROD_EDOTRONIK_VME ZORRO_ID(EDOTRONIK, 0x08, 0)
-#define ZORRO_PROD_EDOTRONIK_DSP96000 ZORRO_ID(EDOTRONIK, 0x09, 0)
-
-#define ZORRO_MANUF_NES_INC 0x0813
-#define ZORRO_PROD_NES_INC_RAM ZORRO_ID(NES_INC, 0x00, 0)
-
-#define ZORRO_MANUF_ICD 0x0817
-#define ZORRO_PROD_ICD_ADVANTAGE_2000_SCSI ZORRO_ID(ICD, 0x01, 0)
-#define ZORRO_PROD_ICD_ADVANTAGE_IDE ZORRO_ID(ICD, 0x03, 0)
-#define ZORRO_PROD_ICD_ADVANTAGE_2080_RAM ZORRO_ID(ICD, 0x04, 0)
-
-#define ZORRO_MANUF_KUPKE_2 0x0819
-#define ZORRO_PROD_KUPKE_OMTI ZORRO_ID(KUPKE_2, 0x01, 0)
-#define ZORRO_PROD_KUPKE_SCSI_II ZORRO_ID(KUPKE_2, 0x02, 0)
-#define ZORRO_PROD_KUPKE_GOLEM_BOX ZORRO_ID(KUPKE_2, 0x03, 0)
-#define ZORRO_PROD_KUPKE_030_882 ZORRO_ID(KUPKE_2, 0x04, 0)
-#define ZORRO_PROD_KUPKE_SCSI_AT ZORRO_ID(KUPKE_2, 0x05, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_3 0x081D
-#define ZORRO_PROD_GVP_A2000_RAM8 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x09, 0)
-#define ZORRO_PROD_GVP_IMPACT_SERIES_II_RAM_2 ZORRO_ID(GREAT_VALLEY_PRODUCTS_3, 0x0A, 0)
-
-#define ZORRO_MANUF_INTERWORKS_NETWORK 0x081E
-
-#define ZORRO_MANUF_HARDITAL_SYNTHESIS 0x0820
-#define ZORRO_PROD_HARDITAL_SYNTHESIS_TQM_68030_68882 ZORRO_ID(HARDITAL_SYNTHESIS, 0x14, 0)
-
-#define ZORRO_MANUF_APPLIED_ENGINEERING 0x0828
-#define ZORRO_PROD_APPLIED_ENGINEERING_DL2000 ZORRO_ID(APPLIED_ENGINEERING, 0x10, 0)
-#define ZORRO_PROD_APPLIED_ENGINEERING_RAM_WORKS ZORRO_ID(APPLIED_ENGINEERING, 0xE0, 0)
-
-#define ZORRO_MANUF_BSC_ALFADATA_3 0x082C
-#define ZORRO_PROD_BSC_OKTAGON_2008 ZORRO_ID(BSC_ALFADATA_3, 0x05, 0)
-#define ZORRO_PROD_BSC_TANDEM_AT_2008_508 ZORRO_ID(BSC_ALFADATA_3, 0x06, 0)
-#define ZORRO_PROD_BSC_ALFA_RAM_1200 ZORRO_ID(BSC_ALFADATA_3, 0x07, 0)
-#define ZORRO_PROD_BSC_OKTAGON_2008_RAM ZORRO_ID(BSC_ALFADATA_3, 0x08, 0)
-#define ZORRO_PROD_BSC_MULTIFACE_I ZORRO_ID(BSC_ALFADATA_3, 0x10, 0)
-#define ZORRO_PROD_BSC_MULTIFACE_II ZORRO_ID(BSC_ALFADATA_3, 0x11, 0)
-#define ZORRO_PROD_BSC_MULTIFACE_III ZORRO_ID(BSC_ALFADATA_3, 0x12, 0)
-#define ZORRO_PROD_BSC_FRAMEMASTER_II ZORRO_ID(BSC_ALFADATA_3, 0x20, 0)
-#define ZORRO_PROD_BSC_GRAFFITI_RAM ZORRO_ID(BSC_ALFADATA_3, 0x21, 0)
-#define ZORRO_PROD_BSC_GRAFFITI_REG ZORRO_ID(BSC_ALFADATA_3, 0x22, 0)
-#define ZORRO_PROD_BSC_ISDN_MASTERCARD ZORRO_ID(BSC_ALFADATA_3, 0x40, 0)
-#define ZORRO_PROD_BSC_ISDN_MASTERCARD_II ZORRO_ID(BSC_ALFADATA_3, 0x41, 0)
-
-#define ZORRO_MANUF_PHOENIX 0x0835
-#define ZORRO_PROD_PHOENIX_ST506 ZORRO_ID(PHOENIX, 0x21, 0)
-#define ZORRO_PROD_PHOENIX_SCSI ZORRO_ID(PHOENIX, 0x22, 0)
-#define ZORRO_PROD_PHOENIX_RAM ZORRO_ID(PHOENIX, 0xBE, 0)
-
-#define ZORRO_MANUF_ADVANCED_STORAGE_SYSTEMS 0x0836
-#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x01, 0)
-#define ZORRO_PROD_ADVANCED_STORAGE_SYSTEMS_NEXUS_RAM ZORRO_ID(ADVANCED_STORAGE_SYSTEMS, 0x08, 0)
-
-#define ZORRO_MANUF_IMPULSE 0x0838
-#define ZORRO_PROD_IMPULSE_FIRECRACKER_24 ZORRO_ID(IMPULSE, 0x00, 0)
-
-#define ZORRO_MANUF_IVS 0x0840
-#define ZORRO_PROD_IVS_GRANDSLAM_PIC_2 ZORRO_ID(IVS, 0x02, 0)
-#define ZORRO_PROD_IVS_GRANDSLAM_PIC_1 ZORRO_ID(IVS, 0x04, 0)
-#define ZORRO_PROD_IVS_OVERDRIVE ZORRO_ID(IVS, 0x10, 0)
-#define ZORRO_PROD_IVS_TRUMPCARD_CLASSIC ZORRO_ID(IVS, 0x30, 0)
-#define ZORRO_PROD_IVS_TRUMPCARD_PRO_GRANDSLAM ZORRO_ID(IVS, 0x34, 0)
-#define ZORRO_PROD_IVS_META_4 ZORRO_ID(IVS, 0x40, 0)
-#define ZORRO_PROD_IVS_WAVETOOLS ZORRO_ID(IVS, 0xBF, 0)
-#define ZORRO_PROD_IVS_VECTOR_1 ZORRO_ID(IVS, 0xF3, 0)
-#define ZORRO_PROD_IVS_VECTOR_2 ZORRO_ID(IVS, 0xF4, 0)
-
-#define ZORRO_MANUF_VECTOR_1 0x0841
-#define ZORRO_PROD_VECTOR_CONNECTION_1 ZORRO_ID(VECTOR_1, 0xE3, 0)
-
-#define ZORRO_MANUF_XPERT_PRODEV 0x0845
-#define ZORRO_PROD_XPERT_PRODEV_VISIONA_RAM ZORRO_ID(XPERT_PRODEV, 0x01, 0)
-#define ZORRO_PROD_XPERT_PRODEV_VISIONA_REG ZORRO_ID(XPERT_PRODEV, 0x02, 0)
-#define ZORRO_PROD_XPERT_PRODEV_MERLIN_RAM ZORRO_ID(XPERT_PRODEV, 0x03, 0)
-#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_1 ZORRO_ID(XPERT_PRODEV, 0x04, 0)
-#define ZORRO_PROD_XPERT_PRODEV_MERLIN_REG_2 ZORRO_ID(XPERT_PRODEV, 0xC9, 0)
-
-#define ZORRO_MANUF_HYDRA_SYSTEMS 0x0849
-#define ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET ZORRO_ID(HYDRA_SYSTEMS, 0x01, 0)
-
-#define ZORRO_MANUF_SUNRIZE_INDUSTRIES 0x084F
-#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD1012 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x01, 0)
-#define ZORRO_PROD_SUNRIZE_INDUSTRIES_AD516 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x02, 0)
-#define ZORRO_PROD_SUNRIZE_INDUSTRIES_DD512 ZORRO_ID(SUNRIZE_INDUSTRIES, 0x03, 0)
-
-#define ZORRO_MANUF_TRICERATOPS 0x0850
-#define ZORRO_PROD_TRICERATOPS_MULTI_IO ZORRO_ID(TRICERATOPS, 0x01, 0)
-
-#define ZORRO_MANUF_APPLIED_MAGIC 0x0851
-#define ZORRO_PROD_APPLIED_MAGIC_DMI_RESOLVER ZORRO_ID(APPLIED_MAGIC, 0x01, 0)
-#define ZORRO_PROD_APPLIED_MAGIC_DIGITAL_BROADCASTER ZORRO_ID(APPLIED_MAGIC, 0x06, 0)
-
-#define ZORRO_MANUF_GFX_BASE 0x085E
-#define ZORRO_PROD_GFX_BASE_GDA_1_VRAM ZORRO_ID(GFX_BASE, 0x00, 0)
-#define ZORRO_PROD_GFX_BASE_GDA_1 ZORRO_ID(GFX_BASE, 0x01, 0)
-
-#define ZORRO_MANUF_ROCTEC 0x0860
-#define ZORRO_PROD_ROCTEC_RH_800C ZORRO_ID(ROCTEC, 0x01, 0)
-#define ZORRO_PROD_ROCTEC_RH_800C_RAM ZORRO_ID(ROCTEC, 0x01, 0)
-
-#define ZORRO_MANUF_KATO 0x0861
-#define ZORRO_PROD_KATO_MELODY ZORRO_ID(KATO, 0x80, 0)
-/* ID clash!! */
-#define ZORRO_MANUF_HELFRICH_1 0x0861
-#define ZORRO_PROD_HELFRICH_RAINBOW_II ZORRO_ID(HELFRICH_1, 0x20, 0)
-#define ZORRO_PROD_HELFRICH_RAINBOW_III ZORRO_ID(HELFRICH_1, 0x21, 0)
-
-#define ZORRO_MANUF_ATLANTIS 0x0862
-
-#define ZORRO_MANUF_PROTAR 0x0864
-
-#define ZORRO_MANUF_ACS 0x0865
-
-#define ZORRO_MANUF_SOFTWARE_RESULTS_ENTERPRISES 0x0866
-#define ZORRO_PROD_SOFTWARE_RESULTS_ENTERPRISES_GOLDEN_GATE_2_BUS_PLUS ZORRO_ID(SOFTWARE_RESULTS_ENTERPRISES, 0x01, 0)
-
-#define ZORRO_MANUF_MASOBOSHI 0x086D
-#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_SC201 ZORRO_ID(MASOBOSHI, 0x03, 0)
-#define ZORRO_PROD_MASOBOSHI_MASTER_CARD_MC702 ZORRO_ID(MASOBOSHI, 0x04, 0)
-#define ZORRO_PROD_MASOBOSHI_MVD_819 ZORRO_ID(MASOBOSHI, 0x07, 0)
-
-#define ZORRO_MANUF_MAINHATTAN_DATA 0x086F
-#define ZORRO_PROD_MAINHATTAN_DATA_IDE ZORRO_ID(MAINHATTAN_DATA, 0x01, 0)
-
-#define ZORRO_MANUF_VILLAGE_TRONIC 0x0877
-#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_RAM ZORRO_ID(VILLAGE_TRONIC, 0x01, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_REG ZORRO_ID(VILLAGE_TRONIC, 0x02, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_DOMINO_16M_PROTOTYPE ZORRO_ID(VILLAGE_TRONIC, 0x03, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_RAM ZORRO_ID(VILLAGE_TRONIC, 0x0B, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_REG ZORRO_ID(VILLAGE_TRONIC, 0x0C, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_II_II_PLUS_SEGMENTED_MODE ZORRO_ID(VILLAGE_TRONIC, 0x0D, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM1 ZORRO_ID(VILLAGE_TRONIC, 0x15, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_MEM2 ZORRO_ID(VILLAGE_TRONIC, 0x16, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z2_REG ZORRO_ID(VILLAGE_TRONIC, 0x17, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_PICASSO_IV_Z3 ZORRO_ID(VILLAGE_TRONIC, 0x18, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE ZORRO_ID(VILLAGE_TRONIC, 0xC9, 0)
-#define ZORRO_PROD_VILLAGE_TRONIC_ARIADNE2 ZORRO_ID(VILLAGE_TRONIC, 0xCA, 0)
-
-#define ZORRO_MANUF_UTILITIES_UNLIMITED 0x087B
-#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE ZORRO_ID(UTILITIES_UNLIMITED, 0x15, 0)
-#define ZORRO_PROD_UTILITIES_UNLIMITED_EMPLANT_DELUXE2 ZORRO_ID(UTILITIES_UNLIMITED, 0x20, 0)
-
-#define ZORRO_MANUF_AMITRIX 0x0880
-#define ZORRO_PROD_AMITRIX_MULTI_IO ZORRO_ID(AMITRIX, 0x01, 0)
-#define ZORRO_PROD_AMITRIX_CD_RAM ZORRO_ID(AMITRIX, 0x02, 0)
-
-#define ZORRO_MANUF_ARMAX 0x0885
-#define ZORRO_PROD_ARMAX_OMNIBUS ZORRO_ID(ARMAX, 0x00, 0)
-
-#define ZORRO_MANUF_ZEUS 0x088D
-#define ZORRO_PROD_ZEUS_SPIDER ZORRO_ID(ZEUS, 0x04, 0)
-
-#define ZORRO_MANUF_NEWTEK 0x088F
-#define ZORRO_PROD_NEWTEK_VIDEOTOASTER ZORRO_ID(NEWTEK, 0x00, 0)
-
-#define ZORRO_MANUF_M_TECH_GERMANY 0x0890
-#define ZORRO_PROD_MTEC_AT500_2 ZORRO_ID(M_TECH_GERMANY, 0x01, 0)
-#define ZORRO_PROD_MTEC_68030 ZORRO_ID(M_TECH_GERMANY, 0x03, 0)
-#define ZORRO_PROD_MTEC_68020I ZORRO_ID(M_TECH_GERMANY, 0x06, 0)
-#define ZORRO_PROD_MTEC_A1200_T68030_RTC ZORRO_ID(M_TECH_GERMANY, 0x20, 0)
-#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530 ZORRO_ID(M_TECH_GERMANY, 0x21, 0)
-#define ZORRO_PROD_MTEC_8_MB_RAM ZORRO_ID(M_TECH_GERMANY, 0x22, 0)
-#define ZORRO_PROD_MTEC_VIPER_MK_V_E_MATRIX_530_SCSI_IDE ZORRO_ID(M_TECH_GERMANY, 0x24, 0)
-
-#define ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_4 0x0891
-#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_RAM ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x01, 0)
-#define ZORRO_PROD_GVP_EGS_28_24_SPECTRUM_REG ZORRO_ID(GREAT_VALLEY_PRODUCTS_4, 0x02, 0)
-
-#define ZORRO_MANUF_APOLLO_1 0x0892
-#define ZORRO_PROD_APOLLO_A1200 ZORRO_ID(APOLLO_1, 0x01, 0)
-
-#define ZORRO_MANUF_HELFRICH_2 0x0893
-#define ZORRO_PROD_HELFRICH_PICCOLO_RAM ZORRO_ID(HELFRICH_2, 0x05, 0)
-#define ZORRO_PROD_HELFRICH_PICCOLO_REG ZORRO_ID(HELFRICH_2, 0x06, 0)
-#define ZORRO_PROD_HELFRICH_PEGGY_PLUS_MPEG ZORRO_ID(HELFRICH_2, 0x07, 0)
-#define ZORRO_PROD_HELFRICH_VIDEOCRUNCHER ZORRO_ID(HELFRICH_2, 0x08, 0)
-#define ZORRO_PROD_HELFRICH_SD64_RAM ZORRO_ID(HELFRICH_2, 0x0A, 0)
-#define ZORRO_PROD_HELFRICH_SD64_REG ZORRO_ID(HELFRICH_2, 0x0B, 0)
-
-#define ZORRO_MANUF_MACROSYSTEMS_USA 0x089B
-#define ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx ZORRO_ID(MACROSYSTEMS_USA, 0x13, 0)
-
-#define ZORRO_MANUF_ELBOX_COMPUTER 0x089E
-#define ZORRO_PROD_ELBOX_COMPUTER_1200_4 ZORRO_ID(ELBOX_COMPUTER, 0x06, 0)
-
-#define ZORRO_MANUF_HARMS_PROFESSIONAL 0x0A00
-#define ZORRO_PROD_HARMS_PROFESSIONAL_030_PLUS ZORRO_ID(HARMS_PROFESSIONAL, 0x10, 0)
-#define ZORRO_PROD_HARMS_PROFESSIONAL_3500 ZORRO_ID(HARMS_PROFESSIONAL, 0xD0, 0)
-
-#define ZORRO_MANUF_MICRONIK 0x0A50
-#define ZORRO_PROD_MICRONIK_RCA_120 ZORRO_ID(MICRONIK, 0x0A, 0)
-
-#define ZORRO_MANUF_MICRONIK2 0x0F0F
-#define ZORRO_PROD_MICRONIK2_Z3I ZORRO_ID(MICRONIK2, 0x01, 0)
-
-#define ZORRO_MANUF_MEGAMICRO 0x1000
-#define ZORRO_PROD_MEGAMICRO_SCRAM_500 ZORRO_ID(MEGAMICRO, 0x03, 0)
-#define ZORRO_PROD_MEGAMICRO_SCRAM_500_RAM ZORRO_ID(MEGAMICRO, 0x04, 0)
-
-#define ZORRO_MANUF_IMTRONICS_2 0x1028
-#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_3 ZORRO_ID(IMTRONICS_2, 0x39, 0)
-#define ZORRO_PROD_IMTRONICS_HURRICANE_2800_4 ZORRO_ID(IMTRONICS_2, 0x57, 0)
-
-/* unofficial ID */
-#define ZORRO_MANUF_INDIVIDUAL_COMPUTERS 0x1212
-#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x00, 0)
-#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x17, 0)
-#define ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL ZORRO_ID(INDIVIDUAL_COMPUTERS, 0x2A, 0)
-
-#define ZORRO_MANUF_KUPKE_3 0x1248
-#define ZORRO_PROD_KUPKE_GOLEM_HD_3000 ZORRO_ID(KUPKE_3, 0x01, 0)
-
-#define ZORRO_MANUF_ITH 0x1388
-#define ZORRO_PROD_ITH_ISDN_MASTER_II ZORRO_ID(ITH, 0x01, 0)
-
-#define ZORRO_MANUF_VMC 0x1389
-#define ZORRO_PROD_VMC_ISDN_BLASTER_Z2 ZORRO_ID(VMC, 0x01, 0)
-#define ZORRO_PROD_VMC_HYPERCOM_4 ZORRO_ID(VMC, 0x02, 0)
-
-#define ZORRO_MANUF_INFORMATION 0x157C
-#define ZORRO_PROD_INFORMATION_ISDN_ENGINE_I ZORRO_ID(INFORMATION, 0x64, 0)
-
-#define ZORRO_MANUF_VORTEX 0x2017
-#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80386SX ZORRO_ID(VORTEX, 0x07, 0)
-#define ZORRO_PROD_VORTEX_GOLDEN_GATE_RAM ZORRO_ID(VORTEX, 0x08, 0)
-#define ZORRO_PROD_VORTEX_GOLDEN_GATE_80486 ZORRO_ID(VORTEX, 0x09, 0)
-
-#define ZORRO_MANUF_EXPANSION_SYSTEMS 0x2062
-#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX ZORRO_ID(EXPANSION_SYSTEMS, 0x01, 0)
-#define ZORRO_PROD_EXPANSION_SYSTEMS_DATAFLYER_4000SX_RAM ZORRO_ID(EXPANSION_SYSTEMS, 0x02, 0)
-
-#define ZORRO_MANUF_READYSOFT 0x2100
-#define ZORRO_PROD_READYSOFT_AMAX_II_IV ZORRO_ID(READYSOFT, 0x01, 0)
-
-#define ZORRO_MANUF_PHASE5 0x2140
-#define ZORRO_PROD_PHASE5_BLIZZARD_RAM ZORRO_ID(PHASE5, 0x01, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD ZORRO_ID(PHASE5, 0x02, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_1220_IV ZORRO_ID(PHASE5, 0x06, 0)
-#define ZORRO_PROD_PHASE5_FASTLANE_Z3_RAM ZORRO_ID(PHASE5, 0x0A, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 ZORRO_ID(PHASE5, 0x0B, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM ZORRO_ID(PHASE5, 0x0C, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_1230 ZORRO_ID(PHASE5, 0x0D, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 ZORRO_ID(PHASE5, 0x11, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_2060 ZORRO_ID(PHASE5, 0x18, 0)
-#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_II ZORRO_ID(PHASE5, 0x19, 0)
-#define ZORRO_PROD_PHASE5_CYBERVISION64 ZORRO_ID(PHASE5, 0x22, 0)
-#define ZORRO_PROD_PHASE5_CYBERVISION64_3D_PROTOTYPE ZORRO_ID(PHASE5, 0x32, 0)
-#define ZORRO_PROD_PHASE5_CYBERVISION64_3D ZORRO_ID(PHASE5, 0x43, 0)
-#define ZORRO_PROD_PHASE5_CYBERSTORM_MK_III ZORRO_ID(PHASE5, 0x64, 0)
-#define ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS ZORRO_ID(PHASE5, 0x6e, 0)
-
-#define ZORRO_MANUF_DPS 0x2169
-#define ZORRO_PROD_DPS_PERSONAL_ANIMATION_RECORDER ZORRO_ID(DPS, 0x01, 0)
-
-#define ZORRO_MANUF_APOLLO_2 0x2200
-#define ZORRO_PROD_APOLLO_A620_68020_1 ZORRO_ID(APOLLO_2, 0x00, 0)
-#define ZORRO_PROD_APOLLO_A620_68020_2 ZORRO_ID(APOLLO_2, 0x01, 0)
-
-#define ZORRO_MANUF_APOLLO_3 0x2222
-#define ZORRO_PROD_APOLLO_AT_APOLLO ZORRO_ID(APOLLO_3, 0x22, 0)
-#define ZORRO_PROD_APOLLO_1230_1240_1260_2030_4040_4060 ZORRO_ID(APOLLO_3, 0x23, 0)
-
-#define ZORRO_MANUF_PETSOFF_LP 0x38A5
-#define ZORRO_PROD_PETSOFF_LP_DELFINA ZORRO_ID(PETSOFF_LP, 0x00, 0)
-#define ZORRO_PROD_PETSOFF_LP_DELFINA_LITE ZORRO_ID(PETSOFF_LP, 0x01, 0)
-
-#define ZORRO_MANUF_UWE_GERLACH 0x3FF7
-#define ZORRO_PROD_UWE_GERLACH_RAM_ROM ZORRO_ID(UWE_GERLACH, 0xd4, 0)
-
-#define ZORRO_MANUF_ACT 0x4231
-#define ZORRO_PROD_ACT_PRELUDE ZORRO_ID(ACT, 0x01, 0)
-
-#define ZORRO_MANUF_MACROSYSTEMS_GERMANY 0x4754
-#define ZORRO_PROD_MACROSYSTEMS_MAESTRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x03, 0)
-#define ZORRO_PROD_MACROSYSTEMS_VLAB ZORRO_ID(MACROSYSTEMS_GERMANY, 0x04, 0)
-#define ZORRO_PROD_MACROSYSTEMS_MAESTRO_PRO ZORRO_ID(MACROSYSTEMS_GERMANY, 0x05, 0)
-#define ZORRO_PROD_MACROSYSTEMS_RETINA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x06, 0)
-#define ZORRO_PROD_MACROSYSTEMS_MULTI_EVOLUTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x08, 0)
-#define ZORRO_PROD_MACROSYSTEMS_TOCCATA ZORRO_ID(MACROSYSTEMS_GERMANY, 0x0C, 0)
-#define ZORRO_PROD_MACROSYSTEMS_RETINA_Z3 ZORRO_ID(MACROSYSTEMS_GERMANY, 0x10, 0)
-#define ZORRO_PROD_MACROSYSTEMS_VLAB_MOTION ZORRO_ID(MACROSYSTEMS_GERMANY, 0x12, 0)
-#define ZORRO_PROD_MACROSYSTEMS_ALTAIS ZORRO_ID(MACROSYSTEMS_GERMANY, 0x13, 0)
-#define ZORRO_PROD_MACROSYSTEMS_FALCON_040 ZORRO_ID(MACROSYSTEMS_GERMANY, 0xFD, 0)
-
-#define ZORRO_MANUF_COMBITEC 0x6766
-
-#define ZORRO_MANUF_SKI_PERIPHERALS 0x8000
-#define ZORRO_PROD_SKI_PERIPHERALS_MAST_FIREBALL ZORRO_ID(SKI_PERIPHERALS, 0x08, 0)
-#define ZORRO_PROD_SKI_PERIPHERALS_SCSI_DUAL_SERIAL ZORRO_ID(SKI_PERIPHERALS, 0x80, 0)
-
-#define ZORRO_MANUF_REIS_WARE_2 0xA9AD
-#define ZORRO_PROD_REIS_WARE_SCAN_KING ZORRO_ID(REIS_WARE_2, 0x11, 0)
-
-#define ZORRO_MANUF_CAMERON 0xAA01
-#define ZORRO_PROD_CAMERON_PERSONAL_A4 ZORRO_ID(CAMERON, 0x10, 0)
-
-#define ZORRO_MANUF_REIS_WARE 0xAA11
-#define ZORRO_PROD_REIS_WARE_HANDYSCANNER ZORRO_ID(REIS_WARE, 0x11, 0)
-
-#define ZORRO_MANUF_PHOENIX_2 0xB5A8
-#define ZORRO_PROD_PHOENIX_ST506_2 ZORRO_ID(PHOENIX_2, 0x21, 0)
-#define ZORRO_PROD_PHOENIX_SCSI_2 ZORRO_ID(PHOENIX_2, 0x22, 0)
-#define ZORRO_PROD_PHOENIX_RAM_2 ZORRO_ID(PHOENIX_2, 0xBE, 0)
-
-#define ZORRO_MANUF_COMBITEC_2 0xC008
-#define ZORRO_PROD_COMBITEC_HD ZORRO_ID(COMBITEC_2, 0x2A, 0)
-#define ZORRO_PROD_COMBITEC_SRAM ZORRO_ID(COMBITEC_2, 0x2B, 0)
-
-
- /*
- * Test and illegal Manufacturer IDs.
- */
-
-#define ZORRO_MANUF_HACKER 0x07DB
-#define ZORRO_PROD_GENERAL_PROTOTYPE ZORRO_ID(HACKER, 0x00, 0)
-#define ZORRO_PROD_HACKER_SCSI ZORRO_ID(HACKER, 0x01, 0)
-#define ZORRO_PROD_RESOURCE_MANAGEMENT_FORCE_QUICKNET_QN2000 ZORRO_ID(HACKER, 0x02, 0)
-#define ZORRO_PROD_VECTOR_CONNECTION_2 ZORRO_ID(HACKER, 0xE0, 0)
-#define ZORRO_PROD_VECTOR_CONNECTION_3 ZORRO_ID(HACKER, 0xE1, 0)
-#define ZORRO_PROD_VECTOR_CONNECTION_4 ZORRO_ID(HACKER, 0xE2, 0)
-#define ZORRO_PROD_VECTOR_CONNECTION_5 ZORRO_ID(HACKER, 0xE3, 0)
diff --git a/original/media/ov5650.h b/original/media/ov5650.h
deleted file mode 100755
index 083cf6e..0000000
--- a/original/media/ov5650.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2010 Motorola, Inc.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-#ifndef __OV5650_H__
-#define __OV5650_H__
-
-#include <linux/ioctl.h> /* For IOCTL macros */
-
-#define OV5650_IOCTL_SET_MODE _IOW('o', 1, struct ov5650_mode)
-#define OV5650_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32)
-#define OV5650_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32)
-#define OV5650_IOCTL_SET_GAIN _IOW('o', 4, __u16)
-#define OV5650_IOCTL_GET_STATUS _IOR('o', 5, __u8)
-#define OV5650_IOCTL_GET_OTP _IOR('o', 6, struct ov5650_otp_data)
-#define OV5650_IOCTL_TEST_PATTERN _IOW('o', 7, enum ov5650_test_pattern)
-
-enum ov5650_test_pattern {
- TEST_PATTERN_NONE,
- TEST_PATTERN_COLORBARS,
- TEST_PATTERN_CHECKERBOARD
-};
-
-struct ov5650_otp_data {
- /* Only the first 5 bytes are actually used. */
- __u8 sensor_serial_num[6];
- __u8 part_num[8];
- __u8 lens_id[1];
- __u8 manufacture_id[2];
- __u8 factory_id[2];
- __u8 manufacture_date[9];
- __u8 manufacture_line[2];
-
- __u32 module_serial_num;
- __u8 focuser_liftoff[2];
- __u8 focuser_macro[2];
- __u8 reserved1[12];
- __u8 shutter_cal[16];
- __u8 reserved2[183];
-
- /* Big-endian. CRC16 over 0x00-0x41 (inclusive) */
- __u16 crc;
- __u8 reserved3[3];
- __u8 auto_load[2];
-} __attribute__ ((packed));
-
-struct ov5650_mode {
- int xres;
- int yres;
- __u32 frame_length;
- __u32 coarse_time;
- __u16 gain;
-};
-#ifdef __KERNEL__
-struct ov5650_platform_data {
- int (*power_on)(void);
- int (*power_off)(void);
-
-};
-#endif /* __KERNEL__ */
-
-#endif /* __OV5650_H__ */
-
diff --git a/original/media/soc2030.h b/original/media/soc2030.h
deleted file mode 100755
index 9f6065e..0000000
--- a/original/media/soc2030.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2010 Motorola, Inc.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-#ifndef __SOC2030_H__
-#define __SOC2030_H__
-
-#include <linux/ioctl.h> /* For IOCTL macros */
-
-#define SOC2030_IOCTL_SET_MODE _IOWR('o', 1, struct soc2030_mode)
-#define SOC2030_IOCTL_GET_STATUS _IOC(_IOC_READ, 'o', 2, 10)
-#define SOC2030_IOCTL_SET_PRIVATE _IOWR('o', 3, struct soc2030_regs)
-#define SOC2030_IOCTL_GET_MODES _IO('o', 4)
-#define SOC2030_IOCTL_GET_NUM_MODES _IOR('o', 5, unsigned int)
-#define SOC2030_IOCTL_SET_EFFECT _IOWR('o', 6, unsigned int)
-#define SOC2030_IOCTL_SET_WHITEBALANCE _IOWR('o', 7, unsigned int)
-#define SOC2030_IOCTL_SET_EXP_COMP _IOWR('o', 8, int)
-#define SOC2030_IOCTL_SET_LOCK _IOWR('o', 9, struct soc2030_lock)
-
-#define SOC2030_POLL_WAITMS 50
-#define SOC2030_MAX_RETRIES 3
-#define SOC2030_POLL_RETRIES 7
-
-#define SOC2030_MAX_PRIVATE_SIZE 1024
-#define SOC2030_MAX_NUM_MODES 6
-
-#define SOC_EV_MAX 2
-#define SOC_EV_MIN -2
-#define EXP_TARGET 0x32
-
-enum {
- REG_TABLE_END,
- WRITE_REG_DATA,
- WRITE_REG_BIT_H,
- WRITE_REG_BIT_L,
- POLL_REG_DATA,
- POLL_REG_BIT_H,
- POLL_REG_BIT_L,
- WRITE_VAR_DATA,
- POLL_VAR_DATA,
- DELAY_MS,
- WRITE_REG_VAR1,
- WRITE_REG_VAR2,
- WRITE_REG_VAR3,
- WRITE_REG_VAR4,
- READ_REG_VAR1,
- READ_REG_VAR2,
- READ_REG_VAR3,
- READ_REG_VAR4,
-};
-
-#define REG_VAR1 (READ_REG_VAR1 - READ_REG_VAR1)
-#define REG_VAR2 (READ_REG_VAR2 - READ_REG_VAR1)
-#define REG_VAR3 (READ_REG_VAR3 - READ_REG_VAR1)
-#define REG_VAR4 (READ_REG_VAR4 - READ_REG_VAR1)
-
-enum {
- EFFECT_NONE,
- EFFECT_BW,
- EFFECT_NEGATIVE,
- EFFECT_POSTERIZE,
- EFFECT_SEPIA,
- EFFECT_SOLARIZE,
- EFFECT_AQUA,
- EFFECT_MAX,
-};
-
-enum {
- WB_AUTO,
- WB_INCANDESCENT,
- WB_FLUORESCENT,
- WB_DAYLIGHT,
- WB_CLOUDYDAYLIGHT,
- WB_NIGHT,
- WB_MAX,
-};
-
-struct soc2030_regs {
- __u8 op;
- __u16 addr;
- __u16 val;
-};
-
-struct soc2030_lock {
- __u8 aelock;
- __u8 aerelock;
- __u8 awblock;
- __u8 awbrelock;
- __u8 previewactive;
-};
-
-struct soc2030_mode {
- int xres;
- int yres;
- int fps;
- struct soc2030_regs *regset;
-};
-
-#ifdef __KERNEL__
-struct soc2030_platform_data {
- int (*power_on)(void);
- int (*power_off)(void);
-
-};
-#endif /* __KERNEL__ */
-
-#endif /* __SOC2030_H__ */
diff --git a/original/media/tegra_camera.h b/original/media/tegra_camera.h
deleted file mode 100644
index 3c8ddca..0000000
--- a/original/media/tegra_camera.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * include/linux/tegra_camera.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-enum {
- TEGRA_CAMERA_MODULE_ISP = 0,
- TEGRA_CAMERA_MODULE_VI,
- TEGRA_CAMERA_MODULE_CSI,
-};
-
-enum {
- TEGRA_CAMERA_VI_CLK,
- TEGRA_CAMERA_VI_SENSOR_CLK,
-};
-
-struct tegra_camera_clk_info {
- uint id;
- uint clk_id;
- unsigned long rate;
-};
-
-#define TEGRA_CAMERA_IOCTL_ENABLE _IOWR('i', 1, uint)
-#define TEGRA_CAMERA_IOCTL_DISABLE _IOWR('i', 2, uint)
-#define TEGRA_CAMERA_IOCTL_CLK_SET_RATE \
- _IOWR('i', 3, struct tegra_camera_clk_info)
-#define TEGRA_CAMERA_IOCTL_RESET _IOWR('i', 4, uint)
diff --git a/original/media/v4l2-mediabus.h b/original/media/v4l2-mediabus.h
deleted file mode 100644
index 83ae07e..0000000
--- a/original/media/v4l2-mediabus.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Media Bus API header
- *
- * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
- *
- * 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.
- */
-
-#ifndef V4L2_MEDIABUS_H
-#define V4L2_MEDIABUS_H
-
-#include <linux/v4l2-mediabus.h>
-
-/* Parallel flags */
-/*
- * Can the client run in master or in slave mode. By "Master mode" an operation
- * mode is meant, when the client (e.g., a camera sensor) is producing
- * horizontal and vertical synchronisation. In "Slave mode" the host is
- * providing these signals to the slave.
- */
-#define V4L2_MBUS_MASTER (1 << 0)
-#define V4L2_MBUS_SLAVE (1 << 1)
-/*
- * Signal polarity flags
- * Note: in BT.656 mode HSYNC, FIELD, and VSYNC are unused
- * V4L2_MBUS_[HV]SYNC* flags should be also used for specifying
- * configuration of hardware that uses [HV]REF signals
- */
-#define V4L2_MBUS_HSYNC_ACTIVE_HIGH (1 << 2)
-#define V4L2_MBUS_HSYNC_ACTIVE_LOW (1 << 3)
-#define V4L2_MBUS_VSYNC_ACTIVE_HIGH (1 << 4)
-#define V4L2_MBUS_VSYNC_ACTIVE_LOW (1 << 5)
-#define V4L2_MBUS_PCLK_SAMPLE_RISING (1 << 6)
-#define V4L2_MBUS_PCLK_SAMPLE_FALLING (1 << 7)
-#define V4L2_MBUS_DATA_ACTIVE_HIGH (1 << 8)
-#define V4L2_MBUS_DATA_ACTIVE_LOW (1 << 9)
-/* FIELD = 0/1 - Field1 (odd)/Field2 (even) */
-#define V4L2_MBUS_FIELD_EVEN_HIGH (1 << 10)
-/* FIELD = 1/0 - Field1 (odd)/Field2 (even) */
-#define V4L2_MBUS_FIELD_EVEN_LOW (1 << 11)
-
-/* Serial flags */
-/* How many lanes the client can use */
-#define V4L2_MBUS_CSI2_1_LANE (1 << 0)
-#define V4L2_MBUS_CSI2_2_LANE (1 << 1)
-#define V4L2_MBUS_CSI2_3_LANE (1 << 2)
-#define V4L2_MBUS_CSI2_4_LANE (1 << 3)
-/* On which channels it can send video data */
-#define V4L2_MBUS_CSI2_CHANNEL_0 (1 << 4)
-#define V4L2_MBUS_CSI2_CHANNEL_1 (1 << 5)
-#define V4L2_MBUS_CSI2_CHANNEL_2 (1 << 6)
-#define V4L2_MBUS_CSI2_CHANNEL_3 (1 << 7)
-/* Does it support only continuous or also non-continuous clock mode */
-#define V4L2_MBUS_CSI2_CONTINUOUS_CLOCK (1 << 8)
-#define V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK (1 << 9)
-
-#define V4L2_MBUS_CSI2_LANES (V4L2_MBUS_CSI2_1_LANE | V4L2_MBUS_CSI2_2_LANE | \
- V4L2_MBUS_CSI2_3_LANE | V4L2_MBUS_CSI2_4_LANE)
-#define V4L2_MBUS_CSI2_CHANNELS (V4L2_MBUS_CSI2_CHANNEL_0 | V4L2_MBUS_CSI2_CHANNEL_1 | \
- V4L2_MBUS_CSI2_CHANNEL_2 | V4L2_MBUS_CSI2_CHANNEL_3)
-
-/**
- * v4l2_mbus_type - media bus type
- * @V4L2_MBUS_PARALLEL: parallel interface with hsync and vsync
- * @V4L2_MBUS_BT656: parallel interface with embedded synchronisation, can
- * also be used for BT.1120
- * @V4L2_MBUS_CSI2: MIPI CSI-2 serial interface
- */
-enum v4l2_mbus_type {
- V4L2_MBUS_PARALLEL,
- V4L2_MBUS_BT656,
- V4L2_MBUS_CSI2,
-};
-
-/**
- * v4l2_mbus_config - media bus configuration
- * @type: in: interface type
- * @flags: in / out: configuration flags, depending on @type
- */
-struct v4l2_mbus_config {
- enum v4l2_mbus_type type;
- unsigned int flags;
-};
-
-static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
- const struct v4l2_mbus_framefmt *mbus_fmt)
-{
- pix_fmt->width = mbus_fmt->width;
- pix_fmt->height = mbus_fmt->height;
- pix_fmt->field = mbus_fmt->field;
- pix_fmt->colorspace = mbus_fmt->colorspace;
-}
-
-static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
- const struct v4l2_pix_format *pix_fmt,
- enum v4l2_mbus_pixelcode code)
-{
- mbus_fmt->width = pix_fmt->width;
- mbus_fmt->height = pix_fmt->height;
- mbus_fmt->field = pix_fmt->field;
- mbus_fmt->colorspace = pix_fmt->colorspace;
- mbus_fmt->code = code;
-}
-
-#endif
diff --git a/original/mtd/mtd-abi.h b/original/mtd/mtd-abi.h
deleted file mode 100644
index 8e501a7..0000000
--- a/original/mtd/mtd-abi.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * $Id: mtd-abi.h,v 1.13 2005/11/07 11:14:56 gleixner Exp $
- *
- * Portions of MTD ABI definition which are shared by kernel and user space
- */
-
-#ifndef __MTD_ABI_H__
-#define __MTD_ABI_H__
-
-struct erase_info_user {
- uint32_t start;
- uint32_t length;
-};
-
-struct mtd_oob_buf {
- uint32_t start;
- uint32_t length;
- unsigned char __user *ptr;
-};
-
-#define MTD_ABSENT 0
-#define MTD_RAM 1
-#define MTD_ROM 2
-#define MTD_NORFLASH 3
-#define MTD_NANDFLASH 4
-#define MTD_DATAFLASH 6
-
-#define MTD_WRITEABLE 0x400 /* Device is writeable */
-#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */
-#define MTD_NO_ERASE 0x1000 /* No erase necessary */
-#define MTD_STUPID_LOCK 0x2000 /* Always locked after reset */
-
-// Some common devices / combinations of capabilities
-#define MTD_CAP_ROM 0
-#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
-#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
-#define MTD_CAP_NANDFLASH (MTD_WRITEABLE)
-
-/* ECC byte placement */
-#define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended)
-#define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode)
-#define MTD_NANDECC_AUTOPLACE 2 // Use the default placement scheme
-#define MTD_NANDECC_PLACEONLY 3 // Use the given placement in the structure (Do not store ecc result on read)
-#define MTD_NANDECC_AUTOPL_USR 4 // Use the given autoplacement scheme rather than using the default
-
-/* OTP mode selection */
-#define MTD_OTP_OFF 0
-#define MTD_OTP_FACTORY 1
-#define MTD_OTP_USER 2
-
-struct mtd_info_user {
- uint8_t type;
- uint32_t flags;
- uint32_t size; // Total size of the MTD
- uint32_t erasesize;
- uint32_t writesize;
- uint32_t oobsize; // Amount of OOB data per block (e.g. 16)
- /* The below two fields are obsolete and broken, do not use them
- * (TODO: remove at some point) */
- uint32_t ecctype;
- uint32_t eccsize;
-};
-
-struct region_info_user {
- uint32_t offset; /* At which this region starts,
- * from the beginning of the MTD */
- uint32_t erasesize; /* For this region */
- uint32_t numblocks; /* Number of blocks in this region */
- uint32_t regionindex;
-};
-
-struct otp_info {
- uint32_t start;
- uint32_t length;
- uint32_t locked;
-};
-
-#define MEMGETINFO _IOR('M', 1, struct mtd_info_user)
-#define MEMERASE _IOW('M', 2, struct erase_info_user)
-#define MEMWRITEOOB _IOWR('M', 3, struct mtd_oob_buf)
-#define MEMREADOOB _IOWR('M', 4, struct mtd_oob_buf)
-#define MEMLOCK _IOW('M', 5, struct erase_info_user)
-#define MEMUNLOCK _IOW('M', 6, struct erase_info_user)
-#define MEMGETREGIONCOUNT _IOR('M', 7, int)
-#define MEMGETREGIONINFO _IOWR('M', 8, struct region_info_user)
-#define MEMSETOOBSEL _IOW('M', 9, struct nand_oobinfo)
-#define MEMGETOOBSEL _IOR('M', 10, struct nand_oobinfo)
-#define MEMGETBADBLOCK _IOW('M', 11, loff_t)
-#define MEMSETBADBLOCK _IOW('M', 12, loff_t)
-#define OTPSELECT _IOR('M', 13, int)
-#define OTPGETREGIONCOUNT _IOW('M', 14, int)
-#define OTPGETREGIONINFO _IOW('M', 15, struct otp_info)
-#define OTPLOCK _IOR('M', 16, struct otp_info)
-#define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout)
-#define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats)
-#define MTDFILEMODE _IO('M', 19)
-
-/*
- * Obsolete legacy interface. Keep it in order not to break userspace
- * interfaces
- */
-struct nand_oobinfo {
- uint32_t useecc;
- uint32_t eccbytes;
- uint32_t oobfree[8][2];
- uint32_t eccpos[32];
-};
-
-struct nand_oobfree {
- uint32_t offset;
- uint32_t length;
-};
-
-#define MTD_MAX_OOBFREE_ENTRIES 8
-/*
- * ECC layout control structure. Exported to userspace for
- * diagnosis and to allow creation of raw images
- */
-struct nand_ecclayout {
- uint32_t eccbytes;
- uint32_t eccpos[64];
- uint32_t oobavail;
- struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
-};
-
-/**
- * struct mtd_ecc_stats - error correction stats
- *
- * @corrected: number of corrected bits
- * @failed: number of uncorrectable errors
- * @badblocks: number of bad blocks in this partition
- * @bbtblocks: number of blocks reserved for bad block tables
- */
-struct mtd_ecc_stats {
- uint32_t corrected;
- uint32_t failed;
- uint32_t badblocks;
- uint32_t bbtblocks;
-};
-
-/*
- * Read/write file modes for access to MTD
- */
-enum mtd_file_modes {
- MTD_MODE_NORMAL = MTD_OTP_OFF,
- MTD_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
- MTD_MODE_OTP_USER = MTD_OTP_USER,
- MTD_MODE_RAW,
-};
-
-#endif /* __MTD_ABI_H__ */
diff --git a/original/mtd/mtd-user.h b/original/mtd/mtd-user.h
deleted file mode 100644
index 713f34d..0000000
--- a/original/mtd/mtd-user.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * $Id: mtd-user.h,v 1.2 2004/05/05 14:44:57 dwmw2 Exp $
- *
- * MTD ABI header for use by user space only.
- */
-
-#ifndef __MTD_USER_H__
-#define __MTD_USER_H__
-
-#include <stdint.h>
-
-/* This file is blessed for inclusion by userspace */
-#include <mtd/mtd-abi.h>
-
-typedef struct mtd_info_user mtd_info_t;
-typedef struct erase_info_user erase_info_t;
-typedef struct region_info_user region_info_t;
-typedef struct nand_oobinfo nand_oobinfo_t;
-typedef struct nand_ecclayout nand_ecclayout_t;
-
-#endif /* __MTD_USER_H__ */
diff --git a/original/sound/asound.h b/original/sound/asound.h
deleted file mode 100644
index 9f1eecf..0000000
--- a/original/sound/asound.h
+++ /dev/null
@@ -1,911 +0,0 @@
-/*
- * Advanced Linux Sound Architecture - ALSA - Driver
- * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>,
- * Abramo Bagnara <abramo@alsa-project.org>
- *
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef __SOUND_ASOUND_H
-#define __SOUND_ASOUND_H
-
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-#include <linux/ioctl.h>
-#include <linux/time.h>
-#include <asm/byteorder.h>
-
-#ifdef __LITTLE_ENDIAN
-#define SNDRV_LITTLE_ENDIAN
-#else
-#ifdef __BIG_ENDIAN
-#define SNDRV_BIG_ENDIAN
-#else
-#error "Unsupported endian..."
-#endif
-#endif
-
-#endif /* __KERNEL__ **/
-
-/*
- * protocol version
- */
-
-#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor))
-#define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff)
-#define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff)
-#define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff)
-#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \
- (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \
- (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \
- SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion)))
-
-/****************************************************************************
- * *
- * Digital audio interface *
- * *
- ****************************************************************************/
-
-struct snd_aes_iec958 {
- unsigned char status[24]; /* AES/IEC958 channel status bits */
- unsigned char subcode[147]; /* AES/IEC958 subcode bits */
- unsigned char pad; /* nothing */
- unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */
-};
-
-/****************************************************************************
- * *
- * Section for driver hardware dependent interface - /dev/snd/hw? *
- * *
- ****************************************************************************/
-
-#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1)
-
-enum {
- SNDRV_HWDEP_IFACE_OPL2 = 0,
- SNDRV_HWDEP_IFACE_OPL3,
- SNDRV_HWDEP_IFACE_OPL4,
- SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */
- SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */
- SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */
- SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */
- SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */
- SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */
- SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */
- SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */
- SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */
- SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */
- SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm */
- SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */
- SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */
- SNDRV_HWDEP_IFACE_HDA, /* HD-audio */
- SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */
-
- /* Don't forget to change the following: */
- SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_USB_STREAM
-};
-
-struct snd_hwdep_info {
- unsigned int device; /* WR: device number */
- int card; /* R: card number */
- unsigned char id[64]; /* ID (user selectable) */
- unsigned char name[80]; /* hwdep name */
- int iface; /* hwdep interface */
- unsigned char reserved[64]; /* reserved for future */
-};
-
-/* generic DSP loader */
-struct snd_hwdep_dsp_status {
- unsigned int version; /* R: driver-specific version */
- unsigned char id[32]; /* R: driver-specific ID string */
- unsigned int num_dsps; /* R: number of DSP images to transfer */
- unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */
- unsigned int chip_ready; /* R: 1 = initialization finished */
- unsigned char reserved[16]; /* reserved for future use */
-};
-
-struct snd_hwdep_dsp_image {
- unsigned int index; /* W: DSP index */
- unsigned char name[64]; /* W: ID (e.g. file name) */
- unsigned char __user *image; /* W: binary image */
- size_t length; /* W: size of image in bytes */
- unsigned long driver_data; /* W: driver-specific data */
-};
-
-#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int)
-#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info)
-#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status)
-#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image)
-
-/*****************************************************************************
- * *
- * Digital Audio (PCM) interface - /dev/snd/pcm?? *
- * *
- *****************************************************************************/
-
-#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 10)
-
-typedef unsigned long snd_pcm_uframes_t;
-typedef signed long snd_pcm_sframes_t;
-
-enum {
- SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */
- SNDRV_PCM_CLASS_MULTI, /* multichannel device */
- SNDRV_PCM_CLASS_MODEM, /* software modem class */
- SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */
- /* Don't forget to change the following: */
- SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER,
-};
-
-enum {
- SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */
- SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */
- /* Don't forget to change the following: */
- SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX,
-};
-
-enum {
- SNDRV_PCM_STREAM_PLAYBACK = 0,
- SNDRV_PCM_STREAM_CAPTURE,
- SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE,
-};
-
-typedef int __bitwise snd_pcm_access_t;
-#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0) /* interleaved mmap */
-#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1) /* noninterleaved mmap */
-#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2) /* complex mmap */
-#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3) /* readi/writei */
-#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4) /* readn/writen */
-#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED
-
-typedef int __bitwise snd_pcm_format_t;
-#define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0)
-#define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1)
-#define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2)
-#define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3)
-#define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4)
-#define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5)
-#define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6) /* low three bytes */
-#define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7) /* low three bytes */
-#define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8) /* low three bytes */
-#define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9) /* low three bytes */
-#define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10)
-#define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11)
-#define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12)
-#define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13)
-#define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
-#define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */
-#define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
-#define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */
-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */
-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */
-#define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20)
-#define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21)
-#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22)
-#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23)
-#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24)
-#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31)
-#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40) /* in three bytes */
-#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */
-#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */
-#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_U18_3BE
-
-#ifdef SNDRV_LITTLE_ENDIAN
-#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
-#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE
-#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE
-#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE
-#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE
-#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE
-#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
-#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
-#endif
-#ifdef SNDRV_BIG_ENDIAN
-#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
-#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE
-#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE
-#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE
-#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE
-#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE
-#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
-#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
-#endif
-
-typedef int __bitwise snd_pcm_subformat_t;
-#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0)
-#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD
-
-#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
-#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */
-#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */
-#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */
-#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */
-#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */
-#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */
-#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */
-#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */
-#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */
-#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */
-#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */
-#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */
-#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */
-#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */
-
-typedef int __bitwise snd_pcm_state_t;
-#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */
-#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */
-#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2) /* stream is ready to start */
-#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3) /* stream is running */
-#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4) /* stream reached an xrun */
-#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5) /* stream is draining */
-#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6) /* stream is paused */
-#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7) /* hardware is suspended */
-#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8) /* hardware is disconnected */
-#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
-
-enum {
- SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
- SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000,
- SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000,
-};
-
-union snd_pcm_sync_id {
- unsigned char id[16];
- unsigned short id16[8];
- unsigned int id32[4];
-};
-
-struct snd_pcm_info {
- unsigned int device; /* RO/WR (control): device number */
- unsigned int subdevice; /* RO/WR (control): subdevice number */
- int stream; /* RO/WR (control): stream direction */
- int card; /* R: card number */
- unsigned char id[64]; /* ID (user selectable) */
- unsigned char name[80]; /* name of this device */
- unsigned char subname[32]; /* subdevice name */
- int dev_class; /* SNDRV_PCM_CLASS_* */
- int dev_subclass; /* SNDRV_PCM_SUBCLASS_* */
- unsigned int subdevices_count;
- unsigned int subdevices_avail;
- union snd_pcm_sync_id sync; /* hardware synchronization ID */
- unsigned char reserved[64]; /* reserved for future... */
-};
-
-typedef int snd_pcm_hw_param_t;
-#define SNDRV_PCM_HW_PARAM_ACCESS 0 /* Access type */
-#define SNDRV_PCM_HW_PARAM_FORMAT 1 /* Format */
-#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2 /* Subformat */
-#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS
-#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT
-
-#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 /* Bits per sample */
-#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9 /* Bits per frame */
-#define SNDRV_PCM_HW_PARAM_CHANNELS 10 /* Channels */
-#define SNDRV_PCM_HW_PARAM_RATE 11 /* Approx rate */
-#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12 /* Approx distance between
- * interrupts in us
- */
-#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13 /* Approx frames between
- * interrupts
- */
-#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14 /* Approx bytes between
- * interrupts
- */
-#define SNDRV_PCM_HW_PARAM_PERIODS 15 /* Approx interrupts per
- * buffer
- */
-#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16 /* Approx duration of buffer
- * in us
- */
-#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17 /* Size of buffer in frames */
-#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18 /* Size of buffer in bytes */
-#define SNDRV_PCM_HW_PARAM_TICK_TIME 19 /* Approx tick duration in us */
-#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS
-#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME
-
-#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */
-
-struct snd_interval {
- unsigned int min, max;
- unsigned int openmin:1,
- openmax:1,
- integer:1,
- empty:1;
-};
-
-#define SNDRV_MASK_MAX 256
-
-struct snd_mask {
- __u32 bits[(SNDRV_MASK_MAX+31)/32];
-};
-
-struct snd_pcm_hw_params {
- unsigned int flags;
- struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK -
- SNDRV_PCM_HW_PARAM_FIRST_MASK + 1];
- struct snd_mask mres[5]; /* reserved masks */
- struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL -
- SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
- struct snd_interval ires[9]; /* reserved intervals */
- unsigned int rmask; /* W: requested masks */
- unsigned int cmask; /* R: changed masks */
- unsigned int info; /* R: Info flags for returned setup */
- unsigned int msbits; /* R: used most significant bits */
- unsigned int rate_num; /* R: rate numerator */
- unsigned int rate_den; /* R: rate denominator */
- snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */
- unsigned char reserved[64]; /* reserved for future */
-};
-
-enum {
- SNDRV_PCM_TSTAMP_NONE = 0,
- SNDRV_PCM_TSTAMP_ENABLE,
- SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE,
-};
-
-struct snd_pcm_sw_params {
- int tstamp_mode; /* timestamp mode */
- unsigned int period_step;
- unsigned int sleep_min; /* min ticks to sleep */
- snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */
- snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */
- snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */
- snd_pcm_uframes_t stop_threshold; /* min avail frames for automatic stop */
- snd_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */
- snd_pcm_uframes_t silence_size; /* silence block size */
- snd_pcm_uframes_t boundary; /* pointers wrap point */
- unsigned char reserved[64]; /* reserved for future */
-};
-
-struct snd_pcm_channel_info {
- unsigned int channel;
- __kernel_off_t offset; /* mmap offset */
- unsigned int first; /* offset to first sample in bits */
- unsigned int step; /* samples distance in bits */
-};
-
-struct snd_pcm_status {
- snd_pcm_state_t state; /* stream state */
- struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */
- struct timespec tstamp; /* reference timestamp */
- snd_pcm_uframes_t appl_ptr; /* appl ptr */
- snd_pcm_uframes_t hw_ptr; /* hw ptr */
- snd_pcm_sframes_t delay; /* current delay in frames */
- snd_pcm_uframes_t avail; /* number of frames available */
- snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */
- snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */
- snd_pcm_state_t suspended_state; /* suspended stream state */
- unsigned char reserved[60]; /* must be filled with zero */
-};
-
-struct snd_pcm_mmap_status {
- snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */
- int pad1; /* Needed for 64 bit alignment */
- snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
- struct timespec tstamp; /* Timestamp */
- snd_pcm_state_t suspended_state; /* RO: suspended stream state */
-};
-
-struct snd_pcm_mmap_control {
- snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */
- snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */
-};
-
-#define SNDRV_PCM_SYNC_PTR_HWSYNC (1<<0) /* execute hwsync */
-#define SNDRV_PCM_SYNC_PTR_APPL (1<<1) /* get appl_ptr from driver (r/w op) */
-#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1<<2) /* get avail_min from driver */
-
-struct snd_pcm_sync_ptr {
- unsigned int flags;
- union {
- struct snd_pcm_mmap_status status;
- unsigned char reserved[64];
- } s;
- union {
- struct snd_pcm_mmap_control control;
- unsigned char reserved[64];
- } c;
-};
-
-struct snd_xferi {
- snd_pcm_sframes_t result;
- void __user *buf;
- snd_pcm_uframes_t frames;
-};
-
-struct snd_xfern {
- snd_pcm_sframes_t result;
- void __user * __user *bufs;
- snd_pcm_uframes_t frames;
-};
-
-enum {
- SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */
- SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */
- SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,
-};
-
-#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int)
-#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info)
-#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int)
-#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int)
-#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params)
-#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params)
-#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12)
-#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params)
-#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status)
-#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t)
-#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22)
-#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr)
-#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info)
-#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40)
-#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41)
-#define SNDRV_PCM_IOCTL_START _IO('A', 0x42)
-#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43)
-#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44)
-#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int)
-#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t)
-#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47)
-#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48)
-#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t)
-#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi)
-#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi)
-#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern)
-#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)
-#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)
-#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61)
-
-/*****************************************************************************
- * *
- * MIDI v1.0 interface *
- * *
- *****************************************************************************/
-
-/*
- * Raw MIDI section - /dev/snd/midi??
- */
-
-#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0)
-
-enum {
- SNDRV_RAWMIDI_STREAM_OUTPUT = 0,
- SNDRV_RAWMIDI_STREAM_INPUT,
- SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT,
-};
-
-#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001
-#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002
-#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004
-
-struct snd_rawmidi_info {
- unsigned int device; /* RO/WR (control): device number */
- unsigned int subdevice; /* RO/WR (control): subdevice number */
- int stream; /* WR: stream */
- int card; /* R: card number */
- unsigned int flags; /* SNDRV_RAWMIDI_INFO_XXXX */
- unsigned char id[64]; /* ID (user selectable) */
- unsigned char name[80]; /* name of device */
- unsigned char subname[32]; /* name of active or selected subdevice */
- unsigned int subdevices_count;
- unsigned int subdevices_avail;
- unsigned char reserved[64]; /* reserved for future use */
-};
-
-struct snd_rawmidi_params {
- int stream;
- size_t buffer_size; /* queue size in bytes */
- size_t avail_min; /* minimum avail bytes for wakeup */
- unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */
- unsigned char reserved[16]; /* reserved for future use */
-};
-
-struct snd_rawmidi_status {
- int stream;
- struct timespec tstamp; /* Timestamp */
- size_t avail; /* available bytes */
- size_t xruns; /* count of overruns since last status (in bytes) */
- unsigned char reserved[16]; /* reserved for future use */
-};
-
-#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int)
-#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info)
-#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params)
-#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status)
-#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int)
-#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int)
-
-/*
- * Timer section - /dev/snd/timer
- */
-
-#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)
-
-enum {
- SNDRV_TIMER_CLASS_NONE = -1,
- SNDRV_TIMER_CLASS_SLAVE = 0,
- SNDRV_TIMER_CLASS_GLOBAL,
- SNDRV_TIMER_CLASS_CARD,
- SNDRV_TIMER_CLASS_PCM,
- SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM,
-};
-
-/* slave timer classes */
-enum {
- SNDRV_TIMER_SCLASS_NONE = 0,
- SNDRV_TIMER_SCLASS_APPLICATION,
- SNDRV_TIMER_SCLASS_SEQUENCER, /* alias */
- SNDRV_TIMER_SCLASS_OSS_SEQUENCER, /* alias */
- SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER,
-};
-
-/* global timers (device member) */
-#define SNDRV_TIMER_GLOBAL_SYSTEM 0
-#define SNDRV_TIMER_GLOBAL_RTC 1
-#define SNDRV_TIMER_GLOBAL_HPET 2
-#define SNDRV_TIMER_GLOBAL_HRTIMER 3
-
-/* info flags */
-#define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */
-
-struct snd_timer_id {
- int dev_class;
- int dev_sclass;
- int card;
- int device;
- int subdevice;
-};
-
-struct snd_timer_ginfo {
- struct snd_timer_id tid; /* requested timer ID */
- unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */
- int card; /* card number */
- unsigned char id[64]; /* timer identification */
- unsigned char name[80]; /* timer name */
- unsigned long reserved0; /* reserved for future use */
- unsigned long resolution; /* average period resolution in ns */
- unsigned long resolution_min; /* minimal period resolution in ns */
- unsigned long resolution_max; /* maximal period resolution in ns */
- unsigned int clients; /* active timer clients */
- unsigned char reserved[32];
-};
-
-struct snd_timer_gparams {
- struct snd_timer_id tid; /* requested timer ID */
- unsigned long period_num; /* requested precise period duration (in seconds) - numerator */
- unsigned long period_den; /* requested precise period duration (in seconds) - denominator */
- unsigned char reserved[32];
-};
-
-struct snd_timer_gstatus {
- struct snd_timer_id tid; /* requested timer ID */
- unsigned long resolution; /* current period resolution in ns */
- unsigned long resolution_num; /* precise current period resolution (in seconds) - numerator */
- unsigned long resolution_den; /* precise current period resolution (in seconds) - denominator */
- unsigned char reserved[32];
-};
-
-struct snd_timer_select {
- struct snd_timer_id id; /* bind to timer ID */
- unsigned char reserved[32]; /* reserved */
-};
-
-struct snd_timer_info {
- unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */
- int card; /* card number */
- unsigned char id[64]; /* timer identificator */
- unsigned char name[80]; /* timer name */
- unsigned long reserved0; /* reserved for future use */
- unsigned long resolution; /* average period resolution in ns */
- unsigned char reserved[64]; /* reserved */
-};
-
-#define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */
-#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1) /* exclusive use, precise start/stop/pause/continue */
-#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2) /* write early event to the poll queue */
-
-struct snd_timer_params {
- unsigned int flags; /* flags - SNDRV_MIXER_PSFLG_* */
- unsigned int ticks; /* requested resolution in ticks */
- unsigned int queue_size; /* total size of queue (32-1024) */
- unsigned int reserved0; /* reserved, was: failure locations */
- unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */
- unsigned char reserved[60]; /* reserved */
-};
-
-struct snd_timer_status {
- struct timespec tstamp; /* Timestamp - last update */
- unsigned int resolution; /* current period resolution in ns */
- unsigned int lost; /* counter of master tick lost */
- unsigned int overrun; /* count of read queue overruns */
- unsigned int queue; /* used queue size */
- unsigned char reserved[64]; /* reserved */
-};
-
-#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int)
-#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id)
-#define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int)
-#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo)
-#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams)
-#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus)
-#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select)
-#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info)
-#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params)
-#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status)
-/* The following four ioctls are changed since 1.0.9 due to confliction */
-#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0)
-#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1)
-#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2)
-#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3)
-
-struct snd_timer_read {
- unsigned int resolution;
- unsigned int ticks;
-};
-
-enum {
- SNDRV_TIMER_EVENT_RESOLUTION = 0, /* val = resolution in ns */
- SNDRV_TIMER_EVENT_TICK, /* val = ticks */
- SNDRV_TIMER_EVENT_START, /* val = resolution in ns */
- SNDRV_TIMER_EVENT_STOP, /* val = 0 */
- SNDRV_TIMER_EVENT_CONTINUE, /* val = resolution in ns */
- SNDRV_TIMER_EVENT_PAUSE, /* val = 0 */
- SNDRV_TIMER_EVENT_EARLY, /* val = 0, early event */
- SNDRV_TIMER_EVENT_SUSPEND, /* val = 0 */
- SNDRV_TIMER_EVENT_RESUME, /* val = resolution in ns */
- /* master timer events for slave timer instances */
- SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10,
- SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10,
- SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10,
- SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10,
- SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10,
- SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10,
-};
-
-struct snd_timer_tread {
- int event;
- struct timespec tstamp;
- unsigned int val;
-};
-
-/****************************************************************************
- * *
- * Section for driver control interface - /dev/snd/control? *
- * *
- ****************************************************************************/
-
-#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6)
-
-struct snd_ctl_card_info {
- int card; /* card number */
- int pad; /* reserved for future (was type) */
- unsigned char id[16]; /* ID of card (user selectable) */
- unsigned char driver[16]; /* Driver name */
- unsigned char name[32]; /* Short name of soundcard */
- unsigned char longname[80]; /* name + info text about soundcard */
- unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */
- unsigned char mixername[80]; /* visual mixer identification */
- unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */
-};
-
-typedef int __bitwise snd_ctl_elem_type_t;
-#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0) /* invalid */
-#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1) /* boolean type */
-#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2) /* integer type */
-#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3) /* enumerated type */
-#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4) /* byte array */
-#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */
-#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */
-#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64
-
-typedef int __bitwise snd_ctl_elem_iface_t;
-#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0) /* global control */
-#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1) /* hardware dependent device */
-#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2) /* virtual mixer device */
-#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3) /* PCM device */
-#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4) /* RawMidi device */
-#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5) /* timer device */
-#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6) /* sequencer client */
-#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER
-
-#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0)
-#define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1)
-#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE)
-#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */
-#define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1<<3) /* when was control changed */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4) /* TLV read is possible */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5) /* TLV write is possible */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE)
-#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1<<6) /* TLV command is possible */
-#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */
-#define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */
-#define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */
-#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */
-#define SNDRV_CTL_ELEM_ACCESS_USER (1<<29) /* user space element */
-/* bits 30 and 31 are obsoleted (for indirect access) */
-
-/* for further details see the ACPI and PCI power management specification */
-#define SNDRV_CTL_POWER_D0 0x0000 /* full On */
-#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */
-#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */
-#define SNDRV_CTL_POWER_D3 0x0300 /* Off */
-#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */
-#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */
-
-struct snd_ctl_elem_id {
- unsigned int numid; /* numeric identifier, zero = invalid */
- snd_ctl_elem_iface_t iface; /* interface identifier */
- unsigned int device; /* device/client number */
- unsigned int subdevice; /* subdevice (substream) number */
- unsigned char name[44]; /* ASCII name of item */
- unsigned int index; /* index of item */
-};
-
-struct snd_ctl_elem_list {
- unsigned int offset; /* W: first element ID to get */
- unsigned int space; /* W: count of element IDs to get */
- unsigned int used; /* R: count of element IDs set */
- unsigned int count; /* R: count of all elements */
- struct snd_ctl_elem_id __user *pids; /* R: IDs */
- unsigned char reserved[50];
-};
-
-struct snd_ctl_elem_info {
- struct snd_ctl_elem_id id; /* W: element ID */
- snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */
- unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */
- unsigned int count; /* count of values */
- __kernel_pid_t owner; /* owner's PID of this control */
- union {
- struct {
- long min; /* R: minimum value */
- long max; /* R: maximum value */
- long step; /* R: step (0 variable) */
- } integer;
- struct {
- long long min; /* R: minimum value */
- long long max; /* R: maximum value */
- long long step; /* R: step (0 variable) */
- } integer64;
- struct {
- unsigned int items; /* R: number of items */
- unsigned int item; /* W: item number */
- char name[64]; /* R: value name */
- } enumerated;
- unsigned char reserved[128];
- } value;
- union {
- unsigned short d[4]; /* dimensions */
- unsigned short *d_ptr; /* indirect - obsoleted */
- } dimen;
- unsigned char reserved[64-4*sizeof(unsigned short)];
-};
-
-struct snd_ctl_elem_value {
- struct snd_ctl_elem_id id; /* W: element ID */
- unsigned int indirect: 1; /* W: indirect access - obsoleted */
- union {
- union {
- long value[128];
- long *value_ptr; /* obsoleted */
- } integer;
- union {
- long long value[64];
- long long *value_ptr; /* obsoleted */
- } integer64;
- union {
- unsigned int item[128];
- unsigned int *item_ptr; /* obsoleted */
- } enumerated;
- union {
- unsigned char data[512];
- unsigned char *data_ptr; /* obsoleted */
- } bytes;
- struct snd_aes_iec958 iec958;
- } value; /* RO */
- struct timespec tstamp;
- unsigned char reserved[128-sizeof(struct timespec)];
-};
-
-struct snd_ctl_tlv {
- unsigned int numid; /* control element numeric identification */
- unsigned int length; /* in bytes aligned to 4 */
- unsigned int tlv[0]; /* first TLV */
-};
-
-#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int)
-#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info)
-#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list)
-#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info)
-#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value)
-#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value)
-#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id)
-#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id)
-#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int)
-#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info)
-#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info)
-#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id)
-#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv)
-#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv)
-#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv)
-#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int)
-#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info)
-#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int)
-#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info)
-#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int)
-#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int)
-#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info)
-#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int)
-#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int)
-#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int)
-
-/*
- * Read interface.
- */
-
-enum sndrv_ctl_event_type {
- SNDRV_CTL_EVENT_ELEM = 0,
- SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM,
-};
-
-#define SNDRV_CTL_EVENT_MASK_VALUE (1<<0) /* element value was changed */
-#define SNDRV_CTL_EVENT_MASK_INFO (1<<1) /* element info was changed */
-#define SNDRV_CTL_EVENT_MASK_ADD (1<<2) /* element was added */
-#define SNDRV_CTL_EVENT_MASK_TLV (1<<3) /* element TLV tree was changed */
-#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) /* element was removed */
-
-struct snd_ctl_event {
- int type; /* event type - SNDRV_CTL_EVENT_* */
- union {
- struct {
- unsigned int mask;
- struct snd_ctl_elem_id id;
- } elem;
- unsigned char data8[60];
- } data;
-};
-
-/*
- * Control names
- */
-
-#define SNDRV_CTL_NAME_NONE ""
-#define SNDRV_CTL_NAME_PLAYBACK "Playback "
-#define SNDRV_CTL_NAME_CAPTURE "Capture "
-
-#define SNDRV_CTL_NAME_IEC958_NONE ""
-#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch"
-#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume"
-#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default"
-#define SNDRV_CTL_NAME_IEC958_MASK "Mask"
-#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask"
-#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask"
-#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream"
-#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what
-
-#endif /* __SOUND_ASOUND_H */
diff --git a/original/sound/compress_offload.h b/original/sound/compress_offload.h
deleted file mode 100644
index 3b2dace..0000000
--- a/original/sound/compress_offload.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * compress_offload.h - compress offload header definations
- *
- * Copyright (C) 2011 Intel Corporation
- * Authors: Vinod Koul <vinod.koul@linux.intel.com>
- * Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * 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; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- */
-#ifndef __COMPRESS_OFFLOAD_H
-#define __COMPRESS_OFFLOAD_H
-
-#include <linux/types.h>
-#include <sound/asound.h>
-#include <sound/compress_params.h>
-
-
-#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 1)
-/**
- * struct snd_compressed_buffer: compressed buffer
- * @fragment_size: size of buffer fragment in bytes
- * @fragments: number of such fragments
- */
-struct snd_compressed_buffer {
- __u32 fragment_size;
- __u32 fragments;
-};
-
-/**
- * struct snd_compr_params: compressed stream params
- * @buffer: buffer description
- * @codec: codec parameters
- * @no_wake_mode: dont wake on fragment elapsed
- */
-struct snd_compr_params {
- struct snd_compressed_buffer buffer;
- struct snd_codec codec;
- __u8 no_wake_mode;
-};
-
-/**
- * struct snd_compr_tstamp: timestamp descriptor
- * @byte_offset: Byte offset in ring buffer to DSP
- * @copied_total: Total number of bytes copied from/to ring buffer to/by DSP
- * @pcm_frames: Frames decoded or encoded by DSP. This field will evolve by
- * large steps and should only be used to monitor encoding/decoding
- * progress. It shall not be used for timing estimates.
- * @pcm_io_frames: Frames rendered or received by DSP into a mixer or an audio
- * output/input. This field should be used for A/V sync or time estimates.
- * @sampling_rate: sampling rate of audio
- */
-struct snd_compr_tstamp {
- __u32 byte_offset;
- __u32 copied_total;
- snd_pcm_uframes_t pcm_frames;
- snd_pcm_uframes_t pcm_io_frames;
- __u32 sampling_rate;
- uint64_t timestamp;
-};
-
-/**
- * struct snd_compr_avail: avail descriptor
- * @avail: Number of bytes available in ring buffer for writing/reading
- * @tstamp: timestamp infomation
- */
-struct snd_compr_avail {
- __u64 avail;
- struct snd_compr_tstamp tstamp;
-};
-
-enum snd_compr_direction {
- SND_COMPRESS_PLAYBACK = 0,
- SND_COMPRESS_CAPTURE
-};
-
-/**
- * struct snd_compr_caps: caps descriptor
- * @codecs: pointer to array of codecs
- * @direction: direction supported. Of type snd_compr_direction
- * @min_fragment_size: minimum fragment supported by DSP
- * @max_fragment_size: maximum fragment supported by DSP
- * @min_fragments: min fragments supported by DSP
- * @max_fragments: max fragments supported by DSP
- * @num_codecs: number of codecs supported
- * @reserved: reserved field
- */
-struct snd_compr_caps {
- __u32 num_codecs;
- __u32 direction;
- __u32 min_fragment_size;
- __u32 max_fragment_size;
- __u32 min_fragments;
- __u32 max_fragments;
- __u32 codecs[MAX_NUM_CODECS];
- __u32 reserved[11];
-};
-
-/**
- * struct snd_compr_codec_caps: query capability of codec
- * @codec: codec for which capability is queried
- * @num_descriptors: number of codec descriptors
- * @descriptor: array of codec capability descriptor
- */
-struct snd_compr_codec_caps {
- __u32 codec;
- __u32 num_descriptors;
- struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS];
-};
-
-/**
- * @SNDRV_COMPRESS_ENCODER_PADDING: no of samples appended by the encoder at the
- * end of the track
- * @SNDRV_COMPRESS_ENCODER_DELAY: no of samples inserted by the encoder at the
- * beginning of the track
- */
-enum {
- SNDRV_COMPRESS_ENCODER_PADDING = 1,
- SNDRV_COMPRESS_ENCODER_DELAY = 2,
-};
-
-/**
- * struct snd_compr_metadata: compressed stream metadata
- * @key: key id
- * @value: key value
- */
-struct snd_compr_metadata {
- __u32 key;
- __u32 value[8];
-};
-
-/**
- * struct snd_compr_audio_info: compressed input audio information
- * @frame_size: legth of the encoded frame with valid data
- * @reserved: reserved for furture use
- */
-struct snd_compr_audio_info {
- uint32_t frame_size;
- uint32_t reserved[15];
-};
-
-/**
- * compress path ioctl definitions
- * SNDRV_COMPRESS_GET_CAPS: Query capability of DSP
- * SNDRV_COMPRESS_GET_CODEC_CAPS: Query capability of a codec
- * SNDRV_COMPRESS_SET_PARAMS: Set codec and stream parameters
- * Note: only codec params can be changed runtime and stream params cant be
- * SNDRV_COMPRESS_GET_PARAMS: Query codec params
- * SNDRV_COMPRESS_TSTAMP: get the current timestamp value
- * SNDRV_COMPRESS_AVAIL: get the current buffer avail value.
- * This also queries the tstamp properties
- * SNDRV_COMPRESS_PAUSE: Pause the running stream
- * SNDRV_COMPRESS_RESUME: resume a paused stream
- * SNDRV_COMPRESS_START: Start a stream
- * SNDRV_COMPRESS_STOP: stop a running stream, discarding ring buffer content
- * and the buffers currently with DSP
- * SNDRV_COMPRESS_DRAIN: Play till end of buffers and stop after that
- * SNDRV_COMPRESS_IOCTL_VERSION: Query the API version
- */
-#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
-#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
-#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11,\
- struct snd_compr_codec_caps)
-#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
-#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
-#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14,\
- struct snd_compr_metadata)
-#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15,\
- struct snd_compr_metadata)
-#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
-#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
-#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
-#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
-#define SNDRV_COMPRESS_START _IO('C', 0x32)
-#define SNDRV_COMPRESS_STOP _IO('C', 0x33)
-#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
-#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35)
-#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36)
-/*
- * TODO
- * 1. add mmap support
- *
- */
-#define SND_COMPR_TRIGGER_DRAIN 7 /*FIXME move this to pcm.h */
-#define SND_COMPR_TRIGGER_NEXT_TRACK 8
-#define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9
-#endif
diff --git a/original/sound/compress_params.h b/original/sound/compress_params.h
deleted file mode 100644
index 866c0f9..0000000
--- a/original/sound/compress_params.h
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * compress_params.h - codec types and parameters for compressed data
- * streaming interface
- *
- * Copyright (C) 2011 Intel Corporation
- * Authors: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- * Vinod Koul <vinod.koul@linux.intel.com>
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * 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; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * The definitions in this file are derived from the OpenMAX AL version 1.1
- * and OpenMAX IL v 1.1.2 header files which contain the copyright notice below.
- *
- * Copyright (c) 2007-2010 The Khronos Group Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and/or associated documentation files (the
- * "Materials "), to deal in the Materials without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Materials, and to
- * permit persons to whom the Materials are furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
- *
- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
- *
- */
-#ifndef __SND_COMPRESS_PARAMS_H
-#define __SND_COMPRESS_PARAMS_H
-
-/* AUDIO CODECS SUPPORTED */
-#define MAX_NUM_CODECS 32
-#define MAX_NUM_CODEC_DESCRIPTORS 32
-#define MAX_NUM_BITRATES 32
-
-/* compressed TX */
-#define MAX_NUM_FRAMES_PER_BUFFER 1
-#define COMPRESSED_META_DATA_MODE 0x10
-#define META_DATA_LEN_BYTES 36
-#define Q6_AC3_DECODER 0x00010BF6
-#define Q6_EAC3_DECODER 0x00010C3C
-#define Q6_DTS 0x00010D88
-#define Q6_DTS_LBR 0x00010DBB
-
-/* Codecs are listed linearly to allow for extensibility */
-#define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
-#define SND_AUDIOCODEC_MP3 ((__u32) 0x00000002)
-#define SND_AUDIOCODEC_AMR ((__u32) 0x00000003)
-#define SND_AUDIOCODEC_AMRWB ((__u32) 0x00000004)
-#define SND_AUDIOCODEC_AMRWBPLUS ((__u32) 0x00000005)
-#define SND_AUDIOCODEC_AAC ((__u32) 0x00000006)
-#define SND_AUDIOCODEC_WMA ((__u32) 0x00000007)
-#define SND_AUDIOCODEC_REAL ((__u32) 0x00000008)
-#define SND_AUDIOCODEC_VORBIS ((__u32) 0x00000009)
-#define SND_AUDIOCODEC_FLAC ((__u32) 0x0000000A)
-#define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
-#define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
-#define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
-#define SND_AUDIOCODEC_AC3 ((__u32) 0x0000000E)
-#define SND_AUDIOCODEC_DTS ((__u32) 0x0000000F)
-#define SND_AUDIOCODEC_AC3_PASS_THROUGH ((__u32) 0x00000010)
-#define SND_AUDIOCODEC_WMA_PRO ((__u32) 0x00000011)
-#define SND_AUDIOCODEC_DTS_PASS_THROUGH ((__u32) 0x00000012)
-#define SND_AUDIOCODEC_DTS_LBR ((__u32) 0x00000013)
-#define SND_AUDIOCODEC_DTS_TRANSCODE_LOOPBACK ((__u32) 0x00000014)
-#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_DTS_TRANSCODE_LOOPBACK
-
-/*
- * Profile and modes are listed with bit masks. This allows for a
- * more compact representation of fields that will not evolve
- * (in contrast to the list of codecs)
- */
-
-#define SND_AUDIOPROFILE_PCM ((__u32) 0x00000001)
-
-/* MP3 modes are only useful for encoders */
-#define SND_AUDIOCHANMODE_MP3_MONO ((__u32) 0x00000001)
-#define SND_AUDIOCHANMODE_MP3_STEREO ((__u32) 0x00000002)
-#define SND_AUDIOCHANMODE_MP3_JOINTSTEREO ((__u32) 0x00000004)
-#define SND_AUDIOCHANMODE_MP3_DUAL ((__u32) 0x00000008)
-
-#define SND_AUDIOPROFILE_AMR ((__u32) 0x00000001)
-
-/* AMR modes are only useful for encoders */
-#define SND_AUDIOMODE_AMR_DTX_OFF ((__u32) 0x00000001)
-#define SND_AUDIOMODE_AMR_VAD1 ((__u32) 0x00000002)
-#define SND_AUDIOMODE_AMR_VAD2 ((__u32) 0x00000004)
-
-#define SND_AUDIOSTREAMFORMAT_UNDEFINED ((__u32) 0x00000000)
-#define SND_AUDIOSTREAMFORMAT_CONFORMANCE ((__u32) 0x00000001)
-#define SND_AUDIOSTREAMFORMAT_IF1 ((__u32) 0x00000002)
-#define SND_AUDIOSTREAMFORMAT_IF2 ((__u32) 0x00000004)
-#define SND_AUDIOSTREAMFORMAT_FSF ((__u32) 0x00000008)
-#define SND_AUDIOSTREAMFORMAT_RTPPAYLOAD ((__u32) 0x00000010)
-#define SND_AUDIOSTREAMFORMAT_ITU ((__u32) 0x00000020)
-
-#define SND_AUDIOPROFILE_AMRWB ((__u32) 0x00000001)
-
-/* AMRWB modes are only useful for encoders */
-#define SND_AUDIOMODE_AMRWB_DTX_OFF ((__u32) 0x00000001)
-#define SND_AUDIOMODE_AMRWB_VAD1 ((__u32) 0x00000002)
-#define SND_AUDIOMODE_AMRWB_VAD2 ((__u32) 0x00000004)
-
-#define SND_AUDIOPROFILE_AMRWBPLUS ((__u32) 0x00000001)
-
-#define SND_AUDIOPROFILE_AAC ((__u32) 0x00000001)
-
-/* AAC modes are required for encoders and decoders */
-#define SND_AUDIOMODE_AAC_MAIN ((__u32) 0x00000001)
-#define SND_AUDIOMODE_AAC_LC ((__u32) 0x00000002)
-#define SND_AUDIOMODE_AAC_SSR ((__u32) 0x00000004)
-#define SND_AUDIOMODE_AAC_LTP ((__u32) 0x00000008)
-#define SND_AUDIOMODE_AAC_HE ((__u32) 0x00000010)
-#define SND_AUDIOMODE_AAC_SCALABLE ((__u32) 0x00000020)
-#define SND_AUDIOMODE_AAC_ERLC ((__u32) 0x00000040)
-#define SND_AUDIOMODE_AAC_LD ((__u32) 0x00000080)
-#define SND_AUDIOMODE_AAC_HE_PS ((__u32) 0x00000100)
-#define SND_AUDIOMODE_AAC_HE_MPS ((__u32) 0x00000200)
-
-/* AAC formats are required for encoders and decoders */
-#define SND_AUDIOSTREAMFORMAT_MP2ADTS ((__u32) 0x00000001)
-#define SND_AUDIOSTREAMFORMAT_MP4ADTS ((__u32) 0x00000002)
-#define SND_AUDIOSTREAMFORMAT_MP4LOAS ((__u32) 0x00000004)
-#define SND_AUDIOSTREAMFORMAT_MP4LATM ((__u32) 0x00000008)
-#define SND_AUDIOSTREAMFORMAT_ADIF ((__u32) 0x00000010)
-#define SND_AUDIOSTREAMFORMAT_MP4FF ((__u32) 0x00000020)
-#define SND_AUDIOSTREAMFORMAT_RAW ((__u32) 0x00000040)
-
-#define SND_AUDIOPROFILE_WMA7 ((__u32) 0x00000001)
-#define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
-#define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
-#define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
-
-#define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
-#define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
-#define SND_AUDIOMODE_WMA_LEVEL3 ((__u32) 0x00000004)
-#define SND_AUDIOMODE_WMA_LEVEL4 ((__u32) 0x00000008)
-#define SND_AUDIOMODE_WMAPRO_LEVELM0 ((__u32) 0x00000010)
-#define SND_AUDIOMODE_WMAPRO_LEVELM1 ((__u32) 0x00000020)
-#define SND_AUDIOMODE_WMAPRO_LEVELM2 ((__u32) 0x00000040)
-#define SND_AUDIOMODE_WMAPRO_LEVELM3 ((__u32) 0x00000080)
-
-#define SND_AUDIOSTREAMFORMAT_WMA_ASF ((__u32) 0x00000001)
-/*
- * Some implementations strip the ASF header and only send ASF packets
- * to the DSP
- */
-#define SND_AUDIOSTREAMFORMAT_WMA_NOASF_HDR ((__u32) 0x00000002)
-
-#define SND_AUDIOPROFILE_REALAUDIO ((__u32) 0x00000001)
-
-#define SND_AUDIOMODE_REALAUDIO_G2 ((__u32) 0x00000001)
-#define SND_AUDIOMODE_REALAUDIO_8 ((__u32) 0x00000002)
-#define SND_AUDIOMODE_REALAUDIO_10 ((__u32) 0x00000004)
-#define SND_AUDIOMODE_REALAUDIO_SURROUND ((__u32) 0x00000008)
-
-#define SND_AUDIOPROFILE_VORBIS ((__u32) 0x00000001)
-
-#define SND_AUDIOMODE_VORBIS ((__u32) 0x00000001)
-
-#define SND_AUDIOPROFILE_FLAC ((__u32) 0x00000001)
-
-/*
- * Define quality levels for FLAC encoders, from LEVEL0 (fast)
- * to LEVEL8 (best)
- */
-#define SND_AUDIOMODE_FLAC_LEVEL0 ((__u32) 0x00000001)
-#define SND_AUDIOMODE_FLAC_LEVEL1 ((__u32) 0x00000002)
-#define SND_AUDIOMODE_FLAC_LEVEL2 ((__u32) 0x00000004)
-#define SND_AUDIOMODE_FLAC_LEVEL3 ((__u32) 0x00000008)
-#define SND_AUDIOMODE_FLAC_LEVEL4 ((__u32) 0x00000010)
-#define SND_AUDIOMODE_FLAC_LEVEL5 ((__u32) 0x00000020)
-#define SND_AUDIOMODE_FLAC_LEVEL6 ((__u32) 0x00000040)
-#define SND_AUDIOMODE_FLAC_LEVEL7 ((__u32) 0x00000080)
-#define SND_AUDIOMODE_FLAC_LEVEL8 ((__u32) 0x00000100)
-
-#define SND_AUDIOSTREAMFORMAT_FLAC ((__u32) 0x00000001)
-#define SND_AUDIOSTREAMFORMAT_FLAC_OGG ((__u32) 0x00000002)
-
-/* IEC61937 payloads without CUVP and preambles */
-#define SND_AUDIOPROFILE_IEC61937 ((__u32) 0x00000001)
-/* IEC61937 with S/PDIF preambles+CUVP bits in 32-bit containers */
-#define SND_AUDIOPROFILE_IEC61937_SPDIF ((__u32) 0x00000002)
-
-/*
- * IEC modes are mandatory for decoders. Format autodetection
- * will only happen on the DSP side with mode 0. The PCM mode should
- * not be used, the PCM codec should be used instead.
- */
-#define SND_AUDIOMODE_IEC_REF_STREAM_HEADER ((__u32) 0x00000000)
-#define SND_AUDIOMODE_IEC_LPCM ((__u32) 0x00000001)
-#define SND_AUDIOMODE_IEC_AC3 ((__u32) 0x00000002)
-#define SND_AUDIOMODE_IEC_MPEG1 ((__u32) 0x00000004)
-#define SND_AUDIOMODE_IEC_MP3 ((__u32) 0x00000008)
-#define SND_AUDIOMODE_IEC_MPEG2 ((__u32) 0x00000010)
-#define SND_AUDIOMODE_IEC_AACLC ((__u32) 0x00000020)
-#define SND_AUDIOMODE_IEC_DTS ((__u32) 0x00000040)
-#define SND_AUDIOMODE_IEC_ATRAC ((__u32) 0x00000080)
-#define SND_AUDIOMODE_IEC_SACD ((__u32) 0x00000100)
-#define SND_AUDIOMODE_IEC_EAC3 ((__u32) 0x00000200)
-#define SND_AUDIOMODE_IEC_DTS_HD ((__u32) 0x00000400)
-#define SND_AUDIOMODE_IEC_MLP ((__u32) 0x00000800)
-#define SND_AUDIOMODE_IEC_DST ((__u32) 0x00001000)
-#define SND_AUDIOMODE_IEC_WMAPRO ((__u32) 0x00002000)
-#define SND_AUDIOMODE_IEC_REF_CXT ((__u32) 0x00004000)
-#define SND_AUDIOMODE_IEC_HE_AAC ((__u32) 0x00008000)
-#define SND_AUDIOMODE_IEC_HE_AAC2 ((__u32) 0x00010000)
-#define SND_AUDIOMODE_IEC_MPEG_SURROUND ((__u32) 0x00020000)
-
-#define SND_AUDIOPROFILE_G723_1 ((__u32) 0x00000001)
-
-#define SND_AUDIOMODE_G723_1_ANNEX_A ((__u32) 0x00000001)
-#define SND_AUDIOMODE_G723_1_ANNEX_B ((__u32) 0x00000002)
-#define SND_AUDIOMODE_G723_1_ANNEX_C ((__u32) 0x00000004)
-
-#define SND_AUDIOPROFILE_G729 ((__u32) 0x00000001)
-
-#define SND_AUDIOMODE_G729_ANNEX_A ((__u32) 0x00000001)
-#define SND_AUDIOMODE_G729_ANNEX_B ((__u32) 0x00000002)
-
-/* <FIXME: multichannel encoders aren't supported for now. Would need
- an additional definition of channel arrangement> */
-
-/* VBR/CBR definitions */
-#define SND_RATECONTROLMODE_CONSTANTBITRATE ((__u32) 0x00000001)
-#define SND_RATECONTROLMODE_VARIABLEBITRATE ((__u32) 0x00000002)
-
-/* Encoder options */
-
-struct snd_enc_wma {
- __u32 super_block_align; /* WMA Type-specific data */
- __u32 bits_per_sample;
- __u32 channelmask;
- __u32 encodeopt;
- __u32 encodeopt1;
- __u32 encodeopt2;
-};
-
-
-/**
- * struct snd_enc_vorbis
- * @quality: Sets encoding quality to n, between -1 (low) and 10 (high).
- * In the default mode of operation, the quality level is 3.
- * Normal quality range is 0 - 10.
- * @managed: Boolean. Set bitrate management mode. This turns off the
- * normal VBR encoding, but allows hard or soft bitrate constraints to be
- * enforced by the encoder. This mode can be slower, and may also be
- * lower quality. It is primarily useful for streaming.
- * @max_bit_rate: Enabled only if managed is TRUE
- * @min_bit_rate: Enabled only if managed is TRUE
- * @downmix: Boolean. Downmix input from stereo to mono (has no effect on
- * non-stereo streams). Useful for lower-bitrate encoding.
- *
- * These options were extracted from the OpenMAX IL spec and Gstreamer vorbisenc
- * properties
- *
- * For best quality users should specify VBR mode and set quality levels.
- */
-
-struct snd_enc_vorbis {
- __s32 quality;
- __u32 managed;
- __u32 max_bit_rate;
- __u32 min_bit_rate;
- __u32 downmix;
-};
-
-
-/**
- * struct snd_enc_real
- * @quant_bits: number of coupling quantization bits in the stream
- * @start_region: coupling start region in the stream
- * @num_regions: number of regions value
- *
- * These options were extracted from the OpenMAX IL spec
- */
-
-struct snd_enc_real {
- __u32 quant_bits;
- __u32 start_region;
- __u32 num_regions;
-};
-
-/**
- * struct snd_enc_flac
- * @num: serial number, valid only for OGG formats
- * needs to be set by application
- * @gain: Add replay gain tags
- *
- * These options were extracted from the FLAC online documentation
- * at http://flac.sourceforge.net/documentation_tools_flac.html
- *
- * To make the API simpler, it is assumed that the user will select quality
- * profiles. Additional options that affect encoding quality and speed can
- * be added at a later stage if needed.
- *
- * By default the Subset format is used by encoders.
- *
- * TAGS such as pictures, etc, cannot be handled by an offloaded encoder and are
- * not supported in this API.
- */
-
-struct snd_enc_flac {
- __u32 num;
- __u32 gain;
-};
-
-struct snd_enc_generic {
- __u32 bw; /* encoder bandwidth */
- __s32 reserved[15];
-};
-
-union snd_codec_options {
- struct snd_enc_wma wma;
- struct snd_enc_vorbis vorbis;
- struct snd_enc_real real;
- struct snd_enc_flac flac;
- struct snd_enc_generic generic;
-};
-
-/** struct snd_codec_desc - description of codec capabilities
- * @max_ch: Maximum number of audio channels
- * @sample_rates: Sampling rates in Hz, use SNDRV_PCM_RATE_xxx for this
- * @bit_rate: Indexed array containing supported bit rates
- * @num_bitrates: Number of valid values in bit_rate array
- * @rate_control: value is specified by SND_RATECONTROLMODE defines.
- * @profiles: Supported profiles. See SND_AUDIOPROFILE defines.
- * @modes: Supported modes. See SND_AUDIOMODE defines
- * @formats: Supported formats. See SND_AUDIOSTREAMFORMAT defines
- * @min_buffer: Minimum buffer size handled by codec implementation
- * @reserved: reserved for future use
- *
- * This structure provides a scalar value for profiles, modes and stream
- * format fields.
- * If an implementation supports multiple combinations, they will be listed as
- * codecs with different descriptors, for example there would be 2 descriptors
- * for AAC-RAW and AAC-ADTS.
- * This entails some redundancy but makes it easier to avoid invalid
- * configurations.
- *
- */
-
-struct snd_codec_desc {
- __u32 max_ch;
- __u32 sample_rates;
- __u32 bit_rate[MAX_NUM_BITRATES];
- __u32 num_bitrates;
- __u32 rate_control;
- __u32 profiles;
- __u32 modes;
- __u32 formats;
- __u32 min_buffer;
- __u32 reserved[15];
-};
-
-/** struct snd_codec
- * @id: Identifies the supported audio encoder/decoder.
- * See SND_AUDIOCODEC macros.
- * @ch_in: Number of input audio channels
- * @ch_out: Number of output channels. In case of contradiction between
- * this field and the channelMode field, the channelMode field
- * overrides.
- * @sample_rate: Audio sample rate of input data
- * @bit_rate: Bitrate of encoded data. May be ignored by decoders
- * @rate_control: Encoding rate control. See SND_RATECONTROLMODE defines.
- * Encoders may rely on profiles for quality levels.
- * May be ignored by decoders.
- * @profile: Mandatory for encoders, can be mandatory for specific
- * decoders as well. See SND_AUDIOPROFILE defines.
- * @level: Supported level (Only used by WMA at the moment)
- * @ch_mode: Channel mode for encoder. See SND_AUDIOCHANMODE defines
- * @format: Format of encoded bistream. Mandatory when defined.
- * See SND_AUDIOSTREAMFORMAT defines.
- * @align: Block alignment in bytes of an audio sample.
- * Only required for PCM or IEC formats.
- * @options: encoder-specific settings
- * @reserved: reserved for future use
- */
-
-struct snd_codec {
- __u32 id;
- __u32 ch_in;
- __u32 ch_out;
- __u32 sample_rate;
- __u32 bit_rate;
- __u32 rate_control;
- __u32 profile;
- __u32 level;
- __u32 ch_mode;
- __u32 format;
- __u32 align;
- union snd_codec_options options;
- __u32 reserved[3];
-};
-
-#endif
diff --git a/original/sound/tlv.h b/original/sound/tlv.h
deleted file mode 100644
index 7067e2d..0000000
--- a/original/sound/tlv.h
+++ /dev/null
@@ -1,76 +0,0 @@
-#ifndef __SOUND_TLV_H
-#define __SOUND_TLV_H
-
-/*
- * Advanced Linux Sound Architecture - ALSA - Driver
- * Copyright (c) 2006 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/*
- * TLV structure is right behind the struct snd_ctl_tlv:
- * unsigned int type - see SNDRV_CTL_TLVT_*
- * unsigned int length
- * .... data aligned to sizeof(unsigned int), use
- * block_length = (length + (sizeof(unsigned int) - 1)) &
- * ~(sizeof(unsigned int) - 1)) ....
- */
-
-#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */
-#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */
-#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */
-#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */
-#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */
-#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */
-
-#define TLV_DB_SCALE_MASK 0xffff
-#define TLV_DB_SCALE_MUTE 0x10000
-#define TLV_DB_SCALE_ITEM(min, step, mute) \
- SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \
- (min), ((step) & TLV_DB_SCALE_MASK) | ((mute) ? TLV_DB_SCALE_MUTE : 0)
-#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \
- unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) }
-
-/* dB scale specified with min/max values instead of step */
-#define TLV_DB_MINMAX_ITEM(min_dB, max_dB) \
- SNDRV_CTL_TLVT_DB_MINMAX, 2 * sizeof(unsigned int), \
- (min_dB), (max_dB)
-#define TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \
- SNDRV_CTL_TLVT_DB_MINMAX_MUTE, 2 * sizeof(unsigned int), \
- (min_dB), (max_dB)
-#define DECLARE_TLV_DB_MINMAX(name, min_dB, max_dB) \
- unsigned int name[] = { TLV_DB_MINMAX_ITEM(min_dB, max_dB) }
-#define DECLARE_TLV_DB_MINMAX_MUTE(name, min_dB, max_dB) \
- unsigned int name[] = { TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) }
-
-/* linear volume between min_dB and max_dB (.01dB unit) */
-#define TLV_DB_LINEAR_ITEM(min_dB, max_dB) \
- SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \
- (min_dB), (max_dB)
-#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB) \
- unsigned int name[] = { TLV_DB_LINEAR_ITEM(min_dB, max_dB) }
-
-/* dB range container */
-/* Each item is: <min> <max> <TLV> */
-/* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR */
-#define TLV_DB_RANGE_HEAD(num) \
- SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int)
-
-#define TLV_DB_GAIN_MUTE -9999999
-
-#endif /* __SOUND_TLV_H */
diff --git a/original/video/dsscomp.h b/original/video/dsscomp.h
deleted file mode 100644
index 4fdcb0c..0000000
--- a/original/video/dsscomp.h
+++ /dev/null
@@ -1,644 +0,0 @@
-#ifndef _LINUX_DSSCOMP_H
-#define _LINUX_DSSCOMP_H
-
-#ifdef __KERNEL__
-#include <video/omapdss.h>
-#else
-
-/* exporting enumerations from arch/arm/plat-omap/include/plat/display.h */
-enum omap_plane {
- OMAP_DSS_GFX = 0,
- OMAP_DSS_VIDEO1 = 1,
- OMAP_DSS_VIDEO2 = 2,
- OMAP_DSS_VIDEO3 = 3,
- OMAP_DSS_WB = 4,
-};
-
-enum omap_channel {
- OMAP_DSS_CHANNEL_LCD = 0,
- OMAP_DSS_CHANNEL_DIGIT = 1,
- OMAP_DSS_CHANNEL_LCD2 = 2,
-};
-
-enum omap_color_mode {
- OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */
- OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */
- OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */
- OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */
-
- /* also referred to as RGB 12-BPP, 16-bit container */
- OMAP_DSS_COLOR_RGB12U = 1 << 4, /* xRGB12-4444 */
- OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16-4444 */
- OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16-565 */
-
- /* also referred to as RGB 24-BPP, 32-bit container */
- OMAP_DSS_COLOR_RGB24U = 1 << 7, /* xRGB24-8888 */
- OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24-888 */
- OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */
- OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */
- OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32-8888 */
- OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32-8888 */
-
- /* also referred to as RGBx 32 in TRM */
- OMAP_DSS_COLOR_RGBX24 = 1 << 13, /* RGBx32-8888 */
- OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32-8888 */
- OMAP_DSS_COLOR_NV12 = 1 << 14, /* NV12 format: YUV 4:2:0 */
-
- /* also referred to as RGBA12-4444 in TRM */
- OMAP_DSS_COLOR_RGBA16 = 1 << 15, /* RGBA16-4444 */
-
- OMAP_DSS_COLOR_RGBX12 = 1 << 16, /* RGBx16-4444 */
- OMAP_DSS_COLOR_RGBX16 = 1 << 16, /* RGBx16-4444 */
- OMAP_DSS_COLOR_ARGB16_1555 = 1 << 17, /* ARGB16-1555 */
-
- /* also referred to as xRGB16-555 in TRM */
- OMAP_DSS_COLOR_XRGB15 = 1 << 18, /* xRGB16-1555 */
- OMAP_DSS_COLOR_XRGB16_1555 = 1 << 18, /* xRGB16-1555 */
-};
-
-enum omap_dss_trans_key_type {
- OMAP_DSS_COLOR_KEY_GFX_DST = 0,
- OMAP_DSS_COLOR_KEY_VID_SRC = 1,
-};
-
-enum omap_dss_display_state {
- OMAP_DSS_DISPLAY_DISABLED = 0,
- OMAP_DSS_DISPLAY_ACTIVE,
- OMAP_DSS_DISPLAY_SUSPENDED,
- OMAP_DSS_DISPLAY_TRANSITION,
-};
-
-struct omap_video_timings {
- /* Unit: pixels */
- __u16 x_res;
- /* Unit: pixels */
- __u16 y_res;
- /* Unit: KHz */
- __u32 pixel_clock;
- /* Unit: pixel clocks */
- __u16 hsw; /* Horizontal synchronization pulse width */
- /* Unit: pixel clocks */
- __u16 hfp; /* Horizontal front porch */
- /* Unit: pixel clocks */
- __u16 hbp; /* Horizontal back porch */
- /* Unit: line clocks */
- __u16 vsw; /* Vertical synchronization pulse width */
- /* Unit: line clocks */
- __u16 vfp; /* Vertical front porch */
- /* Unit: line clocks */
- __u16 vbp; /* Vertical back porch */
-};
-
-/* YUV to RGB color conversion info */
-struct omap_dss_cconv_coefs {
- __s16 ry, rcr, rcb;
- __s16 gy, gcr, gcb;
- __s16 by, bcr, bcb;
-
- /* Y is 16..235, UV is 16..240 if not fullrange. Otherwise 0..255 */
- __u16 full_range;
-} __attribute__ ((aligned(4)));
-
-struct omap_dss_cpr_coefs {
- __s16 rr, rg, rb;
- __s16 gr, gg, gb;
- __s16 br, bg, bb;
-};
-
-#endif
-
-/* copy of fb_videomode */
-struct dsscomp_videomode {
- const char *name; /* optional */
- __u32 refresh; /* optional */
- __u32 xres;
- __u32 yres;
- __u32 pixclock;
- __u32 left_margin;
- __u32 right_margin;
- __u32 upper_margin;
- __u32 lower_margin;
- __u32 hsync_len;
- __u32 vsync_len;
- __u32 sync;
- __u32 vmode;
- __u32 flag;
-};
-
-/*
- * Stereoscopic Panel types
- * row, column, overunder, sidebyside options
- * are with respect to native scan order
- */
-enum s3d_disp_type {
- S3D_DISP_NONE = 0,
- S3D_DISP_FRAME_SEQ,
- S3D_DISP_ROW_IL,
- S3D_DISP_COL_IL,
- S3D_DISP_PIX_IL,
- S3D_DISP_CHECKB,
- S3D_DISP_OVERUNDER,
- S3D_DISP_SIDEBYSIDE,
-};
-
-/* Subsampling direction is based on native panel scan order.*/
-enum s3d_disp_sub_sampling {
- S3D_DISP_SUB_SAMPLE_NONE = 0,
- S3D_DISP_SUB_SAMPLE_V,
- S3D_DISP_SUB_SAMPLE_H,
-};
-
-/*
- * Indicates if display expects left view first followed by right or viceversa
- * For row interlaved displays, defines first row view
- * For column interleaved displays, defines first column view
- * For checkerboard, defines first pixel view
- * For overunder, defines top view
- * For sidebyside, defines west view
- */
-enum s3d_disp_order {
- S3D_DISP_ORDER_L = 0,
- S3D_DISP_ORDER_R = 1,
-};
-
-/*
- * Indicates current view
- * Used mainly for displays that need to trigger a sync signal
- */
-enum s3d_disp_view {
- S3D_DISP_VIEW_L = 0,
- S3D_DISP_VIEW_R,
-};
-
-struct s3d_disp_info {
- enum s3d_disp_type type;
- enum s3d_disp_sub_sampling sub_samp;
- enum s3d_disp_order order;
- /*
- * Gap between left and right views
- * For over/under units are lines
- * For sidebyside units are pixels
- * For other types ignored
- */
- unsigned int gap;
-};
-
-enum omap_dss_ilace_mode {
- OMAP_DSS_ILACE = (1 << 0), /* interlaced vs. progressive */
- OMAP_DSS_ILACE_SEQ = (1 << 1), /* sequential vs interleaved */
- OMAP_DSS_ILACE_SWAP = (1 << 2), /* swap fields, e.g. TB=>BT */
-
- OMAP_DSS_ILACE_NONE = 0,
- OMAP_DSS_ILACE_IL_TB = OMAP_DSS_ILACE,
- OMAP_DSS_ILACE_IL_BT = OMAP_DSS_ILACE | OMAP_DSS_ILACE_SWAP,
- OMAP_DSS_ILACE_SEQ_TB = OMAP_DSS_ILACE_IL_TB | OMAP_DSS_ILACE_SEQ,
- OMAP_DSS_ILACE_SEQ_BT = OMAP_DSS_ILACE_IL_BT | OMAP_DSS_ILACE_SEQ,
-};
-
-/* YUV VC1 range mapping info */
-struct dss2_vc1_range_map_info {
- __u8 enable; /* bool */
-
- __u8 range_y; /* 0..7 */
- __u8 range_uv; /* 0..7 */
-} __attribute__ ((aligned(4)));
-
-/* standard rectangle */
-struct dss2_rect_t {
- __s32 x; /* left */
- __s32 y; /* top */
- __u32 w; /* width */
- __u32 h; /* height */
-} __attribute__ ((aligned(4)));
-
-/* decimation constraints */
-struct dss2_decim {
- __u8 min_x;
- __u8 max_x; /* 0 is same as 255 */
- __u8 min_y;
- __u8 max_y; /* 0 is same as 255 */
-} __attribute__ ((aligned(4)));
-
-/*
- * A somewhat more user friendly interface to the DSS2. This is a
- * direct interface to the DSS2 overlay and overlay_manager modules.
- * User-space APIs are provided for HW-specific control of DSS in
- * contrast with V4L2/FB that are more generic, but in this process
- * omit HW-specific features.
- *
- * For now managers are specified by display index as opposed to manager
- * type, so that display0 is always the default display (e.g. HDMI on
- * panda, and LCD blaze.) For now you would need to query the displays
- * or use sysfs to find a specific display.
- *
- * Userspace operations are as follows:
- *
- * 1) check if DSS supports an overlay configuration, use DSSCIOC_CHECK_OVL
- * ioctl with the manager, overlay, and setup-mode information filled out.
- * All fields should be filled out as it may influence whether DSS can
- * display/render the overlay.
- *
- * If proper address information is not available, it may be possible to
- * use a type-of-address enumeration instead for luma/rgb and chroma (if
- * applicable) frames.
- *
- * Do this for each overlay before attempting to configure DSS.
- *
- * 2) configure DSS pipelines for display/manager using DSSCOMP_SETUP_MANAGER
- * ioctl. You can delay applying the settings until an dss2_manager_apply()
- * is called for the internal composition object, if the APPLY bit of setup mode
- * is not set. However the CAPTURE/DISPLAY bits of the setup mode settings will
- * determine if at this time a capture will take place (in case of capture
- * only mode). You may also set up additional pipelines with
- * dss2_overlay_setup() before this.
- *
- * 3) On OMAP4/5 you can use the DSS WB pipeline to copy (and convert) a buffer
- * using DSS. Use the DSSCIOC_WB_COPY ioctl for this. This is a blocking
- * call, and it may possibly fail if an ongoing WB capture mode has been
- * scheduled (which is outside of the current scope of the DSS2 interface.)
- *
- * There is also a one-shot configuration API (DSSCIOC_SETUP_DISPC). This
- * allows you to set-up all overlays on all managers in one call. This call
- * performs additional functionality:
- *
- * - it maps userspace 1D buffers into TILER 1D for the duration of the display
- * - it disables all overlays that were specified before, but are no longer
- * specified
- *
- */
-
-/*
- * DSS2 overlay information. This structure contains all information
- * needed to set up the overlay for a particular buffer to be displayed
- * at a particular orientation.
- *
- * The following information is deemed to be set globally, so it is not
- * included:
- * - whether to enable zorder (always enabled)
- * - whether to replicate/truncate color fields (it is decided per the
- * whole manager/overlay settings, and is enabled unless overlay is
- * directed to WB.)
- *
- * There is also no support for CLUT formats
- *
- * Requirements:
- *
- * 1) 0 <= crop.x <= crop.x + crop.w <= width
- * 2) 0 <= crop.y <= crop.y + crop.h <= height
- * 3) win.x <= win.x + win.w and win.w >= 0
- * 4) win.y <= win.y + win.h and win.h >= 0
- *
- * 5) color_mode is supported by overlay
- * 6) requested scaling is supported by overlay and functional clocks
- *
- * Notes:
- *
- * 1) Any portions of X:[pos_x, pos_x + out_width] and
- * Y:[pos_y, pos_y + out_height] outside of the screen
- * X:[0, screen.width], Y:[0, screen.height] will be cropped
- * automatically without changing the scaling ratio.
- *
- * 2) Crop region will be adjusted to the pixel granularity:
- * (2-by-1) for YUV422, (2-by-2) for YUV420. This will
- * not modify the output region. Crop region is for the
- * original (unrotated) buffer, so it does not change with
- * rotation.
- *
- * 3) Rotation will not modify the output region, specifically
- * its height and width. Also the coordinate system of the
- * display is always (0,0) = top left.
- *
- * 4) cconv and vc1 only needs to be filled for YUV color modes.
- *
- * 5) vc1.range_y and vc1.range_uv only needs to be filled if
- * vc1.enable is true.
- */
-struct dss2_ovl_cfg {
- __u16 width; /* buffer width */
- __u16 height; /* buffer height */
- __u32 stride; /* buffer stride */
-
- enum omap_color_mode color_mode;
- __u8 pre_mult_alpha; /* bool */
- __u8 global_alpha; /* 0..255 */
- __u8 rotation; /* 0..3 (*90 degrees clockwise) */
- __u8 mirror; /* left-to-right: mirroring is applied after rotation */
-
- enum omap_dss_ilace_mode ilace; /* interlace mode */
-
- struct dss2_rect_t win; /* output window - on display */
- struct dss2_rect_t crop; /* crop window - in source buffer */
-
- struct dss2_decim decim; /* predecimation limits */
-
- struct omap_dss_cconv_coefs cconv;
- struct dss2_vc1_range_map_info vc1;
-
- __u8 ix; /* ovl index same as sysfs/overlay# */
- __u8 zorder; /* 0..3 */
- __u8 enabled; /* bool */
- __u8 zonly; /* only set zorder and enabled bit */
- __u8 mgr_ix; /* mgr index */
-} __attribute__ ((aligned(4)));
-
-enum omapdss_buffer_type {
- OMAP_DSS_BUFTYPE_SDMA,
- OMAP_DSS_BUFTYPE_TILER_8BIT,
- OMAP_DSS_BUFTYPE_TILER_16BIT,
- OMAP_DSS_BUFTYPE_TILER_32BIT,
- OMAP_DSS_BUFTYPE_TILER_PAGE,
-};
-
-enum omapdss_buffer_addressing_type {
- OMAP_DSS_BUFADDR_DIRECT, /* using direct addresses */
- OMAP_DSS_BUFADDR_BYTYPE, /* using buffer types */
- OMAP_DSS_BUFADDR_ION, /* using ion handle(s) */
- OMAP_DSS_BUFADDR_GRALLOC, /* using gralloc handle */
- OMAP_DSS_BUFADDR_OVL_IX, /* using a prior overlay */
- OMAP_DSS_BUFADDR_LAYER_IX, /* using a Post2 layer */
- OMAP_DSS_BUFADDR_FB, /* using framebuffer memory */
-};
-
-struct dss2_ovl_info {
- struct dss2_ovl_cfg cfg;
-
- enum omapdss_buffer_addressing_type addressing;
-
- union {
- /* user-space interfaces */
- struct {
- void *address; /* main buffer address */
- void *uv_address; /* uv buffer */
- };
-
- /*
- * For DSSCIOC_CHECK_OVL we allow specifying just the
- * type of each buffer. This is used if we need to
- * check whether DSS will be able to display a buffer
- * if using a particular memory type before spending
- * time to map/copy the buffer into that type of
- * memory.
- */
- struct {
- enum omapdss_buffer_type ba_type;
- enum omapdss_buffer_type uv_type;
- };
-
- /* kernel-space interfaces */
-
- /*
- * for fbmem, highest 4-bits of address is fb index,
- * rest of the bits are the offset
- */
- struct {
- __u32 ba; /* base address or index */
- __u32 uv; /* uv address */
- };
- };
-};
-
-/*
- * DSS2 manager information.
- *
- * The following information is deemed to be set globally, so it is not
- * included:
- * gamma correction
- * whether to enable zorder (always enabled)
- * whether to replicate/truncate color fields (it is decided per the
- * whole manager/overlay settings, and is enabled unless overlay is
- * directed to WB.)
- * Notes:
- *
- * 1) trans_key_type and trans_enabled only need to be filled if
- * trans_enabled is true, and alpha_blending is false.
- */
-struct dss2_mgr_info {
- __u32 ix; /* display index same as sysfs/display# */
-
- __u32 default_color;
-
- enum omap_dss_trans_key_type trans_key_type;
- __u32 trans_key;
- struct omap_dss_cpr_coefs cpr_coefs;
-
- __u8 trans_enabled; /* bool */
-
- __u8 interlaced; /* bool */
- __u8 alpha_blending; /* bool - overrides trans_enabled */
- __u8 cpr_enabled; /* bool */
- __u8 swap_rb; /* bool - swap red and blue */
-} __attribute__ ((aligned(4)));
-
-/*
- * ioctl: DSSCIOC_SETUP_MGR, struct dsscomp_setup_mgr_data
- *
- * 1. sets manager of each ovl in composition to the display
- * 2. calls set_dss_ovl_info() for each ovl to set up the
- * overlay staging structures (this is a wrapper around ovl->set_info())
- * 3. calls set_dss_mgr_info() for mgr to set up the manager
- * staging structures (this is a wrapper around mgr->set_info())
- * 4. if update is true:
- * calls manager->apply()
- * calls driver->update() in a non-blocking fashion
- * this will program the DSS synchronously
- *
- * Notes:
- *
- * 1) x, y, w, h only needs to be set if update is true.
- *
- * All non-specified pipelines that currently are on the same display
- * will remain the same as on the previous frame. You may want to
- * disable unused pipelines to avoid surprises.
- *
- * If get_sync_obj is false, it returns 0 on success, <0 error value
- * on failure.
- *
- * If get_sync_obj is true, it returns fd on success, or a negative value
- * on failure. You can use the fd to wait on (using DSSCIOC_WAIT ioctl()).
- *
- * Note: frames do not get eclipsed when the display turns off. Queue a
- * blank frame to eclipse old frames. Blank frames get eclipsed when
- * programmed into DSS.
- *
- * (A blank frame is queued to the display automatically in Android before
- * the display is turned off.)
- *
- * All overlays to be used on the frame must be listed. There is no way
- * to add another overlay to a defined frame.
- */
-enum dsscomp_setup_mode {
- DSSCOMP_SETUP_MODE_APPLY = (1 << 0), /* applies changes to cache */
- DSSCOMP_SETUP_MODE_DISPLAY = (1 << 1), /* calls display update */
- DSSCOMP_SETUP_MODE_CAPTURE = (1 << 2), /* capture to WB */
-
- /* just apply changes for next vsync/update */
- DSSCOMP_SETUP_APPLY = DSSCOMP_SETUP_MODE_APPLY,
- /* trigger an update (wait for vsync) */
- DSSCOMP_SETUP_DISPLAY =
- DSSCOMP_SETUP_MODE_APPLY | DSSCOMP_SETUP_MODE_DISPLAY,
- /* capture to WB - WB must be configured */
- DSSCOMP_SETUP_CAPTURE =
- DSSCOMP_SETUP_MODE_APPLY | DSSCOMP_SETUP_MODE_CAPTURE,
- /* display and capture to WB - WB must be configured */
- DSSCOMP_SETUP_DISPLAY_CAPTURE =
- DSSCOMP_SETUP_DISPLAY | DSSCOMP_SETUP_CAPTURE,
-};
-
-struct dsscomp_setup_mgr_data {
- __u32 sync_id; /* synchronization ID - for debugging */
-
- struct dss2_rect_t win; /* update region, set w/h to 0 for fullscreen */
- enum dsscomp_setup_mode mode;
- __u16 num_ovls; /* # of overlays used in the composition */
- __u16 get_sync_obj; /* ioctl should return a sync object */
-
- struct dss2_mgr_info mgr;
- struct dss2_ovl_info ovls[0]; /* up to 5 overlays to set up */
-};
-
-/*
- * ioctl: DSSCIOC_CHECK_OVL, struct dsscomp_check_ovl_data
- *
- * DISPLAY and/or CAPTURE bits must be filled for the mode field
- * correctly to be able to decide correctly if DSS can properly
- * render the overlay.
- *
- * ovl.ix is ignored.
- *
- * Returns a positive bitmask regarding which overlay of DSS can
- * render the overlay as it is configured for the display/display's
- * manager. NOTE: that overlays that are assigned to other displays
- * may be returned. If there is an invalid configuration (negative
- * sizes, etc.), a negative error value is returned.
- *
- * ovl->decim's min values will be modified to the smallest decimation that
- * DSS can use to support the overlay configuration.
- *
- * Assumptions:
- * - zorder will be distinct from other pipelines on that manager
- * - overlay will be enabled and routed to the display specified
- */
-struct dsscomp_check_ovl_data {
- enum dsscomp_setup_mode mode;
- struct dss2_mgr_info mgr;
- struct dss2_ovl_info ovl;
-};
-
-/*
- * This structure is used to set up the entire DISPC (all managers),
- * and is analogous to dsscomp_setup_mgr_data.
- *
- * Additional features:
- * - all overlays that were specified in a prior use of this
- * structure, and are no longer specified, will be disabled.
- * - 1D buffers under 4M will be mapped into TILER1D.
- *
- * Limitations:
- * - only DISPLAY mode is supported (DISPLAY and APPLY bits will
- * automatically be set)
- * - getting a sync object is not supported.
- */
-struct dsscomp_setup_dispc_data {
- __u32 sync_id; /* synchronization ID - for debugging */
-
- enum dsscomp_setup_mode mode;
- __u16 num_ovls; /* # of overlays used in the composition */
- __u16 num_mgrs; /* # of managers used in the composition */
- __u16 get_sync_obj; /* ioctl should return a sync object */
-
- struct dss2_mgr_info mgrs[3];
- struct dss2_ovl_info ovls[5]; /* up to 5 overlays to set up */
-};
-
-/*
- * ioctl: DSSCIOC_WB_COPY, struct dsscomp_wb_copy_data
- *,
- * Requirements:
- * wb.ix must be OMAP_DSS_WB.
- *
- * Returns 0 on success (copy is completed), non-0 on failure.
- */
-struct dsscomp_wb_copy_data {
- struct dss2_ovl_info ovl, wb;
-};
-
-/*
- * ioctl: DSSCIOC_QUERY_DISPLAY, struct dsscomp_display_info
- *
- * Gets informations about the display. Fill in ix and modedb_len before
- * calling ioctl, and rest of the fields are filled in by ioctl. Up to
- * modedb_len timings are retrieved in the order of display preference.
- *
- * Returns: 0 on success, non-0 error value on failure.
- */
-struct dsscomp_display_info {
- __u32 ix; /* display index (sysfs/display#) */
- __u32 overlays_available; /* bitmask of available overlays */
- __u32 overlays_owned; /* bitmask of owned overlays */
- enum omap_channel channel;
- enum omap_dss_display_state state;
- __u8 enabled; /* bool: resume-state if suspended */
- struct omap_video_timings timings;
- struct s3d_disp_info s3d_info; /* any S3D specific information */
- struct dss2_mgr_info mgr; /* manager information */
- __u16 width_in_mm; /* screen dimensions */
- __u16 height_in_mm;
-
- __u32 modedb_len; /* number of video timings */
- struct dsscomp_videomode modedb[]; /* display supported timings */
-};
-
-/*
- * ioctl: DSSCIOC_SETUP_DISPLAY, struct dsscomp_setup_display_data
- *
- * Gets informations about the display. Fill in ix before calling
- * ioctl, and rest of the fields are filled in by ioctl.
- *
- * Returns: 0 on success, non-0 error value on failure.
- */
-struct dsscomp_setup_display_data {
- __u32 ix; /* display index (sysfs/display#) */
- struct dsscomp_videomode mode; /* video timings */
-};
-
-/*
- * ioctl: DSSCIOC_WAIT, struct dsscomp_wait_data
- *
- * Use this ioctl to wait for one of the following events:
- *
- * A) the moment a composition is programmed into DSS
- * B) the moment a composition is first displayed (or captured)
- * C) the moment when a composition is no longer queued or displayed on a
- * display (it is released). (A composition is assumed to be superceded
- * when another composition has been programmed into DSS, even if that
- * subsequent composition does not update/specify all overlays used by
- * the prior composition; moreover, even if it uses the same buffers.)
- *
- * Set timeout to desired timeout value in microseconds.
- *
- * This ioctl must be used on the sync object returned by the
- * DSSCIOC_SETUP_MGR or DSSCIOC_SETUP_DISPC ioctls.
- *
- * Returns: >=0 on success, <0 error value on failure (e.g. -ETIME).
- */
-enum dsscomp_wait_phase {
- DSSCOMP_WAIT_PROGRAMMED = 1,
- DSSCOMP_WAIT_DISPLAYED,
- DSSCOMP_WAIT_RELEASED,
-};
-
-struct dsscomp_wait_data {
- __u32 timeout_us; /* timeout in microseconds */
- enum dsscomp_wait_phase phase; /* phase to wait for */
-};
-
-/* IOCTLS */
-#define DSSCIOC_SETUP_MGR _IOW('O', 128, struct dsscomp_setup_mgr_data)
-#define DSSCIOC_CHECK_OVL _IOWR('O', 129, struct dsscomp_check_ovl_data)
-#define DSSCIOC_WB_COPY _IOW('O', 130, struct dsscomp_wb_copy_data)
-#define DSSCIOC_QUERY_DISPLAY _IOWR('O', 131, struct dsscomp_display_info)
-#define DSSCIOC_WAIT _IOW('O', 132, struct dsscomp_wait_data)
-
-#define DSSCIOC_SETUP_DISPC _IOW('O', 133, struct dsscomp_setup_dispc_data)
-#define DSSCIOC_SETUP_DISPLAY _IOW('O', 134, struct dsscomp_setup_display_data)
-#endif